RecommendInstanceTypes
This class encapsulates and extends the ROS resource type DATASOURCE::ECS::RecommendInstanceTypes
, which is used to query the recommended instance types of Elastic Compute Service (ECS) instances.
Initializers
from ros_cdk_ecs import datasource
datasource.RecommendInstanceTypes(
scope: Construct,
id: str,
cores: typing.Union[typing.Union[int, float], IResolvable] = None,
instance_charge_type: typing.Union[str, IResolvable] = None,
instance_family_level: typing.Union[str, IResolvable] = None,
instance_type: typing.Union[str, IResolvable] = None,
instance_type_families: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
io_optimized: typing.Union[str, IResolvable] = None,
max_price: typing.Union[typing.Union[int, float], IResolvable] = None,
memory: typing.Union[typing.Union[int, float], IResolvable] = None,
priority_strategy: typing.Union[str, IResolvable] = None,
refresh_options: typing.Union[str, IResolvable] = None,
scene: typing.Union[str, IResolvable] = None,
spot_strategy: typing.Union[str, IResolvable] = None,
system_disk_category: typing.Union[str, IResolvable] = None,
zone_id: typing.Union[str, IResolvable] = None,
zone_match_mode: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
cores |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property cores: The number of vCPUs of the instance. |
instance_charge_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceChargeType: The billing method of the instances of the instance type. |
instance_family_level |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceFamilyLevel: The level of the instance family. |
instance_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceType: The specified instance type. |
instance_type_families |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property instanceTypeFamilies: The list of instance family to be filtered out. |
io_optimized |
typing.Union[str, ros_cdk_core.IResolvable] |
Property ioOptimized: Specifies whether to match I\/O optimized instances. |
max_price |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property maxPrice: The maximum hourly price for pay-as-you-go instances or preemptible instances. |
memory |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property memory: The memory size of the instance. |
priority_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property priorityStrategy: The policy for recommending instance types. |
refresh_options |
typing.Union[str, ros_cdk_core.IResolvable] |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
scene |
typing.Union[str, ros_cdk_core.IResolvable] |
Property scene: Specifies the scenario in which the instance type is recommended. |
spot_strategy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property spotStrategy: The bidding policy of preemptible instances. |
system_disk_category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property systemDiskCategory: The category of the system disk. |
zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneId: The zone ID of the alternative instance types. |
zone_match_mode |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneMatchMode: Specifies which alternative instance types are recommended. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
cores
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property cores: The number of vCPUs of the instance.
Note If the Cores and Memory parameters are both specified, all instance types that offer the vCPUs and memory size specified by the parameters are matched.
instance_charge_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceChargeType: The billing method of the instances of the instance type.
Valid values: PrePaid: subscription PostPaid: pay-as-you-go Default value: PostPaid.
instance_family_level
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceFamilyLevel: The level of the instance family.
Valid values: EntryLevel, EnterpriseLevel, CreditEntryLevel.
instance_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceType: The specified instance type.
For more information, see Instance families or call ECS DescribeInstanceTypes operation to query the most recent instance type list. Note If the InstanceType parameter is specified, none of the Cores and Memory parameters can be specified.
instance_type_families
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property instanceTypeFamilies: The list of instance family to be filtered out.
You can also call ECS DescribeInstanceTypeFamilies operation to query the list of instance families.
io_optimized
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ioOptimized: Specifies whether to match I\/O optimized instances.
The IoOptimized parameter cannot be specified when the instance is not I/O optimized. Valid values: optimized: matches I/O optimized instances. none: matches non-I/O optimized instances. Default value: optimized. If you query alternative instance types for retired instance types, this parameter is set to none by default. Default value: none.
max_price
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property maxPrice: The maximum hourly price for pay-as-you-go instances or preemptible instances.
Note If this parameter is specified, the SpotStrategy parameter must be set to SpotWithPriceLimit.
memory
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property memory: The memory size of the instance.
Unit: GiB. Note If the Cores and Memory parameters are both specified, all instance types that offer the vCPUs and memory size specified by the parameters are matched.
priority_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property priorityStrategy: The policy for recommending instance types.
Valid values: InventoryFirst: Instance types are recommended in descending order based on resource availability. PriceFirst: Instance types are recommended in ascending order based on hourly price per vCPU. NewProductFirst: The latest instance types are recommended first. Default value: InventoryFirst.
refresh_options
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
scene
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property scene: Specifies the scenario in which the instance type is recommended.
Valid values: UPGRADE: instance type upgrade or downgrade CREATE: instance creation Default value: CREATE.
spot_strategy
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property spotStrategy: The bidding policy of preemptible instances.
Valid values: NoSpot: applies to regular pay-as-you-go instances. SpotWithPriceLimit: applies to preemptible instances that have user-defined maximum hourly prices. SpotAsPriceGo: applies to preemptible instances that are of the market price at the time of purchase. Note If the SpotStrategy parameter is specified, the InstanceChargeType parameter must be set to PostPaid. Default value: NoSpot.
system_disk_category
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property systemDiskCategory: The category of the system disk.
Valid values: cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: enhanced SSD (ESSD) cloud: basic disk For non-I/O optimized instances, the default value is cloud. For I/O optimized instances, the default value is cloud_efficiency.
zone_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: The zone ID of the alternative instance types.
You can call ECS DescribeZones operation to query the most recent zone list.When you specify this parameter, we recommend that you set ZoneMatchMode to the default value Include. This value indicates that instance types in the zone specified by ZoneId are preferentially recommended, and instance types in other zones in the same region are also listed.
zone_match_mode
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneMatchMode: Specifies which alternative instance types are recommended.
Valid values: Strict: recommends only alternative instance types in the zone specified by ZoneId. Include: recommends all instance types in all the zones in the same region as the specified instance type. When ZoneId is specified, the default value of this parameter is Strict. This value indicates that only alternative instance types in the zone specified by ZoneId are recommended.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
from ros_cdk_ecs import datasource
datasource.RecommendInstanceTypes.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_instance_type_ids |
ros_cdk_core.IResolvable |
Attribute InstanceTypeIds: The list of instance type ids. |
attr_instance_types |
ros_cdk_core.IResolvable |
Attribute InstanceTypes: The list of instance types, including information such as cores and memory. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_instance_type_ids
Required
attr_instance_type_ids: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InstanceTypeIds: The list of instance type ids.
Note that instance type ids are not unique.
attr_instance_types
Required
attr_instance_types: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InstanceTypes: The list of instance types, including information such as cores and memory.