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
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type | Description |
gax.GoogleAuth | |
descriptors
descriptors: Descriptors;
Property Value
Type | Description |
Descriptors | |
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Property Value
Type | Description |
{
[name: string]: Function;
} | |
osConfigZonalServiceStub
osConfigZonalServiceStub?: Promise<{
[name: string]: Function;
}>;
Property Value
Type | Description |
Promise<{
[name: string]: Function;
}> | |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Property Value
Type | Description |
{
[name: string]: gax.PathTemplate;
} | |
port
static get port(): number;
The port for this API service.
Property Value
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type | Description |
(code: string, message: string, warnType?: string) => void | |
Methods
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IGetInventoryRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IGetVulnerabilityReportRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Type | Description |
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
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListInventoriesRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListInventoriesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListInventoriesRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.osconfig.v1.IListVulnerabilityReportsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
inventoryName |
string
A fully-qualified path representing Inventory resource.
|
Returns
Type | Description |
string | number | {string} A string representing the instance.
|
matchInstanceFromVulnerabilityReportName(vulnerabilityReportName)
matchInstanceFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;
Parse the instance from VulnerabilityReport resource.
Parameter
Name | Description |
vulnerabilityReportName |
string
A fully-qualified path representing VulnerabilityReport resource.
|
Returns
Type | Description |
string | number | {string} A string representing the instance.
|
matchLocationFromInventoryName(inventoryName)
matchLocationFromInventoryName(inventoryName: string): string | number;
Parse the location from Inventory resource.
Parameter
Name | Description |
inventoryName |
string
A fully-qualified path representing Inventory resource.
|
Returns
Type | Description |
string | number | {string} A string representing the location.
|
matchLocationFromVulnerabilityReportName(vulnerabilityReportName)
matchLocationFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;
Parse the location from VulnerabilityReport resource.
Parameter
Name | Description |
vulnerabilityReportName |
string
A fully-qualified path representing VulnerabilityReport resource.
|
Returns
Type | Description |
string | number | {string} A string representing the location.
|
matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName)
matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName: string): string | number;
Parse the patch_deployment from PatchDeployment resource.
Parameter
Name | Description |
patchDeploymentName |
string
A fully-qualified path representing PatchDeployment resource.
|
Returns
Type | Description |
string | number | {string} A string representing the patch_deployment.
|
matchPatchJobFromPatchJobName(patchJobName)
matchPatchJobFromPatchJobName(patchJobName: string): string | number;
Parse the patch_job from PatchJob resource.
Parameter
Name | Description |
patchJobName |
string
A fully-qualified path representing PatchJob resource.
|
Returns
Type | Description |
string | number | {string} A string representing the patch_job.
|
matchProjectFromInventoryName(inventoryName)
matchProjectFromInventoryName(inventoryName: string): string | number;
Parse the project from Inventory resource.
Parameter
Name | Description |
inventoryName |
string
A fully-qualified path representing Inventory resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromPatchDeploymentName(patchDeploymentName)
matchProjectFromPatchDeploymentName(patchDeploymentName: string): string | number;
Parse the project from PatchDeployment resource.
Parameter
Name | Description |
patchDeploymentName |
string
A fully-qualified path representing PatchDeployment resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromPatchJobName(patchJobName)
matchProjectFromPatchJobName(patchJobName: string): string | number;
Parse the project from PatchJob resource.
Parameter
Name | Description |
patchJobName |
string
A fully-qualified path representing PatchJob resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project.
|
matchProjectFromVulnerabilityReportName(vulnerabilityReportName)
matchProjectFromVulnerabilityReportName(vulnerabilityReportName: string): string | number;
Parse the project from VulnerabilityReport resource.
Parameter
Name | Description |
vulnerabilityReportName |
string
A fully-qualified path representing VulnerabilityReport resource.
|
Returns
Type | Description |
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
Name | Description |
project |
string
|
patchDeployment |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
patchJobPath(project, patchJob)
patchJobPath(project: string, patchJob: string): string;
Return a fully-qualified patchJob resource name string.
Parameters
Name | Description |
project |
string
|
patchJob |
string
|
Returns
Type | Description |
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
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|