As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Tpu v2alpha1 API

class google.cloud.tpu_v2alpha1.types.AcceleratorConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A TPU accelerator configuration.

type_

Required. Type of TPU.

Type

google.cloud.tpu_v2alpha1.types.AcceleratorConfig.Type

topology

Required. Topology of TPU in chips.

Type

str

class Type(value)[source]

Bases: proto.enums.Enum

TPU type.

Values:
TYPE_UNSPECIFIED (0):

Unspecified version.

V2 (2):

TPU v2.

V3 (4):

TPU v3.

V4 (7):

TPU v4.

class google.cloud.tpu_v2alpha1.types.AcceleratorType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A accelerator type that a Node can be configured with.

name

The resource name.

Type

str

type_

The accelerator type.

Type

str

accelerator_configs

The accelerator config.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.AcceleratorConfig]

class google.cloud.tpu_v2alpha1.types.AccessConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An access config attached to the TPU worker.

external_ip

Output only. An external IP address associated with the TPU worker.

Type

str

class google.cloud.tpu_v2alpha1.types.AttachedDisk(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A node-attached disk resource. Next ID: 8;

source_disk

Specifies the full path to an existing disk. For example: “projects/my-project/zones/us-central1-c/disks/my-disk”.

Type

str

mode

The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.

Type

google.cloud.tpu_v2alpha1.types.AttachedDisk.DiskMode

class DiskMode(value)[source]

Bases: proto.enums.Enum

The different mode of the attached disk.

Values:
DISK_MODE_UNSPECIFIED (0):

The disk mode is not known/set.

READ_WRITE (1):

Attaches the disk in read-write mode. Only one TPU node can attach a disk in read-write mode at a time.

READ_ONLY (2):

Attaches the disk in read-only mode. Multiple TPU nodes can attach a disk in read-only mode at a time.

class google.cloud.tpu_v2alpha1.types.BootDiskConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Boot disk configurations.

customer_encryption_key

Optional. Customer encryption key for boot disk.

Type

google.cloud.tpu_v2alpha1.types.CustomerEncryptionKey

enable_confidential_compute

Optional. Whether the boot disk will be created with confidential compute mode.

Type

bool

class google.cloud.tpu_v2alpha1.types.CreateNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [CreateNode][google.cloud.tpu.v2alpha1.Tpu.CreateNode].

parent

Required. The parent resource name.

Type

str

node_id

The unqualified resource name.

Type

str

node

Required. The node.

Type

google.cloud.tpu_v2alpha1.types.Node

request_id

Idempotent request UUID.

Type

str

class google.cloud.tpu_v2alpha1.types.CreateQueuedResourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource].

parent

Required. The parent resource name.

Type

str

queued_resource_id

The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ regex format.

Type

str

queued_resource

Required. The queued resource.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource

request_id

Idempotent request UUID.

Type

str

class google.cloud.tpu_v2alpha1.types.CustomerEncryptionKey(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Customer’s encryption key.

kms_key_name

The name of the encryption key that is stored in Google Cloud KMS. For example:

"kmsKeyName": "projects/
kms_project_id/locations/
region/keyRings/
key_region/cryptoKeys/key

The fully-qualifed key name may be returned for resource GET requests. For example:

"kmsKeyName": "projects/
kms_project_id/locations/
region/keyRings/
key_region/cryptoKeys/key
/cryptoKeyVersions/1

This field is a member of oneof key.

Type

str

class google.cloud.tpu_v2alpha1.types.DeleteNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [DeleteNode][google.cloud.tpu.v2alpha1.Tpu.DeleteNode].

name

Required. The resource name.

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.tpu_v2alpha1.types.DeleteQueuedResourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource].

name

Required. The resource name.

Type

str

request_id

Idempotent request UUID.

Type

str

force

If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.

Type

bool

class google.cloud.tpu_v2alpha1.types.GenerateServiceIdentityRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].

parent

Required. The parent resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.GenerateServiceIdentityResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity].

identity

ServiceIdentity that was created or retrieved.

Type

google.cloud.tpu_v2alpha1.types.ServiceIdentity

class google.cloud.tpu_v2alpha1.types.GetAcceleratorTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.GetGuestAttributesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].

