genproto: google.golang.org/genproto/googleapis/spanner/admin/database/v1 Index | Files

package database

import "google.golang.org/genproto/googleapis/spanner/admin/database/v1"

Index

Package Files

backup.pb.go common.pb.go spanner_database_admin.pb.go

Variables

var (
    Backup_State_name = map[int32]string{
        0:  "STATE_UNSPECIFIED",
        1:  "CREATING",
        2:  "READY",
    }
    Backup_State_value = map[string]int32{
        "STATE_UNSPECIFIED": 0,
        "CREATING":          1,
        "READY":             2,
    }
)

Enum value maps for Backup_State.

var (
    RestoreSourceType_name = map[int32]string{
        0:  "TYPE_UNSPECIFIED",
        1:  "BACKUP",
    }
    RestoreSourceType_value = map[string]int32{
        "TYPE_UNSPECIFIED": 0,
        "BACKUP":           1,
    }
)

Enum value maps for RestoreSourceType.

var (
    Database_State_name = map[int32]string{
        0:  "STATE_UNSPECIFIED",
        1:  "CREATING",
        2:  "READY",
        3:  "READY_OPTIMIZING",
    }
    Database_State_value = map[string]int32{
        "STATE_UNSPECIFIED": 0,
        "CREATING":          1,
        "READY":             2,
        "READY_OPTIMIZING":  3,
    }
)

Enum value maps for Database_State.

var File_google_spanner_admin_database_v1_backup_proto protoreflect.FileDescriptor
var File_google_spanner_admin_database_v1_common_proto protoreflect.FileDescriptor
var File_google_spanner_admin_database_v1_spanner_database_admin_proto protoreflect.FileDescriptor

func RegisterDatabaseAdminServer Uses

func RegisterDatabaseAdminServer(s *grpc.Server, srv DatabaseAdminServer)

type Backup Uses

type Backup struct {

    // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
    // Name of the database from which this backup was
    // created. This needs to be in the same instance as the backup.
    // Values are of the form
    // `projects/<project>/instances/<instance>/databases/<database>`.
    Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
    // Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
    // operation. The expiration time of the backup, with microseconds
    // granularity that must be at least 6 hours and at most 366 days
    // from the time the CreateBackup request is processed. Once the `expire_time`
    // has passed, the backup is eligible to be automatically deleted by Cloud
    // Spanner to free the resources used by the backup.
    ExpireTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
    // Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
    // Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation.
    //
    // A globally unique identifier for the backup which cannot be
    // changed. Values are of the form
    // `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]`
    // The final segment of the name must be between 2 and 60 characters
    // in length.
    //
    // The backup is stored in the location(s) specified in the instance
    // configuration of the instance containing the backup, identified
    // by the prefix of the backup name of the form
    // `projects/<project>/instances/<instance>`.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // Output only. The backup will contain an externally consistent
    // copy of the database at the timestamp specified by
    // `create_time`. `create_time` is approximately the time the
    // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request is received.
    CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
    // Output only. Size of the backup in bytes.
    SizeBytes int64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
    // Output only. The current state of the backup.
    State Backup_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.spanner.admin.database.v1.Backup_State" json:"state,omitempty"`
    // Output only. The names of the restored databases that reference the backup.
    // The database names are of
    // the form `projects/<project>/instances/<instance>/databases/<database>`.
    // Referencing databases may exist in different instances. The existence of
    // any referencing database prevents the backup from being deleted. When a
    // restored database from the backup enters the `READY` state, the reference
    // to the backup is removed.
    ReferencingDatabases []string `protobuf:"bytes,7,rep,name=referencing_databases,json=referencingDatabases,proto3" json:"referencing_databases,omitempty"`
    // contains filtered or unexported fields
}

A backup of a Cloud Spanner database.

func (*Backup) Descriptor Uses

func (*Backup) Descriptor() ([]byte, []int)

Deprecated: Use Backup.ProtoReflect.Descriptor instead.

func (*Backup) GetCreateTime Uses

func (x *Backup) GetCreateTime() *timestamp.Timestamp

func (*Backup) GetDatabase Uses

func (x *Backup) GetDatabase() string

func (*Backup) GetExpireTime Uses

func (x *Backup) GetExpireTime() *timestamp.Timestamp

func (*Backup) GetName Uses

func (x *Backup) GetName() string

func (*Backup) GetReferencingDatabases Uses

func (x *Backup) GetReferencingDatabases() []string

func (*Backup) GetSizeBytes Uses

func (x *Backup) GetSizeBytes() int64

func (*Backup) GetState Uses

func (x *Backup) GetState() Backup_State

func (*Backup) ProtoMessage Uses

func (*Backup) ProtoMessage()

func (*Backup) ProtoReflect Uses

func (x *Backup) ProtoReflect() protoreflect.Message

func (*Backup) Reset Uses

func (x *Backup) Reset()

func (*Backup) String Uses

func (x *Backup) String() string

type BackupInfo Uses

type BackupInfo struct {

    // Name of the backup.
    Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"`
    // The backup contains an externally consistent copy of `source_database` at
    // the timestamp specified by `create_time`.
    CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
    // Name of the database the backup was created from.
    SourceDatabase string `protobuf:"bytes,3,opt,name=source_database,json=sourceDatabase,proto3" json:"source_database,omitempty"`
    // contains filtered or unexported fields
}

Information about a backup.

func (*BackupInfo) Descriptor Uses

func (*BackupInfo) Descriptor() ([]byte, []int)

Deprecated: Use BackupInfo.ProtoReflect.Descriptor instead.

func (*BackupInfo) GetBackup Uses

func (x *BackupInfo) GetBackup() string

func (*BackupInfo) GetCreateTime Uses

func (x *BackupInfo) GetCreateTime() *timestamp.Timestamp

func (*BackupInfo) GetSourceDatabase Uses

func (x *BackupInfo) GetSourceDatabase() string

func (*BackupInfo) ProtoMessage Uses

func (*BackupInfo) ProtoMessage()

func (*BackupInfo) ProtoReflect Uses

func (x *BackupInfo) ProtoReflect() protoreflect.Message

func (*BackupInfo) Reset Uses

func (x *BackupInfo) Reset()

func (*BackupInfo) String Uses

func (x *BackupInfo) String() string

type Backup_State Uses

type Backup_State int32

Indicates the current state of the backup.

const (
    // Not specified.
    Backup_STATE_UNSPECIFIED Backup_State = 0
    // The pending backup is still being created. Operations on the
    // backup may fail with `FAILED_PRECONDITION` in this state.
    Backup_CREATING Backup_State = 1
    // The backup is complete and ready for use.
    Backup_READY Backup_State = 2
)

func (Backup_State) Descriptor Uses

func (Backup_State) Descriptor() protoreflect.EnumDescriptor

func (Backup_State) Enum Uses

func (x Backup_State) Enum() *Backup_State

func (Backup_State) EnumDescriptor Uses

func (Backup_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Backup_State.Descriptor instead.

func (Backup_State) Number Uses

func (x Backup_State) Number() protoreflect.EnumNumber

func (Backup_State) String Uses

func (x Backup_State) String() string

func (Backup_State) Type Uses

func (Backup_State) Type() protoreflect.EnumType

type CreateBackupMetadata Uses

type CreateBackupMetadata struct {

    // The name of the backup being created.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // The name of the database the backup is created from.
    Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
    // The progress of the
    // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
    Progress *OperationProgress `protobuf:"bytes,3,opt,name=progress,proto3" json:"progress,omitempty"`
    // The time at which cancellation of this operation was received.
    // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
    // starts asynchronous cancellation on a long-running operation. The server
    // makes a best effort to cancel the operation, but success is not guaranteed.
    // Clients can use
    // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
    // other methods to check whether the cancellation succeeded or whether the
    // operation completed despite cancellation. On successful cancellation,
    // the operation is not deleted; instead, it becomes an operation with
    // an [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
    // corresponding to `Code.CANCELLED`.
    CancelTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=cancel_time,json=cancelTime,proto3" json:"cancel_time,omitempty"`
    // contains filtered or unexported fields
}

Metadata type for the operation returned by [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].

func (*CreateBackupMetadata) Descriptor Uses

func (*CreateBackupMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CreateBackupMetadata.ProtoReflect.Descriptor instead.

func (*CreateBackupMetadata) GetCancelTime Uses

func (x *CreateBackupMetadata) GetCancelTime() *timestamp.Timestamp

func (*CreateBackupMetadata) GetDatabase Uses

func (x *CreateBackupMetadata) GetDatabase() string

func (*CreateBackupMetadata) GetName Uses

func (x *CreateBackupMetadata) GetName() string

func (*CreateBackupMetadata) GetProgress Uses

func (x *CreateBackupMetadata) GetProgress() *OperationProgress

func (*CreateBackupMetadata) ProtoMessage Uses

func (*CreateBackupMetadata) ProtoMessage()

func (*CreateBackupMetadata) ProtoReflect Uses

func (x *CreateBackupMetadata) ProtoReflect() protoreflect.Message

func (*CreateBackupMetadata) Reset Uses

func (x *CreateBackupMetadata) Reset()

func (*CreateBackupMetadata) String Uses

func (x *CreateBackupMetadata) String() string

type CreateBackupRequest Uses

type CreateBackupRequest struct {

    // Required. The name of the instance in which the backup will be
    // created. This must be the same instance that contains the database the
    // backup will be created from. The backup will be stored in the
    // location(s) specified in the instance configuration of this
    // instance. Values are of the form
    // `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Required. The id of the backup to be created. The `backup_id` appended to
    // `parent` forms the full backup name of the form
    // `projects/<project>/instances/<instance>/backups/<backup_id>`.
    BackupId string `protobuf:"bytes,2,opt,name=backup_id,json=backupId,proto3" json:"backup_id,omitempty"`
    // Required. The backup to create.
    Backup *Backup `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
    // contains filtered or unexported fields
}

The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].

func (*CreateBackupRequest) Descriptor Uses

func (*CreateBackupRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateBackupRequest.ProtoReflect.Descriptor instead.

func (*CreateBackupRequest) GetBackup Uses

func (x *CreateBackupRequest) GetBackup() *Backup

func (*CreateBackupRequest) GetBackupId Uses

func (x *CreateBackupRequest) GetBackupId() string

func (*CreateBackupRequest) GetParent Uses

func (x *CreateBackupRequest) GetParent() string

func (*CreateBackupRequest) ProtoMessage Uses

func (*CreateBackupRequest) ProtoMessage()

func (*CreateBackupRequest) ProtoReflect Uses

func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message

func (*CreateBackupRequest) Reset Uses

func (x *CreateBackupRequest) Reset()

func (*CreateBackupRequest) String Uses

func (x *CreateBackupRequest) String() string

type CreateDatabaseMetadata Uses

type CreateDatabaseMetadata struct {

    // The database being created.
    Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
    // contains filtered or unexported fields
}

Metadata type for the operation returned by [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].

func (*CreateDatabaseMetadata) Descriptor Uses

func (*CreateDatabaseMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CreateDatabaseMetadata.ProtoReflect.Descriptor instead.

func (*CreateDatabaseMetadata) GetDatabase Uses

func (x *CreateDatabaseMetadata) GetDatabase() string

func (*CreateDatabaseMetadata) ProtoMessage Uses

func (*CreateDatabaseMetadata) ProtoMessage()

func (*CreateDatabaseMetadata) ProtoReflect Uses

func (x *CreateDatabaseMetadata) ProtoReflect() protoreflect.Message

func (*CreateDatabaseMetadata) Reset Uses

func (x *CreateDatabaseMetadata) Reset()

func (*CreateDatabaseMetadata) String Uses

func (x *CreateDatabaseMetadata) String() string

type CreateDatabaseRequest Uses

type CreateDatabaseRequest struct {

    // Required. The name of the instance that will serve the new database.
    // Values are of the form `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Required. A `CREATE DATABASE` statement, which specifies the ID of the
    // new database.  The database ID must conform to the regular expression
    // `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
    // If the database ID is a reserved word or if it contains a hyphen, the
    // database ID must be enclosed in backticks (`` ` ``).
    CreateStatement string `protobuf:"bytes,2,opt,name=create_statement,json=createStatement,proto3" json:"create_statement,omitempty"`
    // Optional. A list of DDL statements to run inside the newly created
    // database. Statements can create tables, indexes, etc. These
    // statements execute atomically with the creation of the database:
    // if there is an error in any statement, the database is not created.
    ExtraStatements []string `protobuf:"bytes,3,rep,name=extra_statements,json=extraStatements,proto3" json:"extra_statements,omitempty"`
    // contains filtered or unexported fields
}

The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].

func (*CreateDatabaseRequest) Descriptor Uses

func (*CreateDatabaseRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateDatabaseRequest.ProtoReflect.Descriptor instead.

func (*CreateDatabaseRequest) GetCreateStatement Uses

func (x *CreateDatabaseRequest) GetCreateStatement() string

func (*CreateDatabaseRequest) GetExtraStatements Uses

func (x *CreateDatabaseRequest) GetExtraStatements() []string

func (*CreateDatabaseRequest) GetParent Uses

func (x *CreateDatabaseRequest) GetParent() string

func (*CreateDatabaseRequest) ProtoMessage Uses

func (*CreateDatabaseRequest) ProtoMessage()

func (*CreateDatabaseRequest) ProtoReflect Uses

func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message

func (*CreateDatabaseRequest) Reset Uses

func (x *CreateDatabaseRequest) Reset()

func (*CreateDatabaseRequest) String Uses

func (x *CreateDatabaseRequest) String() string

type Database Uses

type Database struct {

    // Required. The name of the database. Values are of the form
    // `projects/<project>/instances/<instance>/databases/<database>`,
    // where `<database>` is as specified in the `CREATE DATABASE`
    // statement. This name can be passed to other API methods to
    // identify the database.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // Output only. The current database state.
    State Database_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.spanner.admin.database.v1.Database_State" json:"state,omitempty"`
    // Output only. If exists, the time at which the database creation started.
    CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
    // Output only. Applicable only for restored databases. Contains information
    // about the restore source.
    RestoreInfo *RestoreInfo `protobuf:"bytes,4,opt,name=restore_info,json=restoreInfo,proto3" json:"restore_info,omitempty"`
    // contains filtered or unexported fields
}

A Cloud Spanner database.

func (*Database) Descriptor Uses

func (*Database) Descriptor() ([]byte, []int)

Deprecated: Use Database.ProtoReflect.Descriptor instead.

func (*Database) GetCreateTime Uses

func (x *Database) GetCreateTime() *timestamp.Timestamp

func (*Database) GetName Uses

func (x *Database) GetName() string

func (*Database) GetRestoreInfo Uses

func (x *Database) GetRestoreInfo() *RestoreInfo

func (*Database) GetState Uses

func (x *Database) GetState() Database_State

func (*Database) ProtoMessage Uses

func (*Database) ProtoMessage()

func (*Database) ProtoReflect Uses

func (x *Database) ProtoReflect() protoreflect.Message

func (*Database) Reset Uses

func (x *Database) Reset()

func (*Database) String Uses

func (x *Database) String() string

type DatabaseAdminClient Uses

type DatabaseAdminClient interface {
    // Lists Cloud Spanner databases.
    ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error)
    // Creates a new Cloud Spanner database and starts to prepare it for serving.
    // The returned [long-running operation][google.longrunning.Operation] will
    // have a name of the format `<database_name>/operations/<operation_id>` and
    // can be used to track preparation of the database. The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
    // [response][google.longrunning.Operation.response] field type is
    // [Database][google.spanner.admin.database.v1.Database], if successful.
    CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
    // Gets the state of a Cloud Spanner database.
    GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error)
    // Updates the schema of a Cloud Spanner database by
    // creating/altering/dropping tables, columns, indexes, etc. The returned
    // [long-running operation][google.longrunning.Operation] will have a name of
    // the format `<database_name>/operations/<operation_id>` and can be used to
    // track execution of the schema change(s). The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].  The operation has no response.
    UpdateDatabaseDdl(ctx context.Context, in *UpdateDatabaseDdlRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
    // Drops (aka deletes) a Cloud Spanner database.
    // Completed backups for the database will be retained according to their
    // `expire_time`.
    DropDatabase(ctx context.Context, in *DropDatabaseRequest, opts ...grpc.CallOption) (*empty.Empty, error)
    // Returns the schema of a Cloud Spanner database as a list of formatted
    // DDL statements. This method does not show pending schema updates, those may
    // be queried using the [Operations][google.longrunning.Operations] API.
    GetDatabaseDdl(ctx context.Context, in *GetDatabaseDdlRequest, opts ...grpc.CallOption) (*GetDatabaseDdlResponse, error)
    // Sets the access control policy on a database or backup resource.
    // Replaces any existing policy.
    //
    // Authorization requires `spanner.databases.setIamPolicy`
    // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
    // For backups, authorization requires `spanner.backups.setIamPolicy`
    // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
    SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error)
    // Gets the access control policy for a database or backup resource.
    // Returns an empty policy if a database or backup exists but does not have a
    // policy set.
    //
    // Authorization requires `spanner.databases.getIamPolicy` permission on
    // [resource][google.iam.v1.GetIamPolicyRequest.resource].
    // For backups, authorization requires `spanner.backups.getIamPolicy`
    // permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
    GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error)
    // Returns permissions that the caller has on the specified database or backup
    // resource.
    //
    // Attempting this RPC on a non-existent Cloud Spanner database will
    // result in a NOT_FOUND error if the user has
    // `spanner.databases.list` permission on the containing Cloud
    // Spanner instance. Otherwise returns an empty set of permissions.
    // Calling this method on a backup that does not exist will
    // result in a NOT_FOUND error if the user has
    // `spanner.backups.list` permission on the containing instance.
    TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error)
    // Starts creating a new Cloud Spanner Backup.
    // The returned backup [long-running operation][google.longrunning.Operation]
    // will have a name of the format
    // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
    // and can be used to track creation of the backup. The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
    // [response][google.longrunning.Operation.response] field type is
    // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
    // creation and delete the backup.
    // There can be only one pending backup creation per database. Backup creation
    // of different databases can run concurrently.
    CreateBackup(ctx context.Context, in *CreateBackupRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
    // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    GetBackup(ctx context.Context, in *GetBackupRequest, opts ...grpc.CallOption) (*Backup, error)
    // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    UpdateBackup(ctx context.Context, in *UpdateBackupRequest, opts ...grpc.CallOption) (*Backup, error)
    // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    DeleteBackup(ctx context.Context, in *DeleteBackupRequest, opts ...grpc.CallOption) (*empty.Empty, error)
    // Lists completed and pending backups.
    // Backups returned are ordered by `create_time` in descending order,
    // starting from the most recent `create_time`.
    ListBackups(ctx context.Context, in *ListBackupsRequest, opts ...grpc.CallOption) (*ListBackupsResponse, error)
    // Create a new database by restoring from a completed backup. The new
    // database must be in the same project and in an instance with the same
    // instance configuration as the instance containing
    // the backup. The returned database [long-running
    // operation][google.longrunning.Operation] has a name of the format
    // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,
    // and can be used to track the progress of the operation, and to cancel it.
    // The [metadata][google.longrunning.Operation.metadata] field type is
    // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
    // The [response][google.longrunning.Operation.response] type
    // is [Database][google.spanner.admin.database.v1.Database], if
    // successful. Cancelling the returned operation will stop the restore and
    // delete the database.
    // There can be only one database being restored into an instance at a time.
    // Once the restore operation completes, a new restore operation can be
    // initiated, without waiting for the optimize operation associated with the
    // first restore to complete.
    RestoreDatabase(ctx context.Context, in *RestoreDatabaseRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
    // Lists database [longrunning-operations][google.longrunning.Operation].
    // A database operation has a name of the form
    // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
    // The long-running operation
    // [metadata][google.longrunning.Operation.metadata] field type
    // `metadata.type_url` describes the type of the metadata. Operations returned
    // include those that have completed/failed/canceled within the last 7 days,
    // and pending operations.
    ListDatabaseOperations(ctx context.Context, in *ListDatabaseOperationsRequest, opts ...grpc.CallOption) (*ListDatabaseOperationsResponse, error)
    // Lists the backup [long-running operations][google.longrunning.Operation] in
    // the given instance. A backup operation has a name of the form
    // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
    // The long-running operation
    // [metadata][google.longrunning.Operation.metadata] field type
    // `metadata.type_url` describes the type of the metadata. Operations returned
    // include those that have completed/failed/canceled within the last 7 days,
    // and pending operations. Operations returned are ordered by
    // `operation.metadata.value.progress.start_time` in descending order starting
    // from the most recently started operation.
    ListBackupOperations(ctx context.Context, in *ListBackupOperationsRequest, opts ...grpc.CallOption) (*ListBackupOperationsResponse, error)
}

DatabaseAdminClient is the client API for DatabaseAdmin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDatabaseAdminClient Uses

func NewDatabaseAdminClient(cc grpc.ClientConnInterface) DatabaseAdminClient

type DatabaseAdminServer Uses

type DatabaseAdminServer interface {
    // Lists Cloud Spanner databases.
    ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error)
    // Creates a new Cloud Spanner database and starts to prepare it for serving.
    // The returned [long-running operation][google.longrunning.Operation] will
    // have a name of the format `<database_name>/operations/<operation_id>` and
    // can be used to track preparation of the database. The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
    // [response][google.longrunning.Operation.response] field type is
    // [Database][google.spanner.admin.database.v1.Database], if successful.
    CreateDatabase(context.Context, *CreateDatabaseRequest) (*longrunning.Operation, error)
    // Gets the state of a Cloud Spanner database.
    GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error)
    // Updates the schema of a Cloud Spanner database by
    // creating/altering/dropping tables, columns, indexes, etc. The returned
    // [long-running operation][google.longrunning.Operation] will have a name of
    // the format `<database_name>/operations/<operation_id>` and can be used to
    // track execution of the schema change(s). The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].  The operation has no response.
    UpdateDatabaseDdl(context.Context, *UpdateDatabaseDdlRequest) (*longrunning.Operation, error)
    // Drops (aka deletes) a Cloud Spanner database.
    // Completed backups for the database will be retained according to their
    // `expire_time`.
    DropDatabase(context.Context, *DropDatabaseRequest) (*empty.Empty, error)
    // Returns the schema of a Cloud Spanner database as a list of formatted
    // DDL statements. This method does not show pending schema updates, those may
    // be queried using the [Operations][google.longrunning.Operations] API.
    GetDatabaseDdl(context.Context, *GetDatabaseDdlRequest) (*GetDatabaseDdlResponse, error)
    // Sets the access control policy on a database or backup resource.
    // Replaces any existing policy.
    //
    // Authorization requires `spanner.databases.setIamPolicy`
    // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
    // For backups, authorization requires `spanner.backups.setIamPolicy`
    // permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
    SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error)
    // Gets the access control policy for a database or backup resource.
    // Returns an empty policy if a database or backup exists but does not have a
    // policy set.
    //
    // Authorization requires `spanner.databases.getIamPolicy` permission on
    // [resource][google.iam.v1.GetIamPolicyRequest.resource].
    // For backups, authorization requires `spanner.backups.getIamPolicy`
    // permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
    GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error)
    // Returns permissions that the caller has on the specified database or backup
    // resource.
    //
    // Attempting this RPC on a non-existent Cloud Spanner database will
    // result in a NOT_FOUND error if the user has
    // `spanner.databases.list` permission on the containing Cloud
    // Spanner instance. Otherwise returns an empty set of permissions.
    // Calling this method on a backup that does not exist will
    // result in a NOT_FOUND error if the user has
    // `spanner.backups.list` permission on the containing instance.
    TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)
    // Starts creating a new Cloud Spanner Backup.
    // The returned backup [long-running operation][google.longrunning.Operation]
    // will have a name of the format
    // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
    // and can be used to track creation of the backup. The
    // [metadata][google.longrunning.Operation.metadata] field type is
    // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
    // [response][google.longrunning.Operation.response] field type is
    // [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
    // creation and delete the backup.
    // There can be only one pending backup creation per database. Backup creation
    // of different databases can run concurrently.
    CreateBackup(context.Context, *CreateBackupRequest) (*longrunning.Operation, error)
    // Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    GetBackup(context.Context, *GetBackupRequest) (*Backup, error)
    // Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    UpdateBackup(context.Context, *UpdateBackupRequest) (*Backup, error)
    // Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
    DeleteBackup(context.Context, *DeleteBackupRequest) (*empty.Empty, error)
    // Lists completed and pending backups.
    // Backups returned are ordered by `create_time` in descending order,
    // starting from the most recent `create_time`.
    ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error)
    // Create a new database by restoring from a completed backup. The new
    // database must be in the same project and in an instance with the same
    // instance configuration as the instance containing
    // the backup. The returned database [long-running
    // operation][google.longrunning.Operation] has a name of the format
    // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,
    // and can be used to track the progress of the operation, and to cancel it.
    // The [metadata][google.longrunning.Operation.metadata] field type is
    // [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
    // The [response][google.longrunning.Operation.response] type
    // is [Database][google.spanner.admin.database.v1.Database], if
    // successful. Cancelling the returned operation will stop the restore and
    // delete the database.
    // There can be only one database being restored into an instance at a time.
    // Once the restore operation completes, a new restore operation can be
    // initiated, without waiting for the optimize operation associated with the
    // first restore to complete.
    RestoreDatabase(context.Context, *RestoreDatabaseRequest) (*longrunning.Operation, error)
    // Lists database [longrunning-operations][google.longrunning.Operation].
    // A database operation has a name of the form
    // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
    // The long-running operation
    // [metadata][google.longrunning.Operation.metadata] field type
    // `metadata.type_url` describes the type of the metadata. Operations returned
    // include those that have completed/failed/canceled within the last 7 days,
    // and pending operations.
    ListDatabaseOperations(context.Context, *ListDatabaseOperationsRequest) (*ListDatabaseOperationsResponse, error)
    // Lists the backup [long-running operations][google.longrunning.Operation] in
    // the given instance. A backup operation has a name of the form
    // `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
    // The long-running operation
    // [metadata][google.longrunning.Operation.metadata] field type
    // `metadata.type_url` describes the type of the metadata. Operations returned
    // include those that have completed/failed/canceled within the last 7 days,
    // and pending operations. Operations returned are ordered by
    // `operation.metadata.value.progress.start_time` in descending order starting
    // from the most recently started operation.
    ListBackupOperations(context.Context, *ListBackupOperationsRequest) (*ListBackupOperationsResponse, error)
}

DatabaseAdminServer is the server API for DatabaseAdmin service.

type Database_State Uses

type Database_State int32

Indicates the current state of the database.

const (
    // Not specified.
    Database_STATE_UNSPECIFIED Database_State = 0
    // The database is still being created. Operations on the database may fail
    // with `FAILED_PRECONDITION` in this state.
    Database_CREATING Database_State = 1
    // The database is fully created and ready for use.
    Database_READY Database_State = 2
    // The database is fully created and ready for use, but is still
    // being optimized for performance and cannot handle full load.
    //
    // In this state, the database still references the backup
    // it was restore from, preventing the backup
    // from being deleted. When optimizations are complete, the full performance
    // of the database will be restored, and the database will transition to
    // `READY` state.
    Database_READY_OPTIMIZING Database_State = 3
)

func (Database_State) Descriptor Uses

func (Database_State) Descriptor() protoreflect.EnumDescriptor

func (Database_State) Enum Uses

func (x Database_State) Enum() *Database_State

func (Database_State) EnumDescriptor Uses

func (Database_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Database_State.Descriptor instead.

func (Database_State) Number Uses

func (x Database_State) Number() protoreflect.EnumNumber

func (Database_State) String Uses

func (x Database_State) String() string

func (Database_State) Type Uses

func (Database_State) Type() protoreflect.EnumType

type DeleteBackupRequest Uses

type DeleteBackupRequest struct {

    // Required. Name of the backup to delete.
    // Values are of the form
    // `projects/<project>/instances/<instance>/backups/<backup>`.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // contains filtered or unexported fields
}

The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].

func (*DeleteBackupRequest) Descriptor Uses

func (*DeleteBackupRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteBackupRequest.ProtoReflect.Descriptor instead.

func (*DeleteBackupRequest) GetName Uses

func (x *DeleteBackupRequest) GetName() string

func (*DeleteBackupRequest) ProtoMessage Uses

func (*DeleteBackupRequest) ProtoMessage()

func (*DeleteBackupRequest) ProtoReflect Uses

func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message

func (*DeleteBackupRequest) Reset Uses

func (x *DeleteBackupRequest) Reset()

func (*DeleteBackupRequest) String Uses

func (x *DeleteBackupRequest) String() string

type DropDatabaseRequest Uses

type DropDatabaseRequest struct {

    // Required. The database to be dropped.
    Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
    // contains filtered or unexported fields
}

The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].

func (*DropDatabaseRequest) Descriptor Uses

func (*DropDatabaseRequest) Descriptor() ([]byte, []int)

Deprecated: Use DropDatabaseRequest.ProtoReflect.Descriptor instead.

func (*DropDatabaseRequest) GetDatabase Uses

func (x *DropDatabaseRequest) GetDatabase() string

func (*DropDatabaseRequest) ProtoMessage Uses

func (*DropDatabaseRequest) ProtoMessage()

func (*DropDatabaseRequest) ProtoReflect Uses

func (x *DropDatabaseRequest) ProtoReflect() protoreflect.Message

func (*DropDatabaseRequest) Reset Uses

func (x *DropDatabaseRequest) Reset()

func (*DropDatabaseRequest) String Uses

func (x *DropDatabaseRequest) String() string

type GetBackupRequest Uses

type GetBackupRequest struct {

    // Required. Name of the backup.
    // Values are of the form
    // `projects/<project>/instances/<instance>/backups/<backup>`.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // contains filtered or unexported fields
}

The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].

func (*GetBackupRequest) Descriptor Uses

func (*GetBackupRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBackupRequest.ProtoReflect.Descriptor instead.

func (*GetBackupRequest) GetName Uses

func (x *GetBackupRequest) GetName() string

func (*GetBackupRequest) ProtoMessage Uses

func (*GetBackupRequest) ProtoMessage()

func (*GetBackupRequest) ProtoReflect Uses

func (x *GetBackupRequest) ProtoReflect() protoreflect.Message

func (*GetBackupRequest) Reset Uses

func (x *GetBackupRequest) Reset()

func (*GetBackupRequest) String Uses

func (x *GetBackupRequest) String() string

type GetDatabaseDdlRequest Uses

type GetDatabaseDdlRequest struct {

    // Required. The database whose schema we wish to get.
    Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
    // contains filtered or unexported fields
}

The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].

func (*GetDatabaseDdlRequest) Descriptor Uses

func (*GetDatabaseDdlRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetDatabaseDdlRequest.ProtoReflect.Descriptor instead.

func (*GetDatabaseDdlRequest) GetDatabase Uses

func (x *GetDatabaseDdlRequest) GetDatabase() string

func (*GetDatabaseDdlRequest) ProtoMessage Uses

func (*GetDatabaseDdlRequest) ProtoMessage()

func (*GetDatabaseDdlRequest) ProtoReflect Uses

func (x *GetDatabaseDdlRequest) ProtoReflect() protoreflect.Message

func (*GetDatabaseDdlRequest) Reset Uses

func (x *GetDatabaseDdlRequest) Reset()

func (*GetDatabaseDdlRequest) String Uses

func (x *GetDatabaseDdlRequest) String() string

type GetDatabaseDdlResponse Uses

type GetDatabaseDdlResponse struct {

    // A list of formatted DDL statements defining the schema of the database
    // specified in the request.
    Statements []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"`
    // contains filtered or unexported fields
}

The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].

func (*GetDatabaseDdlResponse) Descriptor Uses

func (*GetDatabaseDdlResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetDatabaseDdlResponse.ProtoReflect.Descriptor instead.

func (*GetDatabaseDdlResponse) GetStatements Uses

func (x *GetDatabaseDdlResponse) GetStatements() []string

func (*GetDatabaseDdlResponse) ProtoMessage Uses

func (*GetDatabaseDdlResponse) ProtoMessage()

func (*GetDatabaseDdlResponse) ProtoReflect Uses

func (x *GetDatabaseDdlResponse) ProtoReflect() protoreflect.Message

func (*GetDatabaseDdlResponse) Reset Uses

func (x *GetDatabaseDdlResponse) Reset()

func (*GetDatabaseDdlResponse) String Uses

func (x *GetDatabaseDdlResponse) String() string

type GetDatabaseRequest Uses

type GetDatabaseRequest struct {

    // Required. The name of the requested database. Values are of the form
    // `projects/<project>/instances/<instance>/databases/<database>`.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // contains filtered or unexported fields
}

The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].

func (*GetDatabaseRequest) Descriptor Uses

func (*GetDatabaseRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetDatabaseRequest.ProtoReflect.Descriptor instead.

func (*GetDatabaseRequest) GetName Uses

func (x *GetDatabaseRequest) GetName() string

func (*GetDatabaseRequest) ProtoMessage Uses

func (*GetDatabaseRequest) ProtoMessage()

func (*GetDatabaseRequest) ProtoReflect Uses

func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message

func (*GetDatabaseRequest) Reset Uses

func (x *GetDatabaseRequest) Reset()

func (*GetDatabaseRequest) String Uses

func (x *GetDatabaseRequest) String() string

type ListBackupOperationsRequest Uses

type ListBackupOperationsRequest struct {

    // Required. The instance of the backup operations. Values are of
    // the form `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // An expression that filters the list of returned backup operations.
    //
    // A filter expression consists of a field name, a
    // comparison operator, and a value for filtering.
    // The value must be a string, a number, or a boolean. The comparison operator
    // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
    // Colon `:` is the contains operator. Filter rules are not case sensitive.
    //
    // The following fields in the [operation][google.longrunning.Operation]
    // are eligible for filtering:
    //
    //   * `name` - The name of the long-running operation
    //   * `done` - False if the operation is in progress, else true.
    //   * `metadata.@type` - the type of metadata. For example, the type string
    //      for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
    //      `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
    //   * `metadata.<field_name>` - any field in metadata.value.
    //   * `error` - Error associated with the long-running operation.
    //   * `response.@type` - the type of response.
    //   * `response.<field_name>` - any field in response.value.
    //
    // You can combine multiple expressions by enclosing each expression in
    // parentheses. By default, expressions are combined with AND logic, but
    // you can specify AND, OR, and NOT logic explicitly.
    //
    // Here are a few examples:
    //
    //   * `done:true` - The operation is complete.
    //   * `metadata.database:prod` - The database the backup was taken from has
    //      a name containing the string "prod".
    //   * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` <br/>
    //     `(metadata.name:howl) AND` <br/>
    //     `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
    //     `(error:*)` - Returns operations where:
    //     * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
    //     * The backup name contains the string "howl".
    //     * The operation started before 2018-03-28T14:50:00Z.
    //     * The operation resulted in an error.
    Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
    // Number of operations to be returned in the response. If 0 or
    // less, defaults to the server's maximum allowed page size.
    PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    // If non-empty, `page_token` should contain a
    // [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
    // from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
    // same `parent` and with the same `filter`.
    PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // contains filtered or unexported fields
}

The request for [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].

func (*ListBackupOperationsRequest) Descriptor Uses

func (*ListBackupOperationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListBackupOperationsRequest.ProtoReflect.Descriptor instead.

func (*ListBackupOperationsRequest) GetFilter Uses

func (x *ListBackupOperationsRequest) GetFilter() string

func (*ListBackupOperationsRequest) GetPageSize Uses

func (x *ListBackupOperationsRequest) GetPageSize() int32

func (*ListBackupOperationsRequest) GetPageToken Uses

func (x *ListBackupOperationsRequest) GetPageToken() string

func (*ListBackupOperationsRequest) GetParent Uses

func (x *ListBackupOperationsRequest) GetParent() string

func (*ListBackupOperationsRequest) ProtoMessage Uses

func (*ListBackupOperationsRequest) ProtoMessage()

func (*ListBackupOperationsRequest) ProtoReflect Uses

func (x *ListBackupOperationsRequest) ProtoReflect() protoreflect.Message

func (*ListBackupOperationsRequest) Reset Uses

func (x *ListBackupOperationsRequest) Reset()

func (*ListBackupOperationsRequest) String Uses

func (x *ListBackupOperationsRequest) String() string

type ListBackupOperationsResponse Uses

type ListBackupOperationsResponse struct {

    // The list of matching backup [long-running
    // operations][google.longrunning.Operation]. Each operation's name will be
    // prefixed by the backup's name and the operation's
    // [metadata][google.longrunning.Operation.metadata] will be of type
    // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
    // pending or have completed/failed/canceled within the last 7 days.
    // Operations returned are ordered by
    // `operation.metadata.value.progress.start_time` in descending order starting
    // from the most recently started operation.
    Operations []*longrunning.Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
    // `next_page_token` can be sent in a subsequent
    // [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
    // call to fetch more of the matching metadata.
    NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    // contains filtered or unexported fields
}

The response for [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].

func (*ListBackupOperationsResponse) Descriptor Uses

func (*ListBackupOperationsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListBackupOperationsResponse.ProtoReflect.Descriptor instead.

func (*ListBackupOperationsResponse) GetNextPageToken Uses

func (x *ListBackupOperationsResponse) GetNextPageToken() string

func (*ListBackupOperationsResponse) GetOperations Uses

func (x *ListBackupOperationsResponse) GetOperations() []*longrunning.Operation

func (*ListBackupOperationsResponse) ProtoMessage Uses

func (*ListBackupOperationsResponse) ProtoMessage()

func (*ListBackupOperationsResponse) ProtoReflect Uses

func (x *ListBackupOperationsResponse) ProtoReflect() protoreflect.Message

func (*ListBackupOperationsResponse) Reset Uses

func (x *ListBackupOperationsResponse) Reset()

func (*ListBackupOperationsResponse) String Uses

func (x *ListBackupOperationsResponse) String() string

type ListBackupsRequest Uses

type ListBackupsRequest struct {

    // Required. The instance to list backups from.  Values are of the
    // form `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // An expression that filters the list of returned backups.
    //
    // A filter expression consists of a field name, a comparison operator, and a
    // value for filtering.
    // The value must be a string, a number, or a boolean. The comparison operator
    // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
    // Colon `:` is the contains operator. Filter rules are not case sensitive.
    //
    // The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
    //
    //   * `name`
    //   * `database`
    //   * `state`
    //   * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
    //   * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
    //   * `size_bytes`
    //
    // You can combine multiple expressions by enclosing each expression in
    // parentheses. By default, expressions are combined with AND logic, but
    // you can specify AND, OR, and NOT logic explicitly.
    //
    // Here are a few examples:
    //
    //   * `name:Howl` - The backup's name contains the string "howl".
    //   * `database:prod`
    //          - The database's name contains the string "prod".
    //   * `state:CREATING` - The backup is pending creation.
    //   * `state:READY` - The backup is fully created and ready for use.
    //   * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")`
    //          - The backup name contains the string "howl" and `create_time`
    //              of the backup is before 2018-03-28T14:50:00Z.
    //   * `expire_time < \"2018-03-28T14:50:00Z\"`
    //          - The backup `expire_time` is before 2018-03-28T14:50:00Z.
    //   * `size_bytes > 10000000000` - The backup's size is greater than 10GB
    Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
    // Number of backups to be returned in the response. If 0 or
    // less, defaults to the server's maximum allowed page size.
    PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    // If non-empty, `page_token` should contain a
    // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
    // previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
    // `filter`.
    PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // contains filtered or unexported fields
}

The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].

func (*ListBackupsRequest) Descriptor Uses

func (*ListBackupsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListBackupsRequest.ProtoReflect.Descriptor instead.

func (*ListBackupsRequest) GetFilter Uses

func (x *ListBackupsRequest) GetFilter() string

func (*ListBackupsRequest) GetPageSize Uses

func (x *ListBackupsRequest) GetPageSize() int32

func (*ListBackupsRequest) GetPageToken Uses

func (x *ListBackupsRequest) GetPageToken() string

func (*ListBackupsRequest) GetParent Uses

func (x *ListBackupsRequest) GetParent() string

func (*ListBackupsRequest) ProtoMessage Uses

func (*ListBackupsRequest) ProtoMessage()

func (*ListBackupsRequest) ProtoReflect Uses

func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message

func (*ListBackupsRequest) Reset Uses

func (x *ListBackupsRequest) Reset()

func (*ListBackupsRequest) String Uses

func (x *ListBackupsRequest) String() string

type ListBackupsResponse Uses

type ListBackupsResponse struct {

    // The list of matching backups. Backups returned are ordered by `create_time`
    // in descending order, starting from the most recent `create_time`.
    Backups []*Backup `protobuf:"bytes,1,rep,name=backups,proto3" json:"backups,omitempty"`
    // `next_page_token` can be sent in a subsequent
    // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
    // of the matching backups.
    NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    // contains filtered or unexported fields
}

The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].

func (*ListBackupsResponse) Descriptor Uses

func (*ListBackupsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListBackupsResponse.ProtoReflect.Descriptor instead.

func (*ListBackupsResponse) GetBackups Uses

func (x *ListBackupsResponse) GetBackups() []*Backup

func (*ListBackupsResponse) GetNextPageToken Uses

func (x *ListBackupsResponse) GetNextPageToken() string

func (*ListBackupsResponse) ProtoMessage Uses

func (*ListBackupsResponse) ProtoMessage()

func (*ListBackupsResponse) ProtoReflect Uses

func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message

func (*ListBackupsResponse) Reset Uses

func (x *ListBackupsResponse) Reset()

func (*ListBackupsResponse) String Uses

func (x *ListBackupsResponse) String() string

type ListDatabaseOperationsRequest Uses

type ListDatabaseOperationsRequest struct {

    // Required. The instance of the database operations.
    // Values are of the form `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // An expression that filters the list of returned operations.
    //
    // A filter expression consists of a field name, a
    // comparison operator, and a value for filtering.
    // The value must be a string, a number, or a boolean. The comparison operator
    // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
    // Colon `:` is the contains operator. Filter rules are not case sensitive.
    //
    // The following fields in the [Operation][google.longrunning.Operation]
    // are eligible for filtering:
    //
    //   * `name` - The name of the long-running operation
    //   * `done` - False if the operation is in progress, else true.
    //   * `metadata.@type` - the type of metadata. For example, the type string
    //      for [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] is
    //      `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
    //   * `metadata.<field_name>` - any field in metadata.value.
    //   * `error` - Error associated with the long-running operation.
    //   * `response.@type` - the type of response.
    //   * `response.<field_name>` - any field in response.value.
    //
    // You can combine multiple expressions by enclosing each expression in
    // parentheses. By default, expressions are combined with AND logic. However,
    // you can specify AND, OR, and NOT logic explicitly.
    //
    // Here are a few examples:
    //
    //   * `done:true` - The operation is complete.
    //   * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` <br/>
    //     `(metadata.source_type:BACKUP) AND` <br/>
    //     `(metadata.backup_info.backup:backup_howl) AND` <br/>
    //     `(metadata.name:restored_howl) AND` <br/>
    //     `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
    //     `(error:*)` - Return operations where:
    //     * The operation's metadata type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
    //     * The database is restored from a backup.
    //     * The backup name contains "backup_howl".
    //     * The restored database's name contains "restored_howl".
    //     * The operation started before 2018-03-28T14:50:00Z.
    //     * The operation resulted in an error.
    Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
    // Number of operations to be returned in the response. If 0 or
    // less, defaults to the server's maximum allowed page size.
    PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    // If non-empty, `page_token` should contain a
    // [next_page_token][google.spanner.admin.database.v1.ListDatabaseOperationsResponse.next_page_token]
    // from a previous [ListDatabaseOperationsResponse][google.spanner.admin.database.v1.ListDatabaseOperationsResponse] to the
    // same `parent` and with the same `filter`.
    PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // contains filtered or unexported fields
}

The request for [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations].

func (*ListDatabaseOperationsRequest) Descriptor Uses

func (*ListDatabaseOperationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListDatabaseOperationsRequest.ProtoReflect.Descriptor instead.

func (*ListDatabaseOperationsRequest) GetFilter Uses

func (x *ListDatabaseOperationsRequest) GetFilter() string

func (*ListDatabaseOperationsRequest) GetPageSize Uses

func (x *ListDatabaseOperationsRequest) GetPageSize() int32

func (*ListDatabaseOperationsRequest) GetPageToken Uses

func (x *ListDatabaseOperationsRequest) GetPageToken() string

func (*ListDatabaseOperationsRequest) GetParent Uses

func (x *ListDatabaseOperationsRequest) GetParent() string

func (*ListDatabaseOperationsRequest) ProtoMessage Uses

func (*ListDatabaseOperationsRequest) ProtoMessage()

func (*ListDatabaseOperationsRequest) ProtoReflect Uses

func (x *ListDatabaseOperationsRequest) ProtoReflect() protoreflect.Message

func (*ListDatabaseOperationsRequest) Reset Uses

func (x *ListDatabaseOperationsRequest) Reset()

func (*ListDatabaseOperationsRequest) String Uses

func (x *ListDatabaseOperationsRequest) String() string

type ListDatabaseOperationsResponse Uses

type ListDatabaseOperationsResponse struct {

    // The list of matching database [long-running
    // operations][google.longrunning.Operation]. Each operation's name will be
    // prefixed by the database's name. The operation's
    // [metadata][google.longrunning.Operation.metadata] field type
    // `metadata.type_url` describes the type of the metadata.
    Operations []*longrunning.Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
    // `next_page_token` can be sent in a subsequent
    // [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]
    // call to fetch more of the matching metadata.
    NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    // contains filtered or unexported fields
}

The response for [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations].

func (*ListDatabaseOperationsResponse) Descriptor Uses

func (*ListDatabaseOperationsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListDatabaseOperationsResponse.ProtoReflect.Descriptor instead.

func (*ListDatabaseOperationsResponse) GetNextPageToken Uses

func (x *ListDatabaseOperationsResponse) GetNextPageToken() string

func (*ListDatabaseOperationsResponse) GetOperations Uses

func (x *ListDatabaseOperationsResponse) GetOperations() []*longrunning.Operation

func (*ListDatabaseOperationsResponse) ProtoMessage Uses

func (*ListDatabaseOperationsResponse) ProtoMessage()

func (*ListDatabaseOperationsResponse) ProtoReflect Uses

func (x *ListDatabaseOperationsResponse) ProtoReflect() protoreflect.Message

func (*ListDatabaseOperationsResponse) Reset Uses

func (x *ListDatabaseOperationsResponse) Reset()

func (*ListDatabaseOperationsResponse) String Uses

func (x *ListDatabaseOperationsResponse) String() string

type ListDatabasesRequest Uses

type ListDatabasesRequest struct {

    // Required. The instance whose databases should be listed.
    // Values are of the form `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Number of databases to be returned in the response. If 0 or less,
    // defaults to the server's maximum allowed page size.
    PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
    // If non-empty, `page_token` should contain a
    // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
    // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
    PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
    // contains filtered or unexported fields
}

The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

func (*ListDatabasesRequest) Descriptor Uses

func (*ListDatabasesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead.

func (*ListDatabasesRequest) GetPageSize Uses

func (x *ListDatabasesRequest) GetPageSize() int32

func (*ListDatabasesRequest) GetPageToken Uses

func (x *ListDatabasesRequest) GetPageToken() string

func (*ListDatabasesRequest) GetParent Uses

func (x *ListDatabasesRequest) GetParent() string

func (*ListDatabasesRequest) ProtoMessage Uses

func (*ListDatabasesRequest) ProtoMessage()

func (*ListDatabasesRequest) ProtoReflect Uses

func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message

func (*ListDatabasesRequest) Reset Uses

func (x *ListDatabasesRequest) Reset()

func (*ListDatabasesRequest) String Uses

func (x *ListDatabasesRequest) String() string

type ListDatabasesResponse Uses

type ListDatabasesResponse struct {

    // Databases that matched the request.
    Databases []*Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
    // `next_page_token` can be sent in a subsequent
    // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
    // of the matching databases.
    NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
    // contains filtered or unexported fields
}

The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

func (*ListDatabasesResponse) Descriptor Uses

func (*ListDatabasesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead.

func (*ListDatabasesResponse) GetDatabases Uses

func (x *ListDatabasesResponse) GetDatabases() []*Database

func (*ListDatabasesResponse) GetNextPageToken Uses

func (x *ListDatabasesResponse) GetNextPageToken() string

func (*ListDatabasesResponse) ProtoMessage Uses

func (*ListDatabasesResponse) ProtoMessage()

func (*ListDatabasesResponse) ProtoReflect Uses

func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message

func (*ListDatabasesResponse) Reset Uses

func (x *ListDatabasesResponse) Reset()

func (*ListDatabasesResponse) String Uses

func (x *ListDatabasesResponse) String() string

type OperationProgress Uses

type OperationProgress struct {

    // Percent completion of the operation.
    // Values are between 0 and 100 inclusive.
    ProgressPercent int32 `protobuf:"varint,1,opt,name=progress_percent,json=progressPercent,proto3" json:"progress_percent,omitempty"`
    // Time the request was received.
    StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
    // If set, the time at which this operation failed or was completed
    // successfully.
    EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
    // contains filtered or unexported fields
}

Encapsulates progress related information for a Cloud Spanner long running operation.

func (*OperationProgress) Descriptor Uses

func (*OperationProgress) Descriptor() ([]byte, []int)

Deprecated: Use OperationProgress.ProtoReflect.Descriptor instead.

func (*OperationProgress) GetEndTime Uses

func (x *OperationProgress) GetEndTime() *timestamp.Timestamp

func (*OperationProgress) GetProgressPercent Uses

func (x *OperationProgress) GetProgressPercent() int32

func (*OperationProgress) GetStartTime Uses

func (x *OperationProgress) GetStartTime() *timestamp.Timestamp

func (*OperationProgress) ProtoMessage Uses

func (*OperationProgress) ProtoMessage()

func (*OperationProgress) ProtoReflect Uses

func (x *OperationProgress) ProtoReflect() protoreflect.Message

func (*OperationProgress) Reset Uses

func (x *OperationProgress) Reset()

func (*OperationProgress) String Uses

func (x *OperationProgress) String() string

type OptimizeRestoredDatabaseMetadata Uses

type OptimizeRestoredDatabaseMetadata struct {

    // Name of the restored database being optimized.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // The progress of the post-restore optimizations.
    Progress *OperationProgress `protobuf:"bytes,2,opt,name=progress,proto3" json:"progress,omitempty"`
    // contains filtered or unexported fields
}

Metadata type for the long-running operation used to track the progress of optimizations performed on a newly restored database. This long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled.

func (*OptimizeRestoredDatabaseMetadata) Descriptor Uses

func (*OptimizeRestoredDatabaseMetadata) Descriptor() ([]byte, []int)

Deprecated: Use OptimizeRestoredDatabaseMetadata.ProtoReflect.Descriptor instead.

func (*OptimizeRestoredDatabaseMetadata) GetName Uses

func (x *OptimizeRestoredDatabaseMetadata) GetName() string

func (*OptimizeRestoredDatabaseMetadata) GetProgress Uses

func (x *OptimizeRestoredDatabaseMetadata) GetProgress() *OperationProgress

func (*OptimizeRestoredDatabaseMetadata) ProtoMessage Uses

func (*OptimizeRestoredDatabaseMetadata) ProtoMessage()

func (*OptimizeRestoredDatabaseMetadata) ProtoReflect Uses

func (x *OptimizeRestoredDatabaseMetadata) ProtoReflect() protoreflect.Message

func (*OptimizeRestoredDatabaseMetadata) Reset Uses

func (x *OptimizeRestoredDatabaseMetadata) Reset()

func (*OptimizeRestoredDatabaseMetadata) String Uses

func (x *OptimizeRestoredDatabaseMetadata) String() string

type RestoreDatabaseMetadata Uses

type RestoreDatabaseMetadata struct {

    // Name of the database being created and restored to.
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // The type of the restore source.
    SourceType RestoreSourceType `protobuf:"varint,2,opt,name=source_type,json=sourceType,proto3,enum=google.spanner.admin.database.v1.RestoreSourceType" json:"source_type,omitempty"`
    // Information about the source used to restore the database, as specified by
    // `source` in [RestoreDatabaseRequest][google.spanner.admin.database.v1.RestoreDatabaseRequest].
    //
    // Types that are assignable to SourceInfo:
    //	*RestoreDatabaseMetadata_BackupInfo
    SourceInfo isRestoreDatabaseMetadata_SourceInfo `protobuf_oneof:"source_info"`
    // The progress of the
    // [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]
    // operation.
    Progress *OperationProgress `protobuf:"bytes,4,opt,name=progress,proto3" json:"progress,omitempty"`
    // The time at which cancellation of this operation was received.
    // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
    // starts asynchronous cancellation on a long-running operation. The server
    // makes a best effort to cancel the operation, but success is not guaranteed.
    // Clients can use
    // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
    // other methods to check whether the cancellation succeeded or whether the
    // operation completed despite cancellation. On successful cancellation,
    // the operation is not deleted; instead, it becomes an operation with
    // an [Operation.error][google.longrunning.Operation.error] value with a
    // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
    CancelTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=cancel_time,json=cancelTime,proto3" json:"cancel_time,omitempty"`
    // If exists, the name of the long-running operation that will be used to
    // track the post-restore optimization process to optimize the performance of
    // the restored database, and remove the dependency on the restore source.
    // The name is of the form
    // `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
    // where the <database> is the name of database being created and restored to.
    // The metadata type of the  long-running operation is
    // [OptimizeRestoredDatabaseMetadata][google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata]. This long-running operation will be
    // automatically created by the system after the RestoreDatabase long-running
    // operation completes successfully. This operation will not be created if the
    // restore was not successful.
    OptimizeDatabaseOperationName string `protobuf:"bytes,6,opt,name=optimize_database_operation_name,json=optimizeDatabaseOperationName,proto3" json:"optimize_database_operation_name,omitempty"`
    // contains filtered or unexported fields
}

Metadata type for the long-running operation returned by [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase].

func (*RestoreDatabaseMetadata) Descriptor Uses

func (*RestoreDatabaseMetadata) Descriptor() ([]byte, []int)

Deprecated: Use RestoreDatabaseMetadata.ProtoReflect.Descriptor instead.

func (*RestoreDatabaseMetadata) GetBackupInfo Uses

func (x *RestoreDatabaseMetadata) GetBackupInfo() *BackupInfo

func (*RestoreDatabaseMetadata) GetCancelTime Uses

func (x *RestoreDatabaseMetadata) GetCancelTime() *timestamp.Timestamp

func (*RestoreDatabaseMetadata) GetName Uses

func (x *RestoreDatabaseMetadata) GetName() string

func (*RestoreDatabaseMetadata) GetOptimizeDatabaseOperationName Uses

func (x *RestoreDatabaseMetadata) GetOptimizeDatabaseOperationName() string

func (*RestoreDatabaseMetadata) GetProgress Uses

func (x *RestoreDatabaseMetadata) GetProgress() *OperationProgress

func (*RestoreDatabaseMetadata) GetSourceInfo Uses

func (m *RestoreDatabaseMetadata) GetSourceInfo() isRestoreDatabaseMetadata_SourceInfo

func (*RestoreDatabaseMetadata) GetSourceType Uses

func (x *RestoreDatabaseMetadata) GetSourceType() RestoreSourceType

func (*RestoreDatabaseMetadata) ProtoMessage Uses

func (*RestoreDatabaseMetadata) ProtoMessage()

func (*RestoreDatabaseMetadata) ProtoReflect Uses

func (x *RestoreDatabaseMetadata) ProtoReflect() protoreflect.Message

func (*RestoreDatabaseMetadata) Reset Uses

func (x *RestoreDatabaseMetadata) Reset()

func (*RestoreDatabaseMetadata) String Uses

func (x *RestoreDatabaseMetadata) String() string

type RestoreDatabaseMetadata_BackupInfo Uses

type RestoreDatabaseMetadata_BackupInfo struct {
    // Information about the backup used to restore the database.
    BackupInfo *BackupInfo `protobuf:"bytes,3,opt,name=backup_info,json=backupInfo,proto3,oneof"`
}

type RestoreDatabaseRequest Uses

type RestoreDatabaseRequest struct {

    // Required. The name of the instance in which to create the
    // restored database. This instance must be in the same project and
    // have the same instance configuration as the instance containing
    // the source backup. Values are of the form
    // `projects/<project>/instances/<instance>`.
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Required. The id of the database to create and restore to. This
    // database must not already exist. The `database_id` appended to
    // `parent` forms the full database name of the form
    // `projects/<project>/instances/<instance>/databases/<database_id>`.
    DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`
    // Required. The source from which to restore.
    //
    // Types that are assignable to Source:
    //	*RestoreDatabaseRequest_Backup
    Source isRestoreDatabaseRequest_Source `protobuf_oneof:"source"`
    // contains filtered or unexported fields
}

The request for [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase].

func (*RestoreDatabaseRequest) Descriptor Uses

func (*RestoreDatabaseRequest) Descriptor() ([]byte, []int)

Deprecated: Use RestoreDatabaseRequest.ProtoReflect.Descriptor instead.

func (*RestoreDatabaseRequest) GetBackup Uses

func (x *RestoreDatabaseRequest) GetBackup() string

func (*RestoreDatabaseRequest) GetDatabaseId Uses

func (x *RestoreDatabaseRequest) GetDatabaseId() string

func (*RestoreDatabaseRequest) GetParent Uses

func (x *RestoreDatabaseRequest) GetParent() string

func (*RestoreDatabaseRequest) GetSource Uses

func (m *RestoreDatabaseRequest) GetSource() isRestoreDatabaseRequest_Source

func (*RestoreDatabaseRequest) ProtoMessage Uses

func (*RestoreDatabaseRequest) ProtoMessage()

func (*RestoreDatabaseRequest) ProtoReflect Uses

func (x *RestoreDatabaseRequest) ProtoReflect() protoreflect.Message

func (*RestoreDatabaseRequest) Reset Uses

func (x *RestoreDatabaseRequest) Reset()

func (*RestoreDatabaseRequest) String Uses

func (x *RestoreDatabaseRequest) String() string

type RestoreDatabaseRequest_Backup Uses

type RestoreDatabaseRequest_Backup struct {
    // Name of the backup from which to restore.  Values are of the form
    // `projects/<project>/instances/<instance>/backups/<backup>`.
    Backup string `protobuf:"bytes,3,opt,name=backup,proto3,oneof"`
}

type RestoreInfo Uses

type RestoreInfo struct {

    // The type of the restore source.
    SourceType RestoreSourceType `protobuf:"varint,1,opt,name=source_type,json=sourceType,proto3,enum=google.spanner.admin.database.v1.RestoreSourceType" json:"source_type,omitempty"`
    // Information about the source used to restore the database.
    //
    // Types that are assignable to SourceInfo:
    //	*RestoreInfo_BackupInfo
    SourceInfo isRestoreInfo_SourceInfo `protobuf_oneof:"source_info"`
    // contains filtered or unexported fields
}

Information about the database restore.

func (*RestoreInfo) Descriptor Uses

func (*RestoreInfo) Descriptor() ([]byte, []int)

Deprecated: Use RestoreInfo.ProtoReflect.Descriptor instead.

func (*RestoreInfo) GetBackupInfo Uses

func (x *RestoreInfo) GetBackupInfo() *BackupInfo

func (*RestoreInfo) GetSourceInfo Uses

func (m *RestoreInfo) GetSourceInfo() isRestoreInfo_SourceInfo

func (*RestoreInfo) GetSourceType Uses

func (x *RestoreInfo) GetSourceType() RestoreSourceType

func (*RestoreInfo) ProtoMessage Uses

func (*RestoreInfo) ProtoMessage()

func (*RestoreInfo) ProtoReflect Uses

func (x *RestoreInfo) ProtoReflect() protoreflect.Message

func (*RestoreInfo) Reset Uses

func (x *RestoreInfo) Reset()

func (*RestoreInfo) String Uses

func (x *RestoreInfo) String() string

type RestoreInfo_BackupInfo Uses

type RestoreInfo_BackupInfo struct {
    // Information about the backup used to restore the database. The backup
    // may no longer exist.
    BackupInfo *BackupInfo `protobuf:"bytes,2,opt,name=backup_info,json=backupInfo,proto3,oneof"`
}

type RestoreSourceType Uses

type RestoreSourceType int32

Indicates the type of the restore source.

const (
    // No restore associated.
    RestoreSourceType_TYPE_UNSPECIFIED RestoreSourceType = 0
    // A backup was used as the source of the restore.
    RestoreSourceType_BACKUP RestoreSourceType = 1
)

func (RestoreSourceType) Descriptor Uses

func (RestoreSourceType) Descriptor() protoreflect.EnumDescriptor

func (RestoreSourceType) Enum Uses

func (x RestoreSourceType) Enum() *RestoreSourceType

func (RestoreSourceType) EnumDescriptor Uses

func (RestoreSourceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RestoreSourceType.Descriptor instead.

func (RestoreSourceType) Number Uses

func (x RestoreSourceType) Number() protoreflect.EnumNumber

func (RestoreSourceType) String Uses

func (x RestoreSourceType) String() string

func (RestoreSourceType) Type Uses

func (RestoreSourceType) Type() protoreflect.EnumType

type UnimplementedDatabaseAdminServer Uses

type UnimplementedDatabaseAdminServer struct {
}

UnimplementedDatabaseAdminServer can be embedded to have forward compatible implementations.

func (*UnimplementedDatabaseAdminServer) CreateBackup Uses

func (*UnimplementedDatabaseAdminServer) CreateBackup(context.Context, *CreateBackupRequest) (*longrunning.Operation, error)

func (*UnimplementedDatabaseAdminServer) CreateDatabase Uses

func (*UnimplementedDatabaseAdminServer) CreateDatabase(context.Context, *CreateDatabaseRequest) (*longrunning.Operation, error)

func (*UnimplementedDatabaseAdminServer) DeleteBackup Uses

func (*UnimplementedDatabaseAdminServer) DeleteBackup(context.Context, *DeleteBackupRequest) (*empty.Empty, error)

func (*UnimplementedDatabaseAdminServer) DropDatabase Uses

func (*UnimplementedDatabaseAdminServer) DropDatabase(context.Context, *DropDatabaseRequest) (*empty.Empty, error)

func (*UnimplementedDatabaseAdminServer) GetBackup Uses

func (*UnimplementedDatabaseAdminServer) GetBackup(context.Context, *GetBackupRequest) (*Backup, error)

func (*UnimplementedDatabaseAdminServer) GetDatabase Uses

func (*UnimplementedDatabaseAdminServer) GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error)

func (*UnimplementedDatabaseAdminServer) GetDatabaseDdl Uses

func (*UnimplementedDatabaseAdminServer) GetDatabaseDdl(context.Context, *GetDatabaseDdlRequest) (*GetDatabaseDdlResponse, error)

func (*UnimplementedDatabaseAdminServer) GetIamPolicy Uses

func (*UnimplementedDatabaseAdminServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error)

func (*UnimplementedDatabaseAdminServer) ListBackupOperations Uses

func (*UnimplementedDatabaseAdminServer) ListBackupOperations(context.Context, *ListBackupOperationsRequest) (*ListBackupOperationsResponse, error)

func (*UnimplementedDatabaseAdminServer) ListBackups Uses

func (*UnimplementedDatabaseAdminServer) ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error)

func (*UnimplementedDatabaseAdminServer) ListDatabaseOperations Uses

func (*UnimplementedDatabaseAdminServer) ListDatabaseOperations(context.Context, *ListDatabaseOperationsRequest) (*ListDatabaseOperationsResponse, error)

func (*UnimplementedDatabaseAdminServer) ListDatabases Uses

func (*UnimplementedDatabaseAdminServer) ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error)

func (*UnimplementedDatabaseAdminServer) RestoreDatabase Uses

func (*UnimplementedDatabaseAdminServer) RestoreDatabase(context.Context, *RestoreDatabaseRequest) (*longrunning.Operation, error)

func (*UnimplementedDatabaseAdminServer) SetIamPolicy Uses

func (*UnimplementedDatabaseAdminServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error)

func (*UnimplementedDatabaseAdminServer) TestIamPermissions Uses

func (*UnimplementedDatabaseAdminServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)

func (*UnimplementedDatabaseAdminServer) UpdateBackup Uses

func (*UnimplementedDatabaseAdminServer) UpdateBackup(context.Context, *UpdateBackupRequest) (*Backup, error)

func (*UnimplementedDatabaseAdminServer) UpdateDatabaseDdl Uses

func (*UnimplementedDatabaseAdminServer) UpdateDatabaseDdl(context.Context, *UpdateDatabaseDdlRequest) (*longrunning.Operation, error)

type UpdateBackupRequest Uses

type UpdateBackupRequest struct {

    // Required. The backup to update. `backup.name`, and the fields to be updated
    // as specified by `update_mask` are required. Other fields are ignored.
    // Update is only supported for the following fields:
    //  * `backup.expire_time`.
    Backup *Backup `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"`
    // Required. A mask specifying which fields (e.g. `expire_time`) in the
    // Backup resource should be updated. This mask is relative to the Backup
    // resource, not to the request message. The field mask must always be
    // specified; this prevents any future fields from being erased accidentally
    // by clients that do not know about them.
    UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
    // contains filtered or unexported fields
}

The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].

func (*UpdateBackupRequest) Descriptor Uses

func (*UpdateBackupRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateBackupRequest.ProtoReflect.Descriptor instead.

func (*UpdateBackupRequest) GetBackup Uses

func (x *UpdateBackupRequest) GetBackup() *Backup

func (*UpdateBackupRequest) GetUpdateMask Uses

func (x *UpdateBackupRequest) GetUpdateMask() *field_mask.FieldMask

func (*UpdateBackupRequest) ProtoMessage Uses

func (*UpdateBackupRequest) ProtoMessage()

func (*UpdateBackupRequest) ProtoReflect Uses

func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message

func (*UpdateBackupRequest) Reset Uses

func (x *UpdateBackupRequest) Reset()

func (*UpdateBackupRequest) String Uses

func (x *UpdateBackupRequest) String() string

type UpdateDatabaseDdlMetadata Uses

type UpdateDatabaseDdlMetadata struct {

    // The database being modified.
    Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
    // For an update this list contains all the statements. For an
    // individual statement, this list contains only that statement.
    Statements []string `protobuf:"bytes,2,rep,name=statements,proto3" json:"statements,omitempty"`
    // Reports the commit timestamps of all statements that have
    // succeeded so far, where `commit_timestamps[i]` is the commit
    // timestamp for the statement `statements[i]`.
    CommitTimestamps []*timestamp.Timestamp `protobuf:"bytes,3,rep,name=commit_timestamps,json=commitTimestamps,proto3" json:"commit_timestamps,omitempty"`
    // contains filtered or unexported fields
}

Metadata type for the operation returned by [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].

func (*UpdateDatabaseDdlMetadata) Descriptor Uses

func (*UpdateDatabaseDdlMetadata) Descriptor() ([]byte, []int)

Deprecated: Use UpdateDatabaseDdlMetadata.ProtoReflect.Descriptor instead.

func (*UpdateDatabaseDdlMetadata) GetCommitTimestamps Uses

func (x *UpdateDatabaseDdlMetadata) GetCommitTimestamps() []*timestamp.Timestamp

func (*UpdateDatabaseDdlMetadata) GetDatabase Uses

func (x *UpdateDatabaseDdlMetadata) GetDatabase() string

func (*UpdateDatabaseDdlMetadata) GetStatements Uses

func (x *UpdateDatabaseDdlMetadata) GetStatements() []string

func (*UpdateDatabaseDdlMetadata) ProtoMessage Uses

func (*UpdateDatabaseDdlMetadata) ProtoMessage()

func (*UpdateDatabaseDdlMetadata) ProtoReflect Uses

func (x *UpdateDatabaseDdlMetadata) ProtoReflect() protoreflect.Message

func (*UpdateDatabaseDdlMetadata) Reset Uses

func (x *UpdateDatabaseDdlMetadata) Reset()

func (*UpdateDatabaseDdlMetadata) String Uses

func (x *UpdateDatabaseDdlMetadata) String() string

type UpdateDatabaseDdlRequest Uses

type UpdateDatabaseDdlRequest struct {

    // Required. The database to update.
    Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
    // Required. DDL statements to be applied to the database.
    Statements []string `protobuf:"bytes,2,rep,name=statements,proto3" json:"statements,omitempty"`
    // If empty, the new update request is assigned an
    // automatically-generated operation ID. Otherwise, `operation_id`
    // is used to construct the name of the resulting
    // [Operation][google.longrunning.Operation].
    //
    // Specifying an explicit operation ID simplifies determining
    // whether the statements were executed in the event that the
    // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
    // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
    // `operation_id` fields can be combined to form the
    // [name][google.longrunning.Operation.name] of the resulting
    // [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
    //
    // `operation_id` should be unique within the database, and must be
    // a valid identifier: `[a-z][a-z0-9_]*`. Note that
    // automatically-generated operation IDs always begin with an
    // underscore. If the named operation already exists,
    // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
    // `ALREADY_EXISTS`.
    OperationId string `protobuf:"bytes,3,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
    // contains filtered or unexported fields
}

Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled.

Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to monitor progress. See the [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more details.

func (*UpdateDatabaseDdlRequest) Descriptor Uses

func (*UpdateDatabaseDdlRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateDatabaseDdlRequest.ProtoReflect.Descriptor instead.

func (*UpdateDatabaseDdlRequest) GetDatabase Uses

func (x *UpdateDatabaseDdlRequest) GetDatabase() string

func (*UpdateDatabaseDdlRequest) GetOperationId Uses

func (x *UpdateDatabaseDdlRequest) GetOperationId() string

func (*UpdateDatabaseDdlRequest) GetStatements Uses

func (x *UpdateDatabaseDdlRequest) GetStatements() []string

func (*UpdateDatabaseDdlRequest) ProtoMessage Uses

func (*UpdateDatabaseDdlRequest) ProtoMessage()

func (*UpdateDatabaseDdlRequest) ProtoReflect Uses

func (x *UpdateDatabaseDdlRequest) ProtoReflect() protoreflect.Message

func (*UpdateDatabaseDdlRequest) Reset Uses

func (x *UpdateDatabaseDdlRequest) Reset()

func (*UpdateDatabaseDdlRequest) String Uses

func (x *UpdateDatabaseDdlRequest) String() string

Package database imports 15 packages (graph) and is imported by 37 packages. Updated 2020-08-13. Refresh now. Tools for package owners.