/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.EC2.Model { /// /// Container for the parameters to the CreateNetworkInterface operation. /// 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. /// /// public partial class CreateNetworkInterfaceRequest : AmazonEC2Request { private string _clientToken; private string _description; private List _groups = new List(); private NetworkInterfaceCreationType _interfaceType; private int? _ipv4PrefixCount; private List _ipv4Prefixes = new List(); private int? _ipv6AddressCount; private List _ipv6Addresses = new List(); private int? _ipv6PrefixCount; private List _ipv6Prefixes = new List(); private string _privateIpAddress; private List _privateIpAddresses = new List(); private int? _secondaryPrivateIpAddressCount; private string _subnetId; private List _tagSpecifications = new List(); /// /// Gets and sets the property ClientToken. /// /// Unique, case-sensitive identifier that you provide to ensure the idempotency of the /// request. For more information, see Ensuring /// Idempotency. /// /// public string ClientToken { get { return this._clientToken; } set { this._clientToken = value; } } // Check to see if ClientToken property is set internal bool IsSetClientToken() { return this._clientToken != null; } /// /// Gets and sets the property Description. /// /// A description for the network interface. /// /// public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// /// Gets and sets the property Groups. /// /// The IDs of one or more security groups. /// /// public List Groups { get { return this._groups; } set { this._groups = value; } } // Check to see if Groups property is set internal bool IsSetGroups() { return this._groups != null && this._groups.Count > 0; } /// /// Gets and sets the property InterfaceType. /// /// The type of network interface. The default is interface. /// /// /// /// The only supported values are interface, efa, and trunk. /// /// public NetworkInterfaceCreationType InterfaceType { get { return this._interfaceType; } set { this._interfaceType = value; } } // Check to see if InterfaceType property is set internal bool IsSetInterfaceType() { return this._interfaceType != null; } /// /// Gets and sets the property 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. /// /// public int Ipv4PrefixCount { get { return this._ipv4PrefixCount.GetValueOrDefault(); } set { this._ipv4PrefixCount = value; } } // Check to see if Ipv4PrefixCount property is set internal bool IsSetIpv4PrefixCount() { return this._ipv4PrefixCount.HasValue; } /// /// Gets and sets the property 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. /// /// public List Ipv4Prefixes { get { return this._ipv4Prefixes; } set { this._ipv4Prefixes = value; } } // Check to see if Ipv4Prefixes property is set internal bool IsSetIpv4Prefixes() { return this._ipv4Prefixes != null && this._ipv4Prefixes.Count > 0; } /// /// Gets and sets the property 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. /// /// public int Ipv6AddressCount { get { return this._ipv6AddressCount.GetValueOrDefault(); } set { this._ipv6AddressCount = value; } } // Check to see if Ipv6AddressCount property is set internal bool IsSetIpv6AddressCount() { return this._ipv6AddressCount.HasValue; } /// /// Gets and sets the property 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. /// /// public List Ipv6Addresses { get { return this._ipv6Addresses; } set { this._ipv6Addresses = value; } } // Check to see if Ipv6Addresses property is set internal bool IsSetIpv6Addresses() { return this._ipv6Addresses != null && this._ipv6Addresses.Count > 0; } /// /// Gets and sets the property 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. /// /// public int Ipv6PrefixCount { get { return this._ipv6PrefixCount.GetValueOrDefault(); } set { this._ipv6PrefixCount = value; } } // Check to see if Ipv6PrefixCount property is set internal bool IsSetIpv6PrefixCount() { return this._ipv6PrefixCount.HasValue; } /// /// Gets and sets the property 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. /// /// public List Ipv6Prefixes { get { return this._ipv6Prefixes; } set { this._ipv6Prefixes = value; } } // Check to see if Ipv6Prefixes property is set internal bool IsSetIpv6Prefixes() { return this._ipv6Prefixes != null && this._ipv6Prefixes.Count > 0; } /// /// Gets and sets the property 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). /// /// public string PrivateIpAddress { get { return this._privateIpAddress; } set { this._privateIpAddress = value; } } // Check to see if PrivateIpAddress property is set internal bool IsSetPrivateIpAddress() { return this._privateIpAddress != null; } /// /// Gets and sets the property 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. /// /// public List PrivateIpAddresses { get { return this._privateIpAddresses; } set { this._privateIpAddresses = value; } } // Check to see if PrivateIpAddresses property is set internal bool IsSetPrivateIpAddresses() { return this._privateIpAddresses != null && this._privateIpAddresses.Count > 0; } /// /// Gets and sets the property 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. /// /// public int SecondaryPrivateIpAddressCount { get { return this._secondaryPrivateIpAddressCount.GetValueOrDefault(); } set { this._secondaryPrivateIpAddressCount = value; } } // Check to see if SecondaryPrivateIpAddressCount property is set internal bool IsSetSecondaryPrivateIpAddressCount() { return this._secondaryPrivateIpAddressCount.HasValue; } /// /// Gets and sets the property SubnetId. /// /// The ID of the subnet to associate with the network interface. /// /// [AWSProperty(Required=true)] public string SubnetId { get { return this._subnetId; } set { this._subnetId = value; } } // Check to see if SubnetId property is set internal bool IsSetSubnetId() { return this._subnetId != null; } /// /// Gets and sets the property TagSpecifications. /// /// The tags to apply to the new network interface. /// /// public List TagSpecifications { get { return this._tagSpecifications; } set { this._tagSpecifications = value; } } // Check to see if TagSpecifications property is set internal bool IsSetTagSpecifications() { return this._tagSpecifications != null && this._tagSpecifications.Count > 0; } } }