Package cloud.google.com/go/appengine/apiv1

Package appengine is an auto-generated package for the App Engine Admin API.

Provisions and manages developers’ App Engine applications.

Use of Context

The ctx passed to NewClient is used for authentication requests and for 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.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go .

Functions

func DefaultAuthScopes

 func DefaultAuthScopes() [] string 
 

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

ApplicationsCallOptions

 type ApplicationsCallOptions struct {
	GetApplication    [] gax 
. CallOption 
CreateApplication [] gax 
. CallOption 
UpdateApplication [] gax 
. CallOption 
RepairApplication [] gax 
. CallOption 
} 

ApplicationsCallOptions contains the retry settings for each method of ApplicationsClient.

ApplicationsClient

 type ApplicationsClient struct {

	// 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

 func NewApplicationsClient(ctx context 
. 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewApplicationsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
} 

func (*ApplicationsClient) Close

 func (c * ApplicationsClient 
) Close() error 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ApplicationsClient) Connection

 func (c * ApplicationsClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*ApplicationsClient) CreateApplication

 func (c * ApplicationsClient 
) CreateApplication(ctx context 
. Context 
, req * appenginepb 
. CreateApplicationRequest 
, opts ... gax 
. CallOption 
) (* CreateApplicationOperation 
, error 
) 

CreateApplication creates an App Engine application for a Google Cloud Platform project. Required fields:

id - The ID of the target Cloud Platform project.

location - The region (at https://cloud.google.com/appengine/docs/locations ) where you want the App Engine application located.

For more information about App Engine applications, see Managing Projects, Applications, and Billing (at https://cloud.google.com/appengine/docs/standard/python/console/ ).

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewApplicationsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.CreateApplicationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ApplicationsClient) CreateApplicationOperation

 func (c * ApplicationsClient 
) CreateApplicationOperation(name string 
) * 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

 func (c * ApplicationsClient 
) GetApplication(ctx context 
. Context 
, req * appenginepb 
. GetApplicationRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

GetApplication gets information about an application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewApplicationsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetApplicationRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ApplicationsClient) RepairApplication

 func (c * ApplicationsClient 
) RepairApplication(ctx context 
. Context 
, req * appenginepb 
. RepairApplicationRequest 
, opts ... gax 
. CallOption 
) (* RepairApplicationOperation 
, error 
) 

RepairApplication recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. 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 will not be able to recreate it. Instead, you should attempt to use the IAM 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 Cloud Console Activity Log.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewApplicationsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.RepairApplicationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.RepairApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ApplicationsClient) RepairApplicationOperation

 func (c * ApplicationsClient 
) RepairApplicationOperation(name string 
) * 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

 func (c * ApplicationsClient 
) UpdateApplication(ctx context 
. Context 
, req * appenginepb 
. UpdateApplicationRequest 
, opts ... gax 
. CallOption 
) (* UpdateApplicationOperation 
, error 
) 

UpdateApplication updates the specified Application resource. You can update the following fields:

auth_domain - Google authentication domain for controlling user access to the application.

default_cookie_expiration - Cookie expiration policy for the application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewApplicationsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateApplicationRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ApplicationsClient) UpdateApplicationOperation

 func (c * ApplicationsClient 
) UpdateApplicationOperation(name string 
) * 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

 type AuthorizedCertificateIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. AuthorizedCertificate 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

AuthorizedCertificateIterator manages a stream of *appenginepb.AuthorizedCertificate.

func (*AuthorizedCertificateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type AuthorizedCertificatesCallOptions struct {
	ListAuthorizedCertificates  [] gax 
. CallOption 
GetAuthorizedCertificate    [] gax 
. CallOption 
CreateAuthorizedCertificate [] gax 
. CallOption 
UpdateAuthorizedCertificate [] gax 
. CallOption 
DeleteAuthorizedCertificate [] gax 
. CallOption 
} 

AuthorizedCertificatesCallOptions contains the retry settings for each method of AuthorizedCertificatesClient.

AuthorizedCertificatesClient

 type AuthorizedCertificatesClient struct {

	// 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 can administer any SSL certificates applicable to their authorized domains.

func NewAuthorizedCertificatesClient

 func NewAuthorizedCertificatesClient(ctx context 
. 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 can administer any SSL certificates applicable to their authorized domains.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
} 

func (*AuthorizedCertificatesClient) Close

 func (c * AuthorizedCertificatesClient 
) Close() error 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AuthorizedCertificatesClient) Connection

 func (c * AuthorizedCertificatesClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*AuthorizedCertificatesClient) CreateAuthorizedCertificate

CreateAuthorizedCertificate uploads the specified SSL certificate.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.CreateAuthorizedCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateAuthorizedCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*AuthorizedCertificatesClient) DeleteAuthorizedCertificate

 func (c * AuthorizedCertificatesClient 
) DeleteAuthorizedCertificate(ctx context 
. Context 
, req * appenginepb 
. DeleteAuthorizedCertificateRequest 
, opts ... gax 
. CallOption 
) error 
 

DeleteAuthorizedCertificate deletes the specified SSL certificate.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteAuthorizedCertificateRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteAuthorizedCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*AuthorizedCertificatesClient) GetAuthorizedCertificate

GetAuthorizedCertificate gets the specified SSL certificate.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetAuthorizedCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetAuthorizedCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*AuthorizedCertificatesClient) ListAuthorizedCertificates

ListAuthorizedCertificates lists all SSL certificates the user is authorized to administer.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListAuthorizedCertificatesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListAuthorizedCertificates(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

func (*AuthorizedCertificatesClient) UpdateAuthorizedCertificate

UpdateAuthorizedCertificate updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedCertificatesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateAuthorizedCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateAuthorizedCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

AuthorizedDomainIterator

 type AuthorizedDomainIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. AuthorizedDomain 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

AuthorizedDomainIterator manages a stream of *appenginepb.AuthorizedDomain.

func (*AuthorizedDomainIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type AuthorizedDomainsCallOptions struct {
	ListAuthorizedDomains [] gax 
. CallOption 
} 

AuthorizedDomainsCallOptions contains the retry settings for each method of AuthorizedDomainsClient.

AuthorizedDomainsClient

 type AuthorizedDomainsClient struct {

	// 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 a domain, verify ownership via Webmaster Central (at https://www.google.com/webmasters/verification/home ).

func NewAuthorizedDomainsClient

 func NewAuthorizedDomainsClient(ctx context 
. 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 a domain, verify ownership via Webmaster Central (at https://www.google.com/webmasters/verification/home ).

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedDomainsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
} 

func (*AuthorizedDomainsClient) Close

 func (c * AuthorizedDomainsClient 
) Close() error 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AuthorizedDomainsClient) Connection

 func (c * AuthorizedDomainsClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*AuthorizedDomainsClient) ListAuthorizedDomains

 func (c * AuthorizedDomainsClient 
) ListAuthorizedDomains(ctx context 
. Context 
, req * appenginepb 
. ListAuthorizedDomainsRequest 
, opts ... gax 
. CallOption 
) * AuthorizedDomainIterator 
 

ListAuthorizedDomains lists all domains the user is authorized to administer.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewAuthorizedDomainsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListAuthorizedDomainsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListAuthorizedDomains(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

CreateApplicationOperation

 type CreateApplicationOperation struct {
	// contains filtered or unexported fields
} 

CreateApplicationOperation manages a long-running operation from CreateApplication.

func (*CreateApplicationOperation) Done

 func (op * CreateApplicationOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*CreateApplicationOperation) Name

 func (op * CreateApplicationOperation 
) Name() string 
 

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

 func (op * CreateApplicationOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

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

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

func (*CreateApplicationOperation) Wait

 func (op * CreateApplicationOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

See documentation of Poll for error-handling information.

CreateDomainMappingOperation

 type CreateDomainMappingOperation struct {
	// contains filtered or unexported fields
} 

CreateDomainMappingOperation manages a long-running operation from CreateDomainMapping.

func (*CreateDomainMappingOperation) Done

 func (op * CreateDomainMappingOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*CreateDomainMappingOperation) Name

 func (op * CreateDomainMappingOperation 
) Name() string 
 

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

 func (op * CreateDomainMappingOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. DomainMapping 
, error 
) 

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

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

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

func (*CreateDomainMappingOperation) Wait

 func (op * CreateDomainMappingOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. DomainMapping 
, error 
) 

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

See documentation of Poll for error-handling information.

CreateVersionOperation

 type CreateVersionOperation struct {
	// contains filtered or unexported fields
} 

CreateVersionOperation manages a long-running operation from CreateVersion.

func (*CreateVersionOperation) Done

 func (op * CreateVersionOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*CreateVersionOperation) Name

 func (op * CreateVersionOperation 
) Name() string 
 

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

 func (op * CreateVersionOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Version 
, error 
) 

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

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

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

func (*CreateVersionOperation) Wait

 func (op * CreateVersionOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Version 
, error 
) 

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

See documentation of Poll for error-handling information.

DebugInstanceOperation

 type DebugInstanceOperation struct {
	// contains filtered or unexported fields
} 

DebugInstanceOperation manages a long-running operation from DebugInstance.

func (*DebugInstanceOperation) Done

 func (op * DebugInstanceOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

 func (op * DebugInstanceOperation 
) Metadata() (* appenginepb 
. OperationMetadataV1 
, error 
) 

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

func (*DebugInstanceOperation) Name

 func (op * DebugInstanceOperation 
) Name() string 
 

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

 func (op * DebugInstanceOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Instance 
, error 
) 

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

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

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

func (*DebugInstanceOperation) Wait

 func (op * DebugInstanceOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Instance 
, error 
) 

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

See documentation of Poll for error-handling information.

DeleteDomainMappingOperation

 type DeleteDomainMappingOperation struct {
	// contains filtered or unexported fields
} 

DeleteDomainMappingOperation manages a long-running operation from DeleteDomainMapping.

func (*DeleteDomainMappingOperation) Done

 func (op * DeleteDomainMappingOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*DeleteDomainMappingOperation) Name

 func (op * DeleteDomainMappingOperation 
) Name() string 
 

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

 func (op * DeleteDomainMappingOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

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

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

func (*DeleteDomainMappingOperation) Wait

 func (op * DeleteDomainMappingOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

See documentation of Poll for error-handling information.

DeleteInstanceOperation

 type DeleteInstanceOperation struct {
	// contains filtered or unexported fields
} 

DeleteInstanceOperation manages a long-running operation from DeleteInstance.

func (*DeleteInstanceOperation) Done

 func (op * DeleteInstanceOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*DeleteInstanceOperation) Name

 func (op * DeleteInstanceOperation 
) Name() string 
 

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

 func (op * DeleteInstanceOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

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

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

func (*DeleteInstanceOperation) Wait

 func (op * DeleteInstanceOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

See documentation of Poll for error-handling information.

DeleteServiceOperation

 type DeleteServiceOperation struct {
	// contains filtered or unexported fields
} 

DeleteServiceOperation manages a long-running operation from DeleteService.

func (*DeleteServiceOperation) Done

 func (op * DeleteServiceOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

 func (op * DeleteServiceOperation 
) Metadata() (* appenginepb 
. OperationMetadataV1 
, error 
) 

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

func (*DeleteServiceOperation) Name

 func (op * DeleteServiceOperation 
) Name() string 
 

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

 func (op * DeleteServiceOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

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

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

func (*DeleteServiceOperation) Wait

 func (op * DeleteServiceOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

See documentation of Poll for error-handling information.

DeleteVersionOperation

 type DeleteVersionOperation struct {
	// contains filtered or unexported fields
} 

DeleteVersionOperation manages a long-running operation from DeleteVersion.

func (*DeleteVersionOperation) Done

 func (op * DeleteVersionOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

 func (op * DeleteVersionOperation 
) Metadata() (* appenginepb 
. OperationMetadataV1 
, error 
) 

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

func (*DeleteVersionOperation) Name

 func (op * DeleteVersionOperation 
) Name() string 
 

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

 func (op * DeleteVersionOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

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

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

func (*DeleteVersionOperation) Wait

 func (op * DeleteVersionOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) error 
 

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

See documentation of Poll for error-handling information.

DomainMappingIterator

 type DomainMappingIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. DomainMapping 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

DomainMappingIterator manages a stream of *appenginepb.DomainMapping.

func (*DomainMappingIterator) Next

 func (it * DomainMappingIterator 
) Next() (* appenginepb 
. DomainMapping 
, error 
) 

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type DomainMappingsCallOptions struct {
	ListDomainMappings  [] gax 
. CallOption 
GetDomainMapping    [] gax 
. CallOption 
CreateDomainMapping [] gax 
. CallOption 
UpdateDomainMapping [] gax 
. CallOption 
DeleteDomainMapping [] gax 
. CallOption 
} 

DomainMappingsCallOptions contains the retry settings for each method of DomainMappingsClient.

DomainMappingsClient

 type DomainMappingsClient struct {

	// 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

 func NewDomainMappingsClient(ctx context 
. 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
} 

func (*DomainMappingsClient) Close

 func (c * DomainMappingsClient 
) Close() error 
 

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*DomainMappingsClient) Connection

 func (c * DomainMappingsClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*DomainMappingsClient) CreateDomainMapping

 func (c * DomainMappingsClient 
) CreateDomainMapping(ctx context 
. Context 
, req * appenginepb 
. CreateDomainMappingRequest 
, opts ... gax 
. CallOption 
) (* CreateDomainMappingOperation 
, error 
) 

CreateDomainMapping maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains (at ).

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.CreateDomainMappingRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateDomainMapping(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*DomainMappingsClient) CreateDomainMappingOperation

 func (c * DomainMappingsClient 
) CreateDomainMappingOperation(name string 
) * 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

 func (c * DomainMappingsClient 
) DeleteDomainMapping(ctx context 
. Context 
, req * appenginepb 
. DeleteDomainMappingRequest 
, opts ... gax 
. CallOption 
) (* DeleteDomainMappingOperation 
, error 
) 

DeleteDomainMapping deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteDomainMappingRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteDomainMapping(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*DomainMappingsClient) DeleteDomainMappingOperation

 func (c * DomainMappingsClient 
) DeleteDomainMappingOperation(name string 
) * 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

 func (c * DomainMappingsClient 
) GetDomainMapping(ctx context 
. Context 
, req * appenginepb 
. GetDomainMappingRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. DomainMapping 
, error 
) 

GetDomainMapping gets the specified domain mapping.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetDomainMappingRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetDomainMapping(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*DomainMappingsClient) ListDomainMappings

 func (c * DomainMappingsClient 
) ListDomainMappings(ctx context 
. Context 
, req * appenginepb 
. ListDomainMappingsRequest 
, opts ... gax 
. CallOption 
) * DomainMappingIterator 
 

ListDomainMappings lists the domain mappings on an application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListDomainMappingsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListDomainMappings(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

func (*DomainMappingsClient) UpdateDomainMapping

 func (c * DomainMappingsClient 
) UpdateDomainMapping(ctx context 
. Context 
, req * appenginepb 
. UpdateDomainMappingRequest 
, opts ... gax 
. CallOption 
) (* UpdateDomainMappingOperation 
, error 
) 

UpdateDomainMapping updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewDomainMappingsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateDomainMappingRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateDomainMapping(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*DomainMappingsClient) UpdateDomainMappingOperation

 func (c * DomainMappingsClient 
) UpdateDomainMappingOperation(name string 
) * 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

 type FirewallCallOptions struct {
	ListIngressRules        [] gax 
. CallOption 
BatchUpdateIngressRules [] gax 
. CallOption 
CreateIngressRule       [] gax 
. CallOption 
GetIngressRule          [] gax 
. CallOption 
UpdateIngressRule       [] gax 
. CallOption 
DeleteIngressRule       [] gax 
. CallOption 
} 

FirewallCallOptions contains the retry settings for each method of FirewallClient.

FirewallClient

 type FirewallClient struct {

	// 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 rules for an Application. Each rule is defined with a position which specifies the rule’s order in the sequence of rules, an IP range to be matched against requests, 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 remaining IP addresses. The default final rule for a newly-created application will be set to “allow” if not otherwise specified by the user.

func NewFirewallClient

 func NewFirewallClient(ctx context 
. 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 rules for an Application. Each rule is defined with a position which specifies the rule’s order in the sequence of rules, an IP range to be matched against requests, 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 remaining IP addresses. The default final rule for a newly-created application will be set to “allow” if not otherwise specified by the user.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
} 

func (*FirewallClient) BatchUpdateIngressRules

 func (c * FirewallClient 
) BatchUpdateIngressRules(ctx context 
. Context 
, req * appenginepb 
. BatchUpdateIngressRulesRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. BatchUpdateIngressRulesResponse 
, error 
) 

BatchUpdateIngressRules replaces the entire firewall ruleset in one bulk operation. This overrides and 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.BatchUpdateIngressRulesRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.BatchUpdateIngressRules(ctx, req)
	if err != 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 when the client is no longer required.

func (*FirewallClient) Connection

 func (c * FirewallClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*FirewallClient) CreateIngressRule

 func (c * FirewallClient 
) CreateIngressRule(ctx context 
. Context 
, req * appenginepb 
. CreateIngressRuleRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. FirewallRule 
, error 
) 

CreateIngressRule creates a firewall rule for the application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.CreateIngressRuleRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateIngressRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*FirewallClient) DeleteIngressRule

 func (c * FirewallClient 
) DeleteIngressRule(ctx context 
. Context 
, req * appenginepb 
. DeleteIngressRuleRequest 
, opts ... gax 
. CallOption 
) error 
 

DeleteIngressRule deletes the specified firewall rule.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteIngressRuleRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteIngressRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*FirewallClient) GetIngressRule

 func (c * FirewallClient 
) GetIngressRule(ctx context 
. Context 
, req * appenginepb 
. GetIngressRuleRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. FirewallRule 
, error 
) 

GetIngressRule gets the specified firewall rule.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetIngressRuleRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetIngressRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*FirewallClient) ListIngressRules

 func (c * FirewallClient 
) ListIngressRules(ctx context 
. Context 
, req * appenginepb 
. ListIngressRulesRequest 
, opts ... gax 
. CallOption 
) * FirewallRuleIterator 
 

ListIngressRules lists the firewall rules of an application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListIngressRulesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListIngressRules(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

func (*FirewallClient) UpdateIngressRule

 func (c * FirewallClient 
) UpdateIngressRule(ctx context 
. Context 
, req * appenginepb 
. UpdateIngressRuleRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. FirewallRule 
, error 
) 

UpdateIngressRule updates the specified firewall rule.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewFirewallClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateIngressRuleRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateIngressRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

FirewallRuleIterator

 type FirewallRuleIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. FirewallRule 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

FirewallRuleIterator manages a stream of *appenginepb.FirewallRule.

func (*FirewallRuleIterator) Next

 func (it * FirewallRuleIterator 
) Next() (* appenginepb 
. FirewallRule 
, error 
) 

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type InstanceIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. Instance 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

InstanceIterator manages a stream of *appenginepb.Instance.

func (*InstanceIterator) Next

 func (it * InstanceIterator 
) Next() (* appenginepb 
. Instance 
, error 
) 

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type InstancesCallOptions struct {
	ListInstances  [] gax 
. CallOption 
GetInstance    [] gax 
. CallOption 
DeleteInstance [] gax 
. CallOption 
DebugInstance  [] gax 
. CallOption 
} 

InstancesCallOptions contains the retry settings for each method of InstancesClient.

InstancesClient

 type InstancesClient struct {

	// 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

 func NewInstancesClient(ctx context 
. 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewInstancesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.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 when the client is no longer required.

func (*InstancesClient) Connection

 func (c * InstancesClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*InstancesClient) DebugInstance

 func (c * InstancesClient 
) DebugInstance(ctx context 
. Context 
, req * appenginepb 
. DebugInstanceRequest 
, opts ... gax 
. CallOption 
) (* DebugInstanceOperation 
, error 
) 

DebugInstance enables debugging on a VM instance. This allows you to use the SSH command 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 then allow the system to take over and determine if another instance should be started.

Only applicable for instances in App Engine flexible environment.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewInstancesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DebugInstanceRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DebugInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*InstancesClient) DebugInstanceOperation

 func (c * InstancesClient 
) DebugInstanceOperation(name string 
) * 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

 func (c * InstancesClient 
) DeleteInstance(ctx context 
. Context 
, req * appenginepb 
. DeleteInstanceRequest 
, opts ... gax 
. CallOption 
) (* DeleteInstanceOperation 
, error 
) 

DeleteInstance stops a running instance.

The instance might be automatically recreated based on the scaling settings of the version. For more information, see “How Instances are Managed” (standard environment (at https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed ) | flexible environment (at https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed )).

To ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to STOPPED with the apps.services.versions.patch (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch ) method.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewInstancesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteInstanceRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*InstancesClient) DeleteInstanceOperation

 func (c * InstancesClient 
) DeleteInstanceOperation(name string 
) * 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

 func (c * InstancesClient 
) GetInstance(ctx context 
. Context 
, req * appenginepb 
. GetInstanceRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Instance 
, error 
) 

GetInstance gets instance information.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewInstancesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetInstanceRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*InstancesClient) ListInstances

 func (c * InstancesClient 
) ListInstances(ctx context 
. Context 
, req * appenginepb 
. ListInstancesRequest 
, opts ... gax 
. CallOption 
) * InstanceIterator 
 

ListInstances lists the instances of a version.

Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (at https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list ).

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewInstancesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListInstancesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

RepairApplicationOperation

 type RepairApplicationOperation struct {
	// contains filtered or unexported fields
} 

RepairApplicationOperation manages a long-running operation from RepairApplication.

func (*RepairApplicationOperation) Done

 func (op * RepairApplicationOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*RepairApplicationOperation) Name

 func (op * RepairApplicationOperation 
) Name() string 
 

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

 func (op * RepairApplicationOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

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

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

func (*RepairApplicationOperation) Wait

 func (op * RepairApplicationOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

See documentation of Poll for error-handling information.

ServiceIterator

 type ServiceIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. Service 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

ServiceIterator manages a stream of *appenginepb.Service.

func (*ServiceIterator) Next

 func (it * ServiceIterator 
) Next() (* appenginepb 
. Service 
, error 
) 

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type ServicesCallOptions struct {
	ListServices  [] gax 
. CallOption 
GetService    [] gax 
. CallOption 
UpdateService [] gax 
. CallOption 
DeleteService [] gax 
. CallOption 
} 

ServicesCallOptions contains the retry settings for each method of ServicesClient.

ServicesClient

 type ServicesClient struct {

	// 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

 func NewServicesClient(ctx context 
. 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewServicesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.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 when the client is no longer required.

func (*ServicesClient) Connection

 func (c * ServicesClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*ServicesClient) DeleteService

 func (c * ServicesClient 
) DeleteService(ctx context 
. Context 
, req * appenginepb 
. DeleteServiceRequest 
, opts ... gax 
. CallOption 
) (* DeleteServiceOperation 
, error 
) 

DeleteService deletes the specified service and all enclosed versions.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewServicesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteServiceRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*ServicesClient) DeleteServiceOperation

 func (c * ServicesClient 
) DeleteServiceOperation(name string 
) * 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

 func (c * ServicesClient 
) GetService(ctx context 
. Context 
, req * appenginepb 
. GetServiceRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Service 
, error 
) 

GetService gets the current configuration of the specified service.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewServicesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetServiceRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ServicesClient) ListServices

 func (c * ServicesClient 
) ListServices(ctx context 
. Context 
, req * appenginepb 
. ListServicesRequest 
, opts ... gax 
. CallOption 
) * ServiceIterator 
 

ListServices lists all the services in the application.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewServicesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListServicesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListServices(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

func (*ServicesClient) UpdateService

 func (c * ServicesClient 
) UpdateService(ctx context 
. Context 
, req * appenginepb 
. UpdateServiceRequest 
, opts ... gax 
. CallOption 
) (* UpdateServiceOperation 
, error 
) 

UpdateService updates the configuration of the specified service.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewServicesClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateServiceRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*ServicesClient) UpdateServiceOperation

 func (c * ServicesClient 
) UpdateServiceOperation(name string 
) * 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

 type UpdateApplicationOperation struct {
	// contains filtered or unexported fields
} 

UpdateApplicationOperation manages a long-running operation from UpdateApplication.

func (*UpdateApplicationOperation) Done

 func (op * UpdateApplicationOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*UpdateApplicationOperation) Name

 func (op * UpdateApplicationOperation 
) Name() string 
 

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

 func (op * UpdateApplicationOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

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

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

func (*UpdateApplicationOperation) Wait

 func (op * UpdateApplicationOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Application 
, error 
) 

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

See documentation of Poll for error-handling information.

UpdateDomainMappingOperation

 type UpdateDomainMappingOperation struct {
	// contains filtered or unexported fields
} 

UpdateDomainMappingOperation manages a long-running operation from UpdateDomainMapping.

func (*UpdateDomainMappingOperation) Done

 func (op * UpdateDomainMappingOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

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

func (*UpdateDomainMappingOperation) Name

 func (op * UpdateDomainMappingOperation 
) Name() string 
 

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

 func (op * UpdateDomainMappingOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. DomainMapping 
, error 
) 

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

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

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

func (*UpdateDomainMappingOperation) Wait

 func (op * UpdateDomainMappingOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. DomainMapping 
, error 
) 

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

See documentation of Poll for error-handling information.

UpdateServiceOperation

 type UpdateServiceOperation struct {
	// contains filtered or unexported fields
} 

UpdateServiceOperation manages a long-running operation from UpdateService.

func (*UpdateServiceOperation) Done

 func (op * UpdateServiceOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

 func (op * UpdateServiceOperation 
) Metadata() (* appenginepb 
. OperationMetadataV1 
, error 
) 

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

func (*UpdateServiceOperation) Name

 func (op * UpdateServiceOperation 
) Name() string 
 

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

 func (op * UpdateServiceOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Service 
, error 
) 

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

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

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

func (*UpdateServiceOperation) Wait

 func (op * UpdateServiceOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Service 
, error 
) 

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

See documentation of Poll for error-handling information.

UpdateVersionOperation

 type UpdateVersionOperation struct {
	// contains filtered or unexported fields
} 

UpdateVersionOperation manages a long-running operation from UpdateVersion.

func (*UpdateVersionOperation) Done

 func (op * UpdateVersionOperation 
) Done() bool 
 

Done reports whether the long-running operation has completed.

 func (op * UpdateVersionOperation 
) Metadata() (* appenginepb 
. OperationMetadataV1 
, error 
) 

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

func (*UpdateVersionOperation) Name

 func (op * UpdateVersionOperation 
) Name() string 
 

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

 func (op * UpdateVersionOperation 
) Poll(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Version 
, error 
) 

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

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

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

func (*UpdateVersionOperation) Wait

 func (op * UpdateVersionOperation 
) Wait(ctx context 
. Context 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Version 
, error 
) 

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

See documentation of Poll for error-handling information.

VersionIterator

 type VersionIterator struct {

	// 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.
	Response interface{}

	// 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.
	InternalFetch func(pageSize int 
, pageToken string 
) (results []* appenginepb 
. Version 
, nextPageToken string 
, err error 
)
	// contains filtered or unexported fields
} 

VersionIterator manages a stream of *appenginepb.Version.

func (*VersionIterator) Next

 func (it * VersionIterator 
) Next() (* appenginepb 
. Version 
, error 
) 

Next returns the next result. Its second return value is iterator.Done if there are no more results. 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

 type VersionsCallOptions struct {
	ListVersions  [] gax 
. CallOption 
GetVersion    [] gax 
. CallOption 
CreateVersion [] gax 
. CallOption 
UpdateVersion [] gax 
. CallOption 
DeleteVersion [] gax 
. CallOption 
} 

VersionsCallOptions contains the retry settings for each method of VersionsClient.

VersionsClient

 type VersionsClient struct {

	// 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

 func NewVersionsClient(ctx context 
. 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.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 when the client is no longer required.

func (*VersionsClient) Connection

 func (c * VersionsClient 
) Connection() * grpc 
. ClientConn 
 

Connection returns a connection to the API service.

Deprecated.

func (*VersionsClient) CreateVersion

 func (c * VersionsClient 
) CreateVersion(ctx context 
. Context 
, req * appenginepb 
. CreateVersionRequest 
, opts ... gax 
. CallOption 
) (* CreateVersionOperation 
, error 
) 

CreateVersion deploys code and resource files to a new version.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.CreateVersionRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*VersionsClient) CreateVersionOperation

 func (c * VersionsClient 
) CreateVersionOperation(name string 
) * 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

 func (c * VersionsClient 
) DeleteVersion(ctx context 
. Context 
, req * appenginepb 
. DeleteVersionRequest 
, opts ... gax 
. CallOption 
) (* DeleteVersionOperation 
, error 
) 

DeleteVersion deletes an existing Version resource.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.DeleteVersionRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
} 

func (*VersionsClient) DeleteVersionOperation

 func (c * VersionsClient 
) DeleteVersionOperation(name string 
) * 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

 func (c * VersionsClient 
) GetVersion(ctx context 
. Context 
, req * appenginepb 
. GetVersionRequest 
, opts ... gax 
. CallOption 
) (* appenginepb 
. Version 
, error 
) 

GetVersion gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.GetVersionRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*VersionsClient) ListVersions

 func (c * VersionsClient 
) ListVersions(ctx context 
. Context 
, req * appenginepb 
. ListVersionsRequest 
, opts ... gax 
. CallOption 
) * VersionIterator 
 

ListVersions lists the versions of a service.

Example

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	"google.golang.org/api/iterator"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.ListVersionsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListVersions(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
} 

func (*VersionsClient) UpdateVersion

 func (c * VersionsClient 
) UpdateVersion(ctx context 
. Context 
, req * appenginepb 
. UpdateVersionRequest 
, opts ... gax 
. CallOption 
) (* UpdateVersionOperation 
, error 
) 

UpdateVersion updates the specified Version resource. You can specify the following fields depending on the App Engine environment 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

 package main

import (
	appengine "cloud.google.com/go/appengine/apiv1"
	"context"
	appenginepb "google.golang.org/genproto/googleapis/appengine/v1"
)

func main() {
	ctx := context.Background()
	c, err := appengine.NewVersionsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &appenginepb.UpdateVersionRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateVersion(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
} 

func (*VersionsClient) UpdateVersionOperation

 func (c * VersionsClient 
) UpdateVersionOperation(name string 
) * 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.

Create a Mobile Website
View Site in Mobile | Classic
Share by: