modify_vpc_tenancy
¶
modify_vpc_tenancy(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
54749 54750 54751 54752 54753 54754 54755 54756 54757 54758 54759 54760 54761 54762 54763 54764 54765 54766 54767 54768 54769 54770 54771 54772 54773 54774 54775 54776 54777 54778 54779 54780 54781 54782 54783 54784 54785 54786 54787 54788 54789 54790 54791 54792 54793 54794 54795 54796 54797 54798 54799 | |