name

Required. The resource name.

Type

str

query_path

The guest attributes path to be queried.

Type

str

worker_ids

The 0-based worker ID. If it is empty, all workers’ GuestAttributes will be returned.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.GetGuestAttributesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes].

guest_attributes

The guest attributes for the TPU workers.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.GuestAttributes]

class google.cloud.tpu_v2alpha1.types.GetNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetNode][google.cloud.tpu.v2alpha1.Tpu.GetNode].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.GetQueuedResourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource]

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.GetRuntimeVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.GuestAttributes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A guest attributes.

query_path

The path to be queried. This can be the default namespace (‘/’) or a nested namespace (‘/<namespace>/’) or a specified key (‘/<namespace>/<key>’)

Type

str

query_value

The value of the requested queried path.

Type

google.cloud.tpu_v2alpha1.types.GuestAttributesValue

class google.cloud.tpu_v2alpha1.types.GuestAttributesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A guest attributes namespace/key/value entry.

namespace

Namespace for the guest attribute entry.

Type

str

key

Key for the guest attribute entry.

Type

str

value

Value for the guest attribute entry.

Type

str

class google.cloud.tpu_v2alpha1.types.GuestAttributesValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Array of guest attribute namespace/key/value tuples.

items

The list of guest attributes entries.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.GuestAttributesEntry]

class google.cloud.tpu_v2alpha1.types.ListAcceleratorTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

filter

List filter.

Type

str

order_by

Sort results.

Type

str

class google.cloud.tpu_v2alpha1.types.ListAcceleratorTypesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes].

accelerator_types

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.AcceleratorType]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.ListNodesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

class google.cloud.tpu_v2alpha1.types.ListNodesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListNodes][google.cloud.tpu.v2alpha1.Tpu.ListNodes].

nodes

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.Node]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.ListQueuedResourcesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

class google.cloud.tpu_v2alpha1.types.ListQueuedResourcesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources].

queued_resources

The listed queued resources.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.QueuedResource]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.ListRuntimeVersionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

filter

List filter.

Type

str

order_by

Sort results.

Type

str

class google.cloud.tpu_v2alpha1.types.ListRuntimeVersionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions].

runtime_versions

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.RuntimeVersion]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.NetworkConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Network related configurations.

network

The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, “default” will be used.

Type

str

subnetwork

The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, “default” will be used.

Type

str

enable_external_ips

Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.

Type

bool

can_ip_forward

Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.

Type

bool

class google.cloud.tpu_v2alpha1.types.NetworkEndpoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A network endpoint over which a TPU worker can be reached.

ip_address

The internal IP address of this network endpoint.

Type

str

port

The port of this network endpoint.

Type

int

access_config

The access config for the TPU worker.

Type

google.cloud.tpu_v2alpha1.types.AccessConfig

class google.cloud.tpu_v2alpha1.types.Node(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A TPU instance.

name

Output only. Immutable. The name of the TPU.

Type

str

description

The user-supplied description of the TPU. Maximum of 512 characters.

Type

str

accelerator_type

The type of hardware accelerators associated with this node.

Type

str

state

Output only. The current state for the TPU Node.

Type

google.cloud.tpu_v2alpha1.types.Node.State

health_description

Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.

Type

str

runtime_version

Required. The runtime version running in the Node.

Type

str

network_config

Network configurations for the TPU node.

Type

google.cloud.tpu_v2alpha1.types.NetworkConfig

cidr_block

The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user’s provided network, or the provided network is peered with another network that is using that CIDR block.

Type

str

service_account

The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used.

Type

google.cloud.tpu_v2alpha1.types.ServiceAccount

create_time

Output only. The time when the node was created.

Type

google.protobuf.timestamp_pb2.Timestamp

scheduling_config

The scheduling options for this node.

Type

google.cloud.tpu_v2alpha1.types.SchedulingConfig

network_endpoints

Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.NetworkEndpoint]

health

The health status of the TPU node.

Type

google.cloud.tpu_v2alpha1.types.Node.Health

labels

Resource labels to represent user-provided metadata.

Type

MutableMapping[str, str]

metadata

Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script

Type

MutableMapping[str, str]

tags

Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.

Type

MutableSequence[str]

id

