modify_instance_capacity_reservation_attributes
(**kwargs)¶Modifies the Capacity Reservation settings for a stopped instance. Use this action to configure an instance to target a specific Capacity Reservation, run in any open
Capacity Reservation with matching attributes, or run On-Demand Instance capacity.
See also: AWS API Documentation
Request Syntax
response = client.modify_instance_capacity_reservation_attributes(
InstanceId='string',
CapacityReservationSpecification={
'CapacityReservationPreference': 'open'|'none',
'CapacityReservationTarget': {
'CapacityReservationId': 'string',
'CapacityReservationResourceGroupArn': 'string'
}
},
DryRun=True|False
)
[REQUIRED]
The ID of the instance to be modified.
[REQUIRED]
Information about the Capacity Reservation targeting option.
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).none
- The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.Information about the target Capacity Reservation or Capacity Reservation group.
The ID of the Capacity Reservation in which to run the instance.
The ARN of the Capacity Reservation resource group in which to run the instance.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
Response Syntax
{
'Return': True|False
}
Response Structure
(dict) --
Return (boolean) --
Returns true
if the request succeeds; otherwise, it returns an error.