AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the CreateSecondaryNetwork operation. 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).
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class CreateSecondaryNetworkRequest : AmazonEC2Request IAmazonWebServiceRequest
The CreateSecondaryNetworkRequest type exposes the following members
| Name | Description | |
|---|---|---|
|
CreateSecondaryNetworkRequest() |
| Name | Type | Description | |
|---|---|---|---|
|
ClientToken | System.String |
Gets and sets the property ClientToken. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency. |
|
DryRun | System.Nullable<System.Boolean> |
Gets and sets the property DryRun.
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 |
|
Ipv4CidrBlock | System.String |
Gets and sets the property Ipv4CidrBlock. The IPv4 CIDR block for the secondary network. The CIDR block size must be between /12 and /28. |
|
NetworkType | Amazon.EC2.SecondaryNetworkType |
Gets and sets the property NetworkType. The type of secondary network. |
|
TagSpecifications | System.Collections.Generic.List<Amazon.EC2.Model.TagSpecification> |
Gets and sets the property TagSpecifications. The tags to assign to the secondary network. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true. |
This example creates a rdma secondary network with a /16 CIDR block.
var client = new AmazonEC2Client();
var response = client.CreateSecondaryNetwork(new CreateSecondaryNetworkRequest
{
ClientToken = "550e8400-e29b-41d4-a716-446655440000",
Ipv4CidrBlock = "10.0.0.0/16",
NetworkType = "rdma",
TagSpecifications = new List<TagSpecification> {
new TagSpecification {
ResourceType = "secondary-network",
Tags = new List<Tag> {
new Tag {
Key = "Name",
Value = "Prod Secondary Network"
}
}
}
}
});
string clientToken = response.ClientToken;
SecondaryNetwork secondaryNetwork = response.SecondaryNetwork;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer