Infrastructure Manager API v1 - Package cloud.google.com/go/config/apiv1 (v1.5.1) Stay organized with collections Save and categorize content based on your preferences.
Package config is an auto-generated package for theInfrastructure Manager API.
Creates and manages Google Cloud Platform resources and infrastructure.
General documentation
For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/config/apiv1@latestctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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, mentioned above.
req:=&configpb.CreateDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#CreateDeploymentRequest.}op,err:=c.CreateDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp
Use of Context
The ctx passed to NewClient is used for authentication requests andfor 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.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
typeCallOptionsstruct{ListDeployments[]gax.CallOptionGetDeployment[]gax.CallOptionCreateDeployment[]gax.CallOptionUpdateDeployment[]gax.CallOptionDeleteDeployment[]gax.CallOptionListRevisions[]gax.CallOptionGetRevision[]gax.CallOptionGetResource[]gax.CallOptionListResources[]gax.CallOptionExportDeploymentStatefile[]gax.CallOptionExportRevisionStatefile[]gax.CallOptionImportStatefile[]gax.CallOptionDeleteStatefile[]gax.CallOptionLockDeployment[]gax.CallOptionUnlockDeployment[]gax.CallOptionExportLockInfo[]gax.CallOptionCreatePreview[]gax.CallOptionGetPreview[]gax.CallOptionListPreviews[]gax.CallOptionDeletePreview[]gax.CallOptionExportPreviewResult[]gax.CallOptionListTerraformVersions[]gax.CallOptionGetTerraformVersion[]gax.CallOptionListResourceChanges[]gax.CallOptionGetResourceChange[]gax.CallOptionListResourceDrifts[]gax.CallOptionGetResourceDrift[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}CallOptions contains the retry settings for each method of Client.
Client
typeClientstruct{// The call options for this service.CallOptions*CallOptions// LROClient is used internally to handle long-running operations.// It is exposed so that its CallOptions can be modified if required.// Users should not Close this client.LROClient*lroauto.OperationsClient// contains filtered or unexported fields}Client is a client for interacting with Infrastructure Manager API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Infrastructure Manager is a managed service that automates the deployment andmanagement of Google Cloud infrastructure resources.
func NewClient
NewClient creates a new config client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Infrastructure Manager is a managed service that automates the deployment andmanagement of Google Cloud infrastructure resources.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRESTClient
NewRESTClient creates a new config rest client.
Infrastructure Manager is a managed service that automates the deployment andmanagement of Google Cloud infrastructure resources.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*Client) CancelOperation
func(c*Client)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.CancelOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.}err=c.CancelOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) Close
Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*Client) Connection (deprecated)
func(c*Client)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*Client) CreateDeployment
func(c*Client)CreateDeployment(ctxcontext.Context,req*configpb.CreateDeploymentRequest,opts...gax.CallOption)(*CreateDeploymentOperation,error)CreateDeployment creates a Deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.CreateDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#CreateDeploymentRequest.}op,err:=c.CreateDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreateDeploymentOperation
func(c*Client)CreateDeploymentOperation(namestring)*CreateDeploymentOperationCreateDeploymentOperation returns a new CreateDeploymentOperation from a given name.The name must be that of a previously created CreateDeploymentOperation, possibly from a different process.
func (*Client) CreatePreview
func(c*Client)CreatePreview(ctxcontext.Context,req*configpb.CreatePreviewRequest,opts...gax.CallOption)(*CreatePreviewOperation,error)CreatePreview creates a Preview.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.CreatePreviewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#CreatePreviewRequest.}op,err:=c.CreatePreview(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) CreatePreviewOperation
func(c*Client)CreatePreviewOperation(namestring)*CreatePreviewOperationCreatePreviewOperation returns a new CreatePreviewOperation from a given name.The name must be that of a previously created CreatePreviewOperation, possibly from a different process.
func (*Client) DeleteDeployment
func(c*Client)DeleteDeployment(ctxcontext.Context,req*configpb.DeleteDeploymentRequest,opts...gax.CallOption)(*DeleteDeploymentOperation,error)DeleteDeployment deletes a Deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.DeleteDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#DeleteDeploymentRequest.}op,err:=c.DeleteDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeleteDeploymentOperation
func(c*Client)DeleteDeploymentOperation(namestring)*DeleteDeploymentOperationDeleteDeploymentOperation returns a new DeleteDeploymentOperation from a given name.The name must be that of a previously created DeleteDeploymentOperation, possibly from a different process.
func (*Client) DeleteOperation
func(c*Client)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.DeleteOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.}err=c.DeleteOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) DeletePreview
func(c*Client)DeletePreview(ctxcontext.Context,req*configpb.DeletePreviewRequest,opts...gax.CallOption)(*DeletePreviewOperation,error)DeletePreview deletes a Preview.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.DeletePreviewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#DeletePreviewRequest.}op,err:=c.DeletePreview(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) DeletePreviewOperation
func(c*Client)DeletePreviewOperation(namestring)*DeletePreviewOperationDeletePreviewOperation returns a new DeletePreviewOperation from a given name.The name must be that of a previously created DeletePreviewOperation, possibly from a different process.
func (*Client) DeleteStatefile
func(c*Client)DeleteStatefile(ctxcontext.Context,req*configpb.DeleteStatefileRequest,opts...gax.CallOption)errorDeleteStatefile deletes Terraform state file in a given deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.DeleteStatefileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#DeleteStatefileRequest.}err=c.DeleteStatefile(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*Client) ExportDeploymentStatefile
func(c*Client)ExportDeploymentStatefile(ctxcontext.Context,req*configpb.ExportDeploymentStatefileRequest,opts...gax.CallOption)(*configpb.Statefile,error)ExportDeploymentStatefile exports Terraform state file from a given deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ExportDeploymentStatefileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ExportDeploymentStatefileRequest.}resp,err:=c.ExportDeploymentStatefile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ExportLockInfo
func(c*Client)ExportLockInfo(ctxcontext.Context,req*configpb.ExportLockInfoRequest,opts...gax.CallOption)(*configpb.LockInfo,error)ExportLockInfo exports the lock info on a locked deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ExportLockInfoRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ExportLockInfoRequest.}resp,err:=c.ExportLockInfo(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ExportPreviewResult
func(c*Client)ExportPreviewResult(ctxcontext.Context,req*configpb.ExportPreviewResultRequest,opts...gax.CallOption)(*configpb.ExportPreviewResultResponse,error)ExportPreviewResult export Preview results.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ExportPreviewResultRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ExportPreviewResultRequest.}resp,err:=c.ExportPreviewResult(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ExportRevisionStatefile
func(c*Client)ExportRevisionStatefile(ctxcontext.Context,req*configpb.ExportRevisionStatefileRequest,opts...gax.CallOption)(*configpb.Statefile,error)ExportRevisionStatefile exports Terraform state file from a given revision.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ExportRevisionStatefileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ExportRevisionStatefileRequest.}resp,err:=c.ExportRevisionStatefile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetDeployment
func(c*Client)GetDeployment(ctxcontext.Context,req*configpb.GetDeploymentRequest,opts...gax.CallOption)(*configpb.Deployment,error)GetDeployment gets details about a Deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetDeploymentRequest.}resp,err:=c.GetDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetIamPolicy
func(c*Client)GetIamPolicy(ctxcontext.Context,req*iampb.GetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetLocation
func(c*Client)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)GetLocation gets information about a location.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.GetLocationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.}resp,err:=c.GetLocation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetOperation
func(c*Client)GetOperation(ctxcontext.Context,req*longrunningpb.GetOperationRequest,opts...gax.CallOption)(*longrunningpb.Operation,error)GetOperation is a utility method from google.longrunning.Operations.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.GetOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.}resp,err:=c.GetOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetPreview
func(c*Client)GetPreview(ctxcontext.Context,req*configpb.GetPreviewRequest,opts...gax.CallOption)(*configpb.Preview,error)GetPreview gets details about a Preview.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetPreviewRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetPreviewRequest.}resp,err:=c.GetPreview(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetResource
func(c*Client)GetResource(ctxcontext.Context,req*configpb.GetResourceRequest,opts...gax.CallOption)(*configpb.Resource,error)GetResource gets details about a Resource deployedby Infra Manager.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetResourceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetResourceRequest.}resp,err:=c.GetResource(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetResourceChange
func(c*Client)GetResourceChange(ctxcontext.Context,req*configpb.GetResourceChangeRequest,opts...gax.CallOption)(*configpb.ResourceChange,error)GetResourceChange get a ResourceChange for a given preview.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetResourceChangeRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetResourceChangeRequest.}resp,err:=c.GetResourceChange(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetResourceDrift
func(c*Client)GetResourceDrift(ctxcontext.Context,req*configpb.GetResourceDriftRequest,opts...gax.CallOption)(*configpb.ResourceDrift,error)GetResourceDrift get a ResourceDrift for a given preview.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetResourceDriftRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetResourceDriftRequest.}resp,err:=c.GetResourceDrift(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetRevision
func(c*Client)GetRevision(ctxcontext.Context,req*configpb.GetRevisionRequest,opts...gax.CallOption)(*configpb.Revision,error)GetRevision gets details about a Revision.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetRevisionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetRevisionRequest.}resp,err:=c.GetRevision(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) GetTerraformVersion
func(c*Client)GetTerraformVersion(ctxcontext.Context,req*configpb.GetTerraformVersionRequest,opts...gax.CallOption)(*configpb.TerraformVersion,error)GetTerraformVersion gets details about aTerraformVersion.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.GetTerraformVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#GetTerraformVersionRequest.}resp,err:=c.GetTerraformVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ImportStatefile
func(c*Client)ImportStatefile(ctxcontext.Context,req*configpb.ImportStatefileRequest,opts...gax.CallOption)(*configpb.Statefile,error)ImportStatefile imports Terraform state file in a given deployment. The state file does nottake effect until the Deployment has been unlocked.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ImportStatefileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ImportStatefileRequest.}resp,err:=c.ImportStatefile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) ListDeployments
func(c*Client)ListDeployments(ctxcontext.Context,req*configpb.ListDeploymentsRequest,opts...gax.CallOption)*DeploymentIteratorListDeployments lists Deployments in a given projectand location.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListDeploymentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListDeploymentsRequest.}it:=c.ListDeployments(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListDeploymentsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListDeploymentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListDeploymentsRequest.}forresp,err:=rangec.ListDeployments(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListLocations
func(c*Client)ListLocations(ctxcontext.Context,req*locationpb.ListLocationsRequest,opts...gax.CallOption)*LocationIteratorListLocations lists information about the supported locations for this service.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}it:=c.ListLocations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*locationpb.ListLocationsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListOperations
func(c*Client)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}it:=c.ListOperations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListPreviews
func(c*Client)ListPreviews(ctxcontext.Context,req*configpb.ListPreviewsRequest,opts...gax.CallOption)*PreviewIteratorListPreviews lists Previews in a given project andlocation.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListPreviewsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListPreviewsRequest.}it:=c.ListPreviews(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListPreviewsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListPreviewsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListPreviewsRequest.}forresp,err:=rangec.ListPreviews(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListResourceChanges
func(c*Client)ListResourceChanges(ctxcontext.Context,req*configpb.ListResourceChangesRequest,opts...gax.CallOption)*ResourceChangeIteratorListResourceChanges lists ResourceChanges for a given preview.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourceChangesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourceChangesRequest.}it:=c.ListResourceChanges(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListResourceChangesResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourceChangesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourceChangesRequest.}forresp,err:=rangec.ListResourceChanges(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListResourceDrifts
func(c*Client)ListResourceDrifts(ctxcontext.Context,req*configpb.ListResourceDriftsRequest,opts...gax.CallOption)*ResourceDriftIteratorListResourceDrifts list ResourceDrifts for a given preview.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourceDriftsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourceDriftsRequest.}it:=c.ListResourceDrifts(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListResourceDriftsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourceDriftsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourceDriftsRequest.}forresp,err:=rangec.ListResourceDrifts(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListResources
func(c*Client)ListResources(ctxcontext.Context,req*configpb.ListResourcesRequest,opts...gax.CallOption)*ResourceIteratorListResources lists Resources in a given revision.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourcesRequest.}it:=c.ListResources(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListResourcesResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListResourcesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListResourcesRequest.}forresp,err:=rangec.ListResources(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListRevisions
func(c*Client)ListRevisions(ctxcontext.Context,req*configpb.ListRevisionsRequest,opts...gax.CallOption)*RevisionIteratorListRevisions lists Revisions of a deployment.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListRevisionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListRevisionsRequest.}it:=c.ListRevisions(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListRevisionsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListRevisionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListRevisionsRequest.}forresp,err:=rangec.ListRevisions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) ListTerraformVersions
func(c*Client)ListTerraformVersions(ctxcontext.Context,req*configpb.ListTerraformVersionsRequest,opts...gax.CallOption)*TerraformVersionIteratorListTerraformVersions lists TerraformVersions in agiven project and location.
Examples
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListTerraformVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListTerraformVersionsRequest.}it:=c.ListTerraformVersions(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*configpb.ListTerraformVersionsResponse)}}all
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.ListTerraformVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#ListTerraformVersionsRequest.}forresp,err:=rangec.ListTerraformVersions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*Client) LockDeployment
func(c*Client)LockDeployment(ctxcontext.Context,req*configpb.LockDeploymentRequest,opts...gax.CallOption)(*LockDeploymentOperation,error)LockDeployment locks a deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.LockDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#LockDeploymentRequest.}op,err:=c.LockDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) LockDeploymentOperation
func(c*Client)LockDeploymentOperation(namestring)*LockDeploymentOperationLockDeploymentOperation returns a new LockDeploymentOperation from a given name.The name must be that of a previously created LockDeploymentOperation, possibly from a different process.
func (*Client) SetIamPolicy
func(c*Client)SetIamPolicy(ctxcontext.Context,req*iampb.SetIamPolicyRequest,opts...gax.CallOption)(*iampb.Policy,error)SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) TestIamPermissions
func(c*Client)TestIamPermissions(ctxcontext.Context,req*iampb.TestIamPermissionsRequest,opts...gax.CallOption)(*iampb.TestIamPermissionsResponse,error)TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UnlockDeployment
func(c*Client)UnlockDeployment(ctxcontext.Context,req*configpb.UnlockDeploymentRequest,opts...gax.CallOption)(*UnlockDeploymentOperation,error)UnlockDeployment unlocks a locked deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.UnlockDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#UnlockDeploymentRequest.}op,err:=c.UnlockDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UnlockDeploymentOperation
func(c*Client)UnlockDeploymentOperation(namestring)*UnlockDeploymentOperationUnlockDeploymentOperation returns a new UnlockDeploymentOperation from a given name.The name must be that of a previously created UnlockDeploymentOperation, possibly from a different process.
func (*Client) UpdateDeployment
func(c*Client)UpdateDeployment(ctxcontext.Context,req*configpb.UpdateDeploymentRequest,opts...gax.CallOption)(*UpdateDeploymentOperation,error)UpdateDeployment updates a Deployment.
Example
packagemainimport("context"config"cloud.google.com/go/config/apiv1"configpb"cloud.google.com/go/config/apiv1/configpb")funcmain(){ctx:=context.Background()// 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.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=config.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&configpb.UpdateDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/config/apiv1/configpb#UpdateDeploymentRequest.}op,err:=c.UpdateDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*Client) UpdateDeploymentOperation
func(c*Client)UpdateDeploymentOperation(namestring)*UpdateDeploymentOperationUpdateDeploymentOperation returns a new UpdateDeploymentOperation from a given name.The name must be that of a previously created UpdateDeploymentOperation, possibly from a different process.
CreateDeploymentOperation
typeCreateDeploymentOperationstruct{// contains filtered or unexported fields}CreateDeploymentOperation manages a long-running operation from CreateDeployment.
func (*CreateDeploymentOperation) Done
func(op*CreateDeploymentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDeploymentOperation) Metadata
func(op*CreateDeploymentOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreateDeploymentOperation) Name
func(op*CreateDeploymentOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDeploymentOperation) Poll
func(op*CreateDeploymentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateDeploymentOperation) Wait
func(op*CreateDeploymentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreatePreviewOperation
typeCreatePreviewOperationstruct{// contains filtered or unexported fields}CreatePreviewOperation manages a long-running operation from CreatePreview.
func (*CreatePreviewOperation) Done
func(op*CreatePreviewOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreatePreviewOperation) Metadata
func(op*CreatePreviewOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*CreatePreviewOperation) Name
func(op*CreatePreviewOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreatePreviewOperation) Poll
func(op*CreatePreviewOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Preview,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreatePreviewOperation) Wait
func(op*CreatePreviewOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Preview,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteDeploymentOperation
typeDeleteDeploymentOperationstruct{// contains filtered or unexported fields}DeleteDeploymentOperation manages a long-running operation from DeleteDeployment.
func (*DeleteDeploymentOperation) Done
func(op*DeleteDeploymentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDeploymentOperation) Metadata
func(op*DeleteDeploymentOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteDeploymentOperation) Name
func(op*DeleteDeploymentOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDeploymentOperation) Poll
func(op*DeleteDeploymentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDeploymentOperation) Wait
func(op*DeleteDeploymentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeletePreviewOperation
typeDeletePreviewOperationstruct{// contains filtered or unexported fields}DeletePreviewOperation manages a long-running operation from DeletePreview.
func (*DeletePreviewOperation) Done
func(op*DeletePreviewOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeletePreviewOperation) Metadata
func(op*DeletePreviewOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*DeletePreviewOperation) Name
func(op*DeletePreviewOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeletePreviewOperation) Poll
func(op*DeletePreviewOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Preview,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeletePreviewOperation) Wait
func(op*DeletePreviewOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Preview,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeploymentIterator
typeDeploymentIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.Deployment,nextPageTokenstring,errerror)// contains filtered or unexported fields}DeploymentIterator manages a stream of *configpb.Deployment.
func (*DeploymentIterator) All
func(it*DeploymentIterator)All()iter.Seq2[*configpb.Deployment,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DeploymentIterator) Next
func(it*DeploymentIterator)Next()(*configpb.Deployment,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*DeploymentIterator) PageInfo
func(it*DeploymentIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
LocationIterator
typeLocationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All
func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*LocationIterator) Next
func(it*LocationIterator)Next()(*locationpb.Location,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo
func(it*LocationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
LockDeploymentOperation
typeLockDeploymentOperationstruct{// contains filtered or unexported fields}LockDeploymentOperation manages a long-running operation from LockDeployment.
func (*LockDeploymentOperation) Done
func(op*LockDeploymentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*LockDeploymentOperation) Metadata
func(op*LockDeploymentOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*LockDeploymentOperation) Name
func(op*LockDeploymentOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*LockDeploymentOperation) Poll
func(op*LockDeploymentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*LockDeploymentOperation) Wait
func(op*LockDeploymentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
OperationIterator
typeOperationIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*OperationIterator) Next
func(it*OperationIterator)Next()(*longrunningpb.Operation,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func(it*OperationIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
PreviewIterator
typePreviewIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.Preview,nextPageTokenstring,errerror)// contains filtered or unexported fields}PreviewIterator manages a stream of *configpb.Preview.
func (*PreviewIterator) All
func(it*PreviewIterator)All()iter.Seq2[*configpb.Preview,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*PreviewIterator) Next
func(it*PreviewIterator)Next()(*configpb.Preview,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*PreviewIterator) PageInfo
func(it*PreviewIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ResourceChangeIterator
typeResourceChangeIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.ResourceChange,nextPageTokenstring,errerror)// contains filtered or unexported fields}ResourceChangeIterator manages a stream of *configpb.ResourceChange.
func (*ResourceChangeIterator) All
func(it*ResourceChangeIterator)All()iter.Seq2[*configpb.ResourceChange,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ResourceChangeIterator) Next
func(it*ResourceChangeIterator)Next()(*configpb.ResourceChange,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ResourceChangeIterator) PageInfo
func(it*ResourceChangeIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ResourceDriftIterator
typeResourceDriftIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.ResourceDrift,nextPageTokenstring,errerror)// contains filtered or unexported fields}ResourceDriftIterator manages a stream of *configpb.ResourceDrift.
func (*ResourceDriftIterator) All
func(it*ResourceDriftIterator)All()iter.Seq2[*configpb.ResourceDrift,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ResourceDriftIterator) Next
func(it*ResourceDriftIterator)Next()(*configpb.ResourceDrift,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ResourceDriftIterator) PageInfo
func(it*ResourceDriftIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ResourceIterator
typeResourceIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.Resource,nextPageTokenstring,errerror)// contains filtered or unexported fields}ResourceIterator manages a stream of *configpb.Resource.
func (*ResourceIterator) All
func(it*ResourceIterator)All()iter.Seq2[*configpb.Resource,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*ResourceIterator) Next
func(it*ResourceIterator)Next()(*configpb.Resource,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*ResourceIterator) PageInfo
func(it*ResourceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RevisionIterator
typeRevisionIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.Revision,nextPageTokenstring,errerror)// contains filtered or unexported fields}RevisionIterator manages a stream of *configpb.Revision.
func (*RevisionIterator) All
func(it*RevisionIterator)All()iter.Seq2[*configpb.Revision,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*RevisionIterator) Next
func(it*RevisionIterator)Next()(*configpb.Revision,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RevisionIterator) PageInfo
func(it*RevisionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TerraformVersionIterator
typeTerraformVersionIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*configpb.TerraformVersion,nextPageTokenstring,errerror)// contains filtered or unexported fields}TerraformVersionIterator manages a stream of *configpb.TerraformVersion.
func (*TerraformVersionIterator) All
func(it*TerraformVersionIterator)All()iter.Seq2[*configpb.TerraformVersion,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*TerraformVersionIterator) Next
func(it*TerraformVersionIterator)Next()(*configpb.TerraformVersion,error)Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*TerraformVersionIterator) PageInfo
func(it*TerraformVersionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UnlockDeploymentOperation
typeUnlockDeploymentOperationstruct{// contains filtered or unexported fields}UnlockDeploymentOperation manages a long-running operation from UnlockDeployment.
func (*UnlockDeploymentOperation) Done
func(op*UnlockDeploymentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UnlockDeploymentOperation) Metadata
func(op*UnlockDeploymentOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UnlockDeploymentOperation) Name
func(op*UnlockDeploymentOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UnlockDeploymentOperation) Poll
func(op*UnlockDeploymentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UnlockDeploymentOperation) Wait
func(op*UnlockDeploymentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateDeploymentOperation
typeUpdateDeploymentOperationstruct{// contains filtered or unexported fields}UpdateDeploymentOperation manages a long-running operation from UpdateDeployment.
func (*UpdateDeploymentOperation) Done
func(op*UpdateDeploymentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateDeploymentOperation) Metadata
func(op*UpdateDeploymentOperation)Metadata()(*configpb.OperationMetadata,error)Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateDeploymentOperation) Name
func(op*UpdateDeploymentOperation)Name()stringName returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateDeploymentOperation) Poll
func(op*UpdateDeploymentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateDeploymentOperation) Wait
func(op*UpdateDeploymentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*configpb.Deployment,error)Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.