@ucloud-sdks/ucloud-sdk-js 0.2.0 → 0.2.1
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.
|
@@ -51,6 +51,12 @@ export default class UHostClient extends Client {
|
|
|
51
51
|
* See also: https://docs.ucloud.cn/api/uhost-api/delete_uhost_key_pairs
|
|
52
52
|
*/
|
|
53
53
|
deleteUHostKeyPairs(request?: DeleteUHostKeyPairsRequest): Promise<DeleteUHostKeyPairsResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* DescribeAvailableInstanceTypes - DescribeAvailableInstanceTypes
|
|
56
|
+
*
|
|
57
|
+
* See also: https://docs.ucloud.cn/api/uhost-api/describe_available_instance_types
|
|
58
|
+
*/
|
|
59
|
+
describeAvailableInstanceTypes(request?: DescribeAvailableInstanceTypesRequest): Promise<DescribeAvailableInstanceTypesResponse>;
|
|
54
60
|
/**
|
|
55
61
|
* DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。
|
|
56
62
|
*
|
|
@@ -601,6 +607,183 @@ export interface DeleteUHostKeyPairsRequest {
|
|
|
601
607
|
*/
|
|
602
608
|
export interface DeleteUHostKeyPairsResponse {
|
|
603
609
|
}
|
|
610
|
+
/**
|
|
611
|
+
* DescribeAvailableInstanceTypes - DescribeAvailableInstanceTypes
|
|
612
|
+
*/
|
|
613
|
+
export interface DescribeAvailableInstanceTypesRequest {
|
|
614
|
+
/**
|
|
615
|
+
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
|
|
616
|
+
*/
|
|
617
|
+
Zone: string;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* DescribeAvailableInstanceTypes - DescribeAvailableInstanceTypes
|
|
621
|
+
*/
|
|
622
|
+
export interface DescribeAvailableInstanceTypesResponse {
|
|
623
|
+
/**
|
|
624
|
+
* AvailableInstanceTypes
|
|
625
|
+
*/
|
|
626
|
+
AvailableInstanceTypes: {
|
|
627
|
+
/**
|
|
628
|
+
* 机型名称:快杰O型|O 、快杰共享型|OM 、快杰内存型|OMEM 、 快杰PRO型|OPRO、通用N型|N、高主频C型|C和GPU G型|G等
|
|
629
|
+
*/
|
|
630
|
+
Name?: string;
|
|
631
|
+
/**
|
|
632
|
+
* 机型状态:可售|Normal 、 公测|Beta、售罄|Soldout、隐藏|Hidden
|
|
633
|
+
*/
|
|
634
|
+
Status?: string;
|
|
635
|
+
/**
|
|
636
|
+
* 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回
|
|
637
|
+
*/
|
|
638
|
+
CpuPlatforms?: {
|
|
639
|
+
/**
|
|
640
|
+
* 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake']
|
|
641
|
+
*/
|
|
642
|
+
Intel?: string[];
|
|
643
|
+
/**
|
|
644
|
+
* 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2']
|
|
645
|
+
*/
|
|
646
|
+
Amd?: string[];
|
|
647
|
+
/**
|
|
648
|
+
* 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra']
|
|
649
|
+
*/
|
|
650
|
+
Ampere?: string[];
|
|
651
|
+
}[];
|
|
652
|
+
/**
|
|
653
|
+
* 磁盘信息。磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。其中云盘主要包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。MinimalSize为磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。MaximalSize为磁盘最大值。InstantResize表示系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。Features为磁盘可支持的服务:数据方舟|DATAARK,快照服务|SNAPSHOT,加密盘|Encrypted。
|
|
654
|
+
*/
|
|
655
|
+
Disks?: {
|
|
656
|
+
/**
|
|
657
|
+
* 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。
|
|
658
|
+
*/
|
|
659
|
+
Name?: string;
|
|
660
|
+
/**
|
|
661
|
+
* 系统盘信息
|
|
662
|
+
*/
|
|
663
|
+
BootDisk?: {
|
|
664
|
+
/**
|
|
665
|
+
* 系统盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。
|
|
666
|
+
*/
|
|
667
|
+
Name?: string;
|
|
668
|
+
/**
|
|
669
|
+
* 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。
|
|
670
|
+
*/
|
|
671
|
+
InstantResize?: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* MaximalSize为磁盘最大值
|
|
674
|
+
*/
|
|
675
|
+
MaximalSize?: number;
|
|
676
|
+
/**
|
|
677
|
+
* 磁盘可支持的服务
|
|
678
|
+
*/
|
|
679
|
+
Features?: string[];
|
|
680
|
+
}[];
|
|
681
|
+
/**
|
|
682
|
+
* 数据盘信息
|
|
683
|
+
*/
|
|
684
|
+
DataDisk?: {
|
|
685
|
+
/**
|
|
686
|
+
* 磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。
|
|
687
|
+
*/
|
|
688
|
+
MinimalSize?: number;
|
|
689
|
+
/**
|
|
690
|
+
* 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。
|
|
691
|
+
*/
|
|
692
|
+
Name?: string;
|
|
693
|
+
/**
|
|
694
|
+
* MaximalSize为磁盘最大值
|
|
695
|
+
*/
|
|
696
|
+
MaximalSize?: number;
|
|
697
|
+
/**
|
|
698
|
+
* 数据盘可支持的服务
|
|
699
|
+
*/
|
|
700
|
+
Features?: string[];
|
|
701
|
+
}[];
|
|
702
|
+
}[];
|
|
703
|
+
/**
|
|
704
|
+
* GPU、CPU和内存信息。Gpu为GPU可支持的规格,Cpu和Memory分别为CPU和内存可支持的规格。如果非GPU机型,GPU为0。MinimalCpuPlatform代表含义这个CPU和内存规格只能在列出来的CPU平台支持。
|
|
705
|
+
*/
|
|
706
|
+
MachineSizes?: {
|
|
707
|
+
/**
|
|
708
|
+
* Gpu为GPU可支持的规格即GPU颗数,非GPU机型,Gpu为0
|
|
709
|
+
*/
|
|
710
|
+
Gpu?: number;
|
|
711
|
+
/**
|
|
712
|
+
* CPU和内存可支持的规格
|
|
713
|
+
*/
|
|
714
|
+
Collection?: {
|
|
715
|
+
/**
|
|
716
|
+
* CPU规格
|
|
717
|
+
*/
|
|
718
|
+
Cpu?: number;
|
|
719
|
+
/**
|
|
720
|
+
* 内存规格
|
|
721
|
+
*/
|
|
722
|
+
Memory?: number[];
|
|
723
|
+
/**
|
|
724
|
+
* CPU和内存规格只能在列出来的CPU平台支持
|
|
725
|
+
*/
|
|
726
|
+
MinimalCpuPlatform?: string[];
|
|
727
|
+
}[];
|
|
728
|
+
}[];
|
|
729
|
+
/**
|
|
730
|
+
* 虚机可支持的特性。目前支持的特性网络增强|NetCapability、热升级|Hotplug。网络增强分为关闭|Normal、网络增强1.0|Super和网络增强2.0|Ultra。Name为可支持的特性名称,Modes为可以提供的模式类别等,RelatedToImageFeature为镜像上支持这个特性的标签。例如DescribeImage返回的字段Features包含HotPlug,说明该镜像支持热升级。MinimalCpuPlatform表示这个特性必须是列出来的CPU平台及以上的CPU才支持。
|
|
731
|
+
*/
|
|
732
|
+
Features?: {
|
|
733
|
+
/**
|
|
734
|
+
* 可支持的特性名称。目前支持的特性网络增强|NetCapability、热升级|Hotplug
|
|
735
|
+
*/
|
|
736
|
+
Name?: string;
|
|
737
|
+
/**
|
|
738
|
+
* 可以提供的模式类别
|
|
739
|
+
*/
|
|
740
|
+
Modes?: {
|
|
741
|
+
/**
|
|
742
|
+
* 模式|特性名称
|
|
743
|
+
*/
|
|
744
|
+
Name?: string;
|
|
745
|
+
/**
|
|
746
|
+
* 为镜像上支持这个特性的标签。例如DescribeImage返回的字段Features包含HotPlug,说明该镜像支持热升级。
|
|
747
|
+
*/
|
|
748
|
+
RelatedToImageFeature?: string[];
|
|
749
|
+
/**
|
|
750
|
+
* 这个特性必须是列出来的CPU平台及以上的CPU才支持
|
|
751
|
+
*/
|
|
752
|
+
MinimalCpuPlatform?: string[];
|
|
753
|
+
}[];
|
|
754
|
+
}[];
|
|
755
|
+
/**
|
|
756
|
+
* 区分是否是GPU机型:GPU机型|GPU,非GPU机型|Normal。
|
|
757
|
+
*/
|
|
758
|
+
MachineClass?: string;
|
|
759
|
+
/**
|
|
760
|
+
* GPU的显存指标,value为值,单位是GB。
|
|
761
|
+
*/
|
|
762
|
+
GraphicsMemory?: {
|
|
763
|
+
/**
|
|
764
|
+
* 值,单位是GB
|
|
765
|
+
*/
|
|
766
|
+
Value?: number;
|
|
767
|
+
/**
|
|
768
|
+
* 交互展示参数,可忽略
|
|
769
|
+
*/
|
|
770
|
+
Rate?: number;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* GPU的性能指标,value为值,单位是TFlops。
|
|
774
|
+
*/
|
|
775
|
+
Performance?: {
|
|
776
|
+
/**
|
|
777
|
+
* 值,单位是TFlops
|
|
778
|
+
*/
|
|
779
|
+
Value?: number;
|
|
780
|
+
/**
|
|
781
|
+
* 交互展示参数,可忽略
|
|
782
|
+
*/
|
|
783
|
+
Rate?: number;
|
|
784
|
+
};
|
|
785
|
+
}[];
|
|
786
|
+
}
|
|
604
787
|
/**
|
|
605
788
|
* DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。
|
|
606
789
|
*/
|
|
@@ -75,6 +75,15 @@ class UHostClient extends client_1.default {
|
|
|
75
75
|
const args = Object.assign({ Action: 'DeleteUHostKeyPairs' }, (request || {}));
|
|
76
76
|
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* DescribeAvailableInstanceTypes - DescribeAvailableInstanceTypes
|
|
80
|
+
*
|
|
81
|
+
* See also: https://docs.ucloud.cn/api/uhost-api/describe_available_instance_types
|
|
82
|
+
*/
|
|
83
|
+
describeAvailableInstanceTypes(request) {
|
|
84
|
+
const args = Object.assign({ Action: 'DescribeAvailableInstanceTypes' }, (request || {}));
|
|
85
|
+
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
|
|
86
|
+
}
|
|
78
87
|
/**
|
|
79
88
|
* DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。
|
|
80
89
|
*
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ucloud-sdks/ucloud-sdk-js",
|
|
3
3
|
"description": "ucloud-sdk-js",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"author": "oas@ucloud.cn",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./lib",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
"files": [
|
|
10
|
+
"package.json",
|
|
11
|
+
"README",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"lib"
|
|
14
|
+
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"start": "node lib/index.js",
|
|
17
17
|
"start:example": "node --no-warnings example/index.js",
|