Package cloud.google.com/go/apphub/apiv1 (v0.4.0)

Beta

This library is covered by thePre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see thelaunch stage descriptions.

Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.

Package apphub is an auto-generated package for theApp Hub API.

NOTE:Thispackageisinbeta.Itisnotstable,andmaybesubjecttochanges.

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:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/apphub/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:=apphub.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:=&apphubpb.CreateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#CreateApplicationRequest.}op,err:=c.CreateApplication(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()[]string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

ApplicationIterator

typeApplicationIteratorstruct{// 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[]*apphubpb.Application,nextPageTokenstring,errerror)// contains filtered or unexported fields}

ApplicationIterator manages a stream of *apphubpb.Application.

func (*ApplicationIterator) All

func(it*ApplicationIterator)All()iter.Seq2[*apphubpb.Application,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*ApplicationIterator) Next

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 (*ApplicationIterator) PageInfo

func(it*ApplicationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CallOptions

typeCallOptionsstruct{LookupServiceProjectAttachment[]gax.CallOptionListServiceProjectAttachments[]gax.CallOptionCreateServiceProjectAttachment[]gax.CallOptionGetServiceProjectAttachment[]gax.CallOptionDeleteServiceProjectAttachment[]gax.CallOptionDetachServiceProjectAttachment[]gax.CallOptionListDiscoveredServices[]gax.CallOptionGetDiscoveredService[]gax.CallOptionLookupDiscoveredService[]gax.CallOptionListServices[]gax.CallOptionCreateService[]gax.CallOptionGetService[]gax.CallOptionUpdateService[]gax.CallOptionDeleteService[]gax.CallOptionListDiscoveredWorkloads[]gax.CallOptionGetDiscoveredWorkload[]gax.CallOptionLookupDiscoveredWorkload[]gax.CallOptionListWorkloads[]gax.CallOptionCreateWorkload[]gax.CallOptionGetWorkload[]gax.CallOptionUpdateWorkload[]gax.CallOptionDeleteWorkload[]gax.CallOptionListApplications[]gax.CallOptionCreateApplication[]gax.CallOptionGetApplication[]gax.CallOptionUpdateApplication[]gax.CallOptionDeleteApplication[]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 App Hub API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The App Hub API allows you to manage App Hub resources.

func NewClient

funcNewClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

NewClient creates a new app hub client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.

The App Hub API allows you to manage App Hub resources.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func NewRESTClient

funcNewRESTClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

NewRESTClient creates a new app hub rest client.

The App Hub API allows you to manage App Hub resources.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func (*Client) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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

func(c*Client)Close()error

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.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.

func (*Client) CreateApplication

CreateApplication creates an Application in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.CreateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#CreateApplicationRequest.}op,err:=c.CreateApplication(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateApplicationOperation

func(c*Client)CreateApplicationOperation(namestring)*CreateApplicationOperation

CreateApplicationOperation returns a new CreateApplicationOperation from a given name.The name must be that of a previously created CreateApplicationOperation, possibly from a different process.

func (*Client) CreateService

CreateService creates a Service in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.CreateServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#CreateServiceRequest.}op,err:=c.CreateService(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateServiceOperation

func(c*Client)CreateServiceOperation(namestring)*CreateServiceOperation

CreateServiceOperation returns a new CreateServiceOperation from a given name.The name must be that of a previously created CreateServiceOperation, possibly from a different process.

func (*Client) CreateServiceProjectAttachment

CreateServiceProjectAttachment attaches a service project to the host project.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.CreateServiceProjectAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#CreateServiceProjectAttachmentRequest.}op,err:=c.CreateServiceProjectAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateServiceProjectAttachmentOperation

func(c*Client)CreateServiceProjectAttachmentOperation(namestring)*CreateServiceProjectAttachmentOperation

CreateServiceProjectAttachmentOperation returns a new CreateServiceProjectAttachmentOperation from a given name.The name must be that of a previously created CreateServiceProjectAttachmentOperation, possibly from a different process.

func (*Client) CreateWorkload

CreateWorkload creates a Workload in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.CreateWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#CreateWorkloadRequest.}op,err:=c.CreateWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateWorkloadOperation

func(c*Client)CreateWorkloadOperation(namestring)*CreateWorkloadOperation

CreateWorkloadOperation returns a new CreateWorkloadOperation from a given name.The name must be that of a previously created CreateWorkloadOperation, possibly from a different process.

func (*Client) DeleteApplication

DeleteApplication deletes an Application in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.DeleteApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#DeleteApplicationRequest.}op,err:=c.DeleteApplication(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteApplicationOperation

func(c*Client)DeleteApplicationOperation(namestring)*DeleteApplicationOperation

DeleteApplicationOperation returns a new DeleteApplicationOperation from a given name.The name must be that of a previously created DeleteApplicationOperation, possibly from a different process.

func (*Client) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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) DeleteService

DeleteService deletes a Service from an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.DeleteServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#DeleteServiceRequest.}op,err:=c.DeleteService(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteServiceOperation

func(c*Client)DeleteServiceOperation(namestring)*DeleteServiceOperation

DeleteServiceOperation returns a new DeleteServiceOperation from a given name.The name must be that of a previously created DeleteServiceOperation, possibly from a different process.

func (*Client) DeleteServiceProjectAttachment

DeleteServiceProjectAttachment deletes a service project attachment.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.DeleteServiceProjectAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#DeleteServiceProjectAttachmentRequest.}op,err:=c.DeleteServiceProjectAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteServiceProjectAttachmentOperation

func(c*Client)DeleteServiceProjectAttachmentOperation(namestring)*DeleteServiceProjectAttachmentOperation

DeleteServiceProjectAttachmentOperation returns a new DeleteServiceProjectAttachmentOperation from a given name.The name must be that of a previously created DeleteServiceProjectAttachmentOperation, possibly from a different process.

func (*Client) DeleteWorkload

DeleteWorkload deletes a Workload from an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.DeleteWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#DeleteWorkloadRequest.}op,err:=c.DeleteWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteWorkloadOperation

func(c*Client)DeleteWorkloadOperation(namestring)*DeleteWorkloadOperation

DeleteWorkloadOperation returns a new DeleteWorkloadOperation from a given name.The name must be that of a previously created DeleteWorkloadOperation, possibly from a different process.

func (*Client) DetachServiceProjectAttachment

DetachServiceProjectAttachment detaches a service project from a host project.You can call this API from any service project without needing access tothe host project that it is attached to.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.DetachServiceProjectAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#DetachServiceProjectAttachmentRequest.}resp,err:=c.DetachServiceProjectAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetApplication

GetApplication gets an Application in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetApplicationRequest.}resp,err:=c.GetApplication(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetDiscoveredService

GetDiscoveredService gets a Discovered Service in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetDiscoveredServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetDiscoveredServiceRequest.}resp,err:=c.GetDiscoveredService(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetDiscoveredWorkload

GetDiscoveredWorkload gets a Discovered Workload in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetDiscoveredWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetDiscoveredWorkloadRequest.}resp,err:=c.GetDiscoveredWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetIamPolicy

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"apphub"cloud.google.com/go/apphub/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:=apphub.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

GetLocation gets information about a location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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

GetOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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) GetService

