paws.compute (version 0.1.0)

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)

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

SubnetId

[required] The ID of the subnet.

Request syntax

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

Examples

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

Run the code above in your browser using DataLab