modify_instance_cpu_options
¶
modify_instance_cpu_options(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
50358 50359 50360 50361 50362 50363 50364 50365 50366 50367 50368 50369 50370 50371 50372 50373 50374 50375 50376 50377 50378 50379 50380 50381 50382 50383 50384 50385 50386 50387 50388 50389 50390 50391 50392 50393 50394 50395 50396 50397 50398 50399 50400 50401 50402 50403 50404 50405 50406 50407 50408 50409 50410 50411 50412 50413 50414 50415 50416 50417 50418 | |