Output only. The unique identifier for the TPU Node.

Type

int

data_disks

The additional data disks for the Node.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.AttachedDisk]

api_version

Output only. The API version that created this Node.

Type

google.cloud.tpu_v2alpha1.types.Node.ApiVersion

symptoms

Output only. The Symptoms that have occurred to the TPU Node.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.Symptom]

queued_resource

Output only. The qualified name of the QueuedResource that requested this Node.

Type

str

accelerator_config

The AccleratorConfig for the TPU Node.

Type

google.cloud.tpu_v2alpha1.types.AcceleratorConfig

shielded_instance_config

Shielded Instance options.

Type

google.cloud.tpu_v2alpha1.types.ShieldedInstanceConfig

multislice_node

Output only. Whether the Node belongs to a Multislice group.

Type

bool

boot_disk_config

Optional. Boot disk configuration.

Type

google.cloud.tpu_v2alpha1.types.BootDiskConfig

class ApiVersion(value)[source]

Bases: proto.enums.Enum

TPU API Version.

Values:
API_VERSION_UNSPECIFIED (0):

API version is unknown.

V1_ALPHA1 (1):

TPU API V1Alpha1 version.

V1 (2):

TPU API V1 version.

V2_ALPHA1 (3):

TPU API V2Alpha1 version.

class Health(value)[source]

Bases: proto.enums.Enum

Health defines the status of a TPU node as reported by Health Monitor.

Values:
HEALTH_UNSPECIFIED (0):

Health status is unknown: not initialized or failed to retrieve.

HEALTHY (1):

The resource is healthy.

TIMEOUT (3):

The resource is unresponsive.

UNHEALTHY_TENSORFLOW (4):

The in-guest ML stack is unhealthy.

UNHEALTHY_MAINTENANCE (5):

The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class State(value)[source]

Bases: proto.enums.Enum

Represents the different states of a TPU node during its lifecycle.

Values:
STATE_UNSPECIFIED (0):

TPU node state is not known/set.

CREATING (1):

TPU node is being created.

READY (2):

TPU node has been created.

RESTARTING (3):

TPU node is restarting.

REIMAGING (4):

TPU node is undergoing reimaging.

DELETING (5):

TPU node is being deleted.

REPAIRING (6):

TPU node is being repaired and may be unusable. Details can be found in the ‘help_description’ field.

STOPPED (8):

TPU node is stopped.

STOPPING (9):

TPU node is currently stopping.

STARTING (10):

TPU node is currently starting.

PREEMPTED (11):

TPU node has been preempted. Only applies to Preemptible TPU Nodes.

TERMINATED (12):

TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).

HIDING (13):

TPU node is currently hiding.

HIDDEN (14):

TPU node has been hidden.

UNHIDING (15):

TPU node is currently unhiding.

class google.cloud.tpu_v2alpha1.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata describing an [Operation][google.longrunning.Operation]

create_time

The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

target

Target of the operation - for example projects/project-1/connectivityTests/test-1

Type

str

verb

Name of the verb executed by the operation.

Type

str

status_detail

Human-readable status of the operation, if any.

Type

str

cancel_requested

Specifies if cancellation was requested for the operation.

Type

bool

api_version

API version.

Type

str

class google.cloud.tpu_v2alpha1.types.QueuedResource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

name

Output only. Immutable. The name of the QueuedResource.

Type

str

tpu

Defines a TPU resource.

This field is a member of oneof resource.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.Tpu

best_effort

The BestEffort tier.

This field is a member of oneof tier.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.BestEffort

guaranteed

The Guaranteed tier.

This field is a member of oneof tier.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.Guaranteed

spot

Optional. The Spot tier.

This field is a member of oneof tier.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.Spot

queueing_policy

The queueing policy of the QueuedRequest.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.QueueingPolicy

state

Output only. State of the QueuedResource request.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState

reservation_name

Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation}

Type

str

