modify_instance_cpu_options
async
¶
modify_instance_cpu_options(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
instance_id: Optional[InstanceId] = None,
core_count: Optional[Integer] = None,
threads_per_core: Optional[Integer] = None,
nested_virtualization: Optional[NestedVirtualizationSpecification] = None,
dry_run: Optional[Boolean] = None,
) -> ModifyInstanceCpuOptionsResult
By default, all vCPUs for the instance type are active when you launch an instance. When you configure the number of active vCPUs for the instance, it can help you save on licensing costs and optimize performance. The base cost of the instance remains unchanged.
The number of active vCPUs equals the number of threads per CPU core multiplied by the number of cores. The instance must be in a Stopped state before you make changes.
Some instance type options do not support this capability. For more information, see Supported CPU options in the Amazon EC2 User Guide.
Parameters:
-
instance_id(Optional[InstanceId], default:None) –The ID of the instance to update.
-
core_count(Optional[Integer], default:None) –The number of CPU cores to activate for the specified instance.
-
threads_per_core(Optional[Integer], default:None) –The number of threads to run for each CPU core.
-
nested_virtualization(Optional[NestedVirtualizationSpecification], default:None) –Indicates whether to enable or disable nested virtualization for the instance. When nested virtualization is enabled, Virtual Secure Mode (VSM) is automatically disabled for the instance.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
51056 51057 51058 51059 51060 51061 51062 51063 51064 51065 51066 51067 51068 51069 51070 51071 51072 51073 51074 51075 51076 51077 51078 51079 51080 51081 51082 51083 51084 51085 51086 51087 51088 51089 51090 51091 51092 51093 51094 51095 51096 51097 51098 51099 51100 51101 51102 51103 51104 51105 51106 51107 51108 51109 51110 51111 51112 51113 51114 51115 51116 51117 | |