/AWS1/CL_EC2=>MODIFYIMAGEATTRIBUTE()
¶
About ModifyImageAttribute¶
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
To specify the attribute, you can use the Attribute
parameter, or one of the following parameters:
Description
, ImdsSupport
, or LaunchPermission
.
Images with an Amazon Web Services Marketplace product code cannot be made public.
To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.
Method Signature¶
IMPORTING¶
Required arguments:¶
IV_IMAGEID
TYPE /AWS1/EC2IMAGEID
/AWS1/EC2IMAGEID
¶
The ID of the AMI.
Optional arguments:¶
IV_ATTRIBUTE
TYPE /AWS1/EC2STRING
/AWS1/EC2STRING
¶
The name of the attribute to modify.
Valid values:
description
|imdsSupport
|launchPermission
IO_DESCRIPTION
TYPE REF TO /AWS1/CL_EC2ATTRIBUTEVALUE
/AWS1/CL_EC2ATTRIBUTEVALUE
¶
A new description for the AMI.
IO_LAUNCHPERMISSION
TYPE REF TO /AWS1/CL_EC2LAUNCHPERMMODS
/AWS1/CL_EC2LAUNCHPERMMODS
¶
A new launch permission for the AMI.
IV_OPERATIONTYPE
TYPE /AWS1/EC2OPERATIONTYPE
/AWS1/EC2OPERATIONTYPE
¶
The operation type. This parameter can be used only when the
Attribute
parameter islaunchPermission
.
IT_PRODUCTCODES
TYPE /AWS1/CL_EC2PRODUCTCODESTRLS00=>TT_PRODUCTCODESTRINGLIST
TT_PRODUCTCODESTRINGLIST
¶
Not supported.
IT_USERGROUPS
TYPE /AWS1/CL_EC2USERGROUPSTRLIST_W=>TT_USERGROUPSTRINGLIST
TT_USERGROUPSTRINGLIST
¶
The user groups. This parameter can be used only when the
Attribute
parameter islaunchPermission
.
IT_USERIDS
TYPE /AWS1/CL_EC2USERIDSTRINGLIST_W=>TT_USERIDSTRINGLIST
TT_USERIDSTRINGLIST
¶
The Amazon Web Services account IDs. This parameter can be used only when the
Attribute
parameter islaunchPermission
.
IV_VALUE
TYPE /AWS1/EC2STRING
/AWS1/EC2STRING
¶
The value of the attribute being modified. This parameter can be used only when the
Attribute
parameter isdescription
orimdsSupport
.
IV_DRYRUN
TYPE /AWS1/EC2BOOLEAN
/AWS1/EC2BOOLEAN
¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
IT_ORGANIZATIONARNS
TYPE /AWS1/CL_EC2ORGARNSTRINGLIST_W=>TT_ORGANIZATIONARNSTRINGLIST
TT_ORGANIZATIONARNSTRINGLIST
¶
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
Attribute
parameter islaunchPermission
.
IT_ORGANIZATIONALUNITARNS
TYPE /AWS1/CL_EC2ORGALUNITARNSTRL00=>TT_ORGALUNITARNSTRINGLIST
TT_ORGALUNITARNSTRINGLIST
¶
The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
Attribute
parameter islaunchPermission
.
IO_IMDSSUPPORT
TYPE REF TO /AWS1/CL_EC2ATTRIBUTEVALUE
/AWS1/CL_EC2ATTRIBUTEVALUE
¶
Set to
v2.0
to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokens
automatically set torequired
so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimit
is set to2
. For more information, see Configure the AMI in the Amazon EC2 User Guide.Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to
v2.0
, you can't undo it. The only way to “reset” your AMI is to create a new AMI from the underlying snapshot.