Class v1beta.OsConfigServiceClient (2.2.2)

OS Config API

The OS Config service is a server-side component that you can use to manage package installations and patch jobs for virtual machine instances. v1beta

Package

@google-cloud/os-config

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of OsConfigServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new OsConfigServiceClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

osConfigServiceStub

osConfigServiceStub?: Promise<{
        [name: string]: Function;
    }>;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

cancelPatchJob(request, options)

cancelPatchJob(request?: protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchJob,
        protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | undefined,
        {} | undefined
    ]>;

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the patch in the form `projects/* /patchJobs/*`
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callCancelPatchJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.cancelPatchJob(request);
    console.log(response);
  }

  callCancelPatchJob();

cancelPatchJob(request, options, callback)

cancelPatchJob(request: protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelPatchJob(request, callback)

cancelPatchJob(request: protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.ICancelPatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createGuestPolicy(request, options)

createGuestPolicy(request?: protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IGuestPolicy,
        protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | undefined,
        {} | undefined
    ]>;

Create an OS Config guest policy.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the parent using one of the following forms:
   *  `projects/{project_number}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The logical name of the guest policy in the project
   *  with the following restrictions:
   *  * Must contain only lowercase letters, numbers, and hyphens.
   *  * Must start with a letter.
   *  * Must be between 1-63 characters.
   *  * Must end with a number or a letter.
   *  * Must be unique within the project.
   */
  // const guestPolicyId = 'abc123'
  /**
   *  Required. The GuestPolicy to create.
   */
  // const guestPolicy = {}

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callCreateGuestPolicy() {
    // Construct request
    const request = {
      parent,
      guestPolicyId,
      guestPolicy,
    };

    // Run request
    const response = await osconfigClient.createGuestPolicy(request);
    console.log(response);
  }

  callCreateGuestPolicy();

createGuestPolicy(request, options, callback)

createGuestPolicy(request: protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGuestPolicy(request, callback)

createGuestPolicy(request: protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.ICreateGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createPatchDeployment(request, options)

createPatchDeployment(request?: protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment,
        (protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Create an OS Config patch deployment.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment, (protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project to apply this patch deployment to in the form `projects/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. A name for the patch deployment in the project. When creating a name
   *  the following rules apply:
   *  * Must contain only lowercase letters, numbers, and hyphens.
   *  * Must start with a letter.
   *  * Must be between 1-63 characters.
   *  * Must end with a number or a letter.
   *  * Must be unique within the project.
   */
  // const patchDeploymentId = 'abc123'
  /**
   *  Required. The patch deployment to create.
   */
  // const patchDeployment = {}

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callCreatePatchDeployment() {
    // Construct request
    const request = {
      parent,
      patchDeploymentId,
      patchDeployment,
    };

    // Run request
    const response = await osconfigClient.createPatchDeployment(request);
    console.log(response);
  }

  callCreatePatchDeployment();

createPatchDeployment(request, options, callback)

createPatchDeployment(request: protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createPatchDeployment(request, callback)

createPatchDeployment(request: protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.ICreatePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGuestPolicy(request, options)

deleteGuestPolicy(request?: protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | undefined,
        {} | undefined
    ]>;

Delete an OS Config guest policy.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the guest policy  using one of the following forms:
   *  `projects/{project_number}/guestPolicies/{guest_policy_id}`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callDeleteGuestPolicy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.deleteGuestPolicy(request);
    console.log(response);
  }

  callDeleteGuestPolicy();

deleteGuestPolicy(request, options, callback)

deleteGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGuestPolicy(request, callback)

deleteGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeleteGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePatchDeployment(request, options)

deletePatchDeployment(request?: protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Delete an OS Config patch deployment.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the patch deployment in the form
   *  `projects/* /patchDeployments/*`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callDeletePatchDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.deletePatchDeployment(request);
    console.log(response);
  }

  callDeletePatchDeployment();

deletePatchDeployment(request, options, callback)

deletePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePatchDeployment(request, callback)

deletePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.osconfig.v1beta.IDeletePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

executePatchJob(request, options)

executePatchJob(request?: protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchJob,
        protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | undefined,
        {} | undefined
    ]>;

Patch VM instances by creating and running a patch job.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project in which to run this patch in the form `projects/*`
   */
  // const parent = 'abc123'
  /**
   *  Description of the patch job. Length of the description is limited
   *  to 1024 characters.
   */
  // const description = 'abc123'
  /**
   *  Required. Instances to patch, either explicitly or filtered by some criteria such
   *  as zone or labels.
   */
  // const instanceFilter = {}
  /**
   *  Patch configuration being applied. If omitted, instances are
   *  patched using the default configurations.
   */
  // const patchConfig = {}
  /**
   *  Duration of the patch job. After the duration ends, the patch job
   *  times out.
   */
  // const duration = {}
  /**
   *  If this patch is a dry-run only, instances are contacted but
   *  will do nothing.
   */
  // const dryRun = true
  /**
   *  Display name for this patch job. This does not have to be unique.
   */
  // const displayName = 'abc123'
  /**
   *  Rollout strategy of the patch job.
   */
  // const rollout = {}

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callExecutePatchJob() {
    // Construct request
    const request = {
      parent,
      instanceFilter,
    };

    // Run request
    const response = await osconfigClient.executePatchJob(request);
    console.log(response);
  }

  callExecutePatchJob();

executePatchJob(request, options, callback)

executePatchJob(request: protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

executePatchJob(request, callback)

executePatchJob(request: protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IExecutePatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGuestPolicy(request, options)

getGuestPolicy(request?: protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IGuestPolicy,
        protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | undefined,
        {} | undefined
    ]>;

Get an OS Config guest policy.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the guest policy using one of the following forms:
   *  `projects/{project_number}/guestPolicies/{guest_policy_id}`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callGetGuestPolicy() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.getGuestPolicy(request);
    console.log(response);
  }

  callGetGuestPolicy();

getGuestPolicy(request, options, callback)

getGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGuestPolicy(request, callback)

getGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IGetGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPatchDeployment(request, options)

getPatchDeployment(request?: protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment,
        (protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Get an OS Config patch deployment.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment, (protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the patch deployment in the form
   *  `projects/* /patchDeployments/*`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callGetPatchDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.getPatchDeployment(request);
    console.log(response);
  }

  callGetPatchDeployment();

getPatchDeployment(request, options, callback)

getPatchDeployment(request: protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPatchDeployment(request, callback)

getPatchDeployment(request: protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IGetPatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPatchJob(request, options)

getPatchJob(request?: protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchJob,
        protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | undefined,
        {} | undefined
    ]>;

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the patch in the form `projects/* /patchJobs/*`
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callGetPatchJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.getPatchJob(request);
    console.log(response);
  }

  callGetPatchJob();

getPatchJob(request, options, callback)

getPatchJob(request: protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getPatchJob(request, callback)

getPatchJob(request: protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchJob, protos.google.cloud.osconfig.v1beta.IGetPatchJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

guestPolicyPath(project, guestPolicy)

guestPolicyPath(project: string, guestPolicy: string): string;

Return a fully-qualified guestPolicy resource name string.

Parameters
NameDescription
project string
guestPolicy string
Returns
TypeDescription
string

{string} Resource name string.

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listGuestPolicies(request, options)

listGuestPolicies(request?: protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IGuestPolicy[],
        protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest | null,
        protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse
    ]>;

Get a page of OS Config guest policies.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IGuestPolicy[], protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest | null, protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listGuestPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listGuestPolicies(request, options, callback)

listGuestPolicies(request: protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IGuestPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IGuestPolicy>
Returns
TypeDescription
void

listGuestPolicies(request, callback)

listGuestPolicies(request: protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IGuestPolicy>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, protos.google.cloud.osconfig.v1beta.IListGuestPoliciesResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IGuestPolicy>
Returns
TypeDescription
void

listGuestPoliciesAsync(request, options)

listGuestPoliciesAsync(request?: protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1beta.IGuestPolicy>;

Equivalent to listGuestPolicies, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1beta.IGuestPolicy>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the parent using one of the following forms:
   *  `projects/{project_number}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of guest policies to return.
   */
  // const pageSize = 1234
  /**
   *  A pagination token returned from a previous call to `ListGuestPolicies`
   *  that indicates where this listing should continue from.
   */
  // const pageToken = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callListGuestPolicies() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await osconfigClient.listGuestPoliciesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListGuestPolicies();

listGuestPoliciesStream(request, options)

listGuestPoliciesStream(request?: protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListGuestPoliciesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGuestPoliciesAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchDeployments(request, options)

listPatchDeployments(request?: protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment[],
        protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest | null,
        protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse
    ]>;

Get a page of OS Config patch deployments.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment[], protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest | null, protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPatchDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchDeployments(request, options, callback)

listPatchDeployments(request: protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchDeployment>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchDeployment>
Returns
TypeDescription
void

listPatchDeployments(request, callback)

listPatchDeployments(request: protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchDeployment>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchDeployment>
Returns
TypeDescription
void

listPatchDeploymentsAsync(request, options)

listPatchDeploymentsAsync(request?: protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchDeployment>;

Equivalent to listPatchDeployments, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchDeployment>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the parent in the form `projects/*`.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of patch deployments to return. Default is 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A pagination token returned from a previous call to ListPatchDeployments
   *  that indicates where this listing should continue from.
   */
  // const pageToken = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callListPatchDeployments() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await osconfigClient.listPatchDeploymentsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPatchDeployments();

listPatchDeploymentsStream(request, options)

listPatchDeploymentsStream(request?: protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPatchDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchJobInstanceDetails(request, options)

listPatchJobInstanceDetails(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails[],
        protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest | null,
        protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse
    ]>;

Get a list of instance details for a given patch job.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails[], protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest | null, protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPatchJobInstanceDetailsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchJobInstanceDetails(request, options, callback)

listPatchJobInstanceDetails(request: protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>
Returns
TypeDescription
void

listPatchJobInstanceDetails(request, callback)

listPatchJobInstanceDetails(request: protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>
Returns
TypeDescription
void

listPatchJobInstanceDetailsAsync(request, options)

listPatchJobInstanceDetailsAsync(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>;

Equivalent to listPatchJobInstanceDetails, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchJobInstanceDetails>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent for the instances are in the form of `projects/* /patchJobs/*`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of instance details records to return.  Default is 100.
   */
  // const pageSize = 1234
  /**
   *  A pagination token returned from a previous call
   *  that indicates where this listing should continue from.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter expression that filters results listed in the response. This
   *  field supports filtering results by instance zone, name, state, or
   *  `failure_reason`.
   */
  // const filter = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callListPatchJobInstanceDetails() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await osconfigClient.listPatchJobInstanceDetailsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPatchJobInstanceDetails();

listPatchJobInstanceDetailsStream(request, options)

listPatchJobInstanceDetailsStream(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobInstanceDetailsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPatchJobInstanceDetailsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchJobs(request, options)

listPatchJobs(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchJob[],
        protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest | null,
        protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse
    ]>;

Get a list of patch jobs.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchJob[], protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest | null, protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPatchJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPatchJobs(request, options, callback)

listPatchJobs(request: protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJob>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJob>
Returns
TypeDescription
void

listPatchJobs(request, callback)

listPatchJobs(request: protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJob>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, protos.google.cloud.osconfig.v1beta.IListPatchJobsResponse | null | undefined, protos.google.cloud.osconfig.v1beta.IPatchJob>
Returns
TypeDescription
void

listPatchJobsAsync(request, options)

listPatchJobsAsync(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchJob>;

Equivalent to listPatchJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1beta.IPatchJob>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. In the form of `projects/*`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of instance status to return.
   */
  // const pageSize = 1234
  /**
   *  A pagination token returned from a previous call
   *  that indicates where this listing should continue from.
   */
  // const pageToken = 'abc123'
  /**
   *  If provided, this field specifies the criteria that must be met by patch
   *  jobs to be included in the response.
   *  Currently, filtering is only available on the patch_deployment field.
   */
  // const filter = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callListPatchJobs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await osconfigClient.listPatchJobsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPatchJobs();

listPatchJobsStream(request, options)

listPatchJobsStream(request?: protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IListPatchJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPatchJobsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

lookupEffectiveGuestPolicy(request, options)

lookupEffectiveGuestPolicy(request?: protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy,
        (protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | undefined),
        {} | undefined
    ]>;

Lookup the effective guest policy that applies to a VM instance. This lookup merges all policies that are assigned to the instance ancestry.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy, (protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The VM instance whose policies are being looked up.
   */
  // const instance = 'abc123'
  /**
   *  Short name of the OS running on the instance. The OS Config agent only
   *  provides this field for targeting if OS Inventory is enabled for that
   *  instance.
   */
  // const osShortName = 'abc123'
  /**
   *  Version of the OS running on the instance. The OS Config agent only
   *  provides this field for targeting if OS Inventory is enabled for that
   *  VM instance.
   */
  // const osVersion = 'abc123'
  /**
   *  Architecture of OS running on the instance. The OS Config agent only
   *  provides this field for targeting if OS Inventory is enabled for that
   *  instance.
   */
  // const osArchitecture = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callLookupEffectiveGuestPolicy() {
    // Construct request
    const request = {
      instance,
    };

    // Run request
    const response = await osconfigClient.lookupEffectiveGuestPolicy(request);
    console.log(response);
  }

  callLookupEffectiveGuestPolicy();

lookupEffectiveGuestPolicy(request, options, callback)

lookupEffectiveGuestPolicy(request: protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy, protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy, protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupEffectiveGuestPolicy(request, callback)

lookupEffectiveGuestPolicy(request: protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy, protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IEffectiveGuestPolicy, protos.google.cloud.osconfig.v1beta.ILookupEffectiveGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

matchGuestPolicyFromGuestPolicyName(guestPolicyName)

matchGuestPolicyFromGuestPolicyName(guestPolicyName: string): string | number;

Parse the guest_policy from GuestPolicy resource.

Parameter
NameDescription
guestPolicyName string

A fully-qualified path representing GuestPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the guest_policy.

matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName)

matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName: string): string | number;

Parse the patch_deployment from PatchDeployment resource.

Parameter
NameDescription
patchDeploymentName string

A fully-qualified path representing PatchDeployment resource.

Returns
TypeDescription
string | number

{string} A string representing the patch_deployment.

matchPatchJobFromPatchJobName(patchJobName)

matchPatchJobFromPatchJobName(patchJobName: string): string | number;

Parse the patch_job from PatchJob resource.

Parameter
NameDescription
patchJobName string

A fully-qualified path representing PatchJob resource.

Returns
TypeDescription
string | number

{string} A string representing the patch_job.

matchProjectFromGuestPolicyName(guestPolicyName)

matchProjectFromGuestPolicyName(guestPolicyName: string): string | number;

Parse the project from GuestPolicy resource.

Parameter
NameDescription
guestPolicyName string

A fully-qualified path representing GuestPolicy resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromPatchDeploymentName(patchDeploymentName)

matchProjectFromPatchDeploymentName(patchDeploymentName: string): string | number;

Parse the project from PatchDeployment resource.

Parameter
NameDescription
patchDeploymentName string

A fully-qualified path representing PatchDeployment resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromPatchJobName(patchJobName)

matchProjectFromPatchJobName(patchJobName: string): string | number;

Parse the project from PatchJob resource.

Parameter
NameDescription
patchJobName string

A fully-qualified path representing PatchJob resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

patchDeploymentPath(project, patchDeployment)

patchDeploymentPath(project: string, patchDeployment: string): string;

Return a fully-qualified patchDeployment resource name string.

Parameters
NameDescription
project string
patchDeployment string
Returns
TypeDescription
string

{string} Resource name string.

patchJobPath(project, patchJob)

patchJobPath(project: string, patchJob: string): string;

Return a fully-qualified patchJob resource name string.

Parameters
NameDescription
project string
patchJob string
Returns
TypeDescription
string

{string} Resource name string.

pausePatchDeployment(request, options)

pausePatchDeployment(request?: protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment,
        (protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate patch jobs.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment, (protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the patch deployment in the form
   *  `projects/* /patchDeployments/*`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callPausePatchDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.pausePatchDeployment(request);
    console.log(response);
  }

  callPausePatchDeployment();

pausePatchDeployment(request, options, callback)

pausePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

pausePatchDeployment(request, callback)

pausePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IPausePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resumePatchDeployment(request, options)

resumePatchDeployment(request?: protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment,
        (protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to generate patch jobs.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment, (protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the patch deployment in the form
   *  `projects/* /patchDeployments/*`.
   */
  // const name = 'abc123'

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callResumePatchDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await osconfigClient.resumePatchDeployment(request);
    console.log(response);
  }

  callResumePatchDeployment();

resumePatchDeployment(request, options, callback)

resumePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resumePatchDeployment(request, callback)

resumePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IResumePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGuestPolicy(request, options)

updateGuestPolicy(request?: protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IGuestPolicy,
        protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | undefined,
        {} | undefined
    ]>;

Update an OS Config guest policy.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The updated GuestPolicy.
   */
  // const guestPolicy = {}
  /**
   *  Field mask that controls which fields of the guest policy should be
   *  updated.
   */
  // const updateMask = {}

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callUpdateGuestPolicy() {
    // Construct request
    const request = {
      guestPolicy,
    };

    // Run request
    const response = await osconfigClient.updateGuestPolicy(request);
    console.log(response);
  }

  callUpdateGuestPolicy();

updateGuestPolicy(request, options, callback)

updateGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGuestPolicy(request, callback)

updateGuestPolicy(request: protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IGuestPolicy, protos.google.cloud.osconfig.v1beta.IUpdateGuestPolicyRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updatePatchDeployment(request, options)

updatePatchDeployment(request?: protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest, options?: CallOptions): Promise<[
        protos.google.cloud.osconfig.v1beta.IPatchDeployment,
        (protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | undefined),
        {} | undefined
    ]>;

Update an OS Config patch deployment.

Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.osconfig.v1beta.IPatchDeployment, (protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The patch deployment to Update.
   */
  // const patchDeployment = {}
  /**
   *  Optional. Field mask that controls which fields of the patch deployment should be
   *  updated.
   */
  // const updateMask = {}

  // Imports the Osconfig library
  const {OsConfigServiceClient} = require('@google-cloud/osconfig').v1beta;

  // Instantiates a client
  const osconfigClient = new OsConfigServiceClient();

  async function callUpdatePatchDeployment() {
    // Construct request
    const request = {
      patchDeployment,
    };

    // Run request
    const response = await osconfigClient.updatePatchDeployment(request);
    console.log(response);
  }

  callUpdatePatchDeployment();

updatePatchDeployment(request, options, callback)

updatePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updatePatchDeployment(request, callback)

updatePatchDeployment(request: protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest, callback: Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest
callback Callback<protos.google.cloud.osconfig.v1beta.IPatchDeployment, protos.google.cloud.osconfig.v1beta.IUpdatePatchDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void