create_default_subnet
¶
create_default_subnet(
*,
config_overrides: Optional[EC2ClientConfig] = None,
availability_zone: Optional[AvailabilityZoneName] = None,
dry_run: Optional[Boolean] = None,
ipv6_native: Optional[Boolean] = None,
availability_zone_id: Optional[AvailabilityZoneId] = None,
) -> CreateDefaultSubnetResult
Creates a default subnet with a size /20 IPv4 CIDR block in the specified Availability Zone in your default VPC. You can have only one default subnet per Availability Zone. For more information, see Create a default subnet in the Amazon VPC User Guide.
Parameters:
-
availability_zone(Optional[AvailabilityZoneName], default:None) –The Availability Zone in which to create the default subnet.
Either
AvailabilityZoneorAvailabilityZoneIdmust be specified, but not both. -
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. -
ipv6_native(Optional[Boolean], default:None) –Indicates whether to create an IPv6 only subnet. If you already have a default subnet for this Availability Zone, you must delete it before you can create an IPv6 only subnet.
-
availability_zone_id(Optional[AvailabilityZoneId], default:None) –The ID of the Availability Zone.
Either
AvailabilityZoneorAvailabilityZoneIdmust be specified, but not both.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.