Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateNetworkInterface = CreateNetworkInterface' {
- clientToken :: Maybe Text
- description :: Maybe Text
- dryRun :: Maybe Bool
- groups :: Maybe [Text]
- interfaceType :: Maybe NetworkInterfaceCreationType
- ipv4PrefixCount :: Maybe Int
- ipv4Prefixes :: Maybe [Ipv4PrefixSpecificationRequest]
- ipv6AddressCount :: Maybe Int
- ipv6Addresses :: Maybe [InstanceIpv6Address]
- ipv6PrefixCount :: Maybe Int
- ipv6Prefixes :: Maybe [Ipv6PrefixSpecificationRequest]
- privateIpAddress :: Maybe Text
- privateIpAddresses :: Maybe [PrivateIpAddressSpecification]
- secondaryPrivateIpAddressCount :: Maybe Int
- tagSpecifications :: Maybe [TagSpecification]
- subnetId :: Text
- newCreateNetworkInterface :: Text -> CreateNetworkInterface
- createNetworkInterface_clientToken :: Lens' CreateNetworkInterface (Maybe Text)
- createNetworkInterface_description :: Lens' CreateNetworkInterface (Maybe Text)
- createNetworkInterface_dryRun :: Lens' CreateNetworkInterface (Maybe Bool)
- createNetworkInterface_groups :: Lens' CreateNetworkInterface (Maybe [Text])
- createNetworkInterface_interfaceType :: Lens' CreateNetworkInterface (Maybe NetworkInterfaceCreationType)
- createNetworkInterface_ipv4PrefixCount :: Lens' CreateNetworkInterface (Maybe Int)
- createNetworkInterface_ipv4Prefixes :: Lens' CreateNetworkInterface (Maybe [Ipv4PrefixSpecificationRequest])
- createNetworkInterface_ipv6AddressCount :: Lens' CreateNetworkInterface (Maybe Int)
- createNetworkInterface_ipv6Addresses :: Lens' CreateNetworkInterface (Maybe [InstanceIpv6Address])
- createNetworkInterface_ipv6PrefixCount :: Lens' CreateNetworkInterface (Maybe Int)
- createNetworkInterface_ipv6Prefixes :: Lens' CreateNetworkInterface (Maybe [Ipv6PrefixSpecificationRequest])
- createNetworkInterface_privateIpAddress :: Lens' CreateNetworkInterface (Maybe Text)
- createNetworkInterface_privateIpAddresses :: Lens' CreateNetworkInterface (Maybe [PrivateIpAddressSpecification])
- createNetworkInterface_secondaryPrivateIpAddressCount :: Lens' CreateNetworkInterface (Maybe Int)
- createNetworkInterface_tagSpecifications :: Lens' CreateNetworkInterface (Maybe [TagSpecification])
- createNetworkInterface_subnetId :: Lens' CreateNetworkInterface Text
- data CreateNetworkInterfaceResponse = CreateNetworkInterfaceResponse' {}
- newCreateNetworkInterfaceResponse :: Int -> CreateNetworkInterfaceResponse
- createNetworkInterfaceResponse_clientToken :: Lens' CreateNetworkInterfaceResponse (Maybe Text)
- createNetworkInterfaceResponse_networkInterface :: Lens' CreateNetworkInterfaceResponse (Maybe NetworkInterface)
- createNetworkInterfaceResponse_httpStatus :: Lens' CreateNetworkInterfaceResponse Int
Creating a Request
data CreateNetworkInterface Source #
See: newCreateNetworkInterface
smart constructor.
CreateNetworkInterface' | |
|
Instances
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_description :: Lens' CreateNetworkInterface (Maybe Text) Source #
A description for the network interface.
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_tagSpecifications :: Lens' CreateNetworkInterface (Maybe [TagSpecification]) Source #
The tags to apply to the new network interface.
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.
CreateNetworkInterfaceResponse' | |
|
Instances
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.
createNetworkInterfaceResponse_networkInterface :: Lens' CreateNetworkInterfaceResponse (Maybe NetworkInterface) Source #
Information about the network interface.
createNetworkInterfaceResponse_httpStatus :: Lens' CreateNetworkInterfaceResponse Int Source #
The response's http status code.