Package cloud.google.com/go/apphub/apiv1 (v0.4.0) Stay organized with collections Save and categorize content based on your preferences.
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:
- 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/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()[]stringDefaultAuthScopes 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
func(it*ApplicationIterator)Next()(*apphubpb.Application,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 (*ApplicationIterator) PageInfo
func(it*ApplicationIterator)PageInfo()*iterator.PageInfoPageInfo 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
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
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
func(c*Client)CancelOperation(ctxcontext.Context,req*longrunningpb.CancelOperationRequest,opts...gax.CallOption)errorCancelOperation 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
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) CreateApplication
func(c*Client)CreateApplication(ctxcontext.Context,req*apphubpb.CreateApplicationRequest,opts...gax.CallOption)(*CreateApplicationOperation,error)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)*CreateApplicationOperationCreateApplicationOperation 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
func(c*Client)CreateService(ctxcontext.Context,req*apphubpb.CreateServiceRequest,opts...gax.CallOption)(*CreateServiceOperation,error)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)*CreateServiceOperationCreateServiceOperation 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
func(c*Client)CreateServiceProjectAttachment(ctxcontext.Context,req*apphubpb.CreateServiceProjectAttachmentRequest,opts...gax.CallOption)(*CreateServiceProjectAttachmentOperation,error)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)*CreateServiceProjectAttachmentOperationCreateServiceProjectAttachmentOperation 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
func(c*Client)CreateWorkload(ctxcontext.Context,req*apphubpb.CreateWorkloadRequest,opts...gax.CallOption)(*CreateWorkloadOperation,error)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)*CreateWorkloadOperationCreateWorkloadOperation 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
func(c*Client)DeleteApplication(ctxcontext.Context,req*apphubpb.DeleteApplicationRequest,opts...gax.CallOption)(*DeleteApplicationOperation,error)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)*DeleteApplicationOperationDeleteApplicationOperation 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
func(c*Client)DeleteOperation(ctxcontext.Context,req*longrunningpb.DeleteOperationRequest,opts...gax.CallOption)errorDeleteOperation 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
func(c*Client)DeleteService(ctxcontext.Context,req*apphubpb.DeleteServiceRequest,opts...gax.CallOption)(*DeleteServiceOperation,error)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)*DeleteServiceOperationDeleteServiceOperation 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
func(c*Client)DeleteServiceProjectAttachment(ctxcontext.Context,req*apphubpb.DeleteServiceProjectAttachmentRequest,opts...gax.CallOption)(*DeleteServiceProjectAttachmentOperation,error)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)*DeleteServiceProjectAttachmentOperationDeleteServiceProjectAttachmentOperation 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
func(c*Client)DeleteWorkload(ctxcontext.Context,req*apphubpb.DeleteWorkloadRequest,opts...gax.CallOption)(*DeleteWorkloadOperation,error)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)*DeleteWorkloadOperationDeleteWorkloadOperation 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
func(c*Client)DetachServiceProjectAttachment(ctxcontext.Context,req*apphubpb.DetachServiceProjectAttachmentRequest,opts...gax.CallOption)(*apphubpb.DetachServiceProjectAttachmentResponse,error)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
func(c*Client)GetApplication(ctxcontext.Context,req*apphubpb.GetApplicationRequest,opts...gax.CallOption)(*apphubpb.Application,error)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
func(c*Client)GetDiscoveredService(ctxcontext.Context,req*apphubpb.GetDiscoveredServiceRequest,opts...gax.CallOption)(*apphubpb.DiscoveredService,error)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
func(c*Client)GetDiscoveredWorkload(ctxcontext.Context,req*apphubpb.GetDiscoveredWorkloadRequest,opts...gax.CallOption)(*apphubpb.DiscoveredWorkload,error)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
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"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
func(c*Client)GetLocation(ctxcontext.Context,req*locationpb.GetLocationRequest,opts...gax.CallOption)(*locationpb.Location,error)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
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"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
func(c*Client)GetService(ctxcontext.Context,req*apphubpb.GetServiceRequest,opts...gax.CallOption)(*apphubpb.Service,error)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
func(c*Client)GetServiceProjectAttachment(ctxcontext.Context,req*apphubpb.GetServiceProjectAttachmentRequest,opts...gax.CallOption)(*apphubpb.ServiceProjectAttachment,error)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
func(c*Client)GetWorkload(ctxcontext.Context,req*apphubpb.GetWorkloadRequest,opts...gax.CallOption)(*apphubpb.Workload,error)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
func(c*Client)ListApplications(ctxcontext.Context,req*apphubpb.ListApplicationsRequest,opts...gax.CallOption)*ApplicationIteratorListApplications 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
func(c*Client)ListDiscoveredServices(ctxcontext.Context,req*apphubpb.ListDiscoveredServicesRequest,opts...gax.CallOption)*DiscoveredServiceIteratorListDiscoveredServices 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
func(c*Client)ListDiscoveredWorkloads(ctxcontext.Context,req*apphubpb.ListDiscoveredWorkloadsRequest,opts...gax.CallOption)*DiscoveredWorkloadIteratorListDiscoveredWorkloads 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
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"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
func(c*Client)ListOperations(ctxcontext.Context,req*longrunningpb.ListOperationsRequest,opts...gax.CallOption)*OperationIteratorListOperations 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
func(c*Client)ListServiceProjectAttachments(ctxcontext.Context,req*apphubpb.ListServiceProjectAttachmentsRequest,opts...gax.CallOption)*ServiceProjectAttachmentIteratorListServiceProjectAttachments 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
func(c*Client)ListServices(ctxcontext.Context,req*apphubpb.ListServicesRequest,opts...gax.CallOption)*ServiceIteratorListServices 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
func(c*Client)ListWorkloads(ctxcontext.Context,req*apphubpb.ListWorkloadsRequest,opts...gax.CallOption)*WorkloadIteratorListWorkloads 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
func(c*Client)LookupDiscoveredService(ctxcontext.Context,req*apphubpb.LookupDiscoveredServiceRequest,opts...gax.CallOption)(*apphubpb.LookupDiscoveredServiceResponse,error)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
func(c*Client)LookupDiscoveredWorkload(ctxcontext.Context,req*apphubpb.LookupDiscoveredWorkloadRequest,opts...gax.CallOption)(*apphubpb.LookupDiscoveredWorkloadResponse,error)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
func(c*Client)LookupServiceProjectAttachment(ctxcontext.Context,req*apphubpb.LookupServiceProjectAttachmentRequest,opts...gax.CallOption)(*apphubpb.LookupServiceProjectAttachmentResponse,error)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
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"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
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"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
func(c*Client)UpdateApplication(ctxcontext.Context,req*apphubpb.UpdateApplicationRequest,opts...gax.CallOption)(*UpdateApplicationOperation,error)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)*UpdateApplicationOperationUpdateApplicationOperation 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
func(c*Client)UpdateService(ctxcontext.Context,req*apphubpb.UpdateServiceRequest,opts...gax.CallOption)(*UpdateServiceOperation,error)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)*UpdateServiceOperationUpdateServiceOperation 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
func(c*Client)UpdateWorkload(ctxcontext.Context,req*apphubpb.UpdateWorkloadRequest,opts...gax.CallOption)(*UpdateWorkloadOperation,error)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)*UpdateWorkloadOperationUpdateWorkloadOperation 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
func(op*CreateApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateApplicationOperation) Metadata
func(op*CreateApplicationOperation)Metadata()(*apphubpb.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 (*CreateApplicationOperation) Name
func(op*CreateApplicationOperation)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 (*CreateApplicationOperation) Poll
func(op*CreateApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Application,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 (*CreateApplicationOperation) Wait
func(op*CreateApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Application,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.
CreateServiceOperation
typeCreateServiceOperationstruct{// contains filtered or unexported fields}CreateServiceOperation manages a long-running operation from CreateService.
func (*CreateServiceOperation) Done
func(op*CreateServiceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateServiceOperation) Metadata
func(op*CreateServiceOperation)Metadata()(*apphubpb.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 (*CreateServiceOperation) Name
func(op*CreateServiceOperation)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 (*CreateServiceOperation) Poll
func(op*CreateServiceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Service,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 (*CreateServiceOperation) Wait
func(op*CreateServiceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Service,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.
CreateServiceProjectAttachmentOperation
typeCreateServiceProjectAttachmentOperationstruct{// contains filtered or unexported fields}CreateServiceProjectAttachmentOperation manages a long-running operation from CreateServiceProjectAttachment.
func (*CreateServiceProjectAttachmentOperation) Done
func(op*CreateServiceProjectAttachmentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateServiceProjectAttachmentOperation) Metadata
func(op*CreateServiceProjectAttachmentOperation)Metadata()(*apphubpb.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 (*CreateServiceProjectAttachmentOperation) Name
func(op*CreateServiceProjectAttachmentOperation)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 (*CreateServiceProjectAttachmentOperation) Poll
func(op*CreateServiceProjectAttachmentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.ServiceProjectAttachment,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 (*CreateServiceProjectAttachmentOperation) Wait
func(op*CreateServiceProjectAttachmentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.ServiceProjectAttachment,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.
CreateWorkloadOperation
typeCreateWorkloadOperationstruct{// contains filtered or unexported fields}CreateWorkloadOperation manages a long-running operation from CreateWorkload.
func (*CreateWorkloadOperation) Done
func(op*CreateWorkloadOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateWorkloadOperation) Metadata
func(op*CreateWorkloadOperation)Metadata()(*apphubpb.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 (*CreateWorkloadOperation) Name
func(op*CreateWorkloadOperation)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 (*CreateWorkloadOperation) Poll
func(op*CreateWorkloadOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Workload,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 (*CreateWorkloadOperation) Wait
func(op*CreateWorkloadOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Workload,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.
DeleteApplicationOperation
typeDeleteApplicationOperationstruct{// contains filtered or unexported fields}DeleteApplicationOperation manages a long-running operation from DeleteApplication.
func (*DeleteApplicationOperation) Done
func(op*DeleteApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteApplicationOperation) Metadata
func(op*DeleteApplicationOperation)Metadata()(*apphubpb.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 (*DeleteApplicationOperation) Name
func(op*DeleteApplicationOperation)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 (*DeleteApplicationOperation) Poll
func(op*DeleteApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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
func(op*DeleteApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait 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
func(op*DeleteServiceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteServiceOperation) Metadata
func(op*DeleteServiceOperation)Metadata()(*apphubpb.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 (*DeleteServiceOperation) Name
func(op*DeleteServiceOperation)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 (*DeleteServiceOperation) Poll
func(op*DeleteServiceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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
func(op*DeleteServiceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait 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
func(op*DeleteServiceProjectAttachmentOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteServiceProjectAttachmentOperation) Metadata
func(op*DeleteServiceProjectAttachmentOperation)Metadata()(*apphubpb.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 (*DeleteServiceProjectAttachmentOperation) Name
func(op*DeleteServiceProjectAttachmentOperation)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 (*DeleteServiceProjectAttachmentOperation) Poll
func(op*DeleteServiceProjectAttachmentOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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
func(op*DeleteServiceProjectAttachmentOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait 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
func(op*DeleteWorkloadOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteWorkloadOperation) Metadata
func(op*DeleteWorkloadOperation)Metadata()(*apphubpb.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 (*DeleteWorkloadOperation) Name
func(op*DeleteWorkloadOperation)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 (*DeleteWorkloadOperation) Poll
func(op*DeleteWorkloadOperation)Poll(ctxcontext.Context,opts...gax.CallOption)errorPoll 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
func(op*DeleteWorkloadOperation)Wait(ctxcontext.Context,opts...gax.CallOption)errorWait 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
func(it*DiscoveredServiceIterator)Next()(*apphubpb.DiscoveredService,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 (*DiscoveredServiceIterator) PageInfo
func(it*DiscoveredServiceIterator)PageInfo()*iterator.PageInfoPageInfo 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
func(it*DiscoveredWorkloadIterator)Next()(*apphubpb.DiscoveredWorkload,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 (*DiscoveredWorkloadIterator) PageInfo
func(it*DiscoveredWorkloadIterator)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.
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.
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
func(it*ServiceIterator)Next()(*apphubpb.Service,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 (*ServiceIterator) PageInfo
func(it*ServiceIterator)PageInfo()*iterator.PageInfoPageInfo 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
func(it*ServiceProjectAttachmentIterator)Next()(*apphubpb.ServiceProjectAttachment,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 (*ServiceProjectAttachmentIterator) PageInfo
func(it*ServiceProjectAttachmentIterator)PageInfo()*iterator.PageInfoPageInfo 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
func(op*UpdateApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateApplicationOperation) Metadata
func(op*UpdateApplicationOperation)Metadata()(*apphubpb.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 (*UpdateApplicationOperation) Name
func(op*UpdateApplicationOperation)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 (*UpdateApplicationOperation) Poll
func(op*UpdateApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Application,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 (*UpdateApplicationOperation) Wait
func(op*UpdateApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Application,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.
UpdateServiceOperation
typeUpdateServiceOperationstruct{// contains filtered or unexported fields}UpdateServiceOperation manages a long-running operation from UpdateService.
func (*UpdateServiceOperation) Done
func(op*UpdateServiceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateServiceOperation) Metadata
func(op*UpdateServiceOperation)Metadata()(*apphubpb.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 (*UpdateServiceOperation) Name
func(op*UpdateServiceOperation)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 (*UpdateServiceOperation) Poll
func(op*UpdateServiceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Service,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 (*UpdateServiceOperation) Wait
func(op*UpdateServiceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Service,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.
UpdateWorkloadOperation
typeUpdateWorkloadOperationstruct{// contains filtered or unexported fields}UpdateWorkloadOperation manages a long-running operation from UpdateWorkload.
func (*UpdateWorkloadOperation) Done
func(op*UpdateWorkloadOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateWorkloadOperation) Metadata
func(op*UpdateWorkloadOperation)Metadata()(*apphubpb.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 (*UpdateWorkloadOperation) Name
func(op*UpdateWorkloadOperation)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 (*UpdateWorkloadOperation) Poll
func(op*UpdateWorkloadOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Workload,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 (*UpdateWorkloadOperation) Wait
func(op*UpdateWorkloadOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*apphubpb.Workload,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.
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
func(it*WorkloadIterator)Next()(*apphubpb.Workload,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 (*WorkloadIterator) PageInfo
func(it*WorkloadIterator)PageInfo()*iterator.PageInfoPageInfo 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.