Créer un internet service
Vous pouvez créer un internet service que vous pouvez ensuite attacher à un Net pour connecter des machines virtuelles (VM) d’un ou plusieurs Subnets à Internet de manière directe.
Pour cela, vous devez également ajouter une route à la route table de ces Subnets dirigeant le trafic Internet vers l’internet service et mettre à jour vos security groups. Pour en savoir plus, voir Tutoriel : Mettre en place une connexion directe entre des VM d’un Net et Internet.
Créer un internet service avec Cockpit
|
Vous pouvez également effectuer cette action en créant un Net. Pour en savoir plus, voir Créer un Net. |
-
Dans le dashboard Internet Services, cliquez sur
Créer un Internet service.
La boîte de dialogue CRÉER UN INTERNET SERVICE apparaît. -
Dans le champ Nom, tapez un nom pour l’internet service.
Cette action ajoute un tag Name de 255 caractères maximum. Vous pouvez utiliser tous les caractères, y compris les lettres accentuées.
-
Cliquez sur Créer.
L’internet service est créé.
Créer un internet service avec OSC CLI
|
À ce jour, cette section est disponible en anglais uniquement. |
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"
}
}
Créer un Internet service avec oapi-cli
|
À ce jour, cette section est disponible en anglais uniquement. |
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"
}
}
Créer une internet gateway avec AWS CLI
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Pour créer une internet gateway, utilisez la commande create-internet-gateway en suivant cette syntaxe :
$ aws ec2 create-internet-gateway \
--profile YOUR_PROFILE \
--endpoint https://fcu.eu-west-2.outscale.com
Cette commande contient les options suivantes que vous devez spécifier :
-
(optionnel)
profile: Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. -
endpoint: Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.
La commande create-internet-gateway renvoie les éléments suivants :
-
InternetGateway: Informations à propos de l’internet gateway nouvellement créée. Cet élément contient les informations suivantes :-
Tags: Un ou plusieurs tags associés à l’internet gateway. -
InternetGatewayId: L’ID de l’internet gateway. -
Attachments: Informations à propos de l’attachement à un VPC (toujours vide à la création).
-
{
"InternetGateway": {
"Tags": [],
"InternetGatewayId": "igw-12345678",
"Attachments": []
}
}
L’internet gateway est créée.
Pages connexes
Méthodes API correspondantes
AWS™ et Amazon Web Services™ sont des marques de commerce d'Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.