GetService gets a Service in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetServiceRequest.}resp,err:=c.GetService(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetServiceProjectAttachment

GetServiceProjectAttachment gets a service project attachment.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetServiceProjectAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetServiceProjectAttachmentRequest.}resp,err:=c.GetServiceProjectAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetWorkload

GetWorkload gets a Workload in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.GetWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#GetWorkloadRequest.}resp,err:=c.GetWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) ListApplications

ListApplications lists Applications in a host project and location.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListApplicationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListApplicationsRequest.}it:=c.ListApplications(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.(*apphubpb.ListApplicationsResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListApplicationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListApplicationsRequest.}forresp,err:=rangec.ListApplications(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListDiscoveredServices

ListDiscoveredServices lists Discovered Services that can be added to an Application in a hostproject and location.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListDiscoveredServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListDiscoveredServicesRequest.}it:=c.ListDiscoveredServices(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.(*apphubpb.ListDiscoveredServicesResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListDiscoveredServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListDiscoveredServicesRequest.}forresp,err:=rangec.ListDiscoveredServices(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListDiscoveredWorkloads

ListDiscoveredWorkloads lists Discovered Workloads that can be added to an Application in a hostproject and location.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListDiscoveredWorkloadsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListDiscoveredWorkloadsRequest.}it:=c.ListDiscoveredWorkloads(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.(*apphubpb.ListDiscoveredWorkloadsResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListDiscoveredWorkloadsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListDiscoveredWorkloadsRequest.}forresp,err:=rangec.ListDiscoveredWorkloads(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

ListLocations lists information about the supported locations for this service.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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"apphub"cloud.google.com/go/apphub/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:=apphub.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

ListOperations is a utility method from google.longrunning.Operations.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/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:=apphub.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"apphub"cloud.google.com/go/apphub/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:=apphub.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) ListServiceProjectAttachments

ListServiceProjectAttachments lists service projects attached to the host project.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListServiceProjectAttachmentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListServiceProjectAttachmentsRequest.}it:=c.ListServiceProjectAttachments(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.(*apphubpb.ListServiceProjectAttachmentsResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListServiceProjectAttachmentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListServiceProjectAttachmentsRequest.}forresp,err:=rangec.ListServiceProjectAttachments(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListServices

ListServices lists Services in an Application.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListServicesRequest.}it:=c.ListServices(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.(*apphubpb.ListServicesResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListServicesRequest.}forresp,err:=rangec.ListServices(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListWorkloads

ListWorkloads lists Workloads in an Application.

Examples

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb""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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListWorkloadsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListWorkloadsRequest.}it:=c.ListWorkloads(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.(*apphubpb.ListWorkloadsResponse)}}
all
packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.ListWorkloadsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#ListWorkloadsRequest.}forresp,err:=rangec.ListWorkloads(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) LookupDiscoveredService

LookupDiscoveredService lists a Discovered Service in a host project and location, with agiven resource URI.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.LookupDiscoveredServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#LookupDiscoveredServiceRequest.}resp,err:=c.LookupDiscoveredService(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) LookupDiscoveredWorkload

LookupDiscoveredWorkload lists a Discovered Workload in a host project and location, with agiven resource URI.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.LookupDiscoveredWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#LookupDiscoveredWorkloadRequest.}resp,err:=c.LookupDiscoveredWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) LookupServiceProjectAttachment

LookupServiceProjectAttachment lists a service project attachment for a given service project. You cancall this API from any project to find if it is attached to a host project.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.LookupServiceProjectAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#LookupServiceProjectAttachmentRequest.}resp,err:=c.LookupServiceProjectAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) SetIamPolicy

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"apphub"cloud.google.com/go/apphub/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:=apphub.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

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"apphub"cloud.google.com/go/apphub/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:=apphub.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) UpdateApplication

UpdateApplication updates an Application in a host project and location.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.UpdateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#UpdateApplicationRequest.}op,err:=c.UpdateApplication(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateApplicationOperation

func(c*Client)UpdateApplicationOperation(namestring)*UpdateApplicationOperation

UpdateApplicationOperation returns a new UpdateApplicationOperation from a given name.The name must be that of a previously created UpdateApplicationOperation, possibly from a different process.

func (*Client) UpdateService

UpdateService updates a Service in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.UpdateServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#UpdateServiceRequest.}op,err:=c.UpdateService(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateServiceOperation

func(c*Client)UpdateServiceOperation(namestring)*UpdateServiceOperation

UpdateServiceOperation returns a new UpdateServiceOperation from a given name.The name must be that of a previously created UpdateServiceOperation, possibly from a different process.

func (*Client) UpdateWorkload

UpdateWorkload updates a Workload in an Application.

Example

packagemainimport("context"apphub"cloud.google.com/go/apphub/apiv1"apphubpb"cloud.google.com/go/apphub/apiv1/apphubpb")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:=apphub.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&apphubpb.UpdateWorkloadRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/apphub/apiv1/apphubpb#UpdateWorkloadRequest.}op,err:=c.UpdateWorkload(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateWorkloadOperation

func(c*Client)UpdateWorkloadOperation(namestring)*UpdateWorkloadOperation

UpdateWorkloadOperation returns a new UpdateWorkloadOperation from a given name.The name must be that of a previously created UpdateWorkloadOperation, possibly from a different process.

CreateApplicationOperation

typeCreateApplicationOperationstruct{// contains filtered or unexported fields}

CreateApplicationOperation manages a long-running operation from CreateApplication.

func (*CreateApplicationOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateApplicationOperation) Metadata

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 (*CreateApplicationOperation) Name

Name 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 (*CreateApplicationOperation) Poll

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 (*CreateApplicationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateServiceOperation

typeCreateServiceOperationstruct{// contains filtered or unexported fields}

CreateServiceOperation manages a long-running operation from CreateService.

func (*CreateServiceOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateServiceOperation) Metadata

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 (*CreateServiceOperation) Name

Name 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 (*CreateServiceOperation) Poll

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 (*CreateServiceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateServiceProjectAttachmentOperation

typeCreateServiceProjectAttachmentOperationstruct{// contains filtered or unexported fields}

CreateServiceProjectAttachmentOperation manages a long-running operation from CreateServiceProjectAttachment.

func (*CreateServiceProjectAttachmentOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateServiceProjectAttachmentOperation) Metadata

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 (*CreateServiceProjectAttachmentOperation) Name

Name 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 (*CreateServiceProjectAttachmentOperation) Poll

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 (*CreateServiceProjectAttachmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateWorkloadOperation

typeCreateWorkloadOperationstruct{// contains filtered or unexported fields}

CreateWorkloadOperation manages a long-running operation from CreateWorkload.

func (*CreateWorkloadOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateWorkloadOperation) Metadata

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 (*CreateWorkloadOperation) Name

Name 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 (*CreateWorkloadOperation) Poll

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 (*CreateWorkloadOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteApplicationOperation

typeDeleteApplicationOperationstruct{// contains filtered or unexported fields}

DeleteApplicationOperation manages a long-running operation from DeleteApplication.

func (*DeleteApplicationOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteApplicationOperation) Metadata

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 (*DeleteApplicationOperation) Name

Name 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 (*DeleteApplicationOperation) Poll

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 (*DeleteApplicationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteServiceOperation

typeDeleteServiceOperationstruct{// contains filtered or unexported fields}

DeleteServiceOperation manages a long-running operation from DeleteService.

func (*DeleteServiceOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServiceOperation) Metadata

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 (*DeleteServiceOperation) Name

Name 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 (*DeleteServiceOperation) Poll

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 (*DeleteServiceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteServiceProjectAttachmentOperation

typeDeleteServiceProjectAttachmentOperationstruct{// contains filtered or unexported fields}

DeleteServiceProjectAttachmentOperation manages a long-running operation from DeleteServiceProjectAttachment.

func (*DeleteServiceProjectAttachmentOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServiceProjectAttachmentOperation) Metadata

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 (*DeleteServiceProjectAttachmentOperation) Name

Name 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 (*DeleteServiceProjectAttachmentOperation) Poll

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 (*DeleteServiceProjectAttachmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteWorkloadOperation

typeDeleteWorkloadOperationstruct{// contains filtered or unexported fields}

DeleteWorkloadOperation manages a long-running operation from DeleteWorkload.

func (*DeleteWorkloadOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteWorkloadOperation) Metadata

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 (*DeleteWorkloadOperation) Name

Name 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 (*DeleteWorkloadOperation) Poll

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 (*DeleteWorkloadOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DiscoveredServiceIterator

typeDiscoveredServiceIteratorstruct{// 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[]*apphubpb.DiscoveredService,nextPageTokenstring,errerror)// contains filtered or unexported fields}

DiscoveredServiceIterator manages a stream of *apphubpb.DiscoveredService.

func (*DiscoveredServiceIterator) All

func(it*DiscoveredServiceIterator)All()iter.Seq2[*apphubpb.DiscoveredService,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*DiscoveredServiceIterator) Next

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 (*DiscoveredServiceIterator) PageInfo

func(it*DiscoveredServiceIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

DiscoveredWorkloadIterator

typeDiscoveredWorkloadIteratorstruct{// 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[]*apphubpb.DiscoveredWorkload,nextPageTokenstring,errerror)// contains filtered or unexported fields}

DiscoveredWorkloadIterator manages a stream of *apphubpb.DiscoveredWorkload.

func (*DiscoveredWorkloadIterator) All

func(it*DiscoveredWorkloadIterator)All()iter.Seq2[*apphubpb.DiscoveredWorkload,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*DiscoveredWorkloadIterator) Next

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 (*DiscoveredWorkloadIterator) PageInfo

func(it*DiscoveredWorkloadIterator)PageInfo()*iterator.PageInfo

PageInfo 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

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.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

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

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.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

ServiceIterator

typeServiceIteratorstruct{// 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[]*apphubpb.Service,nextPageTokenstring,errerror)// contains filtered or unexported fields}

ServiceIterator manages a stream of *apphubpb.Service.

func (*ServiceIterator) All

func(it*ServiceIterator)All()iter.Seq2[*apphubpb.Service,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*ServiceIterator) Next

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 (*ServiceIterator) PageInfo

func(it*ServiceIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

ServiceProjectAttachmentIterator

typeServiceProjectAttachmentIteratorstruct{// 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[]*apphubpb.ServiceProjectAttachment,nextPageTokenstring,errerror)// contains filtered or unexported fields}

ServiceProjectAttachmentIterator manages a stream of *apphubpb.ServiceProjectAttachment.

func (*ServiceProjectAttachmentIterator) All

func(it*ServiceProjectAttachmentIterator)All()iter.Seq2[*apphubpb.ServiceProjectAttachment,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*ServiceProjectAttachmentIterator) Next

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 (*ServiceProjectAttachmentIterator) PageInfo

func(it*ServiceProjectAttachmentIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

UpdateApplicationOperation

typeUpdateApplicationOperationstruct{// contains filtered or unexported fields}

UpdateApplicationOperation manages a long-running operation from UpdateApplication.

func (*UpdateApplicationOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateApplicationOperation) Metadata

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 (*UpdateApplicationOperation) Name

Name 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 (*UpdateApplicationOperation) Poll

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 (*UpdateApplicationOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateServiceOperation

typeUpdateServiceOperationstruct{// contains filtered or unexported fields}

UpdateServiceOperation manages a long-running operation from UpdateService.

func (*UpdateServiceOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateServiceOperation) Metadata

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 (*UpdateServiceOperation) Name

Name 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 (*UpdateServiceOperation) Poll

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 (*UpdateServiceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateWorkloadOperation

typeUpdateWorkloadOperationstruct{// contains filtered or unexported fields}

UpdateWorkloadOperation manages a long-running operation from UpdateWorkload.

func (*UpdateWorkloadOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateWorkloadOperation) Metadata

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 (*UpdateWorkloadOperation) Name

Name 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 (*UpdateWorkloadOperation) Poll

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 (*UpdateWorkloadOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

WorkloadIterator

typeWorkloadIteratorstruct{// 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[]*apphubpb.Workload,nextPageTokenstring,errerror)// contains filtered or unexported fields}

WorkloadIterator manages a stream of *apphubpb.Workload.

func (*WorkloadIterator) All

func(it*WorkloadIterator)All()iter.Seq2[*apphubpb.Workload,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*WorkloadIterator) Next

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 (*WorkloadIterator) PageInfo

func(it*WorkloadIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

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.