All Products
Search
Document Center

Auto Scaling:DescribePatternTypes

Last Updated:Dec 17, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ess:DescribePatternTypeslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
VSwitchIdarrayNo

The IDs of the vSwitches.

stringNo

The ID of the vSwitch.

vsw-bp14zolna43z266bq****
ZoneIdarrayNo

The zone IDs. If you pass vSwitch IDs to the system, this parameter does not take effect.

stringNo

The zone ID.

cn-hangzhou-g
SpotStrategystringNo

The preemption policy that you want to apply to pay-as-you-go instances. Valid values:

  • NoSpot: The instances are created as regular pay-as-you-go instances.
  • SpotWithPriceLimit: The instances are created as preemptible instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The instances are created as preemptible instances for which the market price at the time of purchase is automatically used as the bidding price.

Default value: NoSpot.

NoSpot
CoresintegerNo

The number of vCPUs that you want to assign to the instance type.

2
MemoryfloatNo

The memory size that you want to assign to the instance type. Unit: GiB.

4
MaxPricefloatNo

The maximum hourly price for pay-as-you-go or preemptible instances.

2
InstanceFamilyLevelstringNo

The level of the instance family. Valid values:

  • EntryLevel: entry level
  • EnterpriseLevel: enterprise level
  • CreditEntryLevel: credit-based entry level For more information, see Burstable instance families.
EnterpriseLevel
ExcludedInstanceTypearrayNo

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:

  • ecs.c6.large: excludes the ecs.c6.large instance type.
  • ecs.c6.*: excludes the c6 instance family.
