describe_vpc_attribute
¶
describe_vpc_attribute(
*,
config_overrides: Optional[EC2ClientConfig] = None,
attribute: Optional[VpcAttributeName] = None,
vpc_id: Optional[VpcId] = None,
dry_run: Optional[Boolean] = None,
) -> DescribeVpcAttributeResult
Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.
Parameters:
-
attribute(Optional[VpcAttributeName], default:None) –The VPC attribute.
-
vpc_id(Optional[VpcId], default:None) –The ID of 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.
Examples:
To describe the enableDnsSupport attribute This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.
>>> client.describe_vpc_attribute(vpc_id='vpc-a01106c2', attribute='enableDnsSupport')
To describe the enableDnsHostnames attribute
This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.
Source code in docs_src/capo_ec2/_services/ec2.py
36697 36698 36699 36700 36701 36702 36703 36704 36705 36706 36707 36708 36709 36710 36711 36712 36713 36714 36715 36716 36717 36718 36719 36720 36721 36722 36723 36724 36725 36726 36727 36728 36729 36730 36731 36732 36733 36734 36735 36736 36737 36738 36739 36740 36741 36742 36743 36744 36745 36746 36747 36748 36749 36750 36751 36752 36753 36754 36755 36756 36757 36758 36759 | |