App Engine Admin API v1 - Package cloud.google.com/go/appengine/apiv1 (v1.9.7) Stay organized with collections Save and categorize content based on your preferences.
Package appengine is an auto-generated package for theApp Engine Admin API.
Provisions and manages developers’ App Engine applications.
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/appengine/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:=appengine.NewApplicationsClient(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:=&appenginepb.CreateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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 NewApplicationsClient 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.
ApplicationsCallOptions
typeApplicationsCallOptionsstruct{GetApplication[]gax.CallOptionCreateApplication[]gax.CallOptionUpdateApplication[]gax.CallOptionRepairApplication[]gax.CallOption}ApplicationsCallOptions contains the retry settings for each method of ApplicationsClient.
ApplicationsClient
typeApplicationsClientstruct{// The call options for this service.CallOptions*ApplicationsCallOptions// 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}ApplicationsClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages App Engine applications.
func NewApplicationsClient
funcNewApplicationsClient(ctxcontext.Context,opts...option.ClientOption)(*ApplicationsClient,error)NewApplicationsClient creates a new applications client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages App Engine applications.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewApplicationsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewApplicationsRESTClient
funcNewApplicationsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*ApplicationsClient,error)NewApplicationsRESTClient creates a new applications rest client.
Manages App Engine applications.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewApplicationsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ApplicationsClient) Close
func(c*ApplicationsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ApplicationsClient) Connection (deprecated)
func(c*ApplicationsClient)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 (*ApplicationsClient) CreateApplication
func(c*ApplicationsClient)CreateApplication(ctxcontext.Context,req*appenginepb.CreateApplicationRequest,opts...gax.CallOption)(*CreateApplicationOperation,error)CreateApplication creates an App Engine application for a Google Cloud Platform project.Required fields:
id - The ID of the target Cloud Platform project.location - The region (at https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (athttps://cloud.google.com/appengine/docs/standard/python/console/).
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewApplicationsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.CreateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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 (*ApplicationsClient) CreateApplicationOperation
func(c*ApplicationsClient)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 (*ApplicationsClient) GetApplication
func(c*ApplicationsClient)GetApplication(ctxcontext.Context,req*appenginepb.GetApplicationRequest,opts...gax.CallOption)(*appenginepb.Application,error)GetApplication gets information about an application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewApplicationsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetApplicationRequest.}resp,err:=c.GetApplication(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ApplicationsClient) RepairApplication
func(c*ApplicationsClient)RepairApplication(ctxcontext.Context,req*appenginepb.RepairApplicationRequest,opts...gax.CallOption)(*RepairApplicationOperation,error)RepairApplication recreates the required App Engine features for the specified App Engineapplication, for example a Cloud Storage bucket or App Engine serviceaccount.Use this method if you receive an error message about a missing feature,for example, Error retrieving the App Engine service account.If you have deleted your App Engine service account, this willnot be able to recreate it. Instead, you should attempt to use theIAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params={ (at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B)“name”%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .If the deletion was recent, the numeric ID can be found in the CloudConsole Activity Log.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewApplicationsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.RepairApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#RepairApplicationRequest.}op,err:=c.RepairApplication(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ApplicationsClient) RepairApplicationOperation
func(c*ApplicationsClient)RepairApplicationOperation(namestring)*RepairApplicationOperationRepairApplicationOperation returns a new RepairApplicationOperation from a given name.The name must be that of a previously created RepairApplicationOperation, possibly from a different process.
func (*ApplicationsClient) UpdateApplication
func(c*ApplicationsClient)UpdateApplication(ctxcontext.Context,req*appenginepb.UpdateApplicationRequest,opts...gax.CallOption)(*UpdateApplicationOperation,error)UpdateApplication updates the specified Application resource.You can update the following fields:
auth_domain - Google authentication domain for controlling user access to the application.default_cookie_expiration - Cookie expiration policy for the application.iap - Identity-Aware Proxy properties for the application.Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewApplicationsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateApplicationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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 (*ApplicationsClient) UpdateApplicationOperation
func(c*ApplicationsClient)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.
AuthorizedCertificateIterator
typeAuthorizedCertificateIteratorstruct{// 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[]*appenginepb.AuthorizedCertificate,nextPageTokenstring,errerror)// contains filtered or unexported fields}AuthorizedCertificateIterator manages a stream of *appenginepb.AuthorizedCertificate.
func (*AuthorizedCertificateIterator) All
func(it*AuthorizedCertificateIterator)All()iter.Seq2[*appenginepb.AuthorizedCertificate,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AuthorizedCertificateIterator) Next
func(it*AuthorizedCertificateIterator)Next()(*appenginepb.AuthorizedCertificate,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 (*AuthorizedCertificateIterator) PageInfo
func(it*AuthorizedCertificateIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AuthorizedCertificatesCallOptions
typeAuthorizedCertificatesCallOptionsstruct{ListAuthorizedCertificates[]gax.CallOptionGetAuthorizedCertificate[]gax.CallOptionCreateAuthorizedCertificate[]gax.CallOptionUpdateAuthorizedCertificate[]gax.CallOptionDeleteAuthorizedCertificate[]gax.CallOption}AuthorizedCertificatesCallOptions contains the retry settings for each method of AuthorizedCertificatesClient.
AuthorizedCertificatesClient
typeAuthorizedCertificatesClientstruct{// The call options for this service.CallOptions*AuthorizedCertificatesCallOptions// contains filtered or unexported fields}AuthorizedCertificatesClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages SSL certificates a user is authorized to administer. A user canadminister any SSL certificates applicable to their authorized domains.
func NewAuthorizedCertificatesClient
funcNewAuthorizedCertificatesClient(ctxcontext.Context,opts...option.ClientOption)(*AuthorizedCertificatesClient,error)NewAuthorizedCertificatesClient creates a new authorized certificates client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages SSL certificates a user is authorized to administer. A user canadminister any SSL certificates applicable to their authorized domains.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewAuthorizedCertificatesRESTClient
funcNewAuthorizedCertificatesRESTClient(ctxcontext.Context,opts...option.ClientOption)(*AuthorizedCertificatesClient,error)NewAuthorizedCertificatesRESTClient creates a new authorized certificates rest client.
Manages SSL certificates a user is authorized to administer. A user canadminister any SSL certificates applicable to their authorized domains.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewAuthorizedCertificatesRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*AuthorizedCertificatesClient) Close
func(c*AuthorizedCertificatesClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*AuthorizedCertificatesClient) Connection (deprecated)
func(c*AuthorizedCertificatesClient)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 (*AuthorizedCertificatesClient) CreateAuthorizedCertificate
func(c*AuthorizedCertificatesClient)CreateAuthorizedCertificate(ctxcontext.Context,req*appenginepb.CreateAuthorizedCertificateRequest,opts...gax.CallOption)(*appenginepb.AuthorizedCertificate,error)CreateAuthorizedCertificate uploads the specified SSL certificate.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.CreateAuthorizedCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#CreateAuthorizedCertificateRequest.}resp,err:=c.CreateAuthorizedCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AuthorizedCertificatesClient) DeleteAuthorizedCertificate
func(c*AuthorizedCertificatesClient)DeleteAuthorizedCertificate(ctxcontext.Context,req*appenginepb.DeleteAuthorizedCertificateRequest,opts...gax.CallOption)errorDeleteAuthorizedCertificate deletes the specified SSL certificate.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteAuthorizedCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteAuthorizedCertificateRequest.}err=c.DeleteAuthorizedCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*AuthorizedCertificatesClient) GetAuthorizedCertificate
func(c*AuthorizedCertificatesClient)GetAuthorizedCertificate(ctxcontext.Context,req*appenginepb.GetAuthorizedCertificateRequest,opts...gax.CallOption)(*appenginepb.AuthorizedCertificate,error)GetAuthorizedCertificate gets the specified SSL certificate.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetAuthorizedCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetAuthorizedCertificateRequest.}resp,err:=c.GetAuthorizedCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*AuthorizedCertificatesClient) ListAuthorizedCertificates
func(c*AuthorizedCertificatesClient)ListAuthorizedCertificates(ctxcontext.Context,req*appenginepb.ListAuthorizedCertificatesRequest,opts...gax.CallOption)*AuthorizedCertificateIteratorListAuthorizedCertificates lists all SSL certificates the user is authorized to administer.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListAuthorizedCertificatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListAuthorizedCertificatesRequest.}it:=c.ListAuthorizedCertificates(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.(*appenginepb.ListAuthorizedCertificatesResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListAuthorizedCertificatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListAuthorizedCertificatesRequest.}forresp,err:=rangec.ListAuthorizedCertificates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*AuthorizedCertificatesClient) UpdateAuthorizedCertificate
func(c*AuthorizedCertificatesClient)UpdateAuthorizedCertificate(ctxcontext.Context,req*appenginepb.UpdateAuthorizedCertificateRequest,opts...gax.CallOption)(*appenginepb.AuthorizedCertificate,error)UpdateAuthorizedCertificate updates the specified SSL certificate. To renew a certificate and maintainits existing domain mappings, update certificate_data with a newcertificate. The new certificate must be applicable to the same domains asthe original certificate. The certificate display_name may also beupdated.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedCertificatesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateAuthorizedCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#UpdateAuthorizedCertificateRequest.}resp,err:=c.UpdateAuthorizedCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}AuthorizedDomainIterator
typeAuthorizedDomainIteratorstruct{// 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[]*appenginepb.AuthorizedDomain,nextPageTokenstring,errerror)// contains filtered or unexported fields}AuthorizedDomainIterator manages a stream of *appenginepb.AuthorizedDomain.
func (*AuthorizedDomainIterator) All
func(it*AuthorizedDomainIterator)All()iter.Seq2[*appenginepb.AuthorizedDomain,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*AuthorizedDomainIterator) Next
func(it*AuthorizedDomainIterator)Next()(*appenginepb.AuthorizedDomain,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 (*AuthorizedDomainIterator) PageInfo
func(it*AuthorizedDomainIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AuthorizedDomainsCallOptions
typeAuthorizedDomainsCallOptionsstruct{ListAuthorizedDomains[]gax.CallOption}AuthorizedDomainsCallOptions contains the retry settings for each method of AuthorizedDomainsClient.
AuthorizedDomainsClient
typeAuthorizedDomainsClientstruct{// The call options for this service.CallOptions*AuthorizedDomainsCallOptions// contains filtered or unexported fields}AuthorizedDomainsClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages domains a user is authorized to administer. To authorize use of adomain, verify ownership viaWebmaster Central (athttps://www.google.com/webmasters/verification/home).
func NewAuthorizedDomainsClient
funcNewAuthorizedDomainsClient(ctxcontext.Context,opts...option.ClientOption)(*AuthorizedDomainsClient,error)NewAuthorizedDomainsClient creates a new authorized domains client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages domains a user is authorized to administer. To authorize use of adomain, verify ownership viaWebmaster Central (athttps://www.google.com/webmasters/verification/home).
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewAuthorizedDomainsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewAuthorizedDomainsRESTClient
funcNewAuthorizedDomainsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*AuthorizedDomainsClient,error)NewAuthorizedDomainsRESTClient creates a new authorized domains rest client.
Manages domains a user is authorized to administer. To authorize use of adomain, verify ownership viaWebmaster Central (athttps://www.google.com/webmasters/verification/home).
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewAuthorizedDomainsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*AuthorizedDomainsClient) Close
func(c*AuthorizedDomainsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*AuthorizedDomainsClient) Connection (deprecated)
func(c*AuthorizedDomainsClient)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 (*AuthorizedDomainsClient) ListAuthorizedDomains
func(c*AuthorizedDomainsClient)ListAuthorizedDomains(ctxcontext.Context,req*appenginepb.ListAuthorizedDomainsRequest,opts...gax.CallOption)*AuthorizedDomainIteratorListAuthorizedDomains lists all domains the user is authorized to administer.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewAuthorizedDomainsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListAuthorizedDomainsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListAuthorizedDomainsRequest.}it:=c.ListAuthorizedDomains(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.(*appenginepb.ListAuthorizedDomainsResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewAuthorizedDomainsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListAuthorizedDomainsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListAuthorizedDomainsRequest.}forresp,err:=rangec.ListAuthorizedDomains(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}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()(*appenginepb.OperationMetadataV1,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)(*appenginepb.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)(*appenginepb.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.
CreateDomainMappingOperation
typeCreateDomainMappingOperationstruct{// contains filtered or unexported fields}CreateDomainMappingOperation manages a long-running operation from CreateDomainMapping.
func (*CreateDomainMappingOperation) Done
func(op*CreateDomainMappingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateDomainMappingOperation) Metadata
func(op*CreateDomainMappingOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*CreateDomainMappingOperation) Name
func(op*CreateDomainMappingOperation)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 (*CreateDomainMappingOperation) Poll
func(op*CreateDomainMappingOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.DomainMapping,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 (*CreateDomainMappingOperation) Wait
func(op*CreateDomainMappingOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.DomainMapping,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.
CreateVersionOperation
typeCreateVersionOperationstruct{// contains filtered or unexported fields}CreateVersionOperation manages a long-running operation from CreateVersion.
func (*CreateVersionOperation) Done
func(op*CreateVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*CreateVersionOperation) Metadata
func(op*CreateVersionOperation)Metadata()(*appenginepb.CreateVersionMetadataV1,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 (*CreateVersionOperation) Name
func(op*CreateVersionOperation)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 (*CreateVersionOperation) Poll
func(op*CreateVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Version,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 (*CreateVersionOperation) Wait
func(op*CreateVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Version,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.
DebugInstanceOperation
typeDebugInstanceOperationstruct{// contains filtered or unexported fields}DebugInstanceOperation manages a long-running operation from DebugInstance.
func (*DebugInstanceOperation) Done
func(op*DebugInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DebugInstanceOperation) Metadata
func(op*DebugInstanceOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*DebugInstanceOperation) Name
func(op*DebugInstanceOperation)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 (*DebugInstanceOperation) Poll
func(op*DebugInstanceOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Instance,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 (*DebugInstanceOperation) Wait
func(op*DebugInstanceOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Instance,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.
DeleteDomainMappingOperation
typeDeleteDomainMappingOperationstruct{// contains filtered or unexported fields}DeleteDomainMappingOperation manages a long-running operation from DeleteDomainMapping.
func (*DeleteDomainMappingOperation) Done
func(op*DeleteDomainMappingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteDomainMappingOperation) Metadata
func(op*DeleteDomainMappingOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*DeleteDomainMappingOperation) Name
func(op*DeleteDomainMappingOperation)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 (*DeleteDomainMappingOperation) Poll
func(op*DeleteDomainMappingOperation)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 (*DeleteDomainMappingOperation) Wait
func(op*DeleteDomainMappingOperation)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.
DeleteInstanceOperation
typeDeleteInstanceOperationstruct{// contains filtered or unexported fields}DeleteInstanceOperation manages a long-running operation from DeleteInstance.
func (*DeleteInstanceOperation) Done
func(op*DeleteInstanceOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteInstanceOperation) Metadata
func(op*DeleteInstanceOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*DeleteInstanceOperation) Name
func(op*DeleteInstanceOperation)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 (*DeleteInstanceOperation) Poll
func(op*DeleteInstanceOperation)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 (*DeleteInstanceOperation) Wait
func(op*DeleteInstanceOperation)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()(*appenginepb.OperationMetadataV1,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.
DeleteVersionOperation
typeDeleteVersionOperationstruct{// contains filtered or unexported fields}DeleteVersionOperation manages a long-running operation from DeleteVersion.
func (*DeleteVersionOperation) Done
func(op*DeleteVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*DeleteVersionOperation) Metadata
func(op*DeleteVersionOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*DeleteVersionOperation) Name
func(op*DeleteVersionOperation)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 (*DeleteVersionOperation) Poll
func(op*DeleteVersionOperation)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 (*DeleteVersionOperation) Wait
func(op*DeleteVersionOperation)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.
DomainMappingIterator
typeDomainMappingIteratorstruct{// 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[]*appenginepb.DomainMapping,nextPageTokenstring,errerror)// contains filtered or unexported fields}DomainMappingIterator manages a stream of *appenginepb.DomainMapping.
func (*DomainMappingIterator) All
func(it*DomainMappingIterator)All()iter.Seq2[*appenginepb.DomainMapping,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*DomainMappingIterator) Next
func(it*DomainMappingIterator)Next()(*appenginepb.DomainMapping,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 (*DomainMappingIterator) PageInfo
func(it*DomainMappingIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DomainMappingsCallOptions
typeDomainMappingsCallOptionsstruct{ListDomainMappings[]gax.CallOptionGetDomainMapping[]gax.CallOptionCreateDomainMapping[]gax.CallOptionUpdateDomainMapping[]gax.CallOptionDeleteDomainMapping[]gax.CallOption}DomainMappingsCallOptions contains the retry settings for each method of DomainMappingsClient.
DomainMappingsClient
typeDomainMappingsClientstruct{// The call options for this service.CallOptions*DomainMappingsCallOptions// 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}DomainMappingsClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages domains serving an application.
func NewDomainMappingsClient
funcNewDomainMappingsClient(ctxcontext.Context,opts...option.ClientOption)(*DomainMappingsClient,error)NewDomainMappingsClient creates a new domain mappings client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages domains serving an application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewDomainMappingsRESTClient
funcNewDomainMappingsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*DomainMappingsClient,error)NewDomainMappingsRESTClient creates a new domain mappings rest client.
Manages domains serving an application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewDomainMappingsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*DomainMappingsClient) Close
func(c*DomainMappingsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*DomainMappingsClient) Connection (deprecated)
func(c*DomainMappingsClient)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 (*DomainMappingsClient) CreateDomainMapping
func(c*DomainMappingsClient)CreateDomainMapping(ctxcontext.Context,req*appenginepb.CreateDomainMappingRequest,opts...gax.CallOption)(*CreateDomainMappingOperation,error)CreateDomainMapping maps a domain to an application. A user must be authorized to administer adomain in order to map it to an application. For a list of availableauthorized domains, see AuthorizedDomains.ListAuthorizedDomains (at ).
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.CreateDomainMappingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#CreateDomainMappingRequest.}op,err:=c.CreateDomainMapping(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DomainMappingsClient) CreateDomainMappingOperation
func(c*DomainMappingsClient)CreateDomainMappingOperation(namestring)*CreateDomainMappingOperationCreateDomainMappingOperation returns a new CreateDomainMappingOperation from a given name.The name must be that of a previously created CreateDomainMappingOperation, possibly from a different process.
func (*DomainMappingsClient) DeleteDomainMapping
func(c*DomainMappingsClient)DeleteDomainMapping(ctxcontext.Context,req*appenginepb.DeleteDomainMappingRequest,opts...gax.CallOption)(*DeleteDomainMappingOperation,error)DeleteDomainMapping deletes the specified domain mapping. A user must be authorized toadminister the associated domain in order to delete a DomainMappingresource.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteDomainMappingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteDomainMappingRequest.}op,err:=c.DeleteDomainMapping(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*DomainMappingsClient) DeleteDomainMappingOperation
func(c*DomainMappingsClient)DeleteDomainMappingOperation(namestring)*DeleteDomainMappingOperationDeleteDomainMappingOperation returns a new DeleteDomainMappingOperation from a given name.The name must be that of a previously created DeleteDomainMappingOperation, possibly from a different process.
func (*DomainMappingsClient) GetDomainMapping
func(c*DomainMappingsClient)GetDomainMapping(ctxcontext.Context,req*appenginepb.GetDomainMappingRequest,opts...gax.CallOption)(*appenginepb.DomainMapping,error)GetDomainMapping gets the specified domain mapping.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetDomainMappingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetDomainMappingRequest.}resp,err:=c.GetDomainMapping(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DomainMappingsClient) ListDomainMappings
func(c*DomainMappingsClient)ListDomainMappings(ctxcontext.Context,req*appenginepb.ListDomainMappingsRequest,opts...gax.CallOption)*DomainMappingIteratorListDomainMappings lists the domain mappings on an application.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListDomainMappingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListDomainMappingsRequest.}it:=c.ListDomainMappings(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.(*appenginepb.ListDomainMappingsResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListDomainMappingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListDomainMappingsRequest.}forresp,err:=rangec.ListDomainMappings(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*DomainMappingsClient) UpdateDomainMapping
func(c*DomainMappingsClient)UpdateDomainMapping(ctxcontext.Context,req*appenginepb.UpdateDomainMappingRequest,opts...gax.CallOption)(*UpdateDomainMappingOperation,error)UpdateDomainMapping updates the specified domain mapping. To map an SSL certificate to adomain mapping, update certificate_id to point to an AuthorizedCertificateresource. A user must be authorized to administer the associated domainin order to update a DomainMapping resource.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewDomainMappingsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateDomainMappingRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#UpdateDomainMappingRequest.}op,err:=c.UpdateDomainMapping(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*DomainMappingsClient) UpdateDomainMappingOperation
func(c*DomainMappingsClient)UpdateDomainMappingOperation(namestring)*UpdateDomainMappingOperationUpdateDomainMappingOperation returns a new UpdateDomainMappingOperation from a given name.The name must be that of a previously created UpdateDomainMappingOperation, possibly from a different process.
FirewallCallOptions
typeFirewallCallOptionsstruct{ListIngressRules[]gax.CallOptionBatchUpdateIngressRules[]gax.CallOptionCreateIngressRule[]gax.CallOptionGetIngressRule[]gax.CallOptionUpdateIngressRule[]gax.CallOptionDeleteIngressRule[]gax.CallOption}FirewallCallOptions contains the retry settings for each method of FirewallClient.
FirewallClient
typeFirewallClientstruct{// The call options for this service.CallOptions*FirewallCallOptions// contains filtered or unexported fields}FirewallClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Firewall resources are used to define a collection of access control rulesfor an Application. Each rule is defined with a position which specifiesthe rule’s order in the sequence of rules, an IP range to be matched againstrequests, and an action to take upon matching requests.
Every request is evaluated against the Firewall rules in priority order.Processesing stops at the first rule which matches the request’s IP address.A final rule always specifies an action that applies to all remainingIP addresses. The default final rule for a newly-created application will beset to “allow” if not otherwise specified by the user.
func NewFirewallClient
funcNewFirewallClient(ctxcontext.Context,opts...option.ClientOption)(*FirewallClient,error)NewFirewallClient creates a new firewall client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Firewall resources are used to define a collection of access control rulesfor an Application. Each rule is defined with a position which specifiesthe rule’s order in the sequence of rules, an IP range to be matched againstrequests, and an action to take upon matching requests.
Every request is evaluated against the Firewall rules in priority order.Processesing stops at the first rule which matches the request’s IP address.A final rule always specifies an action that applies to all remainingIP addresses. The default final rule for a newly-created application will beset to “allow” if not otherwise specified by the user.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewFirewallRESTClient
funcNewFirewallRESTClient(ctxcontext.Context,opts...option.ClientOption)(*FirewallClient,error)NewFirewallRESTClient creates a new firewall rest client.
Firewall resources are used to define a collection of access control rulesfor an Application. Each rule is defined with a position which specifiesthe rule’s order in the sequence of rules, an IP range to be matched againstrequests, and an action to take upon matching requests.
Every request is evaluated against the Firewall rules in priority order.Processesing stops at the first rule which matches the request’s IP address.A final rule always specifies an action that applies to all remainingIP addresses. The default final rule for a newly-created application will beset to “allow” if not otherwise specified by the user.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewFirewallRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*FirewallClient) BatchUpdateIngressRules
func(c*FirewallClient)BatchUpdateIngressRules(ctxcontext.Context,req*appenginepb.BatchUpdateIngressRulesRequest,opts...gax.CallOption)(*appenginepb.BatchUpdateIngressRulesResponse,error)BatchUpdateIngressRules replaces the entire firewall ruleset in one bulk operation. This overridesand replaces the rules of an existing firewall with the new rules.
If the final rule does not match traffic with the ‘*’ wildcard IP range,then an “allow all” rule is explicitly added to the end of the list.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.BatchUpdateIngressRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#BatchUpdateIngressRulesRequest.}resp,err:=c.BatchUpdateIngressRules(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FirewallClient) Close
func(c*FirewallClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*FirewallClient) Connection (deprecated)
func(c*FirewallClient)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 (*FirewallClient) CreateIngressRule
func(c*FirewallClient)CreateIngressRule(ctxcontext.Context,req*appenginepb.CreateIngressRuleRequest,opts...gax.CallOption)(*appenginepb.FirewallRule,error)CreateIngressRule creates a firewall rule for the application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.CreateIngressRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#CreateIngressRuleRequest.}resp,err:=c.CreateIngressRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FirewallClient) DeleteIngressRule
func(c*FirewallClient)DeleteIngressRule(ctxcontext.Context,req*appenginepb.DeleteIngressRuleRequest,opts...gax.CallOption)errorDeleteIngressRule deletes the specified firewall rule.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteIngressRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteIngressRuleRequest.}err=c.DeleteIngressRule(ctx,req)iferr!=nil{// TODO: Handle error.}}func (*FirewallClient) GetIngressRule
func(c*FirewallClient)GetIngressRule(ctxcontext.Context,req*appenginepb.GetIngressRuleRequest,opts...gax.CallOption)(*appenginepb.FirewallRule,error)GetIngressRule gets the specified firewall rule.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetIngressRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetIngressRuleRequest.}resp,err:=c.GetIngressRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*FirewallClient) ListIngressRules
func(c*FirewallClient)ListIngressRules(ctxcontext.Context,req*appenginepb.ListIngressRulesRequest,opts...gax.CallOption)*FirewallRuleIteratorListIngressRules lists the firewall rules of an application.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListIngressRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListIngressRulesRequest.}it:=c.ListIngressRules(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.(*appenginepb.ListIngressRulesResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListIngressRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListIngressRulesRequest.}forresp,err:=rangec.ListIngressRules(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*FirewallClient) UpdateIngressRule
func(c*FirewallClient)UpdateIngressRule(ctxcontext.Context,req*appenginepb.UpdateIngressRuleRequest,opts...gax.CallOption)(*appenginepb.FirewallRule,error)UpdateIngressRule updates the specified firewall rule.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewFirewallClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateIngressRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#UpdateIngressRuleRequest.}resp,err:=c.UpdateIngressRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}FirewallRuleIterator
typeFirewallRuleIteratorstruct{// 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[]*appenginepb.FirewallRule,nextPageTokenstring,errerror)// contains filtered or unexported fields}FirewallRuleIterator manages a stream of *appenginepb.FirewallRule.
func (*FirewallRuleIterator) All
func(it*FirewallRuleIterator)All()iter.Seq2[*appenginepb.FirewallRule,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*FirewallRuleIterator) Next
func(it*FirewallRuleIterator)Next()(*appenginepb.FirewallRule,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 (*FirewallRuleIterator) PageInfo
func(it*FirewallRuleIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InstanceIterator
typeInstanceIteratorstruct{// 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[]*appenginepb.Instance,nextPageTokenstring,errerror)// contains filtered or unexported fields}InstanceIterator manages a stream of *appenginepb.Instance.
func (*InstanceIterator) All
func(it*InstanceIterator)All()iter.Seq2[*appenginepb.Instance,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*InstanceIterator) Next
func(it*InstanceIterator)Next()(*appenginepb.Instance,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 (*InstanceIterator) PageInfo
func(it*InstanceIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InstancesCallOptions
typeInstancesCallOptionsstruct{ListInstances[]gax.CallOptionGetInstance[]gax.CallOptionDeleteInstance[]gax.CallOptionDebugInstance[]gax.CallOption}InstancesCallOptions contains the retry settings for each method of InstancesClient.
InstancesClient
typeInstancesClientstruct{// The call options for this service.CallOptions*InstancesCallOptions// 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}InstancesClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages instances of a version.
func NewInstancesClient
funcNewInstancesClient(ctxcontext.Context,opts...option.ClientOption)(*InstancesClient,error)NewInstancesClient creates a new instances client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages instances of a version.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewInstancesRESTClient
funcNewInstancesRESTClient(ctxcontext.Context,opts...option.ClientOption)(*InstancesClient,error)NewInstancesRESTClient creates a new instances rest client.
Manages instances of a version.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewInstancesRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*InstancesClient) Close
func(c*InstancesClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*InstancesClient) Connection (deprecated)
func(c*InstancesClient)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 (*InstancesClient) DebugInstance
func(c*InstancesClient)DebugInstance(ctxcontext.Context,req*appenginepb.DebugInstanceRequest,opts...gax.CallOption)(*DebugInstanceOperation,error)DebugInstance enables debugging on a VM instance. This allows you to use the SSHcommand to connect to the virtual machine where the instance lives.While in “debug mode”, the instance continues to serve live traffic.You should delete the instance when you are done debugging and thenallow the system to take over and determine if another instanceshould be started.
Only applicable for instances in App Engine flexible environment.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DebugInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DebugInstanceRequest.}op,err:=c.DebugInstance(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InstancesClient) DebugInstanceOperation
func(c*InstancesClient)DebugInstanceOperation(namestring)*DebugInstanceOperationDebugInstanceOperation returns a new DebugInstanceOperation from a given name.The name must be that of a previously created DebugInstanceOperation, possibly from a different process.
func (*InstancesClient) DeleteInstance
func(c*InstancesClient)DeleteInstance(ctxcontext.Context,req*appenginepb.DeleteInstanceRequest,opts...gax.CallOption)(*DeleteInstanceOperation,error)DeleteInstance stops a running instance.
The instance might be automatically recreated based on the scaling settingsof the version. For more information, see “How Instances are Managed”(standard environment (athttps://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |flexible environment (athttps://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
To ensure that instances are not re-created and avoid getting billed, youcan stop all instances within the target version by changing the servingstatus of the version to STOPPED with theapps.services.versions.patch (athttps://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)method.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteInstanceRequest.}op,err:=c.DeleteInstance(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*InstancesClient) DeleteInstanceOperation
func(c*InstancesClient)DeleteInstanceOperation(namestring)*DeleteInstanceOperationDeleteInstanceOperation returns a new DeleteInstanceOperation from a given name.The name must be that of a previously created DeleteInstanceOperation, possibly from a different process.
func (*InstancesClient) GetInstance
func(c*InstancesClient)GetInstance(ctxcontext.Context,req*appenginepb.GetInstanceRequest,opts...gax.CallOption)(*appenginepb.Instance,error)GetInstance gets instance information.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetInstanceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetInstanceRequest.}resp,err:=c.GetInstance(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*InstancesClient) ListInstances
func(c*InstancesClient)ListInstances(ctxcontext.Context,req*appenginepb.ListInstancesRequest,opts...gax.CallOption)*InstanceIteratorListInstances lists the instances of a version.
Tip: To aggregate details about instances over time, see theStackdriver Monitoring API (athttps://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListInstancesRequest.}it:=c.ListInstances(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.(*appenginepb.ListInstancesResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewInstancesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListInstancesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListInstancesRequest.}forresp,err:=rangec.ListInstances(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}RepairApplicationOperation
typeRepairApplicationOperationstruct{// contains filtered or unexported fields}RepairApplicationOperation manages a long-running operation from RepairApplication.
func (*RepairApplicationOperation) Done
func(op*RepairApplicationOperation)Done()boolDone reports whether the long-running operation has completed.
func (*RepairApplicationOperation) Metadata
func(op*RepairApplicationOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*RepairApplicationOperation) Name
func(op*RepairApplicationOperation)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 (*RepairApplicationOperation) Poll
func(op*RepairApplicationOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.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 (*RepairApplicationOperation) Wait
func(op*RepairApplicationOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.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.
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[]*appenginepb.Service,nextPageTokenstring,errerror)// contains filtered or unexported fields}ServiceIterator manages a stream of *appenginepb.Service.
func (*ServiceIterator) All
func(it*ServiceIterator)All()iter.Seq2[*appenginepb.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()(*appenginepb.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.
ServicesCallOptions
typeServicesCallOptionsstruct{ListServices[]gax.CallOptionGetService[]gax.CallOptionUpdateService[]gax.CallOptionDeleteService[]gax.CallOption}ServicesCallOptions contains the retry settings for each method of ServicesClient.
ServicesClient
typeServicesClientstruct{// The call options for this service.CallOptions*ServicesCallOptions// 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}ServicesClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages services of an application.
func NewServicesClient
funcNewServicesClient(ctxcontext.Context,opts...option.ClientOption)(*ServicesClient,error)NewServicesClient creates a new services client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages services of an application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewServicesRESTClient
funcNewServicesRESTClient(ctxcontext.Context,opts...option.ClientOption)(*ServicesClient,error)NewServicesRESTClient creates a new services rest client.
Manages services of an application.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewServicesRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*ServicesClient) Close
func(c*ServicesClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*ServicesClient) Connection (deprecated)
func(c*ServicesClient)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 (*ServicesClient) DeleteService
func(c*ServicesClient)DeleteService(ctxcontext.Context,req*appenginepb.DeleteServiceRequest,opts...gax.CallOption)(*DeleteServiceOperation,error)DeleteService deletes the specified service and all enclosed versions.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteServiceRequest.}op,err:=c.DeleteService(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*ServicesClient) DeleteServiceOperation
func(c*ServicesClient)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 (*ServicesClient) GetService
func(c*ServicesClient)GetService(ctxcontext.Context,req*appenginepb.GetServiceRequest,opts...gax.CallOption)(*appenginepb.Service,error)GetService gets the current configuration of the specified service.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetServiceRequest.}resp,err:=c.GetService(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*ServicesClient) ListServices
func(c*ServicesClient)ListServices(ctxcontext.Context,req*appenginepb.ListServicesRequest,opts...gax.CallOption)*ServiceIteratorListServices lists all the services in the application.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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.(*appenginepb.ListServicesResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListServicesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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 (*ServicesClient) UpdateService
func(c*ServicesClient)UpdateService(ctxcontext.Context,req*appenginepb.UpdateServiceRequest,opts...gax.CallOption)(*UpdateServiceOperation,error)UpdateService updates the configuration of the specified service.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewServicesClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateServiceRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#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 (*ServicesClient) UpdateServiceOperation
func(c*ServicesClient)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.
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()(*appenginepb.OperationMetadataV1,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)(*appenginepb.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)(*appenginepb.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.
UpdateDomainMappingOperation
typeUpdateDomainMappingOperationstruct{// contains filtered or unexported fields}UpdateDomainMappingOperation manages a long-running operation from UpdateDomainMapping.
func (*UpdateDomainMappingOperation) Done
func(op*UpdateDomainMappingOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateDomainMappingOperation) Metadata
func(op*UpdateDomainMappingOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*UpdateDomainMappingOperation) Name
func(op*UpdateDomainMappingOperation)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 (*UpdateDomainMappingOperation) Poll
func(op*UpdateDomainMappingOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.DomainMapping,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 (*UpdateDomainMappingOperation) Wait
func(op*UpdateDomainMappingOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.DomainMapping,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()(*appenginepb.OperationMetadataV1,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)(*appenginepb.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)(*appenginepb.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.
UpdateVersionOperation
typeUpdateVersionOperationstruct{// contains filtered or unexported fields}UpdateVersionOperation manages a long-running operation from UpdateVersion.
func (*UpdateVersionOperation) Done
func(op*UpdateVersionOperation)Done()boolDone reports whether the long-running operation has completed.
func (*UpdateVersionOperation) Metadata
func(op*UpdateVersionOperation)Metadata()(*appenginepb.OperationMetadataV1,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 (*UpdateVersionOperation) Name
func(op*UpdateVersionOperation)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 (*UpdateVersionOperation) Poll
func(op*UpdateVersionOperation)Poll(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Version,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 (*UpdateVersionOperation) Wait
func(op*UpdateVersionOperation)Wait(ctxcontext.Context,opts...gax.CallOption)(*appenginepb.Version,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.
VersionIterator
typeVersionIteratorstruct{// 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[]*appenginepb.Version,nextPageTokenstring,errerror)// contains filtered or unexported fields}VersionIterator manages a stream of *appenginepb.Version.
func (*VersionIterator) All
func(it*VersionIterator)All()iter.Seq2[*appenginepb.Version,error]All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.
func (*VersionIterator) Next
func(it*VersionIterator)Next()(*appenginepb.Version,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 (*VersionIterator) PageInfo
func(it*VersionIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
VersionsCallOptions
typeVersionsCallOptionsstruct{ListVersions[]gax.CallOptionGetVersion[]gax.CallOptionCreateVersion[]gax.CallOptionUpdateVersion[]gax.CallOptionDeleteVersion[]gax.CallOption}VersionsCallOptions contains the retry settings for each method of VersionsClient.
VersionsClient
typeVersionsClientstruct{// The call options for this service.CallOptions*VersionsCallOptions// 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}VersionsClient is a client for interacting with App Engine Admin API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Manages versions of a service.
func NewVersionsClient
funcNewVersionsClient(ctxcontext.Context,opts...option.ClientOption)(*VersionsClient,error)NewVersionsClient creates a new versions client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.
Manages versions of a service.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewVersionsRESTClient
funcNewVersionsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*VersionsClient,error)NewVersionsRESTClient creates a new versions rest client.
Manages versions of a service.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/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:=appengine.NewVersionsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*VersionsClient) Close
func(c*VersionsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*VersionsClient) Connection (deprecated)
func(c*VersionsClient)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 (*VersionsClient) CreateVersion
func(c*VersionsClient)CreateVersion(ctxcontext.Context,req*appenginepb.CreateVersionRequest,opts...gax.CallOption)(*CreateVersionOperation,error)CreateVersion deploys code and resource files to a new version.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.CreateVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#CreateVersionRequest.}op,err:=c.CreateVersion(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VersionsClient) CreateVersionOperation
func(c*VersionsClient)CreateVersionOperation(namestring)*CreateVersionOperationCreateVersionOperation returns a new CreateVersionOperation from a given name.The name must be that of a previously created CreateVersionOperation, possibly from a different process.
func (*VersionsClient) DeleteVersion
func(c*VersionsClient)DeleteVersion(ctxcontext.Context,req*appenginepb.DeleteVersionRequest,opts...gax.CallOption)(*DeleteVersionOperation,error)DeleteVersion deletes an existing Version resource.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.DeleteVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#DeleteVersionRequest.}op,err:=c.DeleteVersion(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*VersionsClient) DeleteVersionOperation
func(c*VersionsClient)DeleteVersionOperation(namestring)*DeleteVersionOperationDeleteVersionOperation returns a new DeleteVersionOperation from a given name.The name must be that of a previously created DeleteVersionOperation, possibly from a different process.
func (*VersionsClient) GetVersion
func(c*VersionsClient)GetVersion(ctxcontext.Context,req*appenginepb.GetVersionRequest,opts...gax.CallOption)(*appenginepb.Version,error)GetVersion gets the specified Version resource.By default, only a BASIC_VIEW will be returned.Specify the FULL_VIEW parameter to get the full resource.
Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.GetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#GetVersionRequest.}resp,err:=c.GetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VersionsClient) ListVersions
func(c*VersionsClient)ListVersions(ctxcontext.Context,req*appenginepb.ListVersionsRequest,opts...gax.CallOption)*VersionIteratorListVersions lists the versions of a service.
Examples
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb""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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListVersionsRequest.}it:=c.ListVersions(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.(*appenginepb.ListVersionsResponse)}}all
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.ListVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#ListVersionsRequest.}forresp,err:=rangec.ListVersions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}func (*VersionsClient) UpdateVersion
func(c*VersionsClient)UpdateVersion(ctxcontext.Context,req*appenginepb.UpdateVersionRequest,opts...gax.CallOption)(*UpdateVersionOperation,error)UpdateVersion updates the specified Version resource.You can specify the following fields depending on the App Engineenvironment and type of scaling that the version resource uses:
Standard environment
instance_class (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment:
automatic_scaling.min_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)automatic_scaling.max_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)automaticScaling.standard_scheduler_settings.max_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)automaticScaling.standard_scheduler_settings.min_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)automaticScaling.standard_scheduler_settings.target_cpu_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)automaticScaling.standard_scheduler_settings.target_throughput_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment:
serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Flexible environment
serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment:
automatic_scaling.min_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)automatic_scaling.max_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)automatic_scaling.cool_down_period_sec (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)automatic_scaling.cpu_utilization.target_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)manual scaling in the flexible environment:
manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Example
packagemainimport("context"appengine"cloud.google.com/go/appengine/apiv1"appenginepb"cloud.google.com/go/appengine/apiv1/appenginepb")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:=appengine.NewVersionsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&appenginepb.UpdateVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/appengine/apiv1/appenginepb#UpdateVersionRequest.}op,err:=c.UpdateVersion(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*VersionsClient) UpdateVersionOperation
func(c*VersionsClient)UpdateVersionOperation(namestring)*UpdateVersionOperationUpdateVersionOperation returns a new UpdateVersionOperation from a given name.The name must be that of a previously created UpdateVersionOperation, possibly from a different process.
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.