describe_vpc_attribute
async
¶
describe_vpc_attribute(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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.
>>> await 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/async_ec2.py
37180 37181 37182 37183 37184 37185 37186 37187 37188 37189 37190 37191 37192 37193 37194 37195 37196 37197 37198 37199 37200 37201 37202 37203 37204 37205 37206 37207 37208 37209 37210 37211 37212 37213 37214 37215 37216 37217 37218 37219 37220 37221 37222 37223 37224 37225 37226 37227 37228 37229 37230 37231 37232 37233 37234 37235 37236 37237 37238 37239 37240 37241 37242 37243 | |