paws.compute (version 0.1.0)

ec2_modify_network_interface_attribute: Modifies the specified network interface attribute

Description

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

Usage

ec2_modify_network_interface_attribute(Attachment, Description, DryRun,
  Groups, NetworkInterfaceId, SourceDestCheck)

Arguments

Attachment

Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

Description

A description for the network interface.

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

Groups

Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

NetworkInterfaceId

[required] The ID of the network interface.

SourceDestCheck

Indicates whether source/destination checking is enabled. A value of true means checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Request syntax

svc$modify_network_interface_attribute(
  Attachment = list(
    AttachmentId = "string",
    DeleteOnTermination = TRUE|FALSE
  ),
  Description = list(
    Value = "string"
  ),
  DryRun = TRUE|FALSE,
  Groups = list(
    "string"
  ),
  NetworkInterfaceId = "string",
  SourceDestCheck = list(
    Value = TRUE|FALSE
  )
)

Examples

Run this code
# NOT RUN {
# This example modifies the attachment attribute of the specified network
# interface.
# }
# NOT RUN {
svc$modify_network_interface_attribute(
  Attachment = list(
    AttachmentId = "eni-attach-43348162",
    DeleteOnTermination = FALSE
  ),
  NetworkInterfaceId = "eni-686ea200"
)
# }
# NOT RUN {
# This example modifies the description attribute of the specified network
# interface.
# }
# NOT RUN {
svc$modify_network_interface_attribute(
  Description = list(
    Value = "My description"
  ),
  NetworkInterfaceId = "eni-686ea200"
)
# }
# NOT RUN {
# This example command modifies the groupSet attribute of the specified
# network interface.
# }
# NOT RUN {
svc$modify_network_interface_attribute(
  Groups = list(
    "sg-903004f8",
    "sg-1a2b3c4d"
  ),
  NetworkInterfaceId = "eni-686ea200"
)
# }
# NOT RUN {
# This example command modifies the sourceDestCheck attribute of the
# specified network interface.
# }
# NOT RUN {
svc$modify_network_interface_attribute(
  NetworkInterfaceId = "eni-686ea200",
  SourceDestCheck = list(
    Value = FALSE
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace