App Engine Admin API v1 - Package cloud.google.com/go/appengine/apiv1 (v1.9.7)

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

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:

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()[]string

DefaultAuthScopes 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

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

Connection returns a connection to the API service.

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

func (*ApplicationsClient) CreateApplication

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

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

func (*ApplicationsClient) GetApplication

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

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)*RepairApplicationOperation

RepairApplicationOperation 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

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

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

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

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

PageInfo 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

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

Connection returns a connection to the API service.

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

func (*AuthorizedCertificatesClient) CreateAuthorizedCertificate

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

DeleteAuthorizedCertificate 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

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

ListAuthorizedCertificates 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

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

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

PageInfo 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

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

Connection returns a connection to the API service.

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

func (*AuthorizedDomainsClient) ListAuthorizedDomains

ListAuthorizedDomains 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

Done reports whether the long-running operation has completed.

func (*CreateApplicationOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateApplicationOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateApplicationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

CreateDomainMappingOperation

typeCreateDomainMappingOperationstruct{// contains filtered or unexported fields}

CreateDomainMappingOperation manages a long-running operation from CreateDomainMapping.

func (*CreateDomainMappingOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateDomainMappingOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateDomainMappingOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateDomainMappingOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateDomainMappingOperation) Wait

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

See documentation of Poll for error-handling information.

CreateVersionOperation

typeCreateVersionOperationstruct{// contains filtered or unexported fields}

CreateVersionOperation manages a long-running operation from CreateVersion.

func (*CreateVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateVersionOperation) Wait

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

See documentation of Poll for error-handling information.

DebugInstanceOperation

typeDebugInstanceOperationstruct{// contains filtered or unexported fields}

DebugInstanceOperation manages a long-running operation from DebugInstance.

func (*DebugInstanceOperation) Done

Done reports whether the long-running operation has completed.

func (*DebugInstanceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DebugInstanceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DebugInstanceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DebugInstanceOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteDomainMappingOperation

typeDeleteDomainMappingOperationstruct{// contains filtered or unexported fields}

DeleteDomainMappingOperation manages a long-running operation from DeleteDomainMapping.

func (*DeleteDomainMappingOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteDomainMappingOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteDomainMappingOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteDomainMappingOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteDomainMappingOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteInstanceOperation

typeDeleteInstanceOperationstruct{// contains filtered or unexported fields}

DeleteInstanceOperation manages a long-running operation from DeleteInstance.

func (*DeleteInstanceOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteInstanceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteInstanceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteInstanceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteInstanceOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteServiceOperation

typeDeleteServiceOperationstruct{// contains filtered or unexported fields}

DeleteServiceOperation manages a long-running operation from DeleteService.

func (*DeleteServiceOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServiceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteServiceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteServiceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteServiceOperation) Wait

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

See documentation of Poll for error-handling information.

DeleteVersionOperation

typeDeleteVersionOperationstruct{// contains filtered or unexported fields}

DeleteVersionOperation manages a long-running operation from DeleteVersion.

func (*DeleteVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteVersionOperation) Wait

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

See documentation of Poll for error-handling information.

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

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

PageInfo 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

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

Connection returns a connection to the API service.

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

func (*DomainMappingsClient) CreateDomainMapping

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)*CreateDomainMappingOperation

CreateDomainMappingOperation 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

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)*DeleteDomainMappingOperation

DeleteDomainMappingOperation 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

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

ListDomainMappings 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

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)*UpdateDomainMappingOperation

UpdateDomainMappingOperation 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

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()error

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

Connection returns a connection to the API service.

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

func (*FirewallClient) CreateIngressRule

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

DeleteIngressRule 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

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

ListIngressRules 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

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

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

PageInfo 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

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

PageInfo 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()error

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

Connection returns a connection to the API service.

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

func (*InstancesClient) DebugInstance

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)*DebugInstanceOperation

DebugInstanceOperation 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

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)*DeleteInstanceOperation

DeleteInstanceOperation 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

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

ListInstances 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

Done reports whether the long-running operation has completed.

func (*RepairApplicationOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*RepairApplicationOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*RepairApplicationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*RepairApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

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

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*ServiceIterator) PageInfo

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

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

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()error

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

Connection returns a connection to the API service.

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

func (*ServicesClient) DeleteService

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

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

func (*ServicesClient) GetService

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

ListServices 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

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

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

UpdateApplicationOperation

typeUpdateApplicationOperationstruct{// contains filtered or unexported fields}

UpdateApplicationOperation manages a long-running operation from UpdateApplication.

func (*UpdateApplicationOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateApplicationOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateApplicationOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateApplicationOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateApplicationOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateDomainMappingOperation

typeUpdateDomainMappingOperationstruct{// contains filtered or unexported fields}

UpdateDomainMappingOperation manages a long-running operation from UpdateDomainMapping.

func (*UpdateDomainMappingOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateDomainMappingOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateDomainMappingOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateDomainMappingOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateDomainMappingOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateServiceOperation

typeUpdateServiceOperationstruct{// contains filtered or unexported fields}

UpdateServiceOperation manages a long-running operation from UpdateService.

func (*UpdateServiceOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateServiceOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateServiceOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateServiceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateServiceOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateVersionOperation

typeUpdateVersionOperationstruct{// contains filtered or unexported fields}

UpdateVersionOperation manages a long-running operation from UpdateVersion.

func (*UpdateVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateVersionOperation) Wait

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

See documentation of Poll for error-handling information.

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

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

PageInfo 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()error

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

Connection returns a connection to the API service.

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

func (*VersionsClient) CreateVersion

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)*CreateVersionOperation

CreateVersionOperation 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

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)*DeleteVersionOperation

DeleteVersionOperation 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

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

ListVersions 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

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)*UpdateVersionOperation

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