AWS SDK Version 4 for .NET
API Reference

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.

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).

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to CreateSecondaryNetworkAsync.

Namespace: Amazon.EC2
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public virtual CreateSecondaryNetworkResponse CreateSecondaryNetwork(
         CreateSecondaryNetworkRequest request
)

Parameters

request
Type: Amazon.EC2.Model.CreateSecondaryNetworkRequest

Container for the necessary parameters to execute the CreateSecondaryNetwork service method.

Return Value


The response from the CreateSecondaryNetwork service method, as returned by EC2.

Examples

This example creates a rdma secondary network with a /16 CIDR block.

To create a secondary network


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;

            

Version Information

.NET Framework:
Supported in: 4.7.2 and newer

See Also