Learn R Programming

paws.compute (version 0.1.12)

ec2_modify_subnet_attribute: Modifies a subnet attribute

Description

Modifies a subnet attribute. You can only modify one attribute at a time.

Usage

ec2_modify_subnet_attribute(AssignIpv6AddressOnCreation,
  MapPublicIpOnLaunch, SubnetId, MapCustomerOwnedIpOnLaunch,
  CustomerOwnedIpv4Pool)

Value

An empty list.

Arguments

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.

MapPublicIpOnLaunch

Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a public IPv4 address.

SubnetId

[required] The ID of the subnet.

MapCustomerOwnedIpOnLaunch

Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a customer-owned IPv4 address.

When this value is true, you must specify the customer-owned IP pool using CustomerOwnedIpv4Pool.

CustomerOwnedIpv4Pool

The customer-owned IPv4 address pool associated with the subnet.

You must set this value when you specify true for MapCustomerOwnedIpOnLaunch.

Request syntax

svc$modify_subnet_attribute(
  AssignIpv6AddressOnCreation = list(
    Value = TRUE|FALSE
  ),
  MapPublicIpOnLaunch = list(
    Value = TRUE|FALSE
  ),
  SubnetId = "string",
  MapCustomerOwnedIpOnLaunch = list(
    Value = TRUE|FALSE
  ),
  CustomerOwnedIpv4Pool = "string"
)

Examples

Run this code
if (FALSE) {
# This example modifies the specified subnet so that all instances
# launched into this subnet are assigned a public IP address.
svc$modify_subnet_attribute(
  MapPublicIpOnLaunch = list(
    Value = TRUE
  ),
  SubnetId = "subnet-1a2b3c4d"
)
}

Run the code above in your browser using DataLab