Obtenir des informations sur vos OMI
Avec AWS CLI, vous pouvez obtenir des informations sur les OMI que vous pouvez utiliser pour lancer des machines virtuelles (VM) :
-
Les OMI que vous avez créées.
-
Les OMI que les autres comptes ont partagées avec vous.
Obtenir des informations sur vos OMI avec OSC CLI
À ce jour, cette section est disponible en anglais uniquement. |
The ReadImages command lists one or more OUTSCALE machine images (OMIs) you can use.
$ osc-cli api ReadImages --profile "default" \
--Filters '{
"ImageIds": ["ami-12345678"]
}'
$ osc-cli api ReadImages --profile "default" \
--Filters '{
"AccountAliases": ["Outscale"],
"ImageNames": ["Ubuntu*", "RockyLinux*"]
}'
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. -
Filters
: (optional) One or more filters.-
AccountAliases
: (optional) The account aliases of the owners of the OMIs. -
AccountIds
: (optional) The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch permissions are described. -
Architectures
: (optional) The architectures of the OMIs (i386
|x86_64
). -
BlockDeviceMappingDeleteOnVmDeletion
: (optional) Whether the volumes are deleted or not when terminating the VM. -
BlockDeviceMappingDeviceNames
: (optional) The device names for the volumes. -
BlockDeviceMappingSnapshotIds
: (optional) The IDs of the snapshots used to create the volumes. -
BlockDeviceMappingVolumeSizes
: (optional) The sizes of the volumes, in gibibytes (GiB). -
BlockDeviceMappingVolumeTypes
: (optional) The types of volumes (standard
|gp2
|io1
). -
Descriptions
: (optional) The descriptions of the OMIs, provided when they were created. -
FileLocations
: (optional) The locations of the buckets where the OMI files are stored. -
Hypervisors
: (optional) The hypervisor type of the OMI (alwaysxen
). -
ImageIds
: (optional) The IDs of the OMIs. -
ImageNames
: (optional) The names of the OMIs, provided when they were created. -
PermissionsToLaunchAccountIds
: (optional) The account IDs which have launch permissions for the OMIs. -
PermissionsToLaunchGlobalPermission
: (optional) If true, lists all public OMIs. If false, lists all private OMIs. -
ProductCodeNames
: (optional) The names of the product codes associated with the OMI. -
ProductCodes
: (optional) The product codes associated with the OMI. -
RootDeviceNames
: (optional) The name of the root device. This value must be /dev/sda1. -
RootDeviceTypes
: (optional) The types of root device used by the OMIs (bsu
orebs
). -
States
: (optional) The states of the OMIs (pending
|available
|failed
). -
TagKeys
: (optional) The keys of the tags associated with the OMIs. -
TagValues
: (optional) The values of the tags associated with the OMIs. -
Tags
: (optional) The key/value combination of the tags associated with the OMIs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. -
VirtualizationTypes
: (optional) The virtualization types (alwayshvm
).
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadImages command returns the following elements:
-
Images
: Information about one or more OMIs.-
AccountAlias
: The account alias of the owner of the OMI. -
AccountId
: The account ID of the owner of the OMI. -
Architecture
: The architecture of the OMI. -
BlockDeviceMappings
: One or more block device mappings.-
Bsu
: Information about the BSU volume to create.-
DeleteOnVmDeletion
: By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. -
Iops
: The number of I/O operations per second (IOPS). This parameter must be specified only if you create anio1
volume. The maximum number of IOPS allowed forio1
volumes is13000
with a maximum performance ratio of 300 IOPS per gibibyte. -
SnapshotId
: The ID of the snapshot used to create the volume. -
VolumeSize
: The size of the volume, in gibibytes (GiB).
If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.
If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one. -
VolumeType
: The type of the volume (standard
|io1
|gp2
). If not specified in the request, astandard
volume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
-
-
DeviceName
: The device name for the volume. For a root device, you must use/dev/sda1
. For other volumes, you must use/dev/sdX
,/dev/sdXX
,/dev/xvdX
, or/dev/xvdXX
(where the firstX
is a letter betweenb
andz
, and the secondX
is a letter betweena
andz
). -
VirtualDeviceName
: The name of the virtual device (ephemeralN
).
-
-
CreationDate
: The date and time (UTC) at which the OMI was created. -
Description
: The description of the OMI. -
FileLocation
: The location from which the OMI files were created. -
ImageId
: The ID of the OMI. -
ImageName
: The name of the OMI. -
ImageType
: The type of the OMI. -
PermissionsToLaunch
: Permissions for the resource.-
AccountIds
: One or more account IDs that the permission is associated with. -
GlobalPermission
: A global permission for all accounts.
(Request) Set this parameter to true to make the resource public (if the parent parameter isAdditions
) or to make the resource private (if the parent parameter isRemovals
).
(Response) If true, the resource is public. If false, the resource is private.
-
-
ProductCodes
: The product codes associated with the OMI. -
RootDeviceName
: The name of the root device. -
RootDeviceType
: The type of root device used by the OMI (alwaysbsu
). -
State
: The state of the OMI (pending
|available
|failed
). -
StateComment
: Information about the change of state.-
StateCode
: The code of the change of state. -
StateMessage
: A message explaining the change of state.
-
-
Tags
: One or more tags associated with the OMI.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Images": [
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": false,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 50,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "123456789012/create-image-example",
"Architecture": "x86_64",
"ImageName": "create-image-example"
}
]
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Images": [
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": true,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 10,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"AccountAlias": "Outscale",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "Outscale/Ubuntu-2010.10.01-0",
"Architecture": "x86_64",
"ImageName": "Ubuntu-2010.10.01-0"
},
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": true,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 10,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"AccountAlias": "Outscale",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "Outscale/RockyLinux-2010.10.01-0",
"Architecture": "x86_64",
"ImageName": "RockyLinux-2010.10.01-0"
}
]
}
Obtenir des informations sur vos OMI avec oapi-cli
À ce jour, cette section est disponible en anglais uniquement. |
The ReadImages command lists one or more OUTSCALE machine images (OMIs) you can use.
$ oapi-cli --profile "default" ReadImages \
--Filters '{
"ImageIds": ["ami-12345678"]
}'
$ oapi-cli --profile "default" ReadImages \
--Filters '{
"AccountAliases": ["Outscale"],
"ImageNames": ["Ubuntu*", "RockyLinux*"]
}'
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. -
Filters
: (optional) One or more filters.-
AccountAliases
: (optional) The account aliases of the owners of the OMIs. -
AccountIds
: (optional) The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch permissions are described. -
Architectures
: (optional) The architectures of the OMIs (i386
|x86_64
). -
BlockDeviceMappingDeleteOnVmDeletion
: (optional) Whether the volumes are deleted or not when terminating the VM. -
BlockDeviceMappingDeviceNames
: (optional) The device names for the volumes. -
BlockDeviceMappingSnapshotIds
: (optional) The IDs of the snapshots used to create the volumes. -
BlockDeviceMappingVolumeSizes
: (optional) The sizes of the volumes, in gibibytes (GiB). -
BlockDeviceMappingVolumeTypes
: (optional) The types of volumes (standard
|gp2
|io1
). -
Descriptions
: (optional) The descriptions of the OMIs, provided when they were created. -
FileLocations
: (optional) The locations of the buckets where the OMI files are stored. -
Hypervisors
: (optional) The hypervisor type of the OMI (alwaysxen
). -
ImageIds
: (optional) The IDs of the OMIs. -
ImageNames
: (optional) The names of the OMIs, provided when they were created. -
PermissionsToLaunchAccountIds
: (optional) The account IDs which have launch permissions for the OMIs. -
PermissionsToLaunchGlobalPermission
: (optional) If true, lists all public OMIs. If false, lists all private OMIs. -
ProductCodeNames
: (optional) The names of the product codes associated with the OMI. -
ProductCodes
: (optional) The product codes associated with the OMI. -
RootDeviceNames
: (optional) The name of the root device. This value must be /dev/sda1. -
RootDeviceTypes
: (optional) The types of root device used by the OMIs (bsu
orebs
). -
States
: (optional) The states of the OMIs (pending
|available
|failed
). -
TagKeys
: (optional) The keys of the tags associated with the OMIs. -
TagValues
: (optional) The values of the tags associated with the OMIs. -
Tags
: (optional) The key/value combination of the tags associated with the OMIs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. -
VirtualizationTypes
: (optional) The virtualization types (alwayshvm
).
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadImages command returns the following elements:
-
Images
: Information about one or more OMIs.-
AccountAlias
: The account alias of the owner of the OMI. -
AccountId
: The account ID of the owner of the OMI. -
Architecture
: The architecture of the OMI. -
BlockDeviceMappings
: One or more block device mappings.-
Bsu
: Information about the BSU volume to create.-
DeleteOnVmDeletion
: By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. -
Iops
: The number of I/O operations per second (IOPS). This parameter must be specified only if you create anio1
volume. The maximum number of IOPS allowed forio1
volumes is13000
with a maximum performance ratio of 300 IOPS per gibibyte. -
SnapshotId
: The ID of the snapshot used to create the volume. -
VolumeSize
: The size of the volume, in gibibytes (GiB).
If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.
If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one. -
VolumeType
: The type of the volume (standard
|io1
|gp2
). If not specified in the request, astandard
volume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
-
-
DeviceName
: The device name for the volume. For a root device, you must use/dev/sda1
. For other volumes, you must use/dev/sdX
,/dev/sdXX
,/dev/xvdX
, or/dev/xvdXX
(where the firstX
is a letter betweenb
andz
, and the secondX
is a letter betweena
andz
). -
VirtualDeviceName
: The name of the virtual device (ephemeralN
).
-
-
CreationDate
: The date and time (UTC) at which the OMI was created. -
Description
: The description of the OMI. -
FileLocation
: The location from which the OMI files were created. -
ImageId
: The ID of the OMI. -
ImageName
: The name of the OMI. -
ImageType
: The type of the OMI. -
PermissionsToLaunch
: Permissions for the resource.-
AccountIds
: One or more account IDs that the permission is associated with. -
GlobalPermission
: A global permission for all accounts.
(Request) Set this parameter to true to make the resource public (if the parent parameter isAdditions
) or to make the resource private (if the parent parameter isRemovals
).
(Response) If true, the resource is public. If false, the resource is private.
-
-
ProductCodes
: The product codes associated with the OMI. -
RootDeviceName
: The name of the root device. -
RootDeviceType
: The type of root device used by the OMI (alwaysbsu
). -
State
: The state of the OMI (pending
|available
|failed
). -
StateComment
: Information about the change of state.-
StateCode
: The code of the change of state. -
StateMessage
: A message explaining the change of state.
-
-
Tags
: One or more tags associated with the OMI.-
Key
: The key of the tag, with a minimum of 1 character. -
Value
: The value of the tag, between 0 and 255 characters.
-
-
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Images": [
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": false,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 50,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "123456789012/create-image-example",
"Architecture": "x86_64",
"ImageName": "create-image-example"
}
]
}
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"Images": [
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": true,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 10,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"AccountAlias": "Outscale",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "Outscale/Ubuntu-2010.10.01-0",
"Architecture": "x86_64",
"ImageName": "Ubuntu-2010.10.01-0"
},
{
"StateComment": {},
"State": "available",
"RootDeviceType": "bsu",
"RootDeviceName": "/dev/sda1",
"ProductCodes": [
"0001"
],
"PermissionsToLaunch": {
"GlobalPermission": true,
"AccountIds": []
},
"AccountId": "123456789012",
"Tags": [],
"Description": "",
"ImageId": "ami-12345678",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Bsu": {
"VolumeType": "standard",
"DeleteOnVmDeletion": true,
"VolumeSize": 10,
"SnapshotId": "snap-12345678"
}
}
],
"ImageType": "machine",
"AccountAlias": "Outscale",
"CreationDate": "2010-10-01T12:34:56.789Z",
"FileLocation": "Outscale/RockyLinux-2010.10.01-0",
"Architecture": "x86_64",
"ImageName": "RockyLinux-2010.10.01-0"
}
]
}
Obtenir des informations sur vos OMI avec AWS CLI
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Obtenir des informations générales sur vos OMI
Pour obtenir des informations générales sur une ou plusieurs OMI, utilisez la commande describe-images en suivant cette syntaxe :
$ aws ec2 describe-images \
--profile YOUR_PROFILE \
--image-ids ami-12345678 ami-87654321 ami-56781234 \
--owners 1234567890000 \
--executable-users 0000987654321 \
--filters Name=X,Values=Y \
--endpoint https://fcu.eu-west-2.outscale.com
Cette commande contient les attributs suivants 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. -
image-ids
: Un ou plusieurs ID d’OMI.Si vous ne spécifiez aucun ID d’OMI, toutes vos OMI ou toutes vos OMI en accord avec les filtres spécifiés (s’il y en a) sont décrites.
-
(optionnel)
owners
: L’ID de compte d’un ou plusieurs propriétaires d’OMI. Par défaut, toutes les OMI pour lesquelles vous avez une autorisation d’utilisation sont décrites. -
(optionnel)
executable-users
: Les ID de comptes autorisés à utiliser les OMI. -
(optionnel)
filters
: Un ou plusieurs filtres, au format "Name=X,Values=Y".Vous pouvez spécifier plusieurs valeurs pour un même filtre en utilisant le format "Name=X,Values=Y, Z".
Les filtres suivants sont disponibles :
-
architecture
: L’architecture de l’OMI (i386
oux86_64
). -
block-device-mapping.delete-on-termination
: Indique si le volume BSU est supprimé quand l’instance est terminée. -
block-device-mapping.device-name
: Le nom du périphérique pour le volume BSU (au format/dev/sdX
,/dev/sdXX
,/dev/xvdX
, ou/dev/xvdXX
). -
block-device-mapping.snapshot-id
: L’ID du snapshot utilisé pour créer le volume. -
block-device-mapping.volume-size
: La taille du volume, en gibioctets (Gio). -
block-device-mapping.volume-type
: Le type de volume (standard
|gp2
|io1
). -
description
: La description de l’OMI, fournie lors de sa création. -
hypervisor
: Le type d’hyperviseur de l’instance (toujoursxen
). -
image-id
: L’ID de l’OMI. -
image-type
: Le type d’OMI (toujoursmachine
pour les OMI officielles). -
is-public
: Indique si l’OMI est publique. -
manifest-location
: L’emplacement du manifeste OMI. -
name
: Le nom de l’OMI, fourni lors de sa création. -
owner-alias
: L’alias du compte du propriétaire de l’OMI. -
owner-id
: L’ID de compte du propriétaire de l’OMI. -
platform
: La plateforme. -
product-code.type
: Le type de code produit associé à l’OMI.Une fois associé à une OMI, un code produit ne peut pas être enlevé.
-
root-device-name
: Le nom du périphérique pour le volume système (par exemple, /dev/sda1). -
root-device-type
: Le type de volume système utilisé par l’OMI (toujoursebs)
. -
state
: L’état actuel de l’OMI (pending
|available
|failed
). -
tag:key=value
: La combinaison clé/valeur d’un tag associé à la ressource, au format suivant :Filter=[{'Name':'tag:tag_key','Value':'tag_value'}]
. -
tag-key
: La clé d’un tag associé à la ressource. Vous pouvez utiliser ce filtre avec le filtretag-value
. Dans ce cas, vous filtrez les ressources correspondant à chaque tag, indépendamment de l’autre filtre. -
tag-value
: La valeur d’un tag associé à la ressource. Vous pouvez utiliser ce filtre avec le filtretag-key
. Dans ce cas, vous filtrez les ressources correspondant à chaque tag, indépendamment de l’autre filtre.
-
tag-key
: La clé d’un tag associé à la ressource. -
tag-value
: La valeur d’un tag associé à la ressource. -
tag:XXXX
: La valeur d’un tag associé à la ressource, oùXXXX
est la clé du tag.Pour filtrer un tag dont la clé est
XXXX
et la valeur estYYYY
, vous pouvez donc utiliser un des deux formats suivants :-
--filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY
-
--filters Name=tag:XXXX,Values=YYYY
-
-
virtualization-type
: Le type de virtualisation de l’instance (toujourshvm
).
-
-
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 describe-images renvoie les éléments suivants :
-
Images
: Informations à propos d’une ou plusieurs OMI. Cet élément contient les informations suivantes :-
VirtualizationType
: Le type de virtualisation de l’instance (toujourshvm
). -
Name
: Le nom de l’OMI. -
Hypervisor
: Le type d’hyperviseur de l’instance (toujoursxen
). -
ImageId
: L’ID de l’OMI. -
Platform
: Pas d’information renvoyée. -
State
: L’état actuel de l’OMI. -
BlockDeviceMappings
: Un ou plusieurs block device mappings. Pour en savoir plus, voir Définir des block device mappings. -
Architecture
: L’architecture de l’OMI. -
ImageLocation
: Le chemin de l’OMI. -
RootDeviceType
: Le type de volume système (toujoursebs
). -
OwnerId
: L’ID de compte du propriétaire de l’OMI. -
RootDeviceName
: Le nom du périphérique pour le volume système de l’instance. -
Public
: Indique si l’OMI est publique. -
ImageType
: Le type d’OMI (toujoursmachine
pour les OMI officielles). -
Description
: La description de l’OMI, s’il y en a une.
-
{
"Images": [
{
"VirtualizationType": "hvm",
"Name": "Image_name",
"Hypervisor": "xen",
"ImageId": "ami-12345678",
"Platform": "",
"State": "available",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"SnapshotId": "snap-87654321",
"VolumeSize": 8,
"VolumeType": "standard"
}
}
],
"Architecture": "x86_64",
"ImageLocation": "1234567890000/Image_name",
"RootDeviceType": "ebs",
"OwnerId": "1234567890000",
"RootDeviceName": "/dev/sda1",
"Public": false,
"ImageType": "machine",
"Description": "CentOS 7 with HAProxy installed and NAT configured"
}]
}
Obtenir des informations sur un attribut d’une OMI
Vous pouvez obtenir des informations sur la liste des comptes qui ont les permissions pour créer une instance à partir de l’OMI spécifiée. Vous pouvez modifier ces permissions à tout moment. Pour en savoir plus, voir Modifier les attributs d’une OMI.
Pour obtenir des informations sur les comptes qui ont les permissions d’utiliser une OMI depuis Cockpit, vous devez utiliser la commande Autorisations. Pour en savoir plus, voir Modifier les attributs d’une OMI. |
Pour obtenir des informations sur un attribut d’une OMI, utilisez la commande describe-image-attribute en suivant cette syntaxe :
$ aws ec2 describe-image-attribute \
--profile YOUR_PROFILE \
--image-id ami-12345678 \
--attribute launchPermission \
--endpoint https://fcu.eu-west-2.outscale.com
Cette commande contient les attributs suivants 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. -
image-id
: L’ID de l’OMI. -
attribute
: L’attribut de l’OMI (description
|kernel
|launchPermission
|productCodes
). -
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 describe-images renvoie les éléments suivants :
-
La valeur de l’attribut (ici,
LaunchPermission
). -
ImageId
: L’ID de l’OMI.
{
"LaunchPermissions": [
{
"UserId": "12345679890000"
},
{
"UserId": "0000987654321"
}
],
"ImageId": "ami-123456789"
}
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.