Class v1.OsConfigZonalServiceClient (1.10.0)

Zonal OS Config API

The OS Config service is the server-side component that allows users to manage package installations and patch jobs for Compute Engine VM instances. v1

Package

@google-cloud/os-config

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of OsConfigZonalServiceClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

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

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

osConfigZonalServiceStub

osConfigZonalServiceStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

pathTemplates

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

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

scopes

static get scopes(): string[];

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

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

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

Methods

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.

getInventory(request, options)

getInventory(request?: protos.google.cloud.osconfig.v1.IGetInventoryRequest, options?: CallOptions): Promise<[protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetInventoryRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | undefined, {} | undefined]>

getInventory(request, options, callback)

getInventory(request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetInventoryRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInventory(request, callback)

getInventory(request: protos.google.cloud.osconfig.v1.IGetInventoryRequest, callback: Callback<protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetInventoryRequest
callback Callback<protos.google.cloud.osconfig.v1.IInventory, protos.google.cloud.osconfig.v1.IGetInventoryRequest | 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

getVulnerabilityReport(request, options)

getVulnerabilityReport(request?: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, options?: CallOptions): Promise<[protos.google.cloud.osconfig.v1.IVulnerabilityReport, (protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | undefined), {} | undefined]>;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.osconfig.v1.IVulnerabilityReport, (protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | undefined), {} | undefined]>

getVulnerabilityReport(request, options, callback)

getVulnerabilityReport(request: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, options: CallOptions, callback: Callback<protos.google.cloud.osconfig.v1.IVulnerabilityReport, protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest
options CallOptions
callback Callback<protos.google.cloud.osconfig.v1.IVulnerabilityReport, protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getVulnerabilityReport(request, callback)

getVulnerabilityReport(request: protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest, callback: Callback<protos.google.cloud.osconfig.v1.IVulnerabilityReport, protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest
callback Callback<protos.google.cloud.osconfig.v1.IVulnerabilityReport, protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

inventoryPath(project, location, instance)

inventoryPath(project: string, location: string, instance: string): string;

Return a fully-qualified inventory resource name string.

Parameters
NameDescription
project string
location string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listInventories(request, options)

listInventories(request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, options?: CallOptions): Promise<[protos.google.cloud.osconfig.v1.IInventory[], protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, protos.google.cloud.osconfig.v1.IListInventoriesResponse]>;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListInventoriesRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.osconfig.v1.IInventory[], protos.google.cloud.osconfig.v1.IListInventoriesRequest | null, protos.google.cloud.osconfig.v1.IListInventoriesResponse]>

listInventories(request, options, callback)

listInventories(request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1.IListInventoriesRequest, protos.google.cloud.osconfig.v1.IListInventoriesResponse | null | undefined, protos.google.cloud.osconfig.v1.IInventory>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListInventoriesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1.IListInventoriesRequest, protos.google.cloud.osconfig.v1.IListInventoriesResponse | null | undefined, protos.google.cloud.osconfig.v1.IInventory>
Returns
TypeDescription
void

listInventories(request, callback)

listInventories(request: protos.google.cloud.osconfig.v1.IListInventoriesRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1.IListInventoriesRequest, protos.google.cloud.osconfig.v1.IListInventoriesResponse | null | undefined, protos.google.cloud.osconfig.v1.IInventory>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListInventoriesRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1.IListInventoriesRequest, protos.google.cloud.osconfig.v1.IListInventoriesResponse | null | undefined, protos.google.cloud.osconfig.v1.IInventory>
Returns
TypeDescription
void

listInventoriesAsync(request, options)

listInventoriesAsync(request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1.IInventory>;

Equivalent to listInventories, 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.v1.IListInventoriesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1.IInventory>

{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 [Inventory]. 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

const iterable = client.listInventoriesAsync(request); for await (const response of iterable) { // process response }

listInventoriesStream(request, options)

listInventoriesStream(request?: protos.google.cloud.osconfig.v1.IListInventoriesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListInventoriesRequest

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 [Inventory] 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 listInventoriesAsync() 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.

listVulnerabilityReports(request, options)

listVulnerabilityReports(request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, options?: CallOptions): Promise<[protos.google.cloud.osconfig.v1.IVulnerabilityReport[], protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse]>;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
options CallOptions
Returns
TypeDescription
Promise<[protos.google.cloud.osconfig.v1.IVulnerabilityReport[], protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest | null, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse]>

listVulnerabilityReports(request, options, callback)

listVulnerabilityReports(request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse | null | undefined, protos.google.cloud.osconfig.v1.IVulnerabilityReport>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse | null | undefined, protos.google.cloud.osconfig.v1.IVulnerabilityReport>
Returns
TypeDescription
void

listVulnerabilityReports(request, callback)

listVulnerabilityReports(request: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, callback: PaginationCallback<protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse | null | undefined, protos.google.cloud.osconfig.v1.IVulnerabilityReport>): void;
Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
callback PaginationCallback<protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, protos.google.cloud.osconfig.v1.IListVulnerabilityReportsResponse | null | undefined, protos.google.cloud.osconfig.v1.IVulnerabilityReport>
Returns
TypeDescription
void

listVulnerabilityReportsAsync(request, options)

listVulnerabilityReportsAsync(request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.osconfig.v1.IVulnerabilityReport>;

Equivalent to listVulnerabilityReports, 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.v1.IListVulnerabilityReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.osconfig.v1.IVulnerabilityReport>

{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 [VulnerabilityReport]. 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

const iterable = client.listVulnerabilityReportsAsync(request); for await (const response of iterable) { // process response }

listVulnerabilityReportsStream(request, options)

listVulnerabilityReportsStream(request?: protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest

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 [VulnerabilityReport] 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 listVulnerabilityReportsAsync() 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.

matchInstanceFromInventoryName(inventoryName)

matchInstanceFromInventoryName(inventoryName: string): string | number;

Parse the instance from Inventory resource.

Parameter
NameDescription
inventoryName string

A fully-qualified path representing Inventory resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchInstanceFromVulnerabilityReportName(vulnerabilityReportName)

matchInstanceFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;

Parse the instance from VulnerabilityReport resource.

Parameter
NameDescription
vulnerabilityReportName string

A fully-qualified path representing VulnerabilityReport resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchLocationFromInventoryName(inventoryName)

matchLocationFromInventoryName(inventoryName: string): string | number;

Parse the location from Inventory resource.

Parameter
NameDescription
inventoryName string

A fully-qualified path representing Inventory resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromVulnerabilityReportName(vulnerabilityReportName)

matchLocationFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;

Parse the location from VulnerabilityReport resource.

Parameter
NameDescription
vulnerabilityReportName string

A fully-qualified path representing VulnerabilityReport resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

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.

matchProjectFromInventoryName(inventoryName)

matchProjectFromInventoryName(inventoryName: string): string | number;

Parse the project from Inventory resource.

Parameter
NameDescription
inventoryName string

A fully-qualified path representing Inventory 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.

matchProjectFromVulnerabilityReportName(vulnerabilityReportName)

matchProjectFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;

Parse the project from VulnerabilityReport resource.

Parameter
NameDescription
vulnerabilityReportName string

A fully-qualified path representing VulnerabilityReport 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.

vulnerabilityReportPath(project, location, instance)

vulnerabilityReportPath(project: string, location: string, instance: string): string;

Return a fully-qualified vulnerabilityReport resource name string.

Parameters
NameDescription
project string
location string
instance string
Returns
TypeDescription
string

{string} Resource name string.