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. v1
Package
@google-cloud/os-configConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of OsConfigServiceClient.
opts
ClientOptions
gaxInstance
typeof gax
| typeof 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: true}, gax); ```
Properties
apiEndpoint
get
apiEndpoint
()
:
string
;
The DNS address for this API service.
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath.
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.
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
cancelPatchJob(request, options)
cancelPatchJob
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICancelPatchJobRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICancelPatchJobRequest
|
undefined
,
{}
|
undefined
]>;
Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
ICancelPatchJobRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICancelPatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.ICancelPatchJobRequest
| null | undefined, {} | null | undefined>
void
cancelPatchJob(request, callback)
cancelPatchJob
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICancelPatchJobRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICancelPatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.ICancelPatchJobRequest
| null | undefined, {} | null | undefined>
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.
Promise
<void>
{Promise} A promise that resolves when the client is closed.
createPatchDeployment(request, options)
createPatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICreatePatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICreatePatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Create an OS Config patch deployment.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
ICreatePatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICreatePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
createPatchDeployment(request, callback)
createPatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICreatePatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
ICreatePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.ICreatePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
deletePatchDeployment(request, options)
deletePatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IDeletePatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IDeletePatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Delete an OS Config patch deployment.
request
options
Promise
<[ protos.google.protobuf.IEmpty
, protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty . Please see the documentation for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IDeletePatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IDeletePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.protobuf.IEmpty
, protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
deletePatchDeployment(request, callback)
deletePatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IDeletePatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
protobuf
.
IEmpty
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IDeletePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.protobuf.IEmpty
, protos.google.cloud.osconfig.v1.IDeletePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
executePatchJob(request, options)
executePatchJob
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IExecutePatchJobRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IExecutePatchJobRequest
|
undefined
,
{}
|
undefined
]>;
Patch VM instances by creating and running a patch job.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IExecutePatchJobRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IExecutePatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.IExecutePatchJobRequest
| null | undefined, {} | null | undefined>
void
executePatchJob(request, callback)
executePatchJob
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IExecutePatchJobRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IExecutePatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.IExecutePatchJobRequest
| null | undefined, {} | null | undefined>
void
getPatchDeployment(request, options)
getPatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Get an OS Config patch deployment.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IGetPatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
getPatchDeployment(request, callback)
getPatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IGetPatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
getPatchJob(request, options)
getPatchJob
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchJobRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
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.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IGetPatchJobRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.IGetPatchJobRequest
| null | undefined, {} | null | undefined>
void
getPatchJob(request, callback)
getPatchJob
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchJobRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IGetPatchJobRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchJob
, protos.google.cloud.osconfig.v1.IGetPatchJobRequest
| null | undefined, {} | null | undefined>
void
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
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.
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.
project
string
location
string
instance
string
string
{string} Resource name string.
listPatchDeployments(request, options)
listPatchDeployments
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
[],
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
|
null
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsResponse
]>;
Get a page of OS Config patch deployments.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
[], protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest
| null, protos.google.cloud.osconfig.v1.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
for more details and examples.
listPatchDeployments(request, options, callback)
listPatchDeployments
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
> )
:
void
;
request
options
CallOptions
callback
PaginationCallback
< protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest
, protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse
| null | undefined, protos.google.cloud.osconfig.v1.IPatchDeployment
>
void
listPatchDeployments(request, callback)
listPatchDeployments
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
> )
:
void
;
request
callback
PaginationCallback
< protos.google.cloud.osconfig.v1.IListPatchDeploymentsRequest
, protos.google.cloud.osconfig.v1.IListPatchDeploymentsResponse
| null | undefined, protos.google.cloud.osconfig.v1.IPatchDeployment
>
void
listPatchDeploymentsAsync(request, options)
listPatchDeploymentsAsync
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
> ;
Equivalent to listPatchDeployments
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.cloud.osconfig.v1.IPatchDeployment
>
{Object} An iterable Object that allows async iteration . 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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// Instantiates a client
const
osconfigClient
=
new
OsConfigServiceClient
();
async
function
callListPatchDeployments
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
osconfigClient
.
listPatchDeploymentsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListPatchDeployments
();
listPatchDeploymentsStream(request, options)
listPatchDeploymentsStream
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchDeploymentsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to listPatchDeployments
, but returns a NodeJS Stream object.
request
options
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
for more details and examples.
listPatchJobInstanceDetails(request, options)
listPatchJobInstanceDetails
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJobInstanceDetails
[],
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
|
null
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsResponse
]>;
Get a list of instance details for a given patch job.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails
[], protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsRequest
| null, protos.google.cloud.osconfig.v1.IListPatchJobInstanceDetailsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of PatchJobInstanceDetails
. 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
for more details and examples.
listPatchJobInstanceDetails(request, options, callback)
listPatchJobInstanceDetails
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJobInstanceDetails
> )
:
void
;
options
CallOptions
callback
void
listPatchJobInstanceDetails(request, callback)
listPatchJobInstanceDetails
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJobInstanceDetails
> )
:
void
;
callback
void
listPatchJobInstanceDetailsAsync(request, options)
listPatchJobInstanceDetailsAsync
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJobInstanceDetails
> ;
Equivalent to listPatchJobInstanceDetails
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.cloud.osconfig.v1.IPatchJobInstanceDetails
>
{Object} An iterable Object that allows async iteration . When you iterate the returned iterable, each element will be an object representing PatchJobInstanceDetails . 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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// Instantiates a client
const
osconfigClient
=
new
OsConfigServiceClient
();
async
function
callListPatchJobInstanceDetails
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
osconfigClient
.
listPatchJobInstanceDetailsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListPatchJobInstanceDetails
();
listPatchJobInstanceDetailsStream(request, options)
listPatchJobInstanceDetailsStream
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobInstanceDetailsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to listPatchJobInstanceDetails
, but returns a NodeJS Stream object.
request
options
Transform
{Stream} An object stream which emits an object representing PatchJobInstanceDetails
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
for more details and examples.
listPatchJobs(request, options)
listPatchJobs
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
[],
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
|
null
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsResponse
]>;
Get a list of patch jobs.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchJob
[], protos.google.cloud.osconfig.v1.IListPatchJobsRequest
| null, protos.google.cloud.osconfig.v1.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
for more details and examples.
listPatchJobs(request, options, callback)
listPatchJobs
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
> )
:
void
;
request
options
CallOptions
callback
PaginationCallback
< protos.google.cloud.osconfig.v1.IListPatchJobsRequest
, protos.google.cloud.osconfig.v1.IListPatchJobsResponse
| null | undefined, protos.google.cloud.osconfig.v1.IPatchJob
>
void
listPatchJobs(request, callback)
listPatchJobs
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
callback
:
PaginationCallback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsResponse
|
null
|
undefined
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
> )
:
void
;
request
callback
PaginationCallback
< protos.google.cloud.osconfig.v1.IListPatchJobsRequest
, protos.google.cloud.osconfig.v1.IListPatchJobsResponse
| null | undefined, protos.google.cloud.osconfig.v1.IPatchJob
>
void
listPatchJobsAsync(request, options)
listPatchJobsAsync
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchJob
> ;
Equivalent to listPatchJobs
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.cloud.osconfig.v1.IPatchJob
>
{Object} An iterable Object that allows async iteration . 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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// Instantiates a client
const
osconfigClient
=
new
OsConfigServiceClient
();
async
function
callListPatchJobs
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
osconfigClient
.
listPatchJobsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListPatchJobs
();
listPatchJobsStream(request, options)
listPatchJobsStream
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IListPatchJobsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to listPatchJobs
, but returns a NodeJS Stream object.
request
options
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
for more details and examples.
matchAssignmentFromOSPolicyAssignmentReportName(oSPolicyAssignmentReportName)
matchAssignmentFromOSPolicyAssignmentReportName
(
oSPolicyAssignmentReportName
:
string
)
:
string
|
number
;
Parse the assignment from OSPolicyAssignmentReport resource.
oSPolicyAssignmentReportName
string
A fully-qualified path representing OSPolicyAssignmentReport resource.
string | number
{string} A string representing the assignment.
matchInstanceFromInventoryName(inventoryName)
matchInstanceFromInventoryName
(
inventoryName
:
string
)
:
string
|
number
;
Parse the instance from Inventory resource.
inventoryName
string
A fully-qualified path representing Inventory resource.
string | number
{string} A string representing the instance.
matchInstanceFromOSPolicyAssignmentReportName(oSPolicyAssignmentReportName)
matchInstanceFromOSPolicyAssignmentReportName
(
oSPolicyAssignmentReportName
:
string
)
:
string
|
number
;
Parse the instance from OSPolicyAssignmentReport resource.
oSPolicyAssignmentReportName
string
A fully-qualified path representing OSPolicyAssignmentReport resource.
string | number
{string} A string representing the instance.
matchInstanceFromVulnerabilityReportName(vulnerabilityReportName)
matchInstanceFromVulnerabilityReportName
(
vulnerabilityReportName
:
string
)
:
string
|
number
;
Parse the instance from VulnerabilityReport resource.
vulnerabilityReportName
string
A fully-qualified path representing VulnerabilityReport resource.
string | number
{string} A string representing the instance.
matchLocationFromInventoryName(inventoryName)
matchLocationFromInventoryName
(
inventoryName
:
string
)
:
string
|
number
;
Parse the location from Inventory resource.
inventoryName
string
A fully-qualified path representing Inventory resource.
string | number
{string} A string representing the location.
matchLocationFromOSPolicyAssignmentName(oSPolicyAssignmentName)
matchLocationFromOSPolicyAssignmentName
(
oSPolicyAssignmentName
:
string
)
:
string
|
number
;
Parse the location from OSPolicyAssignment resource.
oSPolicyAssignmentName
string
A fully-qualified path representing OSPolicyAssignment resource.
string | number
{string} A string representing the location.
matchLocationFromOSPolicyAssignmentReportName(oSPolicyAssignmentReportName)
matchLocationFromOSPolicyAssignmentReportName
(
oSPolicyAssignmentReportName
:
string
)
:
string
|
number
;
Parse the location from OSPolicyAssignmentReport resource.
oSPolicyAssignmentReportName
string
A fully-qualified path representing OSPolicyAssignmentReport resource.
string | number
{string} A string representing the location.
matchLocationFromVulnerabilityReportName(vulnerabilityReportName)
matchLocationFromVulnerabilityReportName
(
vulnerabilityReportName
:
string
)
:
string
|
number
;
Parse the location from VulnerabilityReport resource.
vulnerabilityReportName
string
A fully-qualified path representing VulnerabilityReport resource.
string | number
{string} A string representing the location.
matchOsPolicyAssignmentFromOSPolicyAssignmentName(oSPolicyAssignmentName)
matchOsPolicyAssignmentFromOSPolicyAssignmentName
(
oSPolicyAssignmentName
:
string
)
:
string
|
number
;
Parse the os_policy_assignment from OSPolicyAssignment resource.
oSPolicyAssignmentName
string
A fully-qualified path representing OSPolicyAssignment resource.
string | number
{string} A string representing the os_policy_assignment.
matchPatchDeploymentFromPatchDeploymentName(patchDeploymentName)
matchPatchDeploymentFromPatchDeploymentName
(
patchDeploymentName
:
string
)
:
string
|
number
;
Parse the patch_deployment from PatchDeployment resource.
patchDeploymentName
string
A fully-qualified path representing PatchDeployment resource.
string | number
{string} A string representing the patch_deployment.
matchPatchJobFromPatchJobName(patchJobName)
matchPatchJobFromPatchJobName
(
patchJobName
:
string
)
:
string
|
number
;
Parse the patch_job from PatchJob resource.
patchJobName
string
A fully-qualified path representing PatchJob resource.
string | number
{string} A string representing the patch_job.
matchProjectFromInventoryName(inventoryName)
matchProjectFromInventoryName
(
inventoryName
:
string
)
:
string
|
number
;
Parse the project from Inventory resource.
inventoryName
string
A fully-qualified path representing Inventory resource.
string | number
{string} A string representing the project.
matchProjectFromOSPolicyAssignmentName(oSPolicyAssignmentName)
matchProjectFromOSPolicyAssignmentName
(
oSPolicyAssignmentName
:
string
)
:
string
|
number
;
Parse the project from OSPolicyAssignment resource.
oSPolicyAssignmentName
string
A fully-qualified path representing OSPolicyAssignment resource.
string | number
{string} A string representing the project.
matchProjectFromOSPolicyAssignmentReportName(oSPolicyAssignmentReportName)
matchProjectFromOSPolicyAssignmentReportName
(
oSPolicyAssignmentReportName
:
string
)
:
string
|
number
;
Parse the project from OSPolicyAssignmentReport resource.
oSPolicyAssignmentReportName
string
A fully-qualified path representing OSPolicyAssignmentReport resource.
string | number
{string} A string representing the project.
matchProjectFromPatchDeploymentName(patchDeploymentName)
matchProjectFromPatchDeploymentName
(
patchDeploymentName
:
string
)
:
string
|
number
;
Parse the project from PatchDeployment resource.
patchDeploymentName
string
A fully-qualified path representing PatchDeployment resource.
string | number
{string} A string representing the project.
matchProjectFromPatchJobName(patchJobName)
matchProjectFromPatchJobName
(
patchJobName
:
string
)
:
string
|
number
;
Parse the project from PatchJob resource.
patchJobName
string
A fully-qualified path representing PatchJob resource.
string | number
{string} A string representing the project.
matchProjectFromVulnerabilityReportName(vulnerabilityReportName)
matchProjectFromVulnerabilityReportName
(
vulnerabilityReportName
:
string
)
:
string
|
number
;
Parse the project from VulnerabilityReport resource.
vulnerabilityReportName
string
A fully-qualified path representing VulnerabilityReport resource.
string | number
{string} A string representing the project.
oSPolicyAssignmentPath(project, location, osPolicyAssignment)
oSPolicyAssignmentPath
(
project
:
string
,
location
:
string
,
osPolicyAssignment
:
string
)
:
string
;
Return a fully-qualified oSPolicyAssignment resource name string.
project
string
location
string
osPolicyAssignment
string
string
{string} Resource name string.
oSPolicyAssignmentReportPath(project, location, instance, assignment)
oSPolicyAssignmentReportPath
(
project
:
string
,
location
:
string
,
instance
:
string
,
assignment
:
string
)
:
string
;
Return a fully-qualified oSPolicyAssignmentReport resource name string.
project
string
location
string
instance
string
assignment
string
string
{string} Resource name string.
patchDeploymentPath(project, patchDeployment)
patchDeploymentPath
(
project
:
string
,
patchDeployment
:
string
)
:
string
;
Return a fully-qualified patchDeployment resource name string.
project
string
patchDeployment
string
string
{string} Resource name string.
patchJobPath(project, patchJob)
patchJobPath
(
project
:
string
,
patchJob
:
string
)
:
string
;
Return a fully-qualified patchJob resource name string.
project
string
patchJob
string
string
{string} Resource name string.
pausePatchDeployment(request, options)
pausePatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPausePatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPausePatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate patch jobs.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IPausePatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPausePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
pausePatchDeployment(request, callback)
pausePatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPausePatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPausePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IPausePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
resumePatchDeployment(request, options)
resumePatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IResumePatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IResumePatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to generate patch jobs.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IResumePatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IResumePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
resumePatchDeployment(request, callback)
resumePatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IResumePatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IResumePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IResumePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
updatePatchDeployment(request, options)
updatePatchDeployment
(
request
?:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IUpdatePatchDeploymentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IUpdatePatchDeploymentRequest
|
undefined
,
{}
|
undefined
]>;
Update an OS Config patch deployment.
request
options
Promise
<[ protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.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 for more details and examples.
/**
* 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/os-config
'
).
v1
;
// 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
.
v1
.
IUpdatePatchDeploymentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IUpdatePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
updatePatchDeployment(request, callback)
updatePatchDeployment
(
request
:
protos
.
google
.
cloud
.
osconfig
.
v1
.
IUpdatePatchDeploymentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
osconfig
.
v1
.
IPatchDeployment
,
protos
.
google
.
cloud
.
osconfig
.
v1
.
IUpdatePatchDeploymentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.osconfig.v1.IPatchDeployment
, protos.google.cloud.osconfig.v1.IUpdatePatchDeploymentRequest
| null | undefined, {} | null | undefined>
void
vulnerabilityReportPath(project, location, instance)
vulnerabilityReportPath
(
project
:
string
,
location
:
string
,
instance
:
string
)
:
string
;
Return a fully-qualified vulnerabilityReport resource name string.
project
string
location
string
instance
string
string
{string} Resource name string.