create_secondary_network
async
¶
create_secondary_network(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
ipv4_cidr_block: Optional[String] = None,
network_type: Optional[SecondaryNetworkType] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> CreateSecondaryNetworkResult
Creates a secondary network.
The allowed size for a secondary network CIDR block is between /28 netmask (16 IP addresses) and /12 netmask (1,048,576 IP addresses).
Parameters:
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
-
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. -
ipv4_cidr_block(Optional[String], default:None) –The IPv4 CIDR block for the secondary network. The CIDR block size must be between /12 and /28.
-
network_type(Optional[SecondaryNetworkType], default:None) –The type of secondary network.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to assign to the secondary network.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a secondary network This example creates a rdma secondary network with a /16 CIDR block.
>>> await client.create_secondary_network(ipv4_cidr_block='10.0.0.0/16', network_type='rdma', client_token='550e8400-e29b-41d4-a716-446655440000', tag_specifications=[{'ResourceType': 'secondary-network', 'Tags': [{'Key': 'Name', 'Value': 'Prod Secondary Network'}]}])
Source code in docs_src/capo_ec2/_services/async_ec2.py
12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 | |