@googleapis/tpu 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/build/v1.d.ts +3 -849
- package/build/v1.js.map +1 -1
- package/build/v1alpha1.d.ts +3 -853
- package/build/v1alpha1.js.map +1 -1
- package/build/v2.d.ts +36 -978
- package/build/v2.js.map +1 -1
- package/build/v2alpha1.d.ts +421 -1032
- package/build/v2alpha1.js +164 -0
- package/build/v2alpha1.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +2 -2
- package/v1.ts +3 -849
- package/v1alpha1.ts +3 -853
- package/v2.ts +36 -978
- package/v2alpha1.ts +793 -1032
package/build/v1alpha1.d.ts
CHANGED
|
@@ -167,7 +167,7 @@ export declare namespace tpu_v1alpha1 {
|
|
|
167
167
|
unreachable?: string[] | null;
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
|
-
* A resource that represents Google Cloud
|
|
170
|
+
* A resource that represents a Google Cloud location.
|
|
171
171
|
*/
|
|
172
172
|
export interface Schema$Location {
|
|
173
173
|
/**
|
|
@@ -314,7 +314,7 @@ export declare namespace tpu_v1alpha1 {
|
|
|
314
314
|
*/
|
|
315
315
|
name?: string | null;
|
|
316
316
|
/**
|
|
317
|
-
* The normal response of the operation
|
|
317
|
+
* The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
|
|
318
318
|
*/
|
|
319
319
|
response?: {
|
|
320
320
|
[key: string]: any;
|
|
@@ -452,52 +452,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
452
452
|
constructor(context: APIRequestContext);
|
|
453
453
|
/**
|
|
454
454
|
* Gets information about a location.
|
|
455
|
-
* @example
|
|
456
|
-
* ```js
|
|
457
|
-
* // Before running the sample:
|
|
458
|
-
* // - Enable the API at:
|
|
459
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
460
|
-
* // - Login into gcloud by running:
|
|
461
|
-
* // `$ gcloud auth application-default login`
|
|
462
|
-
* // - Install the npm module by running:
|
|
463
|
-
* // `$ npm install googleapis`
|
|
464
|
-
*
|
|
465
|
-
* const {google} = require('googleapis');
|
|
466
|
-
* const tpu = google.tpu('v1alpha1');
|
|
467
|
-
*
|
|
468
|
-
* async function main() {
|
|
469
|
-
* const auth = new google.auth.GoogleAuth({
|
|
470
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
471
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
472
|
-
* });
|
|
473
|
-
*
|
|
474
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
475
|
-
* const authClient = await auth.getClient();
|
|
476
|
-
* google.options({auth: authClient});
|
|
477
|
-
*
|
|
478
|
-
* // Do the magic
|
|
479
|
-
* const res = await tpu.projects.locations.get({
|
|
480
|
-
* // Resource name for the location.
|
|
481
|
-
* name: 'projects/my-project/locations/my-location',
|
|
482
|
-
* });
|
|
483
|
-
* console.log(res.data);
|
|
484
|
-
*
|
|
485
|
-
* // Example response
|
|
486
|
-
* // {
|
|
487
|
-
* // "displayName": "my_displayName",
|
|
488
|
-
* // "labels": {},
|
|
489
|
-
* // "locationId": "my_locationId",
|
|
490
|
-
* // "metadata": {},
|
|
491
|
-
* // "name": "my_name"
|
|
492
|
-
* // }
|
|
493
|
-
* }
|
|
494
|
-
*
|
|
495
|
-
* main().catch(e => {
|
|
496
|
-
* console.error(e);
|
|
497
|
-
* throw e;
|
|
498
|
-
* });
|
|
499
|
-
*
|
|
500
|
-
* ```
|
|
501
455
|
*
|
|
502
456
|
* @param params - Parameters for request
|
|
503
457
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -512,55 +466,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
512
466
|
get(callback: BodyResponseCallback<Schema$Location>): void;
|
|
513
467
|
/**
|
|
514
468
|
* Lists information about the supported locations for this service.
|
|
515
|
-
* @example
|
|
516
|
-
* ```js
|
|
517
|
-
* // Before running the sample:
|
|
518
|
-
* // - Enable the API at:
|
|
519
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
520
|
-
* // - Login into gcloud by running:
|
|
521
|
-
* // `$ gcloud auth application-default login`
|
|
522
|
-
* // - Install the npm module by running:
|
|
523
|
-
* // `$ npm install googleapis`
|
|
524
|
-
*
|
|
525
|
-
* const {google} = require('googleapis');
|
|
526
|
-
* const tpu = google.tpu('v1alpha1');
|
|
527
|
-
*
|
|
528
|
-
* async function main() {
|
|
529
|
-
* const auth = new google.auth.GoogleAuth({
|
|
530
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
531
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
532
|
-
* });
|
|
533
|
-
*
|
|
534
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
535
|
-
* const authClient = await auth.getClient();
|
|
536
|
-
* google.options({auth: authClient});
|
|
537
|
-
*
|
|
538
|
-
* // Do the magic
|
|
539
|
-
* const res = await tpu.projects.locations.list({
|
|
540
|
-
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
541
|
-
* filter: 'placeholder-value',
|
|
542
|
-
* // The resource that owns the locations collection, if applicable.
|
|
543
|
-
* name: 'projects/my-project',
|
|
544
|
-
* // The maximum number of results to return. If not set, the service selects a default.
|
|
545
|
-
* pageSize: 'placeholder-value',
|
|
546
|
-
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
547
|
-
* pageToken: 'placeholder-value',
|
|
548
|
-
* });
|
|
549
|
-
* console.log(res.data);
|
|
550
|
-
*
|
|
551
|
-
* // Example response
|
|
552
|
-
* // {
|
|
553
|
-
* // "locations": [],
|
|
554
|
-
* // "nextPageToken": "my_nextPageToken"
|
|
555
|
-
* // }
|
|
556
|
-
* }
|
|
557
|
-
*
|
|
558
|
-
* main().catch(e => {
|
|
559
|
-
* console.error(e);
|
|
560
|
-
* throw e;
|
|
561
|
-
* });
|
|
562
|
-
*
|
|
563
|
-
* ```
|
|
564
469
|
*
|
|
565
470
|
* @param params - Parameters for request
|
|
566
471
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -603,49 +508,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
603
508
|
constructor(context: APIRequestContext);
|
|
604
509
|
/**
|
|
605
510
|
* Gets AcceleratorType.
|
|
606
|
-
* @example
|
|
607
|
-
* ```js
|
|
608
|
-
* // Before running the sample:
|
|
609
|
-
* // - Enable the API at:
|
|
610
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
611
|
-
* // - Login into gcloud by running:
|
|
612
|
-
* // `$ gcloud auth application-default login`
|
|
613
|
-
* // - Install the npm module by running:
|
|
614
|
-
* // `$ npm install googleapis`
|
|
615
|
-
*
|
|
616
|
-
* const {google} = require('googleapis');
|
|
617
|
-
* const tpu = google.tpu('v1alpha1');
|
|
618
|
-
*
|
|
619
|
-
* async function main() {
|
|
620
|
-
* const auth = new google.auth.GoogleAuth({
|
|
621
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
622
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
623
|
-
* });
|
|
624
|
-
*
|
|
625
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
626
|
-
* const authClient = await auth.getClient();
|
|
627
|
-
* google.options({auth: authClient});
|
|
628
|
-
*
|
|
629
|
-
* // Do the magic
|
|
630
|
-
* const res = await tpu.projects.locations.acceleratorTypes.get({
|
|
631
|
-
* // Required. The resource name.
|
|
632
|
-
* name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
|
|
633
|
-
* });
|
|
634
|
-
* console.log(res.data);
|
|
635
|
-
*
|
|
636
|
-
* // Example response
|
|
637
|
-
* // {
|
|
638
|
-
* // "name": "my_name",
|
|
639
|
-
* // "type": "my_type"
|
|
640
|
-
* // }
|
|
641
|
-
* }
|
|
642
|
-
*
|
|
643
|
-
* main().catch(e => {
|
|
644
|
-
* console.error(e);
|
|
645
|
-
* throw e;
|
|
646
|
-
* });
|
|
647
|
-
*
|
|
648
|
-
* ```
|
|
649
511
|
*
|
|
650
512
|
* @param params - Parameters for request
|
|
651
513
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -660,58 +522,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
660
522
|
get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
|
|
661
523
|
/**
|
|
662
524
|
* Lists accelerator types supported by this API.
|
|
663
|
-
* @example
|
|
664
|
-
* ```js
|
|
665
|
-
* // Before running the sample:
|
|
666
|
-
* // - Enable the API at:
|
|
667
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
668
|
-
* // - Login into gcloud by running:
|
|
669
|
-
* // `$ gcloud auth application-default login`
|
|
670
|
-
* // - Install the npm module by running:
|
|
671
|
-
* // `$ npm install googleapis`
|
|
672
|
-
*
|
|
673
|
-
* const {google} = require('googleapis');
|
|
674
|
-
* const tpu = google.tpu('v1alpha1');
|
|
675
|
-
*
|
|
676
|
-
* async function main() {
|
|
677
|
-
* const auth = new google.auth.GoogleAuth({
|
|
678
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
679
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
680
|
-
* });
|
|
681
|
-
*
|
|
682
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
683
|
-
* const authClient = await auth.getClient();
|
|
684
|
-
* google.options({auth: authClient});
|
|
685
|
-
*
|
|
686
|
-
* // Do the magic
|
|
687
|
-
* const res = await tpu.projects.locations.acceleratorTypes.list({
|
|
688
|
-
* // List filter.
|
|
689
|
-
* filter: 'placeholder-value',
|
|
690
|
-
* // Sort results.
|
|
691
|
-
* orderBy: 'placeholder-value',
|
|
692
|
-
* // The maximum number of items to return.
|
|
693
|
-
* pageSize: 'placeholder-value',
|
|
694
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
695
|
-
* pageToken: 'placeholder-value',
|
|
696
|
-
* // Required. The parent resource name.
|
|
697
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
698
|
-
* });
|
|
699
|
-
* console.log(res.data);
|
|
700
|
-
*
|
|
701
|
-
* // Example response
|
|
702
|
-
* // {
|
|
703
|
-
* // "acceleratorTypes": [],
|
|
704
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
705
|
-
* // "unreachable": []
|
|
706
|
-
* // }
|
|
707
|
-
* }
|
|
708
|
-
*
|
|
709
|
-
* main().catch(e => {
|
|
710
|
-
* console.error(e);
|
|
711
|
-
* throw e;
|
|
712
|
-
* });
|
|
713
|
-
*
|
|
714
|
-
* ```
|
|
715
525
|
*
|
|
716
526
|
* @param params - Parameters for request
|
|
717
527
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -758,82 +568,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
758
568
|
constructor(context: APIRequestContext);
|
|
759
569
|
/**
|
|
760
570
|
* Creates a node.
|
|
761
|
-
* @example
|
|
762
|
-
* ```js
|
|
763
|
-
* // Before running the sample:
|
|
764
|
-
* // - Enable the API at:
|
|
765
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
766
|
-
* // - Login into gcloud by running:
|
|
767
|
-
* // `$ gcloud auth application-default login`
|
|
768
|
-
* // - Install the npm module by running:
|
|
769
|
-
* // `$ npm install googleapis`
|
|
770
|
-
*
|
|
771
|
-
* const {google} = require('googleapis');
|
|
772
|
-
* const tpu = google.tpu('v1alpha1');
|
|
773
|
-
*
|
|
774
|
-
* async function main() {
|
|
775
|
-
* const auth = new google.auth.GoogleAuth({
|
|
776
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
777
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
778
|
-
* });
|
|
779
|
-
*
|
|
780
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
781
|
-
* const authClient = await auth.getClient();
|
|
782
|
-
* google.options({auth: authClient});
|
|
783
|
-
*
|
|
784
|
-
* // Do the magic
|
|
785
|
-
* const res = await tpu.projects.locations.nodes.create({
|
|
786
|
-
* // The unqualified resource name.
|
|
787
|
-
* nodeId: 'placeholder-value',
|
|
788
|
-
* // Required. The parent resource name.
|
|
789
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
790
|
-
* // Idempotent request UUID.
|
|
791
|
-
* requestId: 'placeholder-value',
|
|
792
|
-
*
|
|
793
|
-
* // Request body metadata
|
|
794
|
-
* requestBody: {
|
|
795
|
-
* // request body parameters
|
|
796
|
-
* // {
|
|
797
|
-
* // "acceleratorType": "my_acceleratorType",
|
|
798
|
-
* // "apiVersion": "my_apiVersion",
|
|
799
|
-
* // "cidrBlock": "my_cidrBlock",
|
|
800
|
-
* // "createTime": "my_createTime",
|
|
801
|
-
* // "description": "my_description",
|
|
802
|
-
* // "health": "my_health",
|
|
803
|
-
* // "healthDescription": "my_healthDescription",
|
|
804
|
-
* // "ipAddress": "my_ipAddress",
|
|
805
|
-
* // "labels": {},
|
|
806
|
-
* // "name": "my_name",
|
|
807
|
-
* // "network": "my_network",
|
|
808
|
-
* // "networkEndpoints": [],
|
|
809
|
-
* // "port": "my_port",
|
|
810
|
-
* // "schedulingConfig": {},
|
|
811
|
-
* // "serviceAccount": "my_serviceAccount",
|
|
812
|
-
* // "state": "my_state",
|
|
813
|
-
* // "symptoms": [],
|
|
814
|
-
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
815
|
-
* // "useServiceNetworking": false
|
|
816
|
-
* // }
|
|
817
|
-
* },
|
|
818
|
-
* });
|
|
819
|
-
* console.log(res.data);
|
|
820
|
-
*
|
|
821
|
-
* // Example response
|
|
822
|
-
* // {
|
|
823
|
-
* // "done": false,
|
|
824
|
-
* // "error": {},
|
|
825
|
-
* // "metadata": {},
|
|
826
|
-
* // "name": "my_name",
|
|
827
|
-
* // "response": {}
|
|
828
|
-
* // }
|
|
829
|
-
* }
|
|
830
|
-
*
|
|
831
|
-
* main().catch(e => {
|
|
832
|
-
* console.error(e);
|
|
833
|
-
* throw e;
|
|
834
|
-
* });
|
|
835
|
-
*
|
|
836
|
-
* ```
|
|
837
571
|
*
|
|
838
572
|
* @param params - Parameters for request
|
|
839
573
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -848,54 +582,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
848
582
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
849
583
|
/**
|
|
850
584
|
* Deletes a node.
|
|
851
|
-
* @example
|
|
852
|
-
* ```js
|
|
853
|
-
* // Before running the sample:
|
|
854
|
-
* // - Enable the API at:
|
|
855
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
856
|
-
* // - Login into gcloud by running:
|
|
857
|
-
* // `$ gcloud auth application-default login`
|
|
858
|
-
* // - Install the npm module by running:
|
|
859
|
-
* // `$ npm install googleapis`
|
|
860
|
-
*
|
|
861
|
-
* const {google} = require('googleapis');
|
|
862
|
-
* const tpu = google.tpu('v1alpha1');
|
|
863
|
-
*
|
|
864
|
-
* async function main() {
|
|
865
|
-
* const auth = new google.auth.GoogleAuth({
|
|
866
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
867
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
868
|
-
* });
|
|
869
|
-
*
|
|
870
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
871
|
-
* const authClient = await auth.getClient();
|
|
872
|
-
* google.options({auth: authClient});
|
|
873
|
-
*
|
|
874
|
-
* // Do the magic
|
|
875
|
-
* const res = await tpu.projects.locations.nodes.delete({
|
|
876
|
-
* // Required. The resource name.
|
|
877
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
878
|
-
* // Idempotent request UUID.
|
|
879
|
-
* requestId: 'placeholder-value',
|
|
880
|
-
* });
|
|
881
|
-
* console.log(res.data);
|
|
882
|
-
*
|
|
883
|
-
* // Example response
|
|
884
|
-
* // {
|
|
885
|
-
* // "done": false,
|
|
886
|
-
* // "error": {},
|
|
887
|
-
* // "metadata": {},
|
|
888
|
-
* // "name": "my_name",
|
|
889
|
-
* // "response": {}
|
|
890
|
-
* // }
|
|
891
|
-
* }
|
|
892
|
-
*
|
|
893
|
-
* main().catch(e => {
|
|
894
|
-
* console.error(e);
|
|
895
|
-
* throw e;
|
|
896
|
-
* });
|
|
897
|
-
*
|
|
898
|
-
* ```
|
|
899
585
|
*
|
|
900
586
|
* @param params - Parameters for request
|
|
901
587
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -910,66 +596,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
910
596
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
911
597
|
/**
|
|
912
598
|
* Gets the details of a node.
|
|
913
|
-
* @example
|
|
914
|
-
* ```js
|
|
915
|
-
* // Before running the sample:
|
|
916
|
-
* // - Enable the API at:
|
|
917
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
918
|
-
* // - Login into gcloud by running:
|
|
919
|
-
* // `$ gcloud auth application-default login`
|
|
920
|
-
* // - Install the npm module by running:
|
|
921
|
-
* // `$ npm install googleapis`
|
|
922
|
-
*
|
|
923
|
-
* const {google} = require('googleapis');
|
|
924
|
-
* const tpu = google.tpu('v1alpha1');
|
|
925
|
-
*
|
|
926
|
-
* async function main() {
|
|
927
|
-
* const auth = new google.auth.GoogleAuth({
|
|
928
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
929
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
930
|
-
* });
|
|
931
|
-
*
|
|
932
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
933
|
-
* const authClient = await auth.getClient();
|
|
934
|
-
* google.options({auth: authClient});
|
|
935
|
-
*
|
|
936
|
-
* // Do the magic
|
|
937
|
-
* const res = await tpu.projects.locations.nodes.get({
|
|
938
|
-
* // Required. The resource name.
|
|
939
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
940
|
-
* });
|
|
941
|
-
* console.log(res.data);
|
|
942
|
-
*
|
|
943
|
-
* // Example response
|
|
944
|
-
* // {
|
|
945
|
-
* // "acceleratorType": "my_acceleratorType",
|
|
946
|
-
* // "apiVersion": "my_apiVersion",
|
|
947
|
-
* // "cidrBlock": "my_cidrBlock",
|
|
948
|
-
* // "createTime": "my_createTime",
|
|
949
|
-
* // "description": "my_description",
|
|
950
|
-
* // "health": "my_health",
|
|
951
|
-
* // "healthDescription": "my_healthDescription",
|
|
952
|
-
* // "ipAddress": "my_ipAddress",
|
|
953
|
-
* // "labels": {},
|
|
954
|
-
* // "name": "my_name",
|
|
955
|
-
* // "network": "my_network",
|
|
956
|
-
* // "networkEndpoints": [],
|
|
957
|
-
* // "port": "my_port",
|
|
958
|
-
* // "schedulingConfig": {},
|
|
959
|
-
* // "serviceAccount": "my_serviceAccount",
|
|
960
|
-
* // "state": "my_state",
|
|
961
|
-
* // "symptoms": [],
|
|
962
|
-
* // "tensorflowVersion": "my_tensorflowVersion",
|
|
963
|
-
* // "useServiceNetworking": false
|
|
964
|
-
* // }
|
|
965
|
-
* }
|
|
966
|
-
*
|
|
967
|
-
* main().catch(e => {
|
|
968
|
-
* console.error(e);
|
|
969
|
-
* throw e;
|
|
970
|
-
* });
|
|
971
|
-
*
|
|
972
|
-
* ```
|
|
973
599
|
*
|
|
974
600
|
* @param params - Parameters for request
|
|
975
601
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -984,54 +610,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
984
610
|
get(callback: BodyResponseCallback<Schema$Node>): void;
|
|
985
611
|
/**
|
|
986
612
|
* Lists nodes.
|
|
987
|
-
* @example
|
|
988
|
-
* ```js
|
|
989
|
-
* // Before running the sample:
|
|
990
|
-
* // - Enable the API at:
|
|
991
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
992
|
-
* // - Login into gcloud by running:
|
|
993
|
-
* // `$ gcloud auth application-default login`
|
|
994
|
-
* // - Install the npm module by running:
|
|
995
|
-
* // `$ npm install googleapis`
|
|
996
|
-
*
|
|
997
|
-
* const {google} = require('googleapis');
|
|
998
|
-
* const tpu = google.tpu('v1alpha1');
|
|
999
|
-
*
|
|
1000
|
-
* async function main() {
|
|
1001
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1002
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1003
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1004
|
-
* });
|
|
1005
|
-
*
|
|
1006
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1007
|
-
* const authClient = await auth.getClient();
|
|
1008
|
-
* google.options({auth: authClient});
|
|
1009
|
-
*
|
|
1010
|
-
* // Do the magic
|
|
1011
|
-
* const res = await tpu.projects.locations.nodes.list({
|
|
1012
|
-
* // The maximum number of items to return.
|
|
1013
|
-
* pageSize: 'placeholder-value',
|
|
1014
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
1015
|
-
* pageToken: 'placeholder-value',
|
|
1016
|
-
* // Required. The parent resource name.
|
|
1017
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
1018
|
-
* });
|
|
1019
|
-
* console.log(res.data);
|
|
1020
|
-
*
|
|
1021
|
-
* // Example response
|
|
1022
|
-
* // {
|
|
1023
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1024
|
-
* // "nodes": [],
|
|
1025
|
-
* // "unreachable": []
|
|
1026
|
-
* // }
|
|
1027
|
-
* }
|
|
1028
|
-
*
|
|
1029
|
-
* main().catch(e => {
|
|
1030
|
-
* console.error(e);
|
|
1031
|
-
* throw e;
|
|
1032
|
-
* });
|
|
1033
|
-
*
|
|
1034
|
-
* ```
|
|
1035
613
|
*
|
|
1036
614
|
* @param params - Parameters for request
|
|
1037
615
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1046,60 +624,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1046
624
|
list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
|
|
1047
625
|
/**
|
|
1048
626
|
* Reimages a node's OS.
|
|
1049
|
-
* @example
|
|
1050
|
-
* ```js
|
|
1051
|
-
* // Before running the sample:
|
|
1052
|
-
* // - Enable the API at:
|
|
1053
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1054
|
-
* // - Login into gcloud by running:
|
|
1055
|
-
* // `$ gcloud auth application-default login`
|
|
1056
|
-
* // - Install the npm module by running:
|
|
1057
|
-
* // `$ npm install googleapis`
|
|
1058
|
-
*
|
|
1059
|
-
* const {google} = require('googleapis');
|
|
1060
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1061
|
-
*
|
|
1062
|
-
* async function main() {
|
|
1063
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1064
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1065
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1066
|
-
* });
|
|
1067
|
-
*
|
|
1068
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1069
|
-
* const authClient = await auth.getClient();
|
|
1070
|
-
* google.options({auth: authClient});
|
|
1071
|
-
*
|
|
1072
|
-
* // Do the magic
|
|
1073
|
-
* const res = await tpu.projects.locations.nodes.reimage({
|
|
1074
|
-
* // The resource name.
|
|
1075
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1076
|
-
*
|
|
1077
|
-
* // Request body metadata
|
|
1078
|
-
* requestBody: {
|
|
1079
|
-
* // request body parameters
|
|
1080
|
-
* // {
|
|
1081
|
-
* // "tensorflowVersion": "my_tensorflowVersion"
|
|
1082
|
-
* // }
|
|
1083
|
-
* },
|
|
1084
|
-
* });
|
|
1085
|
-
* console.log(res.data);
|
|
1086
|
-
*
|
|
1087
|
-
* // Example response
|
|
1088
|
-
* // {
|
|
1089
|
-
* // "done": false,
|
|
1090
|
-
* // "error": {},
|
|
1091
|
-
* // "metadata": {},
|
|
1092
|
-
* // "name": "my_name",
|
|
1093
|
-
* // "response": {}
|
|
1094
|
-
* // }
|
|
1095
|
-
* }
|
|
1096
|
-
*
|
|
1097
|
-
* main().catch(e => {
|
|
1098
|
-
* console.error(e);
|
|
1099
|
-
* throw e;
|
|
1100
|
-
* });
|
|
1101
|
-
*
|
|
1102
|
-
* ```
|
|
1103
627
|
*
|
|
1104
628
|
* @param params - Parameters for request
|
|
1105
629
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1114,58 +638,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1114
638
|
reimage(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1115
639
|
/**
|
|
1116
640
|
* Starts a node.
|
|
1117
|
-
* @example
|
|
1118
|
-
* ```js
|
|
1119
|
-
* // Before running the sample:
|
|
1120
|
-
* // - Enable the API at:
|
|
1121
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1122
|
-
* // - Login into gcloud by running:
|
|
1123
|
-
* // `$ gcloud auth application-default login`
|
|
1124
|
-
* // - Install the npm module by running:
|
|
1125
|
-
* // `$ npm install googleapis`
|
|
1126
|
-
*
|
|
1127
|
-
* const {google} = require('googleapis');
|
|
1128
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1129
|
-
*
|
|
1130
|
-
* async function main() {
|
|
1131
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1132
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1133
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1134
|
-
* });
|
|
1135
|
-
*
|
|
1136
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1137
|
-
* const authClient = await auth.getClient();
|
|
1138
|
-
* google.options({auth: authClient});
|
|
1139
|
-
*
|
|
1140
|
-
* // Do the magic
|
|
1141
|
-
* const res = await tpu.projects.locations.nodes.start({
|
|
1142
|
-
* // The resource name.
|
|
1143
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1144
|
-
*
|
|
1145
|
-
* // Request body metadata
|
|
1146
|
-
* requestBody: {
|
|
1147
|
-
* // request body parameters
|
|
1148
|
-
* // {}
|
|
1149
|
-
* },
|
|
1150
|
-
* });
|
|
1151
|
-
* console.log(res.data);
|
|
1152
|
-
*
|
|
1153
|
-
* // Example response
|
|
1154
|
-
* // {
|
|
1155
|
-
* // "done": false,
|
|
1156
|
-
* // "error": {},
|
|
1157
|
-
* // "metadata": {},
|
|
1158
|
-
* // "name": "my_name",
|
|
1159
|
-
* // "response": {}
|
|
1160
|
-
* // }
|
|
1161
|
-
* }
|
|
1162
|
-
*
|
|
1163
|
-
* main().catch(e => {
|
|
1164
|
-
* console.error(e);
|
|
1165
|
-
* throw e;
|
|
1166
|
-
* });
|
|
1167
|
-
*
|
|
1168
|
-
* ```
|
|
1169
641
|
*
|
|
1170
642
|
* @param params - Parameters for request
|
|
1171
643
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1180,58 +652,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1180
652
|
start(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1181
653
|
/**
|
|
1182
654
|
* Stops a node. This operation is only available with single TPU nodes.
|
|
1183
|
-
* @example
|
|
1184
|
-
* ```js
|
|
1185
|
-
* // Before running the sample:
|
|
1186
|
-
* // - Enable the API at:
|
|
1187
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1188
|
-
* // - Login into gcloud by running:
|
|
1189
|
-
* // `$ gcloud auth application-default login`
|
|
1190
|
-
* // - Install the npm module by running:
|
|
1191
|
-
* // `$ npm install googleapis`
|
|
1192
|
-
*
|
|
1193
|
-
* const {google} = require('googleapis');
|
|
1194
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1195
|
-
*
|
|
1196
|
-
* async function main() {
|
|
1197
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1198
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1199
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1200
|
-
* });
|
|
1201
|
-
*
|
|
1202
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1203
|
-
* const authClient = await auth.getClient();
|
|
1204
|
-
* google.options({auth: authClient});
|
|
1205
|
-
*
|
|
1206
|
-
* // Do the magic
|
|
1207
|
-
* const res = await tpu.projects.locations.nodes.stop({
|
|
1208
|
-
* // The resource name.
|
|
1209
|
-
* name: 'projects/my-project/locations/my-location/nodes/my-node',
|
|
1210
|
-
*
|
|
1211
|
-
* // Request body metadata
|
|
1212
|
-
* requestBody: {
|
|
1213
|
-
* // request body parameters
|
|
1214
|
-
* // {}
|
|
1215
|
-
* },
|
|
1216
|
-
* });
|
|
1217
|
-
* console.log(res.data);
|
|
1218
|
-
*
|
|
1219
|
-
* // Example response
|
|
1220
|
-
* // {
|
|
1221
|
-
* // "done": false,
|
|
1222
|
-
* // "error": {},
|
|
1223
|
-
* // "metadata": {},
|
|
1224
|
-
* // "name": "my_name",
|
|
1225
|
-
* // "response": {}
|
|
1226
|
-
* // }
|
|
1227
|
-
* }
|
|
1228
|
-
*
|
|
1229
|
-
* main().catch(e => {
|
|
1230
|
-
* console.error(e);
|
|
1231
|
-
* throw e;
|
|
1232
|
-
* });
|
|
1233
|
-
*
|
|
1234
|
-
* ```
|
|
1235
655
|
*
|
|
1236
656
|
* @param params - Parameters for request
|
|
1237
657
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1328,46 +748,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1328
748
|
constructor(context: APIRequestContext);
|
|
1329
749
|
/**
|
|
1330
750
|
* 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`.
|
|
1331
|
-
* @example
|
|
1332
|
-
* ```js
|
|
1333
|
-
* // Before running the sample:
|
|
1334
|
-
* // - Enable the API at:
|
|
1335
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1336
|
-
* // - Login into gcloud by running:
|
|
1337
|
-
* // `$ gcloud auth application-default login`
|
|
1338
|
-
* // - Install the npm module by running:
|
|
1339
|
-
* // `$ npm install googleapis`
|
|
1340
|
-
*
|
|
1341
|
-
* const {google} = require('googleapis');
|
|
1342
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1343
|
-
*
|
|
1344
|
-
* async function main() {
|
|
1345
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1346
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1347
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1348
|
-
* });
|
|
1349
|
-
*
|
|
1350
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1351
|
-
* const authClient = await auth.getClient();
|
|
1352
|
-
* google.options({auth: authClient});
|
|
1353
|
-
*
|
|
1354
|
-
* // Do the magic
|
|
1355
|
-
* const res = await tpu.projects.locations.operations.cancel({
|
|
1356
|
-
* // The name of the operation resource to be cancelled.
|
|
1357
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1358
|
-
* });
|
|
1359
|
-
* console.log(res.data);
|
|
1360
|
-
*
|
|
1361
|
-
* // Example response
|
|
1362
|
-
* // {}
|
|
1363
|
-
* }
|
|
1364
|
-
*
|
|
1365
|
-
* main().catch(e => {
|
|
1366
|
-
* console.error(e);
|
|
1367
|
-
* throw e;
|
|
1368
|
-
* });
|
|
1369
|
-
*
|
|
1370
|
-
* ```
|
|
1371
751
|
*
|
|
1372
752
|
* @param params - Parameters for request
|
|
1373
753
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1382,46 +762,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1382
762
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1383
763
|
/**
|
|
1384
764
|
* 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`.
|
|
1385
|
-
* @example
|
|
1386
|
-
* ```js
|
|
1387
|
-
* // Before running the sample:
|
|
1388
|
-
* // - Enable the API at:
|
|
1389
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1390
|
-
* // - Login into gcloud by running:
|
|
1391
|
-
* // `$ gcloud auth application-default login`
|
|
1392
|
-
* // - Install the npm module by running:
|
|
1393
|
-
* // `$ npm install googleapis`
|
|
1394
|
-
*
|
|
1395
|
-
* const {google} = require('googleapis');
|
|
1396
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1397
|
-
*
|
|
1398
|
-
* async function main() {
|
|
1399
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1400
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1401
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1402
|
-
* });
|
|
1403
|
-
*
|
|
1404
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1405
|
-
* const authClient = await auth.getClient();
|
|
1406
|
-
* google.options({auth: authClient});
|
|
1407
|
-
*
|
|
1408
|
-
* // Do the magic
|
|
1409
|
-
* const res = await tpu.projects.locations.operations.delete({
|
|
1410
|
-
* // The name of the operation resource to be deleted.
|
|
1411
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1412
|
-
* });
|
|
1413
|
-
* console.log(res.data);
|
|
1414
|
-
*
|
|
1415
|
-
* // Example response
|
|
1416
|
-
* // {}
|
|
1417
|
-
* }
|
|
1418
|
-
*
|
|
1419
|
-
* main().catch(e => {
|
|
1420
|
-
* console.error(e);
|
|
1421
|
-
* throw e;
|
|
1422
|
-
* });
|
|
1423
|
-
*
|
|
1424
|
-
* ```
|
|
1425
765
|
*
|
|
1426
766
|
* @param params - Parameters for request
|
|
1427
767
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1436,52 +776,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1436
776
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
1437
777
|
/**
|
|
1438
778
|
* Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
|
1439
|
-
* @example
|
|
1440
|
-
* ```js
|
|
1441
|
-
* // Before running the sample:
|
|
1442
|
-
* // - Enable the API at:
|
|
1443
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1444
|
-
* // - Login into gcloud by running:
|
|
1445
|
-
* // `$ gcloud auth application-default login`
|
|
1446
|
-
* // - Install the npm module by running:
|
|
1447
|
-
* // `$ npm install googleapis`
|
|
1448
|
-
*
|
|
1449
|
-
* const {google} = require('googleapis');
|
|
1450
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1451
|
-
*
|
|
1452
|
-
* async function main() {
|
|
1453
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1454
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1455
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1456
|
-
* });
|
|
1457
|
-
*
|
|
1458
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1459
|
-
* const authClient = await auth.getClient();
|
|
1460
|
-
* google.options({auth: authClient});
|
|
1461
|
-
*
|
|
1462
|
-
* // Do the magic
|
|
1463
|
-
* const res = await tpu.projects.locations.operations.get({
|
|
1464
|
-
* // The name of the operation resource.
|
|
1465
|
-
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
1466
|
-
* });
|
|
1467
|
-
* console.log(res.data);
|
|
1468
|
-
*
|
|
1469
|
-
* // Example response
|
|
1470
|
-
* // {
|
|
1471
|
-
* // "done": false,
|
|
1472
|
-
* // "error": {},
|
|
1473
|
-
* // "metadata": {},
|
|
1474
|
-
* // "name": "my_name",
|
|
1475
|
-
* // "response": {}
|
|
1476
|
-
* // }
|
|
1477
|
-
* }
|
|
1478
|
-
*
|
|
1479
|
-
* main().catch(e => {
|
|
1480
|
-
* console.error(e);
|
|
1481
|
-
* throw e;
|
|
1482
|
-
* });
|
|
1483
|
-
*
|
|
1484
|
-
* ```
|
|
1485
779
|
*
|
|
1486
780
|
* @param params - Parameters for request
|
|
1487
781
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1495,56 +789,7 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1495
789
|
get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1496
790
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
1497
791
|
/**
|
|
1498
|
-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
1499
|
-
* @example
|
|
1500
|
-
* ```js
|
|
1501
|
-
* // Before running the sample:
|
|
1502
|
-
* // - Enable the API at:
|
|
1503
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1504
|
-
* // - Login into gcloud by running:
|
|
1505
|
-
* // `$ gcloud auth application-default login`
|
|
1506
|
-
* // - Install the npm module by running:
|
|
1507
|
-
* // `$ npm install googleapis`
|
|
1508
|
-
*
|
|
1509
|
-
* const {google} = require('googleapis');
|
|
1510
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1511
|
-
*
|
|
1512
|
-
* async function main() {
|
|
1513
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1514
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1515
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1516
|
-
* });
|
|
1517
|
-
*
|
|
1518
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1519
|
-
* const authClient = await auth.getClient();
|
|
1520
|
-
* google.options({auth: authClient});
|
|
1521
|
-
*
|
|
1522
|
-
* // Do the magic
|
|
1523
|
-
* const res = await tpu.projects.locations.operations.list({
|
|
1524
|
-
* // The standard list filter.
|
|
1525
|
-
* filter: 'placeholder-value',
|
|
1526
|
-
* // The name of the operation's parent resource.
|
|
1527
|
-
* name: 'projects/my-project/locations/my-location',
|
|
1528
|
-
* // The standard list page size.
|
|
1529
|
-
* pageSize: 'placeholder-value',
|
|
1530
|
-
* // The standard list page token.
|
|
1531
|
-
* pageToken: 'placeholder-value',
|
|
1532
|
-
* });
|
|
1533
|
-
* console.log(res.data);
|
|
1534
|
-
*
|
|
1535
|
-
* // Example response
|
|
1536
|
-
* // {
|
|
1537
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1538
|
-
* // "operations": []
|
|
1539
|
-
* // }
|
|
1540
|
-
* }
|
|
1541
|
-
*
|
|
1542
|
-
* main().catch(e => {
|
|
1543
|
-
* console.error(e);
|
|
1544
|
-
* throw e;
|
|
1545
|
-
* });
|
|
1546
|
-
*
|
|
1547
|
-
* ```
|
|
792
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
1548
793
|
*
|
|
1549
794
|
* @param params - Parameters for request
|
|
1550
795
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1599,49 +844,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1599
844
|
constructor(context: APIRequestContext);
|
|
1600
845
|
/**
|
|
1601
846
|
* Gets TensorFlow Version.
|
|
1602
|
-
* @example
|
|
1603
|
-
* ```js
|
|
1604
|
-
* // Before running the sample:
|
|
1605
|
-
* // - Enable the API at:
|
|
1606
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1607
|
-
* // - Login into gcloud by running:
|
|
1608
|
-
* // `$ gcloud auth application-default login`
|
|
1609
|
-
* // - Install the npm module by running:
|
|
1610
|
-
* // `$ npm install googleapis`
|
|
1611
|
-
*
|
|
1612
|
-
* const {google} = require('googleapis');
|
|
1613
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1614
|
-
*
|
|
1615
|
-
* async function main() {
|
|
1616
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1617
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1618
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1619
|
-
* });
|
|
1620
|
-
*
|
|
1621
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1622
|
-
* const authClient = await auth.getClient();
|
|
1623
|
-
* google.options({auth: authClient});
|
|
1624
|
-
*
|
|
1625
|
-
* // Do the magic
|
|
1626
|
-
* const res = await tpu.projects.locations.tensorflowVersions.get({
|
|
1627
|
-
* // Required. The resource name.
|
|
1628
|
-
* name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
|
|
1629
|
-
* });
|
|
1630
|
-
* console.log(res.data);
|
|
1631
|
-
*
|
|
1632
|
-
* // Example response
|
|
1633
|
-
* // {
|
|
1634
|
-
* // "name": "my_name",
|
|
1635
|
-
* // "version": "my_version"
|
|
1636
|
-
* // }
|
|
1637
|
-
* }
|
|
1638
|
-
*
|
|
1639
|
-
* main().catch(e => {
|
|
1640
|
-
* console.error(e);
|
|
1641
|
-
* throw e;
|
|
1642
|
-
* });
|
|
1643
|
-
*
|
|
1644
|
-
* ```
|
|
1645
847
|
*
|
|
1646
848
|
* @param params - Parameters for request
|
|
1647
849
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1656,58 +858,6 @@ export declare namespace tpu_v1alpha1 {
|
|
|
1656
858
|
get(callback: BodyResponseCallback<Schema$TensorFlowVersion>): void;
|
|
1657
859
|
/**
|
|
1658
860
|
* Lists TensorFlow versions supported by this API.
|
|
1659
|
-
* @example
|
|
1660
|
-
* ```js
|
|
1661
|
-
* // Before running the sample:
|
|
1662
|
-
* // - Enable the API at:
|
|
1663
|
-
* // https://console.developers.google.com/apis/api/tpu.googleapis.com
|
|
1664
|
-
* // - Login into gcloud by running:
|
|
1665
|
-
* // `$ gcloud auth application-default login`
|
|
1666
|
-
* // - Install the npm module by running:
|
|
1667
|
-
* // `$ npm install googleapis`
|
|
1668
|
-
*
|
|
1669
|
-
* const {google} = require('googleapis');
|
|
1670
|
-
* const tpu = google.tpu('v1alpha1');
|
|
1671
|
-
*
|
|
1672
|
-
* async function main() {
|
|
1673
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1674
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1675
|
-
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1676
|
-
* });
|
|
1677
|
-
*
|
|
1678
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1679
|
-
* const authClient = await auth.getClient();
|
|
1680
|
-
* google.options({auth: authClient});
|
|
1681
|
-
*
|
|
1682
|
-
* // Do the magic
|
|
1683
|
-
* const res = await tpu.projects.locations.tensorflowVersions.list({
|
|
1684
|
-
* // List filter.
|
|
1685
|
-
* filter: 'placeholder-value',
|
|
1686
|
-
* // Sort results.
|
|
1687
|
-
* orderBy: 'placeholder-value',
|
|
1688
|
-
* // The maximum number of items to return.
|
|
1689
|
-
* pageSize: 'placeholder-value',
|
|
1690
|
-
* // The next_page_token value returned from a previous List request, if any.
|
|
1691
|
-
* pageToken: 'placeholder-value',
|
|
1692
|
-
* // Required. The parent resource name.
|
|
1693
|
-
* parent: 'projects/my-project/locations/my-location',
|
|
1694
|
-
* });
|
|
1695
|
-
* console.log(res.data);
|
|
1696
|
-
*
|
|
1697
|
-
* // Example response
|
|
1698
|
-
* // {
|
|
1699
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
1700
|
-
* // "tensorflowVersions": [],
|
|
1701
|
-
* // "unreachable": []
|
|
1702
|
-
* // }
|
|
1703
|
-
* }
|
|
1704
|
-
*
|
|
1705
|
-
* main().catch(e => {
|
|
1706
|
-
* console.error(e);
|
|
1707
|
-
* throw e;
|
|
1708
|
-
* });
|
|
1709
|
-
*
|
|
1710
|
-
* ```
|
|
1711
861
|
*
|
|
1712
862
|
* @param params - Parameters for request
|
|
1713
863
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|