AWS SDK Version 3 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.

Container for the parameters to the ModifySubnetAttribute operation. Modifies a subnet attribute. You can only modify one attribute at a time.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.EC2.AmazonEC2Request
      Amazon.EC2.Model.ModifySubnetAttributeRequest

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

Syntax

C#
public class ModifySubnetAttributeRequest : AmazonEC2Request
         IAmazonWebServiceRequest

The ModifySubnetAttributeRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AssignIpv6AddressOnCreation System.Boolean

Gets and sets the property AssignIpv6AddressOnCreation.

Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives an IPv6 address).

If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it's created using version 2016-11-15 or later of the Amazon EC2 API.

Public Property MapPublicIpOnLaunch System.Boolean

Gets and sets the property MapPublicIpOnLaunch.

Specify true to indicate that network interfaces created in the specified subnet should be assigned a public IPv4 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives a public IPv4 address).

Public Property SubnetId System.String

Gets and sets the property SubnetId.

The ID of the subnet.

Examples

This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address.

To change a subnet's public IP addressing behavior


var response = client.ModifySubnetAttribute(new ModifySubnetAttributeRequest 
{
    MapPublicIpOnLaunch = jsondata object,
    SubnetId = "subnet-1a2b3c4d"
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms