instance

package
v0.0.0-...-0e82294 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Instance_State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	1: "CREATING",
	2: "READY",
}
View Source
var Instance_State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"CREATING":          1,
	"READY":             2,
}

Functions

func RegisterInstanceAdminServer

func RegisterInstanceAdminServer(s *grpc.Server, srv InstanceAdminServer)

Types

type CreateInstanceMetadata

type CreateInstanceMetadata struct {
	// The instance being created.
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// The time at which the
	// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance] request was
	// received.
	StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The time at which this operation was cancelled. If set, this operation is
	// in the process of undoing itself (which is guaranteed to succeed) and
	// cannot be cancelled again.
	CancelTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=cancel_time,json=cancelTime,proto3" json:"cancel_time,omitempty"`
	// The time at which this operation failed or was completed successfully.
	EndTime              *timestamp.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Metadata type for the operation returned by [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].

func (*CreateInstanceMetadata) Descriptor

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

func (*CreateInstanceMetadata) GetCancelTime

func (m *CreateInstanceMetadata) GetCancelTime() *timestamp.Timestamp

func (*CreateInstanceMetadata) GetEndTime

func (m *CreateInstanceMetadata) GetEndTime() *timestamp.Timestamp

func (*CreateInstanceMetadata) GetInstance

func (m *CreateInstanceMetadata) GetInstance() *Instance

func (*CreateInstanceMetadata) GetStartTime

func (m *CreateInstanceMetadata) GetStartTime() *timestamp.Timestamp

func (*CreateInstanceMetadata) ProtoMessage

func (*CreateInstanceMetadata) ProtoMessage()

func (*CreateInstanceMetadata) Reset

func (m *CreateInstanceMetadata) Reset()

func (*CreateInstanceMetadata) String

func (m *CreateInstanceMetadata) String() string

func (*CreateInstanceMetadata) XXX_DiscardUnknown

func (m *CreateInstanceMetadata) XXX_DiscardUnknown()

func (*CreateInstanceMetadata) XXX_Marshal

func (m *CreateInstanceMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateInstanceMetadata) XXX_Merge

func (m *CreateInstanceMetadata) XXX_Merge(src proto.Message)

func (*CreateInstanceMetadata) XXX_Size

func (m *CreateInstanceMetadata) XXX_Size() int

func (*CreateInstanceMetadata) XXX_Unmarshal

func (m *CreateInstanceMetadata) XXX_Unmarshal(b []byte) error

type CreateInstanceRequest

type CreateInstanceRequest struct {
	// Required. The name of the project in which to create the instance. Values
	// are of the form `projects/<project>`.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The ID of the instance to create.  Valid identifiers are of the
	// form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 6 and 30 characters in
	// length.
	InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// Required. The instance to create.  The name may be omitted, but if
	// specified must be `<parent>/instances/<instance_id>`.
	Instance             *Instance `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

The request for [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].

func (*CreateInstanceRequest) Descriptor

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

func (*CreateInstanceRequest) GetInstance

func (m *CreateInstanceRequest) GetInstance() *Instance

func (*CreateInstanceRequest) GetInstanceId

func (m *CreateInstanceRequest) GetInstanceId() string

func (*CreateInstanceRequest) GetParent

func (m *CreateInstanceRequest) GetParent() string

func (*CreateInstanceRequest) ProtoMessage

func (*CreateInstanceRequest) ProtoMessage()

func (*CreateInstanceRequest) Reset

func (m *CreateInstanceRequest) Reset()

func (*CreateInstanceRequest) String

func (m *CreateInstanceRequest) String() string

func (*CreateInstanceRequest) XXX_DiscardUnknown

func (m *CreateInstanceRequest) XXX_DiscardUnknown()

func (*CreateInstanceRequest) XXX_Marshal

func (m *CreateInstanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateInstanceRequest) XXX_Merge

func (m *CreateInstanceRequest) XXX_Merge(src proto.Message)

func (*CreateInstanceRequest) XXX_Size

func (m *CreateInstanceRequest) XXX_Size() int

func (*CreateInstanceRequest) XXX_Unmarshal

func (m *CreateInstanceRequest) XXX_Unmarshal(b []byte) error

type DeleteInstanceRequest

type DeleteInstanceRequest struct {
	// Required. The name of the instance to be deleted. Values are of the form
	// `projects/<project>/instances/<instance>`
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request for [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].

func (*DeleteInstanceRequest) Descriptor

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

func (*DeleteInstanceRequest) GetName

func (m *DeleteInstanceRequest) GetName() string

func (*DeleteInstanceRequest) ProtoMessage

func (*DeleteInstanceRequest) ProtoMessage()

func (*DeleteInstanceRequest) Reset

func (m *DeleteInstanceRequest) Reset()

func (*DeleteInstanceRequest) String

func (m *DeleteInstanceRequest) String() string

func (*DeleteInstanceRequest) XXX_DiscardUnknown

func (m *DeleteInstanceRequest) XXX_DiscardUnknown()

func (*DeleteInstanceRequest) XXX_Marshal

func (m *DeleteInstanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteInstanceRequest) XXX_Merge

func (m *DeleteInstanceRequest) XXX_Merge(src proto.Message)

func (*DeleteInstanceRequest) XXX_Size

func (m *DeleteInstanceRequest) XXX_Size() int

func (*DeleteInstanceRequest) XXX_Unmarshal

func (m *DeleteInstanceRequest) XXX_Unmarshal(b []byte) error

type GetInstanceConfigRequest

type GetInstanceConfigRequest struct {
	// Required. The name of the requested instance configuration. Values are of
	// the form `projects/<project>/instanceConfigs/<config>`.
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request for GetInstanceConfigRequest[google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].

func (*GetInstanceConfigRequest) Descriptor

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

func (*GetInstanceConfigRequest) GetName

func (m *GetInstanceConfigRequest) GetName() string

func (*GetInstanceConfigRequest) ProtoMessage

func (*GetInstanceConfigRequest) ProtoMessage()

func (*GetInstanceConfigRequest) Reset

func (m *GetInstanceConfigRequest) Reset()

func (*GetInstanceConfigRequest) String

func (m *GetInstanceConfigRequest) String() string

func (*GetInstanceConfigRequest) XXX_DiscardUnknown

func (m *GetInstanceConfigRequest) XXX_DiscardUnknown()

func (*GetInstanceConfigRequest) XXX_Marshal

func (m *GetInstanceConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInstanceConfigRequest) XXX_Merge

func (m *GetInstanceConfigRequest) XXX_Merge(src proto.Message)

func (*GetInstanceConfigRequest) XXX_Size

func (m *GetInstanceConfigRequest) XXX_Size() int

func (*GetInstanceConfigRequest) XXX_Unmarshal

func (m *GetInstanceConfigRequest) XXX_Unmarshal(b []byte) error

type GetInstanceRequest

type GetInstanceRequest struct {
	// Required. The name of the requested instance. Values are of the form
	// `projects/<project>/instances/<instance>`.
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request for [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].

func (*GetInstanceRequest) Descriptor

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

func (*GetInstanceRequest) GetName

func (m *GetInstanceRequest) GetName() string

func (*GetInstanceRequest) ProtoMessage

func (*GetInstanceRequest) ProtoMessage()

func (*GetInstanceRequest) Reset

func (m *GetInstanceRequest) Reset()

func (*GetInstanceRequest) String

func (m *GetInstanceRequest) String() string

func (*GetInstanceRequest) XXX_DiscardUnknown

func (m *GetInstanceRequest) XXX_DiscardUnknown()

func (*GetInstanceRequest) XXX_Marshal

func (m *GetInstanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetInstanceRequest) XXX_Merge

func (m *GetInstanceRequest) XXX_Merge(src proto.Message)

func (*GetInstanceRequest) XXX_Size

func (m *GetInstanceRequest) XXX_Size() int

func (*GetInstanceRequest) XXX_Unmarshal

func (m *GetInstanceRequest) XXX_Unmarshal(b []byte) error

type Instance

type Instance struct {
	// Required. A unique identifier for the instance, which cannot be changed
	// after the instance is created. Values are of the form
	// `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
	// segment of the name must be between 6 and 30 characters in length.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The name of the instance's configuration. Values are of the form
	// `projects/<project>/instanceConfigs/<configuration>`. See
	// also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
	// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
	Config string `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// Required. The descriptive name for this instance as it appears in UIs.
	// Must be unique per project and between 4 and 30 characters in length.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Required. The number of nodes allocated to this instance. This may be zero
	// in API responses for instances that are not yet in state `READY`.
	//
	// See [the documentation](https://cloud.google.com/spanner/docs/instances#node_count)
	// for more information about nodes.
	NodeCount int32 `protobuf:"varint,5,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"`
	// Output only. The current instance state. For
	// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance], the state must be
	// either omitted or set to `CREATING`. For
	// [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance], the state must be
	// either omitted or set to `READY`.
	State Instance_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.spanner.admin.instance.v1.Instance_State" json:"state,omitempty"`
	// Cloud Labels are a flexible and lightweight mechanism for organizing cloud
	// resources into groups that reflect a customer's organizational needs and
	// deployment strategies. Cloud Labels can be used to filter collections of
	// resources. They can be used to control how resource metrics are aggregated.
	// And they can be used as arguments to policy management rules (e.g. route,
	// firewall, load balancing, etc.).
	//
	//  * Label keys must be between 1 and 63 characters long and must conform to
	//    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
	//  * Label values must be between 0 and 63 characters long and must conform
	//    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
	//  * No more than 64 labels can be associated with a given resource.
	//
	// See https://goo.gl/xmQnxf for more information on and examples of labels.
	//
	// If you plan to use labels in your own code, please note that additional
	// characters may be allowed in the future. And so you are advised to use an
	// internal label representation, such as JSON, which doesn't rely upon
	// specific characters being disallowed.  For example, representing labels
	// as the string:  name + "_" + value  would prove problematic if we were to
	// allow "_" in a future release.
	Labels               map[string]string `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

An isolated set of Cloud Spanner resources on which databases can be hosted.

func (*Instance) Descriptor

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

func (*Instance) GetConfig

func (m *Instance) GetConfig() string

func (*Instance) GetDisplayName

func (m *Instance) GetDisplayName() string

func (*Instance) GetLabels

func (m *Instance) GetLabels() map[string]string

func (*Instance) GetName

func (m *Instance) GetName() string

func (*Instance) GetNodeCount

func (m *Instance) GetNodeCount() int32

func (*Instance) GetState

func (m *Instance) GetState() Instance_State

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) Reset

func (m *Instance) Reset()

func (*Instance) String

func (m *Instance) String() string

func (*Instance) XXX_DiscardUnknown

func (m *Instance) XXX_DiscardUnknown()

func (*Instance) XXX_Marshal

func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Instance) XXX_Merge

func (m *Instance) XXX_Merge(src proto.Message)

func (*Instance) XXX_Size

func (m *Instance) XXX_Size() int

func (*Instance) XXX_Unmarshal

func (m *Instance) XXX_Unmarshal(b []byte) error

type InstanceAdminClient

type InstanceAdminClient interface {
	// Lists the supported instance configurations for a given project.
	ListInstanceConfigs(ctx context.Context, in *ListInstanceConfigsRequest, opts ...grpc.CallOption) (*ListInstanceConfigsResponse, error)
	// Gets information about a particular instance configuration.
	GetInstanceConfig(ctx context.Context, in *GetInstanceConfigRequest, opts ...grpc.CallOption) (*InstanceConfig, error)
	// Lists all instances in the given project.
	ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error)
	// Gets information about a particular instance.
	GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error)
	// Creates an instance and begins preparing it to begin serving. The
	// returned [long-running operation][google.longrunning.Operation]
	// can be used to track the progress of preparing the new
	// instance. The instance name is assigned by the caller. If the
	// named instance already exists, `CreateInstance` returns
	// `ALREADY_EXISTS`.
	//
	// Immediately upon completion of this request:
	//
	//   * The instance is readable via the API, with all requested attributes
	//     but no allocated resources. Its state is `CREATING`.
	//
	// Until completion of the returned operation:
	//
	//   * Cancelling the operation renders the instance immediately unreadable
	//     via the API.
	//   * The instance can be deleted.
	//   * All other attempts to modify the instance are rejected.
	//
	// Upon completion of the returned operation:
	//
	//   * Billing for all successfully-allocated resources begins (some types
	//     may have lower than the requested levels).
	//   * Databases can be created in the instance.
	//   * The instance's allocated resource levels are readable via the API.
	//   * The instance's state becomes `READY`.
	//
	// The returned [long-running operation][google.longrunning.Operation] will
	// have a name of the format `<instance_name>/operations/<operation_id>` and
	// can be used to track creation of the instance.  The
	// [metadata][google.longrunning.Operation.metadata] field type is
	// [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
	// The [response][google.longrunning.Operation.response] field type is
	// [Instance][google.spanner.admin.instance.v1.Instance], if successful.
	CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// Updates an instance, and begins allocating or releasing resources
	// as requested. The returned [long-running
	// operation][google.longrunning.Operation] can be used to track the
	// progress of updating the instance. If the named instance does not
	// exist, returns `NOT_FOUND`.
	//
	// Immediately upon completion of this request:
	//
	//   * For resource types for which a decrease in the instance's allocation
	//     has been requested, billing is based on the newly-requested level.
	//
	// Until completion of the returned operation:
	//
	//   * Cancelling the operation sets its metadata's
	//     [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins
	//     restoring resources to their pre-request values. The operation
	//     is guaranteed to succeed at undoing all resource changes,
	//     after which point it terminates with a `CANCELLED` status.
	//   * All other attempts to modify the instance are rejected.
	//   * Reading the instance via the API continues to give the pre-request
	//     resource levels.
	//
	// Upon completion of the returned operation:
	//
	//   * Billing begins for all successfully-allocated resources (some types
	//     may have lower than the requested levels).
	//   * All newly-reserved resources are available for serving the instance's
	//     tables.
	//   * The instance's new resource levels are readable via the API.
	//
	// The returned [long-running operation][google.longrunning.Operation] will
	// have a name of the format `<instance_name>/operations/<operation_id>` and
	// can be used to track the instance modification.  The
	// [metadata][google.longrunning.Operation.metadata] field type is
	// [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
	// The [response][google.longrunning.Operation.response] field type is
	// [Instance][google.spanner.admin.instance.v1.Instance], if successful.
	//
	// Authorization requires `spanner.instances.update` permission on
	// resource [name][google.spanner.admin.instance.v1.Instance.name].
	UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// Deletes an instance.
	//
	// Immediately upon completion of the request:
	//
	//   * Billing ceases for all of the instance's reserved resources.
	//
	// Soon afterward:
	//
	//   * The instance and *all of its databases* immediately and
	//     irrevocably disappear from the API. All data in the databases
	//     is permanently deleted.
	DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Sets the access control policy on an instance resource. Replaces any
	// existing policy.
	//
	// Authorization requires `spanner.instances.setIamPolicy` 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 an instance resource. Returns an empty
	// policy if an instance exists but does not have a policy set.
	//
	// Authorization requires `spanner.instances.getIamPolicy` 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 instance resource.
	//
	// Attempting this RPC on a non-existent Cloud Spanner instance resource will
	// result in a NOT_FOUND error if the user has `spanner.instances.list`
	// permission on the containing Google Cloud Project. Otherwise returns an
	// empty set of permissions.
	TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error)
}

InstanceAdminClient is the client API for InstanceAdmin service.

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

func NewInstanceAdminClient

func NewInstanceAdminClient(cc *grpc.ClientConn) InstanceAdminClient

type InstanceAdminServer

type InstanceAdminServer interface {
	// Lists the supported instance configurations for a given project.
	ListInstanceConfigs(context.Context, *ListInstanceConfigsRequest) (*ListInstanceConfigsResponse, error)
	// Gets information about a particular instance configuration.
	GetInstanceConfig(context.Context, *GetInstanceConfigRequest) (*InstanceConfig, error)
	// Lists all instances in the given project.
	ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error)
	// Gets information about a particular instance.
	GetInstance(context.Context, *GetInstanceRequest) (*Instance, error)
	// Creates an instance and begins preparing it to begin serving. The
	// returned [long-running operation][google.longrunning.Operation]
	// can be used to track the progress of preparing the new
	// instance. The instance name is assigned by the caller. If the
	// named instance already exists, `CreateInstance` returns
	// `ALREADY_EXISTS`.
	//
	// Immediately upon completion of this request:
	//
	//   * The instance is readable via the API, with all requested attributes
	//     but no allocated resources. Its state is `CREATING`.
	//
	// Until completion of the returned operation:
	//
	//   * Cancelling the operation renders the instance immediately unreadable
	//     via the API.
	//   * The instance can be deleted.
	//   * All other attempts to modify the instance are rejected.
	//
	// Upon completion of the returned operation:
	//
	//   * Billing for all successfully-allocated resources begins (some types
	//     may have lower than the requested levels).
	//   * Databases can be created in the instance.
	//   * The instance's allocated resource levels are readable via the API.
	//   * The instance's state becomes `READY`.
	//
	// The returned [long-running operation][google.longrunning.Operation] will
	// have a name of the format `<instance_name>/operations/<operation_id>` and
	// can be used to track creation of the instance.  The
	// [metadata][google.longrunning.Operation.metadata] field type is
	// [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
	// The [response][google.longrunning.Operation.response] field type is
	// [Instance][google.spanner.admin.instance.v1.Instance], if successful.
	CreateInstance(context.Context, *CreateInstanceRequest) (*longrunning.Operation, error)
	// Updates an instance, and begins allocating or releasing resources
	// as requested. The returned [long-running
	// operation][google.longrunning.Operation] can be used to track the
	// progress of updating the instance. If the named instance does not
	// exist, returns `NOT_FOUND`.
	//
	// Immediately upon completion of this request:
	//
	//   * For resource types for which a decrease in the instance's allocation
	//     has been requested, billing is based on the newly-requested level.
	//
	// Until completion of the returned operation:
	//
	//   * Cancelling the operation sets its metadata's
	//     [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins
	//     restoring resources to their pre-request values. The operation
	//     is guaranteed to succeed at undoing all resource changes,
	//     after which point it terminates with a `CANCELLED` status.
	//   * All other attempts to modify the instance are rejected.
	//   * Reading the instance via the API continues to give the pre-request
	//     resource levels.
	//
	// Upon completion of the returned operation:
	//
	//   * Billing begins for all successfully-allocated resources (some types
	//     may have lower than the requested levels).
	//   * All newly-reserved resources are available for serving the instance's
	//     tables.
	//   * The instance's new resource levels are readable via the API.
	//
	// The returned [long-running operation][google.longrunning.Operation] will
	// have a name of the format `<instance_name>/operations/<operation_id>` and
	// can be used to track the instance modification.  The
	// [metadata][google.longrunning.Operation.metadata] field type is
	// [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
	// The [response][google.longrunning.Operation.response] field type is
	// [Instance][google.spanner.admin.instance.v1.Instance], if successful.
	//
	// Authorization requires `spanner.instances.update` permission on
	// resource [name][google.spanner.admin.instance.v1.Instance.name].
	UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunning.Operation, error)
	// Deletes an instance.
	//
	// Immediately upon completion of the request:
	//
	//   * Billing ceases for all of the instance's reserved resources.
	//
	// Soon afterward:
	//
	//   * The instance and *all of its databases* immediately and
	//     irrevocably disappear from the API. All data in the databases
	//     is permanently deleted.
	DeleteInstance(context.Context, *DeleteInstanceRequest) (*empty.Empty, error)
	// Sets the access control policy on an instance resource. Replaces any
	// existing policy.
	//
	// Authorization requires `spanner.instances.setIamPolicy` on
	// [resource][google.iam.v1.SetIamPolicyRequest.resource].
	SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error)
	// Gets the access control policy for an instance resource. Returns an empty
	// policy if an instance exists but does not have a policy set.
	//
	// Authorization requires `spanner.instances.getIamPolicy` on
	// [resource][google.iam.v1.GetIamPolicyRequest.resource].
	GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error)
	// Returns permissions that the caller has on the specified instance resource.
	//
	// Attempting this RPC on a non-existent Cloud Spanner instance resource will
	// result in a NOT_FOUND error if the user has `spanner.instances.list`
	// permission on the containing Google Cloud Project. Otherwise returns an
	// empty set of permissions.
	TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)
}

InstanceAdminServer is the server API for InstanceAdmin service.

type InstanceConfig

type InstanceConfig struct {
	// A unique identifier for the instance configuration.  Values
	// are of the form
	// `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The name of this instance configuration as it appears in UIs.
	DisplayName          string   `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.

func (*InstanceConfig) Descriptor

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

func (*InstanceConfig) GetDisplayName

func (m *InstanceConfig) GetDisplayName() string

func (*InstanceConfig) GetName

func (m *InstanceConfig) GetName() string

func (*InstanceConfig) ProtoMessage

func (*InstanceConfig) ProtoMessage()

func (*InstanceConfig) Reset

func (m *InstanceConfig) Reset()

func (*InstanceConfig) String

func (m *InstanceConfig) String() string

func (*InstanceConfig) XXX_DiscardUnknown

func (m *InstanceConfig) XXX_DiscardUnknown()

func (*InstanceConfig) XXX_Marshal

func (m *InstanceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InstanceConfig) XXX_Merge

func (m *InstanceConfig) XXX_Merge(src proto.Message)

func (*InstanceConfig) XXX_Size

func (m *InstanceConfig) XXX_Size() int

func (*InstanceConfig) XXX_Unmarshal

func (m *InstanceConfig) XXX_Unmarshal(b []byte) error

type Instance_State

type Instance_State int32

Indicates the current state of the instance.

const (
	// Not specified.
	Instance_STATE_UNSPECIFIED Instance_State = 0
	// The instance is still being created. Resources may not be
	// available yet, and operations such as database creation may not
	// work.
	Instance_CREATING Instance_State = 1
	// The instance is fully created and ready to do work such as
	// creating databases.
	Instance_READY Instance_State = 2
)

func (Instance_State) EnumDescriptor

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

func (Instance_State) String

func (x Instance_State) String() string

type ListInstanceConfigsRequest

type ListInstanceConfigsRequest struct {
	// Required. The name of the project for which a list of supported instance
	// configurations is requested. Values are of the form
	// `projects/<project>`.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Number of instance configurations to be returned in the response. If 0 or
	// less, defaults to the server's maximum allowed page size.
	PageSize int32 `protobuf:"varint,2,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.instance.v1.ListInstanceConfigsResponse.next_page_token]
	// from a previous [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
	PageToken            string   `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].

func (*ListInstanceConfigsRequest) Descriptor

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

func (*ListInstanceConfigsRequest) GetPageSize

func (m *ListInstanceConfigsRequest) GetPageSize() int32

func (*ListInstanceConfigsRequest) GetPageToken

func (m *ListInstanceConfigsRequest) GetPageToken() string

func (*ListInstanceConfigsRequest) GetParent

func (m *ListInstanceConfigsRequest) GetParent() string

func (*ListInstanceConfigsRequest) ProtoMessage

func (*ListInstanceConfigsRequest) ProtoMessage()

func (*ListInstanceConfigsRequest) Reset

func (m *ListInstanceConfigsRequest) Reset()

func (*ListInstanceConfigsRequest) String

func (m *ListInstanceConfigsRequest) String() string

func (*ListInstanceConfigsRequest) XXX_DiscardUnknown

func (m *ListInstanceConfigsRequest) XXX_DiscardUnknown()

func (*ListInstanceConfigsRequest) XXX_Marshal

func (m *ListInstanceConfigsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListInstanceConfigsRequest) XXX_Merge

func (m *ListInstanceConfigsRequest) XXX_Merge(src proto.Message)

func (*ListInstanceConfigsRequest) XXX_Size

func (m *ListInstanceConfigsRequest) XXX_Size() int

func (*ListInstanceConfigsRequest) XXX_Unmarshal

func (m *ListInstanceConfigsRequest) XXX_Unmarshal(b []byte) error

type ListInstanceConfigsResponse

type ListInstanceConfigsResponse struct {
	// The list of requested instance configurations.
	InstanceConfigs []*InstanceConfig `protobuf:"bytes,1,rep,name=instance_configs,json=instanceConfigs,proto3" json:"instance_configs,omitempty"`
	// `next_page_token` can be sent in a subsequent
	// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs] call to
	// fetch more of the matching instance configurations.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].

func (*ListInstanceConfigsResponse) Descriptor

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

func (*ListInstanceConfigsResponse) GetInstanceConfigs

func (m *ListInstanceConfigsResponse) GetInstanceConfigs() []*InstanceConfig

func (*ListInstanceConfigsResponse) GetNextPageToken

func (m *ListInstanceConfigsResponse) GetNextPageToken() string

func (*ListInstanceConfigsResponse) ProtoMessage

func (*ListInstanceConfigsResponse) ProtoMessage()

func (*ListInstanceConfigsResponse) Reset

func (m *ListInstanceConfigsResponse) Reset()

func (*ListInstanceConfigsResponse) String

func (m *ListInstanceConfigsResponse) String() string

func (*ListInstanceConfigsResponse) XXX_DiscardUnknown

func (m *ListInstanceConfigsResponse) XXX_DiscardUnknown()

func (*ListInstanceConfigsResponse) XXX_Marshal

func (m *ListInstanceConfigsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListInstanceConfigsResponse) XXX_Merge

func (m *ListInstanceConfigsResponse) XXX_Merge(src proto.Message)

func (*ListInstanceConfigsResponse) XXX_Size

func (m *ListInstanceConfigsResponse) XXX_Size() int

func (*ListInstanceConfigsResponse) XXX_Unmarshal

func (m *ListInstanceConfigsResponse) XXX_Unmarshal(b []byte) error

type ListInstancesRequest

type ListInstancesRequest struct {
	// Required. The name of the project for which a list of instances is
	// requested. Values are of the form `projects/<project>`.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Number of instances to be returned in the response. If 0 or less, defaults
	// to the server's maximum allowed page size.
	PageSize int32 `protobuf:"varint,2,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.instance.v1.ListInstancesResponse.next_page_token] from a
	// previous [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// An expression for filtering the results of the request. Filter rules are
	// case insensitive. The fields eligible for filtering are:
	//
	//   * `name`
	//   * `display_name`
	//   * `labels.key` where key is the name of a label
	//
	// Some examples of using filters are:
	//
	//   * `name:*` --> The instance has a name.
	//   * `name:Howl` --> The instance's name contains the string "howl".
	//   * `name:HOWL` --> Equivalent to above.
	//   * `NAME:howl` --> Equivalent to above.
	//   * `labels.env:*` --> The instance has the label "env".
	//   * `labels.env:dev` --> The instance has the label "env" and the value of
	//                        the label contains the string "dev".
	//   * `name:howl labels.env:dev` --> The instance's name contains "howl" and
	//                                  it has the label "env" with its value
	//                                  containing "dev".
	Filter               string   `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].

func (*ListInstancesRequest) Descriptor

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

func (*ListInstancesRequest) GetFilter

func (m *ListInstancesRequest) GetFilter() string

func (*ListInstancesRequest) GetPageSize

func (m *ListInstancesRequest) GetPageSize() int32

func (*ListInstancesRequest) GetPageToken

func (m *ListInstancesRequest) GetPageToken() string

func (*ListInstancesRequest) GetParent

func (m *ListInstancesRequest) GetParent() string

func (*ListInstancesRequest) ProtoMessage

func (*ListInstancesRequest) ProtoMessage()

func (*ListInstancesRequest) Reset

func (m *ListInstancesRequest) Reset()

func (*ListInstancesRequest) String

func (m *ListInstancesRequest) String() string

func (*ListInstancesRequest) XXX_DiscardUnknown

func (m *ListInstancesRequest) XXX_DiscardUnknown()

func (*ListInstancesRequest) XXX_Marshal

func (m *ListInstancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListInstancesRequest) XXX_Merge

func (m *ListInstancesRequest) XXX_Merge(src proto.Message)

func (*ListInstancesRequest) XXX_Size

func (m *ListInstancesRequest) XXX_Size() int

func (*ListInstancesRequest) XXX_Unmarshal

func (m *ListInstancesRequest) XXX_Unmarshal(b []byte) error

type ListInstancesResponse

type ListInstancesResponse struct {
	// The list of requested instances.
	Instances []*Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"`
	// `next_page_token` can be sent in a subsequent
	// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances] call to fetch more
	// of the matching instances.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].

func (*ListInstancesResponse) Descriptor

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

func (*ListInstancesResponse) GetInstances

func (m *ListInstancesResponse) GetInstances() []*Instance

func (*ListInstancesResponse) GetNextPageToken

func (m *ListInstancesResponse) GetNextPageToken() string

func (*ListInstancesResponse) ProtoMessage

func (*ListInstancesResponse) ProtoMessage()

func (*ListInstancesResponse) Reset

func (m *ListInstancesResponse) Reset()

func (*ListInstancesResponse) String

func (m *ListInstancesResponse) String() string

func (*ListInstancesResponse) XXX_DiscardUnknown

func (m *ListInstancesResponse) XXX_DiscardUnknown()

func (*ListInstancesResponse) XXX_Marshal

func (m *ListInstancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListInstancesResponse) XXX_Merge

func (m *ListInstancesResponse) XXX_Merge(src proto.Message)

func (*ListInstancesResponse) XXX_Size

func (m *ListInstancesResponse) XXX_Size() int

func (*ListInstancesResponse) XXX_Unmarshal

func (m *ListInstancesResponse) XXX_Unmarshal(b []byte) error

type UpdateInstanceMetadata

type UpdateInstanceMetadata struct {
	// The desired end state of the update.
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// The time at which [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]
	// request was received.
	StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The time at which this operation was cancelled. If set, this operation is
	// in the process of undoing itself (which is guaranteed to succeed) and
	// cannot be cancelled again.
	CancelTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=cancel_time,json=cancelTime,proto3" json:"cancel_time,omitempty"`
	// The time at which this operation failed or was completed successfully.
	EndTime              *timestamp.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Metadata type for the operation returned by [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].

func (*UpdateInstanceMetadata) Descriptor

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

func (*UpdateInstanceMetadata) GetCancelTime

func (m *UpdateInstanceMetadata) GetCancelTime() *timestamp.Timestamp

func (*UpdateInstanceMetadata) GetEndTime

func (m *UpdateInstanceMetadata) GetEndTime() *timestamp.Timestamp

func (*UpdateInstanceMetadata) GetInstance

func (m *UpdateInstanceMetadata) GetInstance() *Instance

func (*UpdateInstanceMetadata) GetStartTime

func (m *UpdateInstanceMetadata) GetStartTime() *timestamp.Timestamp

func (*UpdateInstanceMetadata) ProtoMessage

func (*UpdateInstanceMetadata) ProtoMessage()

func (*UpdateInstanceMetadata) Reset

func (m *UpdateInstanceMetadata) Reset()

func (*UpdateInstanceMetadata) String

func (m *UpdateInstanceMetadata) String() string

func (*UpdateInstanceMetadata) XXX_DiscardUnknown

func (m *UpdateInstanceMetadata) XXX_DiscardUnknown()

func (*UpdateInstanceMetadata) XXX_Marshal

func (m *UpdateInstanceMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateInstanceMetadata) XXX_Merge

func (m *UpdateInstanceMetadata) XXX_Merge(src proto.Message)

func (*UpdateInstanceMetadata) XXX_Size

func (m *UpdateInstanceMetadata) XXX_Size() int

func (*UpdateInstanceMetadata) XXX_Unmarshal

func (m *UpdateInstanceMetadata) XXX_Unmarshal(b []byte) error

type UpdateInstanceRequest

type UpdateInstanceRequest struct {
	// Required. The instance to update, which must always include the instance
	// name.  Otherwise, only fields mentioned in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// Required. A mask specifying which fields in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should be updated.
	// The field mask must always be specified; this prevents any future fields in
	// [][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know
	// about them.
	FieldMask            *field_mask.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

The request for [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].

func (*UpdateInstanceRequest) Descriptor

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

func (*UpdateInstanceRequest) GetFieldMask

func (m *UpdateInstanceRequest) GetFieldMask() *field_mask.FieldMask

func (*UpdateInstanceRequest) GetInstance

func (m *UpdateInstanceRequest) GetInstance() *Instance

func (*UpdateInstanceRequest) ProtoMessage

func (*UpdateInstanceRequest) ProtoMessage()

func (*UpdateInstanceRequest) Reset

func (m *UpdateInstanceRequest) Reset()

func (*UpdateInstanceRequest) String

func (m *UpdateInstanceRequest) String() string

func (*UpdateInstanceRequest) XXX_DiscardUnknown

func (m *UpdateInstanceRequest) XXX_DiscardUnknown()

func (*UpdateInstanceRequest) XXX_Marshal

func (m *UpdateInstanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateInstanceRequest) XXX_Merge

func (m *UpdateInstanceRequest) XXX_Merge(src proto.Message)

func (*UpdateInstanceRequest) XXX_Size

func (m *UpdateInstanceRequest) XXX_Size() int

func (*UpdateInstanceRequest) XXX_Unmarshal

func (m *UpdateInstanceRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL