create_secondary_network
¶
create_secondary_network(
*,
config_overrides: Optional[EC2ClientConfig] = 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.
>>> 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/ec2.py
12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 | |