Note If you want to exclude multiple instance types, separate the instance types with forward slashes (/). Example: ecs.n1.small/ecs.n1.*/*7*.
stringNo

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:

  • ecs.c6.large: excludes the ecs.c6.large instance type.
  • ecs.c6.*: excludes the c6 instance family.
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
ArchitecturearrayNo

The architecture types of the instance types. Valid values:

  • X86: x86 architecture.
  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated.
  • BareMetal: ECS Bare Metal Instance.
  • Arm: Arm.

By default, all values are selected.

stringNo

The architecture type of the instance type. Valid values:

  • X86: x86 architecture.
  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated.
  • BareMetal: ECS Bare Metal Instance.
  • Arm: Arm.

By default, all values are selected.

X86
BurstablePerformancestringNo

Specifies whether to include burstable instance types. Valid values:

  • Exclude: does not include burstable instance types.
  • Include: includes burstable instance types.
  • Required: includes only burstable instance types.

Default value: Include.

Include
CoresListarrayNo

The number of vCPUs that you want to assign to the instance type. You can specify multiple vCPUs.

integerNo

The number of vCPUs that you want to assign to the instance type. You can specify multiple vCPUs.

2
MemoryListarrayNo

The memory size that you want to assign to the instance type. Unit: GiB. You can specify multiple memory sizes.

floatNo

The memory size that you want to assign to the instance type. Unit: GiB. You can specify multiple memory sizes.

4
ChannelIdlongNo

The channel ID. This parameter is not for public use.

79425074
InstanceTypeFamiliesarrayNo

The instance families that you want to query. You can query 1 to 10 instance families in each call.

stringNo

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"]
MinimumCpuCoreCountintegerNo

The minimum number of vCPUs per instance type.

2
MaximumCpuCoreCountintegerNo

The maximum number of vCPUs per instance type.

4
GpuSpecsarrayNo

The GPU models.

stringNo

The GPU model.

["NVIDIA V100"]
InstanceCategoriesarrayNo

The classifications of the instance types. Valid values:

  • General-purpose: general-purpose instance type.
  • Compute-optimized: compute-optimized instance type.
  • Memory-optimized: memory-optimized instance type.
  • Big data: big data instance type.
  • Local SSDs: instance type with local SSDs.
  • High Clock Speed: instance type with high clock speeds.
  • Enhanced: enhanced instance type.
  • Shared: shared instance type.
  • Compute-optimized with GPU: GPU-accelerated compute-optimized instance type.
  • Visual Compute-optimized: visual compute-optimized instance type.
  • Heterogeneous Service: heterogeneous service instance type.
  • Compute-optimized with FPGA: FPGA-accelerated compute-optimized instance type.
  • Compute-optimized with NPU: NPU-accelerated compute-optimized instance type.
  • ECS Bare Metal: ECS Bare Metal Instance type.
  • High Performance Compute: HPC-optimized instance type.
stringNo

The classification of the instance type. Valid values:

  • General-purpose: general-purpose instance type.
  • Compute-optimized: compute-optimized instance type.
  • Memory-optimized: memory-optimized instance type.
  • Big data: big data instance type.
  • Local SSDs: instance type with local SSDs.
  • High Clock Speed: instance type with high clock speeds.
  • Enhanced: enhanced instance type.
  • Shared: shared instance type.
  • Compute-optimized with GPU: GPU-accelerated compute-optimized instance type.
  • Visual Compute-optimized: visual compute-optimized instance type.
  • Heterogeneous Service: heterogeneous service instance type.
  • Compute-optimized with FPGA: FPGA-accelerated compute-optimized instance type.
  • Compute-optimized with NPU: NPU-accelerated compute-optimized instance type.
  • ECS Bare Metal: ECS Bare Metal Instance type.
  • High Performance Compute: HPC-optimized instance type.
["Compute-optimized with GPU"]
CpuArchitecturesarrayNo

The CPU architectures of the instance types. Valid values:

Note You can specify 1 to 2 CPU architectures.
  • x86
  • Arm
stringNo

The CPU architecture of the instance type. Valid values:

Note You can specify 1 to 2 CPU architectures.
  • x86
  • Arm
["X86", "ARM"]
PhysicalProcessorModelsarrayNo

The processor models of the instance types. You can specify 1 to 10 processor models.

stringNo

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"]
MinimumEniQuantityintegerNo

The minimum number of elastic network interfaces (ENIs) per instance.

2
MinimumEniPrivateIpAddressQuantityintegerNo

The minimum number of IPv4 addresses per ENI.

2
MinimumEniIpv6AddressQuantityintegerNo

The minimum number of IPv6 addresses per ENI.

1
MinimumInitialCreditintegerNo

The initial vCPU credits per t5 or t6 burstable instance.

12
MinimumBaselineCreditintegerNo

The baseline vCPU computing performance (overall baseline performance of all vCPUs) per t5 or t6 burstable instance.

12
MinimumMemorySizefloatNo

The minimum memory size per instance. Unit: GiB.

4
MaximumMemorySizefloatNo

The maximum memory size per instance. Unit: GiB.

4
MinimumGpuAmountintegerNo

The minimum number of GPUs per instance. The value must be a positive integer.

2
MaximumGpuAmountintegerNo

The maximum number of GPUs per instance. The value must be a positive integer.

2

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
PatternTypesarray<object>

The instance types that meet the specified requirements.

PatternTypeobject
InstanceTypestring

The name of the instance type.

ecs.c7.xlarge
InstanceFamilyLevelstring

The level of the instance family.

  • EntryLevel: entry level (shared instance types) Instance types of this level are the most cost-effective but may not provide stable computing performance. Instance types of this level are suitable for business scenarios in which the CPU utilization is low. For more information, see Shared instance families.
  • EnterpriseLevel: enterprise level. Instance types of this level provide stable performance and dedicated resources and are suitable for scenarios that require high stability. For more information, see Overview of instance families.
  • CreditEntryLevel: credit-based entry level (burstable instance types). CPU credits are used to ensure computing performance. Instance types of this level are suitable for scenarios in which the CPU utilization is low but may fluctuate in specific cases. For more information, see Overview of burstable instances.
EnterpriseLevel
InstanceTypeFamilystring

The instance family.

ecs.c7
Coresinteger

The number of vCPUs that are assigned to the instance type.

4
Memoryfloat

The memory size that are assigned to the instance type. Unit: GiB.

8

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2024-11-12The request parameters of the API has changedView Change Details
2024-06-12The request parameters of the API has changedView Change Details