AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

This is the response object from the AllocateAddress operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.EC2.Model.AllocateAddressResponse

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public class AllocateAddressResponse : AmazonWebServiceResponse

The AllocateAddressResponse type exposes the following members

Constructors

NameDescription
Public Method AllocateAddressResponse()

Properties

NameTypeDescription
Public Property AllocationId System.String

Gets and sets the property AllocationId.

The ID that represents the allocation of the Elastic IP address.

Public Property CarrierIp System.String

Gets and sets the property CarrierIp.

The carrier IP address. This option is only available for network interfaces that reside in a subnet in a Wavelength Zone.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property CustomerOwnedIp System.String

Gets and sets the property CustomerOwnedIp.

The customer-owned IP address.

Public Property CustomerOwnedIpv4Pool System.String

Gets and sets the property CustomerOwnedIpv4Pool.

The ID of the customer-owned address pool.

Public Property Domain Amazon.EC2.DomainType

Gets and sets the property Domain.

The network (vpc).

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property NetworkBorderGroup System.String

Gets and sets the property NetworkBorderGroup.

The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

Public Property PublicIp System.String

Gets and sets the property PublicIp.

The Elastic IP address.

Public Property PublicIpv4Pool System.String

Gets and sets the property PublicIpv4Pool.

The ID of an address pool.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

Examples

This example allocates an Elastic IP address.

To allocate an Elastic IP address


var client = new AmazonEC2Client();
var response = client.AllocateAddress(new AllocateAddressRequest 
{
});

string allocationId = response.AllocationId;
string domain = response.Domain;
string networkBorderGroup = response.NetworkBorderGroup;
string publicIp = response.PublicIp;
string publicIpv4Pool = response.PublicIpv4Pool;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5