class BestEffort(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

BestEffort tier definition.

class Guaranteed(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Guaranteed tier definition.

min_duration

Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.

Type

google.protobuf.duration_pb2.Duration

reserved

Optional. Specifies the request should be scheduled on reserved capacity.

Type

bool

class QueueingPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Defines the policy of the QueuedRequest.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

valid_until_duration

A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.

This field is a member of oneof start_timing_constraints.

Type

google.protobuf.duration_pb2.Duration

valid_until_time

An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.

This field is a member of oneof start_timing_constraints.

Type

google.protobuf.timestamp_pb2.Timestamp

valid_after_duration

A relative time after which resources may be created.

This field is a member of oneof start_timing_constraints.

Type

google.protobuf.duration_pb2.Duration

valid_after_time

An absolute time at which resources may be created.

This field is a member of oneof start_timing_constraints.

Type

google.protobuf.timestamp_pb2.Timestamp

valid_interval

An absolute time interval within which resources may be created.

This field is a member of oneof start_timing_constraints.

Type

google.type.interval_pb2.Interval

class Spot(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Spot tier definition.

class Tpu(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of the TPU resource(s) being requested.

node_spec

The TPU node(s) being requested.

Type

MutableSequence[google.cloud.tpu_v2alpha1.types.QueuedResource.Tpu.NodeSpec]

class NodeSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.

parent

Required. The parent resource name.

Type

str

node_id

The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It’s an error to specify both node_id and multi_node_params.

Type

str

multi_node_params

Optional. Fields to specify in case of multi-node request.

Type

google.cloud.tpu_v2alpha1.types.QueuedResource.Tpu.NodeSpec.MultiNodeParams

node

Required. The node.

Type

google.cloud.tpu_v2alpha1.types.Node

class MultiNodeParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It’s an error to specify both node_id and multi_node_params.

node_count

Required. Number of nodes with this spec. The system will attempt to provison “node_count” nodes as part of the request. This needs to be > 1.

Type

int

node_id_prefix

Prefix of node_ids in case of multi-node request Should follow the ^[A-Za-z0-9_.~+%-]+$ regex format. If node_count = 3 and node_id_prefix = “np”, node ids of nodes created will be “np-0”, “np-1”, “np-2”. If this field is not provided we use queued_resource_id as the node_id_prefix.

Type

str

class google.cloud.tpu_v2alpha1.types.QueuedResourceState(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

QueuedResourceState defines the details of the QueuedResource request.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

state

State of the QueuedResource request.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.State

creating_data

Further data for the creating state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.CreatingData

accepted_data

Further data for the accepted state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.AcceptedData

provisioning_data

Further data for the provisioning state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.ProvisioningData

failed_data

Further data for the failed state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.FailedData

deleting_data

Further data for the deleting state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.DeletingData

active_data

Further data for the active state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.ActiveData

suspending_data

Further data for the suspending state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.SuspendingData

suspended_data

Further data for the suspended state.

This field is a member of oneof state_data.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.SuspendedData

state_initiator

Output only. The initiator of the QueuedResources’s current state.

Type

google.cloud.tpu_v2alpha1.types.QueuedResourceState.StateInitiator

class AcceptedData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the accepted state.

class ActiveData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the active state.

class CreatingData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the creating state.

class DeletingData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the deleting state.

class FailedData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the failed state.

error

The error that caused the queued resource to enter the FAILED state.

Type

google.rpc.status_pb2.Status

class ProvisioningData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the provisioning state.

class State(value)[source]

Bases: proto.enums.Enum

Output only state of the request

Values:
STATE_UNSPECIFIED (0):

State of the QueuedResource request is not known/set.

CREATING (1):

The QueuedResource request has been received. We’re still working on determining if we will be able to honor this request.

ACCEPTED (2):

The QueuedResource request has passed initial validation/admission control and has been persisted in the queue.

PROVISIONING (3):

The QueuedResource request has been selected. The associated resources are currently being provisioned (or very soon will begin provisioning).

FAILED (4):

The request could not be completed. This may be due to some late-discovered problem with the request itself, or due to unavailability of resources within the constraints of the request (e.g., the ‘valid until’ start timing constraint expired).

DELETING (5):

The QueuedResource is being deleted.

ACTIVE (6):

The resources specified in the QueuedResource request have been provisioned and are ready for use by the end-user/consumer.

SUSPENDING (7):

The resources specified in the QueuedResource request are being deleted. This may have been initiated by the user, or the Cloud TPU service. Inspect the state data for more details.

SUSPENDED (8):

The resources specified in the QueuedResource request have been deleted.

WAITING_FOR_RESOURCES (9):

The QueuedResource request has passed initial validation and has been persisted in the queue. It will remain in this state until there are sufficient free resources to begin provisioning your request. Wait times will vary significantly depending on demand levels. When demand is high, not all requests can be immediately provisioned. If you need more reliable obtainability of TPUs consider purchasing a reservation. To put a limit on how long you are willing to wait, use timing constraints.

class StateInitiator(value)[source]

Bases: proto.enums.Enum

The initiator of the QueuedResource’s SUSPENDING/SUSPENDED state.

Values:
STATE_INITIATOR_UNSPECIFIED (0):

The state initiator is unspecified.

USER (1):

The current QueuedResource state was initiated by the user.

SERVICE (2):

The current QueuedResource state was initiated by the service.

class SuspendedData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the suspended state.

class SuspendingData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Further data for the suspending state.

class google.cloud.tpu_v2alpha1.types.ResetQueuedResourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ResetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.ResetQueuedResource].

name

Required. The name of the queued resource.

Type

str

class google.cloud.tpu_v2alpha1.types.RuntimeVersion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A runtime version that a Node can be configured with.

name

The resource name.

Type

str

version

The runtime version.

Type

str

class google.cloud.tpu_v2alpha1.types.SchedulingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Sets the scheduling options for this node.

preemptible

Defines whether the node is preemptible.

Type

bool

reserved

Whether the node is created under a reservation.

Type

bool

class google.cloud.tpu_v2alpha1.types.ServiceAccount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A service account.

email

Email address of the service account. If empty, default Compute service account will be used.

Type

str

scope

The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.ServiceIdentity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The per-product per-project service identity for Cloud TPU service.

email

The email address of the service identity.

Type

str

class google.cloud.tpu_v2alpha1.types.ShieldedInstanceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A set of Shielded Instance options.

enable_secure_boot

Defines whether the instance has Secure Boot enabled.

Type

bool

class google.cloud.tpu_v2alpha1.types.SimulateMaintenanceEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent].

name

Required. The resource name.

Type

str

worker_ids

The 0-based worker ID. If it is empty, worker ID 0 will be selected for maintenance event simulation. A maintenance event will only be fired on the first specified worker ID. Future implementations may support firing on multiple workers.

Type

MutableSequence[str]

class google.cloud.tpu_v2alpha1.types.StartNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [StartNode][google.cloud.tpu.v2alpha1.Tpu.StartNode].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.StopNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [StopNode][google.cloud.tpu.v2alpha1.Tpu.StopNode].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v2alpha1.types.Symptom(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Symptom instance.

create_time

Timestamp when the Symptom is created.

Type

google.protobuf.timestamp_pb2.Timestamp

symptom_type

Type of the Symptom.

Type

google.cloud.tpu_v2alpha1.types.Symptom.SymptomType

details

Detailed information of the current Symptom.

Type

str

worker_id

A string used to uniquely distinguish a worker within a TPU node.

Type

str

class SymptomType(value)[source]

Bases: proto.enums.Enum

SymptomType represents the different types of Symptoms that a TPU can be at.

Values:
SYMPTOM_TYPE_UNSPECIFIED (0):

Unspecified symptom.

LOW_MEMORY (1):

TPU VM memory is low.

OUT_OF_MEMORY (2):

TPU runtime is out of memory.

EXECUTE_TIMED_OUT (3):

TPU runtime execution has timed out.

MESH_BUILD_FAIL (4):

TPU runtime fails to construct a mesh that recognizes each TPU device’s neighbors.

HBM_OUT_OF_MEMORY (5):

TPU HBM is out of memory.

PROJECT_ABUSE (6):

Abusive behaviors have been identified on the current project.

class google.cloud.tpu_v2alpha1.types.UpdateNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [UpdateNode][google.cloud.tpu.v2alpha1.Tpu.UpdateNode].

update_mask

Required. Mask of fields from [Node][Tpu.Node] to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].

Type

google.protobuf.field_mask_pb2.FieldMask

node

Required. The node. Only fields specified in update_mask are updated.

Type

google.cloud.tpu_v2alpha1.types.Node