amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.CreateNetworkInterface

Description

Creates a network interface in the specified subnet.

The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide.

For more information about network interfaces, see Elastic network interfaces in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data CreateNetworkInterface Source #

See: newCreateNetworkInterface smart constructor.

Constructors

CreateNetworkInterface' 

Fields

  • clientToken :: Maybe Text

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

  • description :: Maybe Text

    A description for the network interface.

  • dryRun :: Maybe Bool

    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 :: Maybe [Text]

    The IDs of one or more security groups.

  • interfaceType :: Maybe NetworkInterfaceCreationType

    The type of network interface. The default is interface.

    The only supported values are efa and trunk.

  • ipv4PrefixCount :: Maybe Int

    The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface.

    You can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

  • ipv4Prefixes :: Maybe [Ipv4PrefixSpecificationRequest]

    The IPv4 prefixes assigned to the network interface.

    You can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

  • ipv6AddressCount :: Maybe Int

    The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range.

    You can't specify a count of IPv6 addresses using this parameter if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

    If your subnet has the AssignIpv6AddressOnCreation attribute set, you can override that setting by specifying 0 as the IPv6 address count.

  • ipv6Addresses :: Maybe [InstanceIpv6Address]

    The IPv6 addresses from the IPv6 CIDR block range of your subnet.

    You can't specify IPv6 addresses using this parameter if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

  • ipv6PrefixCount :: Maybe Int

    The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface.

    You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

  • ipv6Prefixes :: Maybe [Ipv6PrefixSpecificationRequest]

    The IPv6 prefixes assigned to the network interface.

    You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

  • privateIpAddress :: Maybe Text

    The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

  • privateIpAddresses :: Maybe [PrivateIpAddressSpecification]

    The private IPv4 addresses.

    You can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

  • secondaryPrivateIpAddressCount :: Maybe Int

    The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses.

    You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the new network interface.

  • subnetId :: Text

    The ID of the subnet to associate with the network interface.

Instances

Instances details
ToHeaders CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

ToPath CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

ToQuery CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

AWSRequest CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Associated Types

type AWSResponse CreateNetworkInterface #

Generic CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Associated Types

type Rep CreateNetworkInterface :: Type -> Type #

Read CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Show CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

NFData CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Methods

rnf :: CreateNetworkInterface -> () #

Eq CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Hashable CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

type AWSResponse CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

type Rep CreateNetworkInterface Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

type Rep CreateNetworkInterface = D1 ('MetaData "CreateNetworkInterface" "Amazonka.EC2.CreateNetworkInterface" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateNetworkInterface'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "groups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: ((S1 ('MetaSel ('Just "interfaceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NetworkInterfaceCreationType)) :*: S1 ('MetaSel ('Just "ipv4PrefixCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "ipv4Prefixes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Ipv4PrefixSpecificationRequest])) :*: S1 ('MetaSel ('Just "ipv6AddressCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))) :*: (((S1 ('MetaSel ('Just "ipv6Addresses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [InstanceIpv6Address])) :*: S1 ('MetaSel ('Just "ipv6PrefixCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "ipv6Prefixes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Ipv6PrefixSpecificationRequest])) :*: S1 ('MetaSel ('Just "privateIpAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "privateIpAddresses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [PrivateIpAddressSpecification])) :*: S1 ('MetaSel ('Just "secondaryPrivateIpAddressCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: S1 ('MetaSel ('Just "subnetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))

newCreateNetworkInterface Source #

Create a value of CreateNetworkInterface with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateNetworkInterface, createNetworkInterface_clientToken - Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

CreateNetworkInterface, createNetworkInterface_description - A description for the network interface.

$sel:dryRun:CreateNetworkInterface', createNetworkInterface_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.

CreateNetworkInterface, createNetworkInterface_groups - The IDs of one or more security groups.

CreateNetworkInterface, createNetworkInterface_interfaceType - The type of network interface. The default is interface.

The only supported values are efa and trunk.

CreateNetworkInterface, createNetworkInterface_ipv4PrefixCount - The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface.

You can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

CreateNetworkInterface, createNetworkInterface_ipv4Prefixes - The IPv4 prefixes assigned to the network interface.

You can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

CreateNetworkInterface, createNetworkInterface_ipv6AddressCount - The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range.

You can't specify a count of IPv6 addresses using this parameter if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

If your subnet has the AssignIpv6AddressOnCreation attribute set, you can override that setting by specifying 0 as the IPv6 address count.

CreateNetworkInterface, createNetworkInterface_ipv6Addresses - The IPv6 addresses from the IPv6 CIDR block range of your subnet.

You can't specify IPv6 addresses using this parameter if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

CreateNetworkInterface, createNetworkInterface_ipv6PrefixCount - The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface.

You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

CreateNetworkInterface, createNetworkInterface_ipv6Prefixes - The IPv6 prefixes assigned to the network interface.

You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

CreateNetworkInterface, createNetworkInterface_privateIpAddress - The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

CreateNetworkInterface, createNetworkInterface_privateIpAddresses - The private IPv4 addresses.

You can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

CreateNetworkInterface, createNetworkInterface_secondaryPrivateIpAddressCount - The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses.

You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

CreateNetworkInterface, createNetworkInterface_tagSpecifications - The tags to apply to the new network interface.

CreateNetworkInterface, createNetworkInterface_subnetId - The ID of the subnet to associate with the network interface.

Request Lenses

createNetworkInterface_clientToken :: Lens' CreateNetworkInterface (Maybe Text) Source #

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

createNetworkInterface_dryRun :: Lens' CreateNetworkInterface (Maybe Bool) Source #

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.

createNetworkInterface_groups :: Lens' CreateNetworkInterface (Maybe [Text]) Source #

The IDs of one or more security groups.

createNetworkInterface_interfaceType :: Lens' CreateNetworkInterface (Maybe NetworkInterfaceCreationType) Source #

The type of network interface. The default is interface.

The only supported values are efa and trunk.

createNetworkInterface_ipv4PrefixCount :: Lens' CreateNetworkInterface (Maybe Int) Source #

The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface.

You can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

createNetworkInterface_ipv4Prefixes :: Lens' CreateNetworkInterface (Maybe [Ipv4PrefixSpecificationRequest]) Source #

The IPv4 prefixes assigned to the network interface.

You can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.

createNetworkInterface_ipv6AddressCount :: Lens' CreateNetworkInterface (Maybe Int) Source #

The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range.

You can't specify a count of IPv6 addresses using this parameter if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

If your subnet has the AssignIpv6AddressOnCreation attribute set, you can override that setting by specifying 0 as the IPv6 address count.

createNetworkInterface_ipv6Addresses :: Lens' CreateNetworkInterface (Maybe [InstanceIpv6Address]) Source #

The IPv6 addresses from the IPv6 CIDR block range of your subnet.

You can't specify IPv6 addresses using this parameter if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.

createNetworkInterface_ipv6PrefixCount :: Lens' CreateNetworkInterface (Maybe Int) Source #

The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface.

You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

createNetworkInterface_ipv6Prefixes :: Lens' CreateNetworkInterface (Maybe [Ipv6PrefixSpecificationRequest]) Source #

The IPv6 prefixes assigned to the network interface.

You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.

createNetworkInterface_privateIpAddress :: Lens' CreateNetworkInterface (Maybe Text) Source #

The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

createNetworkInterface_privateIpAddresses :: Lens' CreateNetworkInterface (Maybe [PrivateIpAddressSpecification]) Source #

The private IPv4 addresses.

You can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

createNetworkInterface_secondaryPrivateIpAddressCount :: Lens' CreateNetworkInterface (Maybe Int) Source #

The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses.

You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.

createNetworkInterface_subnetId :: Lens' CreateNetworkInterface Text Source #

The ID of the subnet to associate with the network interface.

Destructuring the Response

data CreateNetworkInterfaceResponse Source #

See: newCreateNetworkInterfaceResponse smart constructor.

Constructors

CreateNetworkInterfaceResponse' 

Fields

Instances

Instances details
Generic CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Associated Types

type Rep CreateNetworkInterfaceResponse :: Type -> Type #

Read CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Show CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

NFData CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

Eq CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

type Rep CreateNetworkInterfaceResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateNetworkInterface

type Rep CreateNetworkInterfaceResponse = D1 ('MetaData "CreateNetworkInterfaceResponse" "Amazonka.EC2.CreateNetworkInterface" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateNetworkInterfaceResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "networkInterface") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NetworkInterface)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateNetworkInterfaceResponse Source #

Create a value of CreateNetworkInterfaceResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateNetworkInterface, createNetworkInterfaceResponse_clientToken - The token to use to retrieve the next page of results. This value is null when there are no more results to return.

CreateNetworkInterfaceResponse, createNetworkInterfaceResponse_networkInterface - Information about the network interface.

$sel:httpStatus:CreateNetworkInterfaceResponse', createNetworkInterfaceResponse_httpStatus - The response's http status code.

Response Lenses

createNetworkInterfaceResponse_clientToken :: Lens' CreateNetworkInterfaceResponse (Maybe Text) Source #

The token to use to retrieve the next page of results. This value is null when there are no more results to return.