Allocating a Public IP to Your Account

You can allocate a public IP to your account that you can then associate with a virtual machine (VM) or a network interface.

You also need public IPs to create NAT services. For more information, see Creating a NAT Service.

Allocating a Public IP Using Cockpit v2

  1. In the Public IPs dashboard, click IconAddFull Create Public IP.
    The CREATE PUBLIC IP dialog box appears.

  2. (optional) In the Name field, type a name for the public IP.

    This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.

  3. Click Create Public IP.
    The public IP is allocated.

Allocating a Public IP Using OSC CLI

The CreatePublicIp command acquires a public IP for your account.
A public IP is a static IP designed for dynamic Cloud computing. It can be associated with a virtual machine (VM) in the public Cloud or in a Net, a network interface card (NIC), a NAT service.

For more information, see About Public IPs.

Request sample
$ osc-cli api CreatePublicIp --profile "default"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreatePublicIp command returns the following elements:

  • PublicIp: Information about the public IP.

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIp": {
    "Tags": [],
    "PublicIpId": "eipalloc-12345678",
    "PublicIp": "192.0.2.0"
  }
}

Allocating an EIP Using AWS CLI

To allocate an EIP to your account, use the allocate-address command following this syntax:

Request sample
$ aws ec2 allocate-address \
    --profile YOUR_PROFILE \
    --domain vpc \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • domain: The domain in which the EIP is allocated (standard | vpc). The domain is for information only and does not modify the behavior of the EIP. Some programs and scripts may use this attribute for compatibility.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The allocate-address command returns the following elements:

  • PublicIp: The EIP.

  • Domain: The domain of the EIP. This element is for information only.

  • AllocationId: If you specified the vpc domain, the ID of the allocation of the EIP.

    If you did not specify the domain, the ID of the allocation is available in the information of the EIP. For more information, see Getting Information About Your Public IPs.

Result sample
{
    "PublicIp": "111.1.1.1",
    "Domain": "vpc"
    "AllocationId": "eipalloc-12345678"
}

The EIP is allocated to your account.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.