modify_vpc_tenancy
async
¶
modify_vpc_tenancy(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
vpc_id: Optional[VpcId] = None,
instance_tenancy: Optional[VpcTenancy] = None,
dry_run: Optional[Boolean] = None,
) -> ModifyVpcTenancyResult
Modifies the instance tenancy attribute of the specified VPC. You can change the instance tenancy attribute of a VPC to default only. You cannot change the instance tenancy attribute to dedicated.
After you modify the tenancy of the VPC, any new instances that you launch into the VPC have a tenancy of default, unless you specify otherwise during launch. The tenancy of any existing instances in the VPC is not affected.
For more information, see Dedicated Instances in the Amazon EC2 User Guide.
Parameters:
-
vpc_id(Optional[VpcId], default:None) –The ID of the VPC.
-
instance_tenancy(Optional[VpcTenancy], default:None) –The instance tenancy attribute for the VPC.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, 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
55510 55511 55512 55513 55514 55515 55516 55517 55518 55519 55520 55521 55522 55523 55524 55525 55526 55527 55528 55529 55530 55531 55532 55533 55534 55535 55536 55537 55538 55539 55540 55541 55542 55543 55544 55545 55546 55547 55548 55549 55550 55551 55552 55553 55554 55555 55556 55557 55558 55559 55560 55561 | |