Package osconfig is an auto-generated package for the OS Config API.
OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.
Example usage
To get started with this package, create a client.
ctx := context . Background () c , err := osconfig . NewClient ( ctx ) if err != nil { // TODO: Handle error. } defer c . Close ()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx := context . Background () c , err := osconfig . NewClient ( ctx ) if err != nil { // TODO: Handle error. } defer c . Close () req := & osconfigpb . ExecutePatchJobRequest { // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ExecutePatchJobRequest. } resp , err := c . ExecutePatchJob ( ctx , req ) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go .
Functions
func DefaultAuthScopes
func
DefaultAuthScopes
()
[]
string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
type
CallOptions
struct
{
ExecutePatchJob
[]
gax
.
CallOption
GetPatchJob
[]
gax
.
CallOption
CancelPatchJob
[]
gax
.
CallOption
ListPatchJobs
[]
gax
.
CallOption
ListPatchJobInstanceDetails
[]
gax
.
CallOption
CreatePatchDeployment
[]
gax
.
CallOption
GetPatchDeployment
[]
gax
.
CallOption
ListPatchDeployments
[]
gax
.
CallOption
DeletePatchDeployment
[]
gax
.
CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type
Client
struct
{
// The call options for this service.
CallOptions
*
CallOptions
// contains filtered or unexported fields
}
Client is a client for interacting with OS Config API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
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.
func NewClient
NewClient creates a new os config service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
// TODO: Use client.
_
=
c
}
func (*Client) CancelPatchJob
func
(
c
*
Client
)
CancelPatchJob
(
ctx
context
.
Context
,
req
*
osconfigpb
.
CancelPatchJobRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
PatchJob
,
error
)
CancelPatchJob cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
CancelPatchJobRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#CancelPatchJobRequest.
}
resp
,
err
:=
c
.
CancelPatchJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection
func
(
c
*
Client
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*Client) CreatePatchDeployment
func
(
c
*
Client
)
CreatePatchDeployment
(
ctx
context
.
Context
,
req
*
osconfigpb
.
CreatePatchDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
PatchDeployment
,
error
)
CreatePatchDeployment create an OS Config patch deployment.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
CreatePatchDeploymentRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#CreatePatchDeploymentRequest.
}
resp
,
err
:=
c
.
CreatePatchDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*Client) DeletePatchDeployment
func
(
c
*
Client
)
DeletePatchDeployment
(
ctx
context
.
Context
,
req
*
osconfigpb
.
DeletePatchDeploymentRequest
,
opts
...
gax
.
CallOption
)
error
DeletePatchDeployment delete an OS Config patch deployment.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
DeletePatchDeploymentRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#DeletePatchDeploymentRequest.
}
err
=
c
.
DeletePatchDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
}
func (*Client) ExecutePatchJob
func
(
c
*
Client
)
ExecutePatchJob
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ExecutePatchJobRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
PatchJob
,
error
)
ExecutePatchJob patch VM instances by creating and running a patch job.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ExecutePatchJobRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ExecutePatchJobRequest.
}
resp
,
err
:=
c
.
ExecutePatchJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*Client) GetPatchDeployment
func
(
c
*
Client
)
GetPatchDeployment
(
ctx
context
.
Context
,
req
*
osconfigpb
.
GetPatchDeploymentRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
PatchDeployment
,
error
)
GetPatchDeployment get an OS Config patch deployment.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
GetPatchDeploymentRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#GetPatchDeploymentRequest.
}
resp
,
err
:=
c
.
GetPatchDeployment
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*Client) GetPatchJob
func
(
c
*
Client
)
GetPatchJob
(
ctx
context
.
Context
,
req
*
osconfigpb
.
GetPatchJobRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
PatchJob
,
error
)
GetPatchJob get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
GetPatchJobRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#GetPatchJobRequest.
}
resp
,
err
:=
c
.
GetPatchJob
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*Client) ListPatchDeployments
func
(
c
*
Client
)
ListPatchDeployments
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ListPatchDeploymentsRequest
,
opts
...
gax
.
CallOption
)
*
PatchDeploymentIterator
ListPatchDeployments get a page of OS Config patch deployments.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
"google.golang.org/api/iterator"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ListPatchDeploymentsRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ListPatchDeploymentsRequest.
}
it
:=
c
.
ListPatchDeployments
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*Client) ListPatchJobInstanceDetails
func
(
c
*
Client
)
ListPatchJobInstanceDetails
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ListPatchJobInstanceDetailsRequest
,
opts
...
gax
.
CallOption
)
*
PatchJobInstanceDetailsIterator
ListPatchJobInstanceDetails get a list of instance details for a given patch job.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
"google.golang.org/api/iterator"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ListPatchJobInstanceDetailsRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ListPatchJobInstanceDetailsRequest.
}
it
:=
c
.
ListPatchJobInstanceDetails
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*Client) ListPatchJobs
func
(
c
*
Client
)
ListPatchJobs
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ListPatchJobsRequest
,
opts
...
gax
.
CallOption
)
*
PatchJobIterator
ListPatchJobs get a list of patch jobs.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
"google.golang.org/api/iterator"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ListPatchJobsRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ListPatchJobsRequest.
}
it
:=
c
.
ListPatchJobs
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
InventoryIterator
type
InventoryIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
osconfigpb
.
Inventory
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
InventoryIterator manages a stream of *osconfigpb.Inventory.
func (*InventoryIterator) Next
func
(
it
*
InventoryIterator
)
Next
()
(
*
osconfigpb
.
Inventory
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*InventoryIterator) PageInfo
func
(
it
*
InventoryIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
OsConfigZonalCallOptions
type
OsConfigZonalCallOptions
struct
{
GetInventory
[]
gax
.
CallOption
ListInventories
[]
gax
.
CallOption
GetVulnerabilityReport
[]
gax
.
CallOption
ListVulnerabilityReports
[]
gax
.
CallOption
}
OsConfigZonalCallOptions contains the retry settings for each method of OsConfigZonalClient.
OsConfigZonalClient
type
OsConfigZonalClient
struct
{
// The call options for this service.
CallOptions
*
OsConfigZonalCallOptions
// contains filtered or unexported fields
}
OsConfigZonalClient is a client for interacting with OS Config API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
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.
func NewOsConfigZonalClient
func
NewOsConfigZonalClient
(
ctx
context
.
Context
,
opts
...
option
.
ClientOption
)
(
*
OsConfigZonalClient
,
error
)
NewOsConfigZonalClient creates a new os config zonal service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewOsConfigZonalClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
// TODO: Use client.
_
=
c
}
func (*OsConfigZonalClient) Close
func
(
c
*
OsConfigZonalClient
)
Close
()
error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*OsConfigZonalClient) Connection
func
(
c
*
OsConfigZonalClient
)
Connection
()
*
grpc
.
ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*OsConfigZonalClient) GetInventory
func
(
c
*
OsConfigZonalClient
)
GetInventory
(
ctx
context
.
Context
,
req
*
osconfigpb
.
GetInventoryRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
Inventory
,
error
)
GetInventory get inventory data for the specified VM instance. If the VM has no associated inventory, the message NOT_FOUND is returned.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewOsConfigZonalClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
GetInventoryRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#GetInventoryRequest.
}
resp
,
err
:=
c
.
GetInventory
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*OsConfigZonalClient) GetVulnerabilityReport
func
(
c
*
OsConfigZonalClient
)
GetVulnerabilityReport
(
ctx
context
.
Context
,
req
*
osconfigpb
.
GetVulnerabilityReportRequest
,
opts
...
gax
.
CallOption
)
(
*
osconfigpb
.
VulnerabilityReport
,
error
)
GetVulnerabilityReport gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewOsConfigZonalClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
GetVulnerabilityReportRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#GetVulnerabilityReportRequest.
}
resp
,
err
:=
c
.
GetVulnerabilityReport
(
ctx
,
req
)
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
func (*OsConfigZonalClient) ListInventories
func
(
c
*
OsConfigZonalClient
)
ListInventories
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ListInventoriesRequest
,
opts
...
gax
.
CallOption
)
*
InventoryIterator
ListInventories list inventory data for all VM instances in the specified zone.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
"google.golang.org/api/iterator"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewOsConfigZonalClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ListInventoriesRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ListInventoriesRequest.
}
it
:=
c
.
ListInventories
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
func (*OsConfigZonalClient) ListVulnerabilityReports
func
(
c
*
OsConfigZonalClient
)
ListVulnerabilityReports
(
ctx
context
.
Context
,
req
*
osconfigpb
.
ListVulnerabilityReportsRequest
,
opts
...
gax
.
CallOption
)
*
VulnerabilityReportIterator
ListVulnerabilityReports list vulnerability reports for all VM instances in the specified zone.
Example
package
main
import
(
"context"
osconfig
"cloud.google.com/go/osconfig/apiv1"
"google.golang.org/api/iterator"
osconfigpb
"google.golang.org/genproto/googleapis/cloud/osconfig/v1"
)
func
main
()
{
ctx
:=
context
.
Background
()
c
,
err
:=
osconfig
.
NewOsConfigZonalClient
(
ctx
)
if
err
!=
nil
{
// TODO: Handle error.
}
defer
c
.
Close
()
req
:=
& osconfigpb
.
ListVulnerabilityReportsRequest
{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/osconfig/v1#ListVulnerabilityReportsRequest.
}
it
:=
c
.
ListVulnerabilityReports
(
ctx
,
req
)
for
{
resp
,
err
:=
it
.
Next
()
if
err
==
iterator
.
Done
{
break
}
if
err
!=
nil
{
// TODO: Handle error.
}
// TODO: Use resp.
_
=
resp
}
}
PatchDeploymentIterator
type
PatchDeploymentIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
osconfigpb
.
PatchDeployment
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
PatchDeploymentIterator manages a stream of *osconfigpb.PatchDeployment.
func (*PatchDeploymentIterator) Next
func
(
it
*
PatchDeploymentIterator
)
Next
()
(
*
osconfigpb
.
PatchDeployment
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*PatchDeploymentIterator) PageInfo
func
(
it
*
PatchDeploymentIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
PatchJobInstanceDetailsIterator
type
PatchJobInstanceDetailsIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
osconfigpb
.
PatchJobInstanceDetails
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
PatchJobInstanceDetailsIterator manages a stream of *osconfigpb.PatchJobInstanceDetails.
func (*PatchJobInstanceDetailsIterator) Next
func
(
it
*
PatchJobInstanceDetailsIterator
)
Next
()
(
*
osconfigpb
.
PatchJobInstanceDetails
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*PatchJobInstanceDetailsIterator) PageInfo
func
(
it
*
PatchJobInstanceDetailsIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
PatchJobIterator
type
PatchJobIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
osconfigpb
.
PatchJob
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
PatchJobIterator manages a stream of *osconfigpb.PatchJob.
func (*PatchJobIterator) Next
func
(
it
*
PatchJobIterator
)
Next
()
(
*
osconfigpb
.
PatchJob
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*PatchJobIterator) PageInfo
func
(
it
*
PatchJobIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
VulnerabilityReportIterator
type
VulnerabilityReportIterator
struct
{
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response
interface
{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch
func
(
pageSize
int
,
pageToken
string
)
(
results
[]
*
osconfigpb
.
VulnerabilityReport
,
nextPageToken
string
,
err
error
)
// contains filtered or unexported fields
}
VulnerabilityReportIterator manages a stream of *osconfigpb.VulnerabilityReport.
func (*VulnerabilityReportIterator) Next
func
(
it
*
VulnerabilityReportIterator
)
Next
()
(
*
osconfigpb
.
VulnerabilityReport
,
error
)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*VulnerabilityReportIterator) PageInfo
func
(
it
*
VulnerabilityReportIterator
)
PageInfo
()
*
iterator
.
PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.