Queries instance types. When you call the DescribePatternTypes operation, you can specify attributes such as the vSwitch ID, number of vCPUs, memory size, instance family, and maximum acceptable price to filer instance types that meet your business requirements.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ess:DescribePatternTypes | list | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. | cn-hangzhou |
VSwitchId | array | No | The IDs of the vSwitches. | |
string | No | The ID of the vSwitch. | vsw-bp14zolna43z266bq**** | |
ZoneId | array | No | The zone IDs. If you pass vSwitch IDs to the system, this parameter does not take effect. | |
string | No | The zone ID. | cn-hangzhou-g | |
SpotStrategy | string | No | The preemption policy that you want to apply to pay-as-you-go instances. Valid values:
Default value: NoSpot. | NoSpot |
Cores | integer | No | The number of vCPUs that you want to assign to the instance type. | 2 |
Memory | float | No | The memory size that you want to assign to the instance type. Unit: GiB. | 4 |
MaxPrice | float | No | The maximum hourly price for pay-as-you-go or preemptible instances. | 2 |
InstanceFamilyLevel | string | No | The level of the instance family. Valid values:
| EnterpriseLevel |
ExcludedInstanceType | array | No | The instance types that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family. Examples:
Note
If you want to exclude multiple instance types, separate the instance types with forward slashes (/). Example: ecs.n1.small/ecs.n1.*/*7* .
| |
string | No | The instance type that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family. Examples:
Note
If you want to exclude multiple instance types, separate the instance types with delimiters (/). Example: ecs.n1.small/ecs.n1.*/*7* .
| ecs.c6.xlarge | |
Architecture | array | No | The architecture types of the instance types. Valid values:
By default, all values are selected. | |
string | No | The architecture type of the instance type. Valid values:
By default, all values are selected. | X86 | |
BurstablePerformance | string | No | Specifies whether to include burstable instance types. Valid values:
Default value: Include. | Include |
CoresList | array | No | The number of vCPUs that you want to assign to the instance type. You can specify multiple vCPUs. | |
integer | No | The number of vCPUs that you want to assign to the instance type. You can specify multiple vCPUs. | 2 | |
MemoryList | array | No | The memory size that you want to assign to the instance type. Unit: GiB. You can specify multiple memory sizes. | |
float | No | The memory size that you want to assign to the instance type. Unit: GiB. You can specify multiple memory sizes. | 4 | |
ChannelId | long | No | The channel ID. This parameter is not for public use. | 79425074 |
InstanceTypeFamilies | array | No | The instance families that you want to query. You can query 1 to 10 instance families in each call. | |
string | No | The instance family that you want to query. You can query 1 to 10 instance families in each call. | ["ecs.g6", "ecs.c6", … "ecs.r6"] | |
MinimumCpuCoreCount | integer | No | The minimum number of vCPUs per instance type. | 2 |
MaximumCpuCoreCount | integer | No | The maximum number of vCPUs per instance type. | 4 |
GpuSpecs | array | No | The GPU models. | |
string | No | The GPU model. | ["NVIDIA V100"] | |
InstanceCategories | array | No | The classifications of the instance types. Valid values:
| |
string | No | The classification of the instance type. Valid values:
| ["Compute-optimized with GPU"] | |
CpuArchitectures | array | No | The CPU architectures of the instance types. Valid values: Note
You can specify 1 to 2 CPU architectures.
| |
string | No | The CPU architecture of the instance type. Valid values: Note
You can specify 1 to 2 CPU architectures.
| ["X86", "ARM"] | |
PhysicalProcessorModels | array | No | The processor models of the instance types. You can specify 1 to 10 processor models. | |
string | No | The processor model of the instance type. You can specify 1 to 10 processor models. | ["Intel Xeon(Ice Lake) Platinum 8369B", "Intel Xeon(Skylake) Platinum 8163", … "Intel Xeon(Cascade Lake) Platinum 8269CY"] | |
MinimumEniQuantity | integer | No | The minimum number of elastic network interfaces (ENIs) per instance. | 2 |
MinimumEniPrivateIpAddressQuantity | integer | No | The minimum number of IPv4 addresses per ENI. | 2 |
MinimumEniIpv6AddressQuantity | integer | No | The minimum number of IPv6 addresses per ENI. | 1 |
MinimumInitialCredit | integer | No | The initial vCPU credits per t5 or t6 burstable instance. | 12 |
MinimumBaselineCredit | integer | No | The baseline vCPU computing performance (overall baseline performance of all vCPUs) per t5 or t6 burstable instance. | 12 |
MinimumMemorySize | float | No | The minimum memory size per instance. Unit: GiB. | 4 |
MaximumMemorySize | float | No | The maximum memory size per instance. Unit: GiB. | 4 |
MinimumGpuAmount | integer | No | The minimum number of GPUs per instance. The value must be a positive integer. | 2 |
MaximumGpuAmount | integer | No | The maximum number of GPUs per instance. The value must be a positive integer. | 2 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PatternTypes": [
{
"InstanceType": "ecs.c7.xlarge",
"InstanceFamilyLevel": "EnterpriseLevel",
"InstanceTypeFamily": "ecs.c7",
"Cores": 4,
"Memory": 8
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-12 | The request parameters of the API has changed | View Change Details |
2024-06-12 | The request parameters of the API has changed | View Change Details |