Creating an Internet Service
You can create an internet gateway that you can then attach to a Net to connect virtual machines (VMs) in one or more Subnets directly to the internet.
To do so, you also need to add a route to the route table of these Subnets directing internet traffic to the internet gateway and update your security groups. For more information, see Tutorial: Setting Up a Direct Connection Between VMs in a Net and the Internet.
Creating an Internet Service Using Cockpit v2
-
In the Internet Services dashboard, click Create Internet Service.
The CREATE INTERNET SERVICE dialog box appears. -
In the Name field, type a name for the internet service.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
Click Create Internet Service.
The internet service is created.
Creating an Internet Service Using OSC CLI
The CreateInternetService command creates an internet service you can use with a Net.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.
For more information, see About Internet Services.
$ osc-cli api CreateInternetService --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 CreateInternetService command returns the following elements:
-
InternetService
: Information about the internet service.-
InternetServiceId
: The ID of the internet service. -
NetId
: The ID of the Net attached to the internet service. -
State
: The state of the attachment of the internet service to the Net (alwaysavailable
). -
Tags
: One or more tags associated with the internet service.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"InternetService": {
"Tags": [],
"InternetServiceId": "igw-12345678"
}
}
Creating an Internet Service Using oapi-cli
The CreateInternetService command creates an internet service you can use with a Net.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.
For more information, see About Internet Services.
$ oapi-cli --profile "default" CreateInternetService
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 CreateInternetService command returns the following elements:
-
InternetService
: Information about the internet service.-
InternetServiceId
: The ID of the internet service. -
NetId
: The ID of the Net attached to the internet service. -
State
: The state of the attachment of the internet service to the Net (alwaysavailable
). -
Tags
: One or more tags associated with the internet service.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"InternetService": {
"Tags": [],
"InternetServiceId": "igw-12345678"
}
}
Creating an Internet Gateway Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To create an internet gateway, use the create-internet-gateway command following this syntax:
$ aws ec2 create-internet-gateway \
--profile YOUR_PROFILE \
--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. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The create-internet-gateway command returns the following elements:
-
InternetGateway
: Information about the newly created internet gateway. This element contains the following information:-
Tags
: One or more tags associated with the internet gateway. -
InternetGatewayId
: The ID of the internet gateway. -
Attachments
: Information about the attachment to a VPC (always empty at creation).
-
{
"InternetGateway": {
"Tags": [],
"InternetGatewayId": "igw-12345678",
"Attachments": []
}
}
The internet gateway is created.
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.