@datafire/google_tpu v5.0.0
@datafire/google_tpu
Client library for Cloud TPU API
Installation and Usage
npm install --save @datafire/google_tpu
let google_tpu = require('@datafire/google_tpu').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Description
TPU API provides customers with access to Google TPU technology.
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
google_tpu.oauthCallback({
"code": ""
}, context)
Input
- input
object
- code required
string
- code required
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
oauthRefresh
Exchange a refresh_token for an access_token
google_tpu.oauthRefresh(null, context)
Input
This action has no parameters
Output
- output
object
- access_token
string
- refresh_token
string
- token_type
string
- scope
string
- expiration
string
- access_token
tpu.projects.locations.operations.delete
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
google_tpu.tpu.projects.locations.operations.delete({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the operation resource to be deleted. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output Empty
tpu.projects.locations.tensorflowVersions.get
Gets TensorFlow Version.
google_tpu.tpu.projects.locations.tensorflowVersions.get({
"name": ""
}, context)
Input
- input
object
- name required
string
: Required. The resource name. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output TensorFlowVersion
tpu.projects.locations.list
Lists information about the supported locations for this service.
google_tpu.tpu.projects.locations.list({
"name": ""
}, context)
Input
- input
object
- name required
string
: The resource that owns the locations collection, if applicable. - filter
string
: The standard list filter. - pageSize
integer
: The standard list page size. - pageToken
string
: The standard list page token. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output ListLocationsResponse
tpu.projects.locations.operations.list
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. NOTE: the name
binding allows API services to override the binding to use different resource name schemes, such as users/*/operations
. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
google_tpu.tpu.projects.locations.operations.list({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the operation's parent resource. - filter
string
: The standard list filter. - pageSize
integer
: The standard list page size. - pageToken
string
: The standard list page token. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output ListOperationsResponse
tpu.projects.locations.operations.cancel
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use 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 of 1, corresponding to Code.CANCELLED
.
google_tpu.tpu.projects.locations.operations.cancel({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the operation resource to be cancelled. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output Empty
tpu.projects.locations.nodes.reimage
Reimages a node's OS.
google_tpu.tpu.projects.locations.nodes.reimage({
"name": ""
}, context)
Input
- input
object
- name required
string
: The resource name. - body ReimageNodeRequest
- $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output Operation
tpu.projects.locations.nodes.start
Starts a node.
google_tpu.tpu.projects.locations.nodes.start({
"name": ""
}, context)
Input
- input
object
- name required
string
: The resource name. - body StartNodeRequest
- $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output Operation
tpu.projects.locations.nodes.stop
Stops a node.
google_tpu.tpu.projects.locations.nodes.stop({
"name": ""
}, context)
Input
- input
object
- name required
string
: The resource name. - body StopNodeRequest
- $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- name required
Output
- output Operation
tpu.projects.locations.acceleratorTypes.list
Lists accelerator types supported by this API.
google_tpu.tpu.projects.locations.acceleratorTypes.list({
"parent": ""
}, context)
Input
- input
object
- parent required
string
: Required. The parent resource name. - filter
string
: List filter. - orderBy
string
: Sort results. - pageSize
integer
: The maximum number of items to return. - pageToken
string
: The next_page_token value returned from a previous List request, if any. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- parent required
Output
- output ListAcceleratorTypesResponse
tpu.projects.locations.nodes.list
Lists nodes.
google_tpu.tpu.projects.locations.nodes.list({
"parent": ""
}, context)
Input
- input
object
- parent required
string
: Required. The parent resource name. - pageSize
integer
: The maximum number of items to return. - pageToken
string
: The next_page_token value returned from a previous List request, if any. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- parent required
Output
- output ListNodesResponse
tpu.projects.locations.nodes.create
Creates a node.
google_tpu.tpu.projects.locations.nodes.create({
"parent": ""
}, context)
Input
- input
object
- parent required
string
: Required. The parent resource name. - nodeId
string
: The unqualified resource name. - body Node
- $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- parent required
Output
- output Operation
tpu.projects.locations.tensorflowVersions.list
Lists TensorFlow versions supported by this API.
google_tpu.tpu.projects.locations.tensorflowVersions.list({
"parent": ""
}, context)
Input
- input
object
- parent required
string
: Required. The parent resource name. - filter
string
: List filter. - orderBy
string
: Sort results. - pageSize
integer
: The maximum number of items to return. - pageToken
string
: The next_page_token value returned from a previous List request, if any. - $.xgafv
string
(values: 1, 2): V1 error format. - access_token
string
: OAuth access token. - alt
string
(values: json, media, proto): Data format for response. - callback
string
: JSONP - fields
string
: Selector specifying which fields to include in a partial response. - key
string
: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - oauth_token
string
: OAuth 2.0 token for the current user. - prettyPrint
boolean
: Returns response with indentations and line breaks. - quotaUser
string
: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - upload_protocol
string
: Upload protocol for media (e.g. "raw", "multipart"). - uploadType
string
: Legacy upload protocol for media (e.g. "media", "multipart").
- parent required
Output
Definitions
AcceleratorType
- AcceleratorType
object
: A accelerator type that a Node can be configured with.- name
string
: The resource name. - type
string
: the accelerator type.
- name
Empty
- Empty
object
: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation forEmpty
is empty JSON object{}
.
ListAcceleratorTypesResponse
- ListAcceleratorTypesResponse
object
: Response for ListAcceleratorTypes.- acceleratorTypes
array
: The listed nodes.- items AcceleratorType
- nextPageToken
string
: The next page token or empty if none. - unreachable
array
: Locations that could not be reached.- items
string
- items
- acceleratorTypes
ListLocationsResponse
- ListLocationsResponse
object
: The response message for Locations.ListLocations.- locations
array
: A list of locations that matches the specified filter in the request.- items Location
- nextPageToken
string
: The standard List next-page token.
- locations
ListNodesResponse
- ListNodesResponse
object
: Response for ListNodes.- nextPageToken
string
: The next page token or empty if none. - nodes
array
: The listed nodes.- items Node
- unreachable
array
: Locations that could not be reached.- items
string
- items
- nextPageToken
ListOperationsResponse
- ListOperationsResponse
object
: The response message for Operations.ListOperations.- nextPageToken
string
: The standard List next-page token. - operations
array
: A list of operations that matches the specified filter in the request.- items Operation
- nextPageToken
ListTensorFlowVersionsResponse
- ListTensorFlowVersionsResponse
object
: Response for ListTensorFlowVersions.- nextPageToken
string
: The next page token or empty if none. - tensorflowVersions
array
: The listed nodes.- items TensorFlowVersion
- unreachable
array
: Locations that could not be reached.- items
string
- items
- nextPageToken
Location
- Location
object
: A resource that represents Google Cloud Platform location.- displayName
string
: The friendly name for this location, typically a nearby city name. For example, "Tokyo". - labels
object
: Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} - locationId
string
: The canonical id for this location. For example:"us-east1"
. - metadata
object
: Service-specific metadata. For example the available capacity at the given location. - name
string
: Resource name for the location, which may vary between implementations. For example:"projects/example-project/locations/us-east1"
- displayName
NetworkEndpoint
- NetworkEndpoint
object
: A network endpoint over which a TPU worker can be reached.- ipAddress
string
: The IP address of this network endpoint. - port
integer
: The port of this network endpoint.
- ipAddress
Node
- Node
object
: A TPU instance.- acceleratorType
string
: Required. The type of hardware accelerators associated with this node. - cidrBlock
string
: 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. - createTime
string
: Output only. The time when the node was created. - description
string
: The user-supplied description of the TPU. Maximum of 512 characters. - health
string
(values: HEALTH_UNSPECIFIED, HEALTHY, DEPRECATED_UNHEALTHY, TIMEOUT, UNHEALTHY_TENSORFLOW, UNHEALTHY_MAINTENANCE): The health status of the TPU node. - healthDescription
string
: Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy. - ipAddress
string
: Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances. - labels
object
: Resource labels to represent user-provided metadata. - name
string
: Output only. Immutable. The name of the TPU - network
string
: The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used. - networkEndpoints
array
: Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first.- items NetworkEndpoint
- port
string
: Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances. - schedulingConfig SchedulingConfig
- serviceAccount
string
: Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data. - state
string
(values: STATE_UNSPECIFIED, CREATING, READY, RESTARTING, REIMAGING, DELETING, REPAIRING, STOPPED, STOPPING, STARTING, PREEMPTED, TERMINATED, HIDING, HIDDEN, UNHIDING): Output only. The current state for the TPU Node. - symptoms
array
: Output only. The Symptoms that have occurred to the TPU Node.- items Symptom
- tensorflowVersion
string
: Required. The version of Tensorflow running in the Node. - useServiceNetworking
boolean
: Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.
- acceleratorType
Operation
- Operation
object
: This resource represents a long-running operation that is the result of a network API call.- done
boolean
: If the value isfalse
, it means the operation is still in progress. Iftrue
, the operation is completed, and eithererror
orresponse
is available. - error Status
- metadata
object
: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. - name
string
: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, thename
should be a resource name ending withoperations/{unique_id}
. - response
object
: The normal response of the operation in case of success. If the original method returns no data on success, such asDelete
, the response isgoogle.protobuf.Empty
. If the original method is standardGet
/Create
/Update
, the response should be the resource. For other methods, the response should have the typeXxxResponse
, whereXxx
is the original method name. For example, if the original method name isTakeSnapshot()
, the inferred response type isTakeSnapshotResponse
.
- done
OperationMetadata
- OperationMetadata
object
: Represents the metadata of the long-running operation.- apiVersion
string
: Output only API version used to start the operation. - cancelRequested
boolean
: Output only Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding toCode.CANCELLED
. - createTime
string
: Output only The time the operation was created. - endTime
string
: Output only The time the operation finished running. - statusDetail
string
: Output only Human-readable status of the operation, if any. - target
string
: Output only Server-defined resource path for the target of the operation. - verb
string
: Output only Name of the verb executed by the operation.
- apiVersion
ReimageNodeRequest
- ReimageNodeRequest
object
: Request for ReimageNode.- tensorflowVersion
string
: The version for reimage to create.
- tensorflowVersion
SchedulingConfig
- SchedulingConfig
object
: Sets the scheduling options for this node.- preemptible
boolean
: Defines whether the node is preemptible. - reserved
boolean
: Whether the node is created under a reservation.
- preemptible
StartNodeRequest
- StartNodeRequest
object
: Request for StartNode.
Status
- Status
object
: TheStatus
type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. EachStatus
message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.- code
integer
: The status code, which should be an enum value of google.rpc.Code. - details
array
: A list of messages that carry the error details. There is a common set of message types for APIs to use.- items
object
- items
- message
string
: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
- code
StopNodeRequest
- StopNodeRequest
object
: Request for StopNode.
Symptom
- Symptom
object
: A Symptom instance.- createTime
string
: Timestamp when the Symptom is created. - details
string
: Detailed information of the current Symptom. - symptomType
string
(values: SYMPTOM_TYPE_UNSPECIFIED, LOW_MEMORY, OUT_OF_MEMORY, EXECUTE_TIMED_OUT, MESH_BUILD_FAIL, HBM_OUT_OF_MEMORY): Type of the Symptom. - workerId
string
: A string used to uniquely distinguish a worker within a TPU node.
- createTime
TensorFlowVersion
- TensorFlowVersion
object
: A tensorflow version that a Node can be configured with.- name
string
: The resource name. - version
string
: the tensorflow version.
- name