Documentation ¶
Overview ¶
Package alloydb is an auto-generated package for the AlloyDB API.
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.BatchCreateInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#BatchCreateInstancesRequest. } op, err := c.BatchCreateInstances(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context ¶
The ctx passed to NewAlloyDBAdminClient 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.
Index ¶
- func DefaultAuthScopes() []string
- type AlloyDBAdminCallOptions
- type AlloyDBAdminClient
- func (c *AlloyDBAdminClient) BatchCreateInstances(ctx context.Context, req *alloydbpb.BatchCreateInstancesRequest, ...) (*BatchCreateInstancesOperation, error)
- func (c *AlloyDBAdminClient) BatchCreateInstancesOperation(name string) *BatchCreateInstancesOperation
- func (c *AlloyDBAdminClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *AlloyDBAdminClient) Close() error
- func (c *AlloyDBAdminClient) Connection() *grpc.ClientConndeprecated
- func (c *AlloyDBAdminClient) CreateBackup(ctx context.Context, req *alloydbpb.CreateBackupRequest, ...) (*CreateBackupOperation, error)
- func (c *AlloyDBAdminClient) CreateBackupOperation(name string) *CreateBackupOperation
- func (c *AlloyDBAdminClient) CreateCluster(ctx context.Context, req *alloydbpb.CreateClusterRequest, ...) (*CreateClusterOperation, error)
- func (c *AlloyDBAdminClient) CreateClusterOperation(name string) *CreateClusterOperation
- func (c *AlloyDBAdminClient) CreateInstance(ctx context.Context, req *alloydbpb.CreateInstanceRequest, ...) (*CreateInstanceOperation, error)
- func (c *AlloyDBAdminClient) CreateInstanceOperation(name string) *CreateInstanceOperation
- func (c *AlloyDBAdminClient) CreateSecondaryCluster(ctx context.Context, req *alloydbpb.CreateSecondaryClusterRequest, ...) (*CreateSecondaryClusterOperation, error)
- func (c *AlloyDBAdminClient) CreateSecondaryClusterOperation(name string) *CreateSecondaryClusterOperation
- func (c *AlloyDBAdminClient) CreateSecondaryInstance(ctx context.Context, req *alloydbpb.CreateSecondaryInstanceRequest, ...) (*CreateSecondaryInstanceOperation, error)
- func (c *AlloyDBAdminClient) CreateSecondaryInstanceOperation(name string) *CreateSecondaryInstanceOperation
- func (c *AlloyDBAdminClient) CreateUser(ctx context.Context, req *alloydbpb.CreateUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
- func (c *AlloyDBAdminClient) DeleteBackup(ctx context.Context, req *alloydbpb.DeleteBackupRequest, ...) (*DeleteBackupOperation, error)
- func (c *AlloyDBAdminClient) DeleteBackupOperation(name string) *DeleteBackupOperation
- func (c *AlloyDBAdminClient) DeleteCluster(ctx context.Context, req *alloydbpb.DeleteClusterRequest, ...) (*DeleteClusterOperation, error)
- func (c *AlloyDBAdminClient) DeleteClusterOperation(name string) *DeleteClusterOperation
- func (c *AlloyDBAdminClient) DeleteInstance(ctx context.Context, req *alloydbpb.DeleteInstanceRequest, ...) (*DeleteInstanceOperation, error)
- func (c *AlloyDBAdminClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation
- func (c *AlloyDBAdminClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *AlloyDBAdminClient) DeleteUser(ctx context.Context, req *alloydbpb.DeleteUserRequest, opts ...gax.CallOption) error
- func (c *AlloyDBAdminClient) FailoverInstance(ctx context.Context, req *alloydbpb.FailoverInstanceRequest, ...) (*FailoverInstanceOperation, error)
- func (c *AlloyDBAdminClient) FailoverInstanceOperation(name string) *FailoverInstanceOperation
- func (c *AlloyDBAdminClient) GenerateClientCertificate(ctx context.Context, req *alloydbpb.GenerateClientCertificateRequest, ...) (*alloydbpb.GenerateClientCertificateResponse, error)
- func (c *AlloyDBAdminClient) GetBackup(ctx context.Context, req *alloydbpb.GetBackupRequest, opts ...gax.CallOption) (*alloydbpb.Backup, error)
- func (c *AlloyDBAdminClient) GetCluster(ctx context.Context, req *alloydbpb.GetClusterRequest, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (c *AlloyDBAdminClient) GetConnectionInfo(ctx context.Context, req *alloydbpb.GetConnectionInfoRequest, ...) (*alloydbpb.ConnectionInfo, error)
- func (c *AlloyDBAdminClient) GetInstance(ctx context.Context, req *alloydbpb.GetInstanceRequest, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (c *AlloyDBAdminClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *AlloyDBAdminClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *AlloyDBAdminClient) GetUser(ctx context.Context, req *alloydbpb.GetUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
- func (c *AlloyDBAdminClient) InjectFault(ctx context.Context, req *alloydbpb.InjectFaultRequest, opts ...gax.CallOption) (*InjectFaultOperation, error)
- func (c *AlloyDBAdminClient) InjectFaultOperation(name string) *InjectFaultOperation
- func (c *AlloyDBAdminClient) ListBackups(ctx context.Context, req *alloydbpb.ListBackupsRequest, opts ...gax.CallOption) *BackupIterator
- func (c *AlloyDBAdminClient) ListClusters(ctx context.Context, req *alloydbpb.ListClustersRequest, ...) *ClusterIterator
- func (c *AlloyDBAdminClient) ListDatabases(ctx context.Context, req *alloydbpb.ListDatabasesRequest, ...) *DatabaseIterator
- func (c *AlloyDBAdminClient) ListInstances(ctx context.Context, req *alloydbpb.ListInstancesRequest, ...) *InstanceIterator
- func (c *AlloyDBAdminClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *AlloyDBAdminClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *AlloyDBAdminClient) ListSupportedDatabaseFlags(ctx context.Context, req *alloydbpb.ListSupportedDatabaseFlagsRequest, ...) *SupportedDatabaseFlagIterator
- func (c *AlloyDBAdminClient) ListUsers(ctx context.Context, req *alloydbpb.ListUsersRequest, opts ...gax.CallOption) *UserIterator
- func (c *AlloyDBAdminClient) PromoteCluster(ctx context.Context, req *alloydbpb.PromoteClusterRequest, ...) (*PromoteClusterOperation, error)
- func (c *AlloyDBAdminClient) PromoteClusterOperation(name string) *PromoteClusterOperation
- func (c *AlloyDBAdminClient) RestartInstance(ctx context.Context, req *alloydbpb.RestartInstanceRequest, ...) (*RestartInstanceOperation, error)
- func (c *AlloyDBAdminClient) RestartInstanceOperation(name string) *RestartInstanceOperation
- func (c *AlloyDBAdminClient) RestoreCluster(ctx context.Context, req *alloydbpb.RestoreClusterRequest, ...) (*RestoreClusterOperation, error)
- func (c *AlloyDBAdminClient) RestoreClusterOperation(name string) *RestoreClusterOperation
- func (c *AlloyDBAdminClient) UpdateBackup(ctx context.Context, req *alloydbpb.UpdateBackupRequest, ...) (*UpdateBackupOperation, error)
- func (c *AlloyDBAdminClient) UpdateBackupOperation(name string) *UpdateBackupOperation
- func (c *AlloyDBAdminClient) UpdateCluster(ctx context.Context, req *alloydbpb.UpdateClusterRequest, ...) (*UpdateClusterOperation, error)
- func (c *AlloyDBAdminClient) UpdateClusterOperation(name string) *UpdateClusterOperation
- func (c *AlloyDBAdminClient) UpdateInstance(ctx context.Context, req *alloydbpb.UpdateInstanceRequest, ...) (*UpdateInstanceOperation, error)
- func (c *AlloyDBAdminClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation
- func (c *AlloyDBAdminClient) UpdateUser(ctx context.Context, req *alloydbpb.UpdateUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
- type BackupIterator
- type BatchCreateInstancesOperation
- func (op *BatchCreateInstancesOperation) Done() bool
- func (op *BatchCreateInstancesOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *BatchCreateInstancesOperation) Name() string
- func (op *BatchCreateInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.BatchCreateInstancesResponse, error)
- func (op *BatchCreateInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.BatchCreateInstancesResponse, error)
- type ClusterIterator
- type CreateBackupOperation
- func (op *CreateBackupOperation) Done() bool
- func (op *CreateBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *CreateBackupOperation) Name() string
- func (op *CreateBackupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, error)
- func (op *CreateBackupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, error)
- type CreateClusterOperation
- func (op *CreateClusterOperation) Done() bool
- func (op *CreateClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *CreateClusterOperation) Name() string
- func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- type CreateInstanceOperation
- func (op *CreateInstanceOperation) Done() bool
- func (op *CreateInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *CreateInstanceOperation) Name() string
- func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type CreateSecondaryClusterOperation
- func (op *CreateSecondaryClusterOperation) Done() bool
- func (op *CreateSecondaryClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *CreateSecondaryClusterOperation) Name() string
- func (op *CreateSecondaryClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (op *CreateSecondaryClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- type CreateSecondaryInstanceOperation
- func (op *CreateSecondaryInstanceOperation) Done() bool
- func (op *CreateSecondaryInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *CreateSecondaryInstanceOperation) Name() string
- func (op *CreateSecondaryInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *CreateSecondaryInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type DatabaseIterator
- type DeleteBackupOperation
- func (op *DeleteBackupOperation) Done() bool
- func (op *DeleteBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *DeleteBackupOperation) Name() string
- func (op *DeleteBackupOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteBackupOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteClusterOperation
- func (op *DeleteClusterOperation) Done() bool
- func (op *DeleteClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *DeleteClusterOperation) Name() string
- func (op *DeleteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteInstanceOperation
- func (op *DeleteInstanceOperation) Done() bool
- func (op *DeleteInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *DeleteInstanceOperation) Name() string
- func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type FailoverInstanceOperation
- func (op *FailoverInstanceOperation) Done() bool
- func (op *FailoverInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *FailoverInstanceOperation) Name() string
- func (op *FailoverInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *FailoverInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type InjectFaultOperation
- func (op *InjectFaultOperation) Done() bool
- func (op *InjectFaultOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *InjectFaultOperation) Name() string
- func (op *InjectFaultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *InjectFaultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type InstanceIterator
- type LocationIterator
- type OperationIterator
- type PromoteClusterOperation
- func (op *PromoteClusterOperation) Done() bool
- func (op *PromoteClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *PromoteClusterOperation) Name() string
- func (op *PromoteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (op *PromoteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- type RestartInstanceOperation
- func (op *RestartInstanceOperation) Done() bool
- func (op *RestartInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *RestartInstanceOperation) Name() string
- func (op *RestartInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *RestartInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type RestoreClusterOperation
- func (op *RestoreClusterOperation) Done() bool
- func (op *RestoreClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *RestoreClusterOperation) Name() string
- func (op *RestoreClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (op *RestoreClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- type SupportedDatabaseFlagIterator
- type UpdateBackupOperation
- func (op *UpdateBackupOperation) Done() bool
- func (op *UpdateBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *UpdateBackupOperation) Name() string
- func (op *UpdateBackupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, error)
- func (op *UpdateBackupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, error)
- type UpdateClusterOperation
- func (op *UpdateClusterOperation) Done() bool
- func (op *UpdateClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *UpdateClusterOperation) Name() string
- func (op *UpdateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- func (op *UpdateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
- type UpdateInstanceOperation
- func (op *UpdateInstanceOperation) Done() bool
- func (op *UpdateInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
- func (op *UpdateInstanceOperation) Name() string
- func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Instance, error)
- type UserIterator
Examples ¶
- AlloyDBAdminClient.BatchCreateInstances
- AlloyDBAdminClient.CancelOperation
- AlloyDBAdminClient.CreateBackup
- AlloyDBAdminClient.CreateCluster
- AlloyDBAdminClient.CreateInstance
- AlloyDBAdminClient.CreateSecondaryCluster
- AlloyDBAdminClient.CreateSecondaryInstance
- AlloyDBAdminClient.CreateUser
- AlloyDBAdminClient.DeleteBackup
- AlloyDBAdminClient.DeleteCluster
- AlloyDBAdminClient.DeleteInstance
- AlloyDBAdminClient.DeleteOperation
- AlloyDBAdminClient.DeleteUser
- AlloyDBAdminClient.FailoverInstance
- AlloyDBAdminClient.GenerateClientCertificate
- AlloyDBAdminClient.GetBackup
- AlloyDBAdminClient.GetCluster
- AlloyDBAdminClient.GetConnectionInfo
- AlloyDBAdminClient.GetInstance
- AlloyDBAdminClient.GetLocation
- AlloyDBAdminClient.GetOperation
- AlloyDBAdminClient.GetUser
- AlloyDBAdminClient.InjectFault
- AlloyDBAdminClient.ListBackups
- AlloyDBAdminClient.ListClusters
- AlloyDBAdminClient.ListDatabases
- AlloyDBAdminClient.ListInstances
- AlloyDBAdminClient.ListLocations
- AlloyDBAdminClient.ListOperations
- AlloyDBAdminClient.ListSupportedDatabaseFlags
- AlloyDBAdminClient.ListUsers
- AlloyDBAdminClient.PromoteCluster
- AlloyDBAdminClient.RestartInstance
- AlloyDBAdminClient.RestoreCluster
- AlloyDBAdminClient.UpdateBackup
- AlloyDBAdminClient.UpdateCluster
- AlloyDBAdminClient.UpdateInstance
- AlloyDBAdminClient.UpdateUser
- NewAlloyDBAdminClient
- NewAlloyDBAdminRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AlloyDBAdminCallOptions ¶
type AlloyDBAdminCallOptions struct { ListClusters []gax.CallOption GetCluster []gax.CallOption CreateCluster []gax.CallOption UpdateCluster []gax.CallOption DeleteCluster []gax.CallOption PromoteCluster []gax.CallOption RestoreCluster []gax.CallOption CreateSecondaryCluster []gax.CallOption ListInstances []gax.CallOption GetInstance []gax.CallOption CreateInstance []gax.CallOption CreateSecondaryInstance []gax.CallOption BatchCreateInstances []gax.CallOption UpdateInstance []gax.CallOption DeleteInstance []gax.CallOption FailoverInstance []gax.CallOption InjectFault []gax.CallOption RestartInstance []gax.CallOption ListBackups []gax.CallOption GetBackup []gax.CallOption CreateBackup []gax.CallOption UpdateBackup []gax.CallOption DeleteBackup []gax.CallOption ListSupportedDatabaseFlags []gax.CallOption GenerateClientCertificate []gax.CallOption GetConnectionInfo []gax.CallOption ListUsers []gax.CallOption GetUser []gax.CallOption CreateUser []gax.CallOption UpdateUser []gax.CallOption DeleteUser []gax.CallOption ListDatabases []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
AlloyDBAdminCallOptions contains the retry settings for each method of AlloyDBAdminClient.
type AlloyDBAdminClient ¶
type AlloyDBAdminClient struct { // The call options for this service. CallOptions *AlloyDBAdminCallOptions // 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 }
AlloyDBAdminClient is a client for interacting with AlloyDB API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources
func NewAlloyDBAdminClient ¶
func NewAlloyDBAdminClient(ctx context.Context, opts ...option.ClientOption) (*AlloyDBAdminClient, error)
NewAlloyDBAdminClient creates a new alloydb admin client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewAlloyDBAdminRESTClient ¶
func NewAlloyDBAdminRESTClient(ctx context.Context, opts ...option.ClientOption) (*AlloyDBAdminClient, error)
NewAlloyDBAdminRESTClient creates a new alloydb admin rest client.
Service describing handlers for resources
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*AlloyDBAdminClient) BatchCreateInstances ¶
func (c *AlloyDBAdminClient) BatchCreateInstances(ctx context.Context, req *alloydbpb.BatchCreateInstancesRequest, opts ...gax.CallOption) (*BatchCreateInstancesOperation, error)
BatchCreateInstances creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.BatchCreateInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#BatchCreateInstancesRequest. } op, err := c.BatchCreateInstances(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) BatchCreateInstancesOperation ¶
func (c *AlloyDBAdminClient) BatchCreateInstancesOperation(name string) *BatchCreateInstancesOperation
BatchCreateInstancesOperation returns a new BatchCreateInstancesOperation from a given name. The name must be that of a previously created BatchCreateInstancesOperation, possibly from a different process.
func (*AlloyDBAdminClient) CancelOperation ¶
func (c *AlloyDBAdminClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) Close ¶
func (c *AlloyDBAdminClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*AlloyDBAdminClient) Connection
deprecated
func (c *AlloyDBAdminClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*AlloyDBAdminClient) CreateBackup ¶
func (c *AlloyDBAdminClient) CreateBackup(ctx context.Context, req *alloydbpb.CreateBackupRequest, opts ...gax.CallOption) (*CreateBackupOperation, error)
CreateBackup creates a new Backup in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateBackupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateBackupRequest. } op, err := c.CreateBackup(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) CreateBackupOperation ¶
func (c *AlloyDBAdminClient) CreateBackupOperation(name string) *CreateBackupOperation
CreateBackupOperation returns a new CreateBackupOperation from a given name. The name must be that of a previously created CreateBackupOperation, possibly from a different process.
func (*AlloyDBAdminClient) CreateCluster ¶
func (c *AlloyDBAdminClient) CreateCluster(ctx context.Context, req *alloydbpb.CreateClusterRequest, opts ...gax.CallOption) (*CreateClusterOperation, error)
CreateCluster creates a new Cluster in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateClusterRequest. } op, err := c.CreateCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) CreateClusterOperation ¶
func (c *AlloyDBAdminClient) CreateClusterOperation(name string) *CreateClusterOperation
CreateClusterOperation returns a new CreateClusterOperation from a given name. The name must be that of a previously created CreateClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) CreateInstance ¶
func (c *AlloyDBAdminClient) CreateInstance(ctx context.Context, req *alloydbpb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error)
CreateInstance creates a new Instance in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateInstanceRequest. } op, err := c.CreateInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) CreateInstanceOperation ¶
func (c *AlloyDBAdminClient) CreateInstanceOperation(name string) *CreateInstanceOperation
CreateInstanceOperation returns a new CreateInstanceOperation from a given name. The name must be that of a previously created CreateInstanceOperation, possibly from a different process.
func (*AlloyDBAdminClient) CreateSecondaryCluster ¶
func (c *AlloyDBAdminClient) CreateSecondaryCluster(ctx context.Context, req *alloydbpb.CreateSecondaryClusterRequest, opts ...gax.CallOption) (*CreateSecondaryClusterOperation, error)
CreateSecondaryCluster creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateSecondaryClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateSecondaryClusterRequest. } op, err := c.CreateSecondaryCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) CreateSecondaryClusterOperation ¶
func (c *AlloyDBAdminClient) CreateSecondaryClusterOperation(name string) *CreateSecondaryClusterOperation
CreateSecondaryClusterOperation returns a new CreateSecondaryClusterOperation from a given name. The name must be that of a previously created CreateSecondaryClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) CreateSecondaryInstance ¶
func (c *AlloyDBAdminClient) CreateSecondaryInstance(ctx context.Context, req *alloydbpb.CreateSecondaryInstanceRequest, opts ...gax.CallOption) (*CreateSecondaryInstanceOperation, error)
CreateSecondaryInstance creates a new SECONDARY Instance in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateSecondaryInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateSecondaryInstanceRequest. } op, err := c.CreateSecondaryInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) CreateSecondaryInstanceOperation ¶
func (c *AlloyDBAdminClient) CreateSecondaryInstanceOperation(name string) *CreateSecondaryInstanceOperation
CreateSecondaryInstanceOperation returns a new CreateSecondaryInstanceOperation from a given name. The name must be that of a previously created CreateSecondaryInstanceOperation, possibly from a different process.
func (*AlloyDBAdminClient) CreateUser ¶ added in v1.2.0
func (c *AlloyDBAdminClient) CreateUser(ctx context.Context, req *alloydbpb.CreateUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
CreateUser creates a new User in a given project, location, and cluster.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.CreateUserRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#CreateUserRequest. } resp, err := c.CreateUser(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) DeleteBackup ¶
func (c *AlloyDBAdminClient) DeleteBackup(ctx context.Context, req *alloydbpb.DeleteBackupRequest, opts ...gax.CallOption) (*DeleteBackupOperation, error)
DeleteBackup deletes a single Backup.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.DeleteBackupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#DeleteBackupRequest. } op, err := c.DeleteBackup(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) DeleteBackupOperation ¶
func (c *AlloyDBAdminClient) DeleteBackupOperation(name string) *DeleteBackupOperation
DeleteBackupOperation returns a new DeleteBackupOperation from a given name. The name must be that of a previously created DeleteBackupOperation, possibly from a different process.
func (*AlloyDBAdminClient) DeleteCluster ¶
func (c *AlloyDBAdminClient) DeleteCluster(ctx context.Context, req *alloydbpb.DeleteClusterRequest, opts ...gax.CallOption) (*DeleteClusterOperation, error)
DeleteCluster deletes a single Cluster.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.DeleteClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#DeleteClusterRequest. } op, err := c.DeleteCluster(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) DeleteClusterOperation ¶
func (c *AlloyDBAdminClient) DeleteClusterOperation(name string) *DeleteClusterOperation
DeleteClusterOperation returns a new DeleteClusterOperation from a given name. The name must be that of a previously created DeleteClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) DeleteInstance ¶
func (c *AlloyDBAdminClient) DeleteInstance(ctx context.Context, req *alloydbpb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error)
DeleteInstance deletes a single Instance.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.DeleteInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#DeleteInstanceRequest. } op, err := c.DeleteInstance(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) DeleteInstanceOperation ¶
func (c *AlloyDBAdminClient) 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 (*AlloyDBAdminClient) DeleteOperation ¶
func (c *AlloyDBAdminClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) DeleteUser ¶ added in v1.2.0
func (c *AlloyDBAdminClient) DeleteUser(ctx context.Context, req *alloydbpb.DeleteUserRequest, opts ...gax.CallOption) error
DeleteUser deletes a single User.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.DeleteUserRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#DeleteUserRequest. } err = c.DeleteUser(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*AlloyDBAdminClient) FailoverInstance ¶
func (c *AlloyDBAdminClient) FailoverInstance(ctx context.Context, req *alloydbpb.FailoverInstanceRequest, opts ...gax.CallOption) (*FailoverInstanceOperation, error)
FailoverInstance forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.FailoverInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#FailoverInstanceRequest. } op, err := c.FailoverInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) FailoverInstanceOperation ¶
func (c *AlloyDBAdminClient) FailoverInstanceOperation(name string) *FailoverInstanceOperation
FailoverInstanceOperation returns a new FailoverInstanceOperation from a given name. The name must be that of a previously created FailoverInstanceOperation, possibly from a different process.
func (*AlloyDBAdminClient) GenerateClientCertificate ¶
func (c *AlloyDBAdminClient) GenerateClientCertificate(ctx context.Context, req *alloydbpb.GenerateClientCertificateRequest, opts ...gax.CallOption) (*alloydbpb.GenerateClientCertificateResponse, error)
GenerateClientCertificate generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint’s behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GenerateClientCertificateRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GenerateClientCertificateRequest. } resp, err := c.GenerateClientCertificate(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetBackup ¶
func (c *AlloyDBAdminClient) GetBackup(ctx context.Context, req *alloydbpb.GetBackupRequest, opts ...gax.CallOption) (*alloydbpb.Backup, error)
GetBackup gets details of a single Backup.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GetBackupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GetBackupRequest. } resp, err := c.GetBackup(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetCluster ¶
func (c *AlloyDBAdminClient) GetCluster(ctx context.Context, req *alloydbpb.GetClusterRequest, opts ...gax.CallOption) (*alloydbpb.Cluster, error)
GetCluster gets details of a single Cluster.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GetClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GetClusterRequest. } resp, err := c.GetCluster(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetConnectionInfo ¶
func (c *AlloyDBAdminClient) GetConnectionInfo(ctx context.Context, req *alloydbpb.GetConnectionInfoRequest, opts ...gax.CallOption) (*alloydbpb.ConnectionInfo, error)
GetConnectionInfo get instance metadata used for a connection.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GetConnectionInfoRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GetConnectionInfoRequest. } resp, err := c.GetConnectionInfo(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetInstance ¶
func (c *AlloyDBAdminClient) GetInstance(ctx context.Context, req *alloydbpb.GetInstanceRequest, opts ...gax.CallOption) (*alloydbpb.Instance, error)
GetInstance gets details of a single Instance.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GetInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GetInstanceRequest. } resp, err := c.GetInstance(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetLocation ¶
func (c *AlloyDBAdminClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.GetLocationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. } resp, err := c.GetLocation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetOperation ¶
func (c *AlloyDBAdminClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) GetUser ¶ added in v1.2.0
func (c *AlloyDBAdminClient) GetUser(ctx context.Context, req *alloydbpb.GetUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
GetUser gets details of a single User.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.GetUserRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#GetUserRequest. } resp, err := c.GetUser(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) InjectFault ¶ added in v1.2.0
func (c *AlloyDBAdminClient) InjectFault(ctx context.Context, req *alloydbpb.InjectFaultRequest, opts ...gax.CallOption) (*InjectFaultOperation, error)
InjectFault injects fault in an instance. Imperative only.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.InjectFaultRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#InjectFaultRequest. } op, err := c.InjectFault(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) InjectFaultOperation ¶ added in v1.2.0
func (c *AlloyDBAdminClient) InjectFaultOperation(name string) *InjectFaultOperation
InjectFaultOperation returns a new InjectFaultOperation from a given name. The name must be that of a previously created InjectFaultOperation, possibly from a different process.
func (*AlloyDBAdminClient) ListBackups ¶
func (c *AlloyDBAdminClient) ListBackups(ctx context.Context, req *alloydbpb.ListBackupsRequest, opts ...gax.CallOption) *BackupIterator
ListBackups lists Backups in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListBackupsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListBackupsRequest. } it := c.ListBackups(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListBackupsResponse) } }
Output:
func (*AlloyDBAdminClient) ListClusters ¶
func (c *AlloyDBAdminClient) ListClusters(ctx context.Context, req *alloydbpb.ListClustersRequest, opts ...gax.CallOption) *ClusterIterator
ListClusters lists Clusters in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListClustersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListClustersRequest. } it := c.ListClusters(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListClustersResponse) } }
Output:
func (*AlloyDBAdminClient) ListDatabases ¶ added in v1.8.0
func (c *AlloyDBAdminClient) ListDatabases(ctx context.Context, req *alloydbpb.ListDatabasesRequest, opts ...gax.CallOption) *DatabaseIterator
ListDatabases lists Databases in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListDatabasesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListDatabasesRequest. } it := c.ListDatabases(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListDatabasesResponse) } }
Output:
func (*AlloyDBAdminClient) ListInstances ¶
func (c *AlloyDBAdminClient) ListInstances(ctx context.Context, req *alloydbpb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator
ListInstances lists Instances in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListInstancesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListInstancesRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListInstancesResponse) } }
Output:
func (*AlloyDBAdminClient) ListLocations ¶
func (c *AlloyDBAdminClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" "google.golang.org/api/iterator" locationpb "google.golang.org/genproto/googleapis/cloud/location" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &locationpb.ListLocationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. } it := c.ListLocations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*locationpb.ListLocationsResponse) } }
Output:
func (*AlloyDBAdminClient) ListOperations ¶
func (c *AlloyDBAdminClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }
Output:
func (*AlloyDBAdminClient) ListSupportedDatabaseFlags ¶
func (c *AlloyDBAdminClient) ListSupportedDatabaseFlags(ctx context.Context, req *alloydbpb.ListSupportedDatabaseFlagsRequest, opts ...gax.CallOption) *SupportedDatabaseFlagIterator
ListSupportedDatabaseFlags lists SupportedDatabaseFlags for a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListSupportedDatabaseFlagsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListSupportedDatabaseFlagsRequest. } it := c.ListSupportedDatabaseFlags(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListSupportedDatabaseFlagsResponse) } }
Output:
func (*AlloyDBAdminClient) ListUsers ¶ added in v1.2.0
func (c *AlloyDBAdminClient) ListUsers(ctx context.Context, req *alloydbpb.ListUsersRequest, opts ...gax.CallOption) *UserIterator
ListUsers lists Users in a given project and location.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.ListUsersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#ListUsersRequest. } it := c.ListUsers(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*alloydbpb.ListUsersResponse) } }
Output:
func (*AlloyDBAdminClient) PromoteCluster ¶
func (c *AlloyDBAdminClient) PromoteCluster(ctx context.Context, req *alloydbpb.PromoteClusterRequest, opts ...gax.CallOption) (*PromoteClusterOperation, error)
PromoteCluster promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.PromoteClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#PromoteClusterRequest. } op, err := c.PromoteCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) PromoteClusterOperation ¶
func (c *AlloyDBAdminClient) PromoteClusterOperation(name string) *PromoteClusterOperation
PromoteClusterOperation returns a new PromoteClusterOperation from a given name. The name must be that of a previously created PromoteClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) RestartInstance ¶
func (c *AlloyDBAdminClient) RestartInstance(ctx context.Context, req *alloydbpb.RestartInstanceRequest, opts ...gax.CallOption) (*RestartInstanceOperation, error)
RestartInstance restart an Instance in a cluster. Imperative only.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.RestartInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#RestartInstanceRequest. } op, err := c.RestartInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) RestartInstanceOperation ¶
func (c *AlloyDBAdminClient) RestartInstanceOperation(name string) *RestartInstanceOperation
RestartInstanceOperation returns a new RestartInstanceOperation from a given name. The name must be that of a previously created RestartInstanceOperation, possibly from a different process.
func (*AlloyDBAdminClient) RestoreCluster ¶
func (c *AlloyDBAdminClient) RestoreCluster(ctx context.Context, req *alloydbpb.RestoreClusterRequest, opts ...gax.CallOption) (*RestoreClusterOperation, error)
RestoreCluster creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.RestoreClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#RestoreClusterRequest. } op, err := c.RestoreCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) RestoreClusterOperation ¶
func (c *AlloyDBAdminClient) RestoreClusterOperation(name string) *RestoreClusterOperation
RestoreClusterOperation returns a new RestoreClusterOperation from a given name. The name must be that of a previously created RestoreClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) UpdateBackup ¶
func (c *AlloyDBAdminClient) UpdateBackup(ctx context.Context, req *alloydbpb.UpdateBackupRequest, opts ...gax.CallOption) (*UpdateBackupOperation, error)
UpdateBackup updates the parameters of a single Backup.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.UpdateBackupRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#UpdateBackupRequest. } op, err := c.UpdateBackup(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) UpdateBackupOperation ¶
func (c *AlloyDBAdminClient) UpdateBackupOperation(name string) *UpdateBackupOperation
UpdateBackupOperation returns a new UpdateBackupOperation from a given name. The name must be that of a previously created UpdateBackupOperation, possibly from a different process.
func (*AlloyDBAdminClient) UpdateCluster ¶
func (c *AlloyDBAdminClient) UpdateCluster(ctx context.Context, req *alloydbpb.UpdateClusterRequest, opts ...gax.CallOption) (*UpdateClusterOperation, error)
UpdateCluster updates the parameters of a single Cluster.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.UpdateClusterRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#UpdateClusterRequest. } op, err := c.UpdateCluster(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) UpdateClusterOperation ¶
func (c *AlloyDBAdminClient) UpdateClusterOperation(name string) *UpdateClusterOperation
UpdateClusterOperation returns a new UpdateClusterOperation from a given name. The name must be that of a previously created UpdateClusterOperation, possibly from a different process.
func (*AlloyDBAdminClient) UpdateInstance ¶
func (c *AlloyDBAdminClient) UpdateInstance(ctx context.Context, req *alloydbpb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error)
UpdateInstance updates the parameters of a single Instance.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.UpdateInstanceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#UpdateInstanceRequest. } op, err := c.UpdateInstance(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*AlloyDBAdminClient) UpdateInstanceOperation ¶
func (c *AlloyDBAdminClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation
UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name. The name must be that of a previously created UpdateInstanceOperation, possibly from a different process.
func (*AlloyDBAdminClient) UpdateUser ¶ added in v1.2.0
func (c *AlloyDBAdminClient) UpdateUser(ctx context.Context, req *alloydbpb.UpdateUserRequest, opts ...gax.CallOption) (*alloydbpb.User, error)
UpdateUser updates the parameters of a single User.
Example ¶
package main import ( "context" alloydb "cloud.google.com/go/alloydb/apiv1alpha" alloydbpb "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := alloydb.NewAlloyDBAdminClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &alloydbpb.UpdateUserRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/alloydb/apiv1alpha/alloydbpb#UpdateUserRequest. } resp, err := c.UpdateUser(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type BackupIterator ¶
type BackupIterator 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 []*alloydbpb.Backup, nextPageToken string, err error) // contains filtered or unexported fields }
BackupIterator manages a stream of *alloydbpb.Backup.
func (*BackupIterator) Next ¶
func (it *BackupIterator) Next() (*alloydbpb.Backup, 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 (*BackupIterator) PageInfo ¶
func (it *BackupIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type BatchCreateInstancesOperation ¶
type BatchCreateInstancesOperation struct {
// contains filtered or unexported fields
}
BatchCreateInstancesOperation manages a long-running operation from BatchCreateInstances.
func (*BatchCreateInstancesOperation) Done ¶
func (op *BatchCreateInstancesOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*BatchCreateInstancesOperation) Metadata ¶
func (op *BatchCreateInstancesOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*BatchCreateInstancesOperation) Name ¶
func (op *BatchCreateInstancesOperation) 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 (*BatchCreateInstancesOperation) Poll ¶
func (op *BatchCreateInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.BatchCreateInstancesResponse, 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 (*BatchCreateInstancesOperation) Wait ¶
func (op *BatchCreateInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.BatchCreateInstancesResponse, 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.
type ClusterIterator ¶
type ClusterIterator 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 []*alloydbpb.Cluster, nextPageToken string, err error) // contains filtered or unexported fields }
ClusterIterator manages a stream of *alloydbpb.Cluster.
func (*ClusterIterator) Next ¶
func (it *ClusterIterator) Next() (*alloydbpb.Cluster, 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 (*ClusterIterator) PageInfo ¶
func (it *ClusterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateBackupOperation ¶
type CreateBackupOperation struct {
// contains filtered or unexported fields
}
CreateBackupOperation manages a long-running operation from CreateBackup.
func (*CreateBackupOperation) Done ¶
func (op *CreateBackupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateBackupOperation) Metadata ¶
func (op *CreateBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateBackupOperation) Name ¶
func (op *CreateBackupOperation) 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 (*CreateBackupOperation) Poll ¶
func (op *CreateBackupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, 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 (*CreateBackupOperation) Wait ¶
func (op *CreateBackupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, 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.
type CreateClusterOperation ¶
type CreateClusterOperation struct {
// contains filtered or unexported fields
}
CreateClusterOperation manages a long-running operation from CreateCluster.
func (*CreateClusterOperation) Done ¶
func (op *CreateClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateClusterOperation) Metadata ¶
func (op *CreateClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateClusterOperation) Name ¶
func (op *CreateClusterOperation) 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 (*CreateClusterOperation) Poll ¶
func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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 (*CreateClusterOperation) Wait ¶
func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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.
type CreateInstanceOperation ¶
type CreateInstanceOperation struct {
// contains filtered or unexported fields
}
CreateInstanceOperation manages a long-running operation from CreateInstance.
func (*CreateInstanceOperation) Done ¶
func (op *CreateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInstanceOperation) Metadata ¶
func (op *CreateInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateInstanceOperation) Name ¶
func (op *CreateInstanceOperation) 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 (*CreateInstanceOperation) Poll ¶
func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*CreateInstanceOperation) Wait ¶
func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type CreateSecondaryClusterOperation ¶
type CreateSecondaryClusterOperation struct {
// contains filtered or unexported fields
}
CreateSecondaryClusterOperation manages a long-running operation from CreateSecondaryCluster.
func (*CreateSecondaryClusterOperation) Done ¶
func (op *CreateSecondaryClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSecondaryClusterOperation) Metadata ¶
func (op *CreateSecondaryClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSecondaryClusterOperation) Name ¶
func (op *CreateSecondaryClusterOperation) 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 (*CreateSecondaryClusterOperation) Poll ¶
func (op *CreateSecondaryClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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 (*CreateSecondaryClusterOperation) Wait ¶
func (op *CreateSecondaryClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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.
type CreateSecondaryInstanceOperation ¶
type CreateSecondaryInstanceOperation struct {
// contains filtered or unexported fields
}
CreateSecondaryInstanceOperation manages a long-running operation from CreateSecondaryInstance.
func (*CreateSecondaryInstanceOperation) Done ¶
func (op *CreateSecondaryInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSecondaryInstanceOperation) Metadata ¶
func (op *CreateSecondaryInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSecondaryInstanceOperation) Name ¶
func (op *CreateSecondaryInstanceOperation) 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 (*CreateSecondaryInstanceOperation) Poll ¶
func (op *CreateSecondaryInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*CreateSecondaryInstanceOperation) Wait ¶
func (op *CreateSecondaryInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type DatabaseIterator ¶ added in v1.8.0
type DatabaseIterator 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 []*alloydbpb.Database, nextPageToken string, err error) // contains filtered or unexported fields }
DatabaseIterator manages a stream of *alloydbpb.Database.
func (*DatabaseIterator) Next ¶ added in v1.8.0
func (it *DatabaseIterator) Next() (*alloydbpb.Database, 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 (*DatabaseIterator) PageInfo ¶ added in v1.8.0
func (it *DatabaseIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DeleteBackupOperation ¶
type DeleteBackupOperation struct {
// contains filtered or unexported fields
}
DeleteBackupOperation manages a long-running operation from DeleteBackup.
func (*DeleteBackupOperation) Done ¶
func (op *DeleteBackupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteBackupOperation) Metadata ¶
func (op *DeleteBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteBackupOperation) Name ¶
func (op *DeleteBackupOperation) 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 (*DeleteBackupOperation) Poll ¶
func (op *DeleteBackupOperation) 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 (*DeleteBackupOperation) Wait ¶
func (op *DeleteBackupOperation) 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.
type DeleteClusterOperation ¶
type DeleteClusterOperation struct {
// contains filtered or unexported fields
}
DeleteClusterOperation manages a long-running operation from DeleteCluster.
func (*DeleteClusterOperation) Done ¶
func (op *DeleteClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteClusterOperation) Metadata ¶
func (op *DeleteClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteClusterOperation) Name ¶
func (op *DeleteClusterOperation) 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 (*DeleteClusterOperation) Poll ¶
func (op *DeleteClusterOperation) 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 (*DeleteClusterOperation) Wait ¶
func (op *DeleteClusterOperation) 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.
type 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.
func (*DeleteInstanceOperation) Metadata ¶
func (op *DeleteInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*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.
type FailoverInstanceOperation ¶
type FailoverInstanceOperation struct {
// contains filtered or unexported fields
}
FailoverInstanceOperation manages a long-running operation from FailoverInstance.
func (*FailoverInstanceOperation) Done ¶
func (op *FailoverInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*FailoverInstanceOperation) Metadata ¶
func (op *FailoverInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*FailoverInstanceOperation) Name ¶
func (op *FailoverInstanceOperation) 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 (*FailoverInstanceOperation) Poll ¶
func (op *FailoverInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*FailoverInstanceOperation) Wait ¶
func (op *FailoverInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type InjectFaultOperation ¶ added in v1.2.0
type InjectFaultOperation struct {
// contains filtered or unexported fields
}
InjectFaultOperation manages a long-running operation from InjectFault.
func (*InjectFaultOperation) Done ¶ added in v1.2.0
func (op *InjectFaultOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*InjectFaultOperation) Metadata ¶ added in v1.2.0
func (op *InjectFaultOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*InjectFaultOperation) Name ¶ added in v1.2.0
func (op *InjectFaultOperation) 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 (*InjectFaultOperation) Poll ¶ added in v1.2.0
func (op *InjectFaultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*InjectFaultOperation) Wait ¶ added in v1.2.0
func (op *InjectFaultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type 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 []*alloydbpb.Instance, nextPageToken string, err error) // contains filtered or unexported fields }
InstanceIterator manages a stream of *alloydbpb.Instance.
func (*InstanceIterator) Next ¶
func (it *InstanceIterator) Next() (*alloydbpb.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.
type LocationIterator ¶
type LocationIterator 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 []*locationpb.Location, nextPageToken string, err error) // contains filtered or unexported fields }
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*LocationIterator) PageInfo ¶
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶
type OperationIterator 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 []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo ¶
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PromoteClusterOperation ¶
type PromoteClusterOperation struct {
// contains filtered or unexported fields
}
PromoteClusterOperation manages a long-running operation from PromoteCluster.
func (*PromoteClusterOperation) Done ¶
func (op *PromoteClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*PromoteClusterOperation) Metadata ¶
func (op *PromoteClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*PromoteClusterOperation) Name ¶
func (op *PromoteClusterOperation) 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 (*PromoteClusterOperation) Poll ¶
func (op *PromoteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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 (*PromoteClusterOperation) Wait ¶
func (op *PromoteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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.
type RestartInstanceOperation ¶
type RestartInstanceOperation struct {
// contains filtered or unexported fields
}
RestartInstanceOperation manages a long-running operation from RestartInstance.
func (*RestartInstanceOperation) Done ¶
func (op *RestartInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RestartInstanceOperation) Metadata ¶
func (op *RestartInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*RestartInstanceOperation) Name ¶
func (op *RestartInstanceOperation) 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 (*RestartInstanceOperation) Poll ¶
func (op *RestartInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*RestartInstanceOperation) Wait ¶
func (op *RestartInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type RestoreClusterOperation ¶
type RestoreClusterOperation struct {
// contains filtered or unexported fields
}
RestoreClusterOperation manages a long-running operation from RestoreCluster.
func (*RestoreClusterOperation) Done ¶
func (op *RestoreClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RestoreClusterOperation) Metadata ¶
func (op *RestoreClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*RestoreClusterOperation) Name ¶
func (op *RestoreClusterOperation) 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 (*RestoreClusterOperation) Poll ¶
func (op *RestoreClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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 (*RestoreClusterOperation) Wait ¶
func (op *RestoreClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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.
type SupportedDatabaseFlagIterator ¶
type SupportedDatabaseFlagIterator 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 []*alloydbpb.SupportedDatabaseFlag, nextPageToken string, err error) // contains filtered or unexported fields }
SupportedDatabaseFlagIterator manages a stream of *alloydbpb.SupportedDatabaseFlag.
func (*SupportedDatabaseFlagIterator) Next ¶
func (it *SupportedDatabaseFlagIterator) Next() (*alloydbpb.SupportedDatabaseFlag, 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 (*SupportedDatabaseFlagIterator) PageInfo ¶
func (it *SupportedDatabaseFlagIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateBackupOperation ¶
type UpdateBackupOperation struct {
// contains filtered or unexported fields
}
UpdateBackupOperation manages a long-running operation from UpdateBackup.
func (*UpdateBackupOperation) Done ¶
func (op *UpdateBackupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateBackupOperation) Metadata ¶
func (op *UpdateBackupOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateBackupOperation) Name ¶
func (op *UpdateBackupOperation) 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 (*UpdateBackupOperation) Poll ¶
func (op *UpdateBackupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, 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 (*UpdateBackupOperation) Wait ¶
func (op *UpdateBackupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Backup, 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.
type UpdateClusterOperation ¶
type UpdateClusterOperation struct {
// contains filtered or unexported fields
}
UpdateClusterOperation manages a long-running operation from UpdateCluster.
func (*UpdateClusterOperation) Done ¶
func (op *UpdateClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateClusterOperation) Metadata ¶
func (op *UpdateClusterOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateClusterOperation) Name ¶
func (op *UpdateClusterOperation) 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 (*UpdateClusterOperation) Poll ¶
func (op *UpdateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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 (*UpdateClusterOperation) Wait ¶
func (op *UpdateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.Cluster, 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.
type UpdateInstanceOperation ¶
type UpdateInstanceOperation struct {
// contains filtered or unexported fields
}
UpdateInstanceOperation manages a long-running operation from UpdateInstance.
func (*UpdateInstanceOperation) Done ¶
func (op *UpdateInstanceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateInstanceOperation) Metadata ¶
func (op *UpdateInstanceOperation) Metadata() (*alloydbpb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateInstanceOperation) Name ¶
func (op *UpdateInstanceOperation) 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 (*UpdateInstanceOperation) Poll ¶
func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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 (*UpdateInstanceOperation) Wait ¶
func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*alloydbpb.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.
type UserIterator ¶ added in v1.2.0
type UserIterator 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 []*alloydbpb.User, nextPageToken string, err error) // contains filtered or unexported fields }
UserIterator manages a stream of *alloydbpb.User.
func (*UserIterator) Next ¶ added in v1.2.0
func (it *UserIterator) Next() (*alloydbpb.User, 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 (*UserIterator) PageInfo ¶ added in v1.2.0
func (it *UserIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.