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
-
In the Public IPs dashboard, click Create Public IP.
The CREATE PUBLIC IP dialog box appears. -
(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.
-
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.
$ 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.-
LinkPublicIpId
: (Required in a Net) The ID representing the association of the public IP with the VM or the NIC. -
NicAccountId
: The account ID of the owner of the NIC. -
NicId
: The ID of the NIC the public IP is associated with (if any). -
PrivateIp
: The private IP associated with the public IP. -
PublicIp
: The public IP. -
PublicIpId
: The allocation ID of the public IP. -
Tags
: One or more tags associated with the public IP.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
VmId
: The ID of the VM the public IP is associated with (if any).
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PublicIp": {
"Tags": [],
"PublicIpId": "eipalloc-12345678",
"PublicIp": "192.0.2.0"
}
}
Allocating a Public IP Using oapi-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.
$ oapi-cli --profile "default" CreatePublicIp
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.-
LinkPublicIpId
: (Required in a Net) The ID representing the association of the public IP with the VM or the NIC. -
NicAccountId
: The account ID of the owner of the NIC. -
NicId
: The ID of the NIC the public IP is associated with (if any). -
PrivateIp
: The private IP associated with the public IP. -
PublicIp
: The public IP. -
PublicIpId
: The allocation ID of the public IP. -
Tags
: One or more tags associated with the public IP.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
VmId
: The ID of the VM the public IP is associated with (if any).
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"PublicIp": {
"Tags": [],
"PublicIpId": "eipalloc-12345678",
"PublicIp": "192.0.2.0"
}
}
Allocating an EIP Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To allocate an EIP to your account, use the allocate-address command following this syntax:
$ 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. For more information, see Installing and Configuring AWS CLI.
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 thevpc
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.
{
"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.