Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
See https://www.paws-r-sdk.com/docs/ec2_modify_image_attribute/ for full documentation.
ec2_modify_image_attribute(
Attribute = NULL,
Description = NULL,
ImageId,
LaunchPermission = NULL,
OperationType = NULL,
ProductCodes = NULL,
UserGroups = NULL,
UserIds = NULL,
Value = NULL,
DryRun = NULL,
OrganizationArns = NULL,
OrganizationalUnitArns = NULL,
ImdsSupport = NULL
)
The name of the attribute to modify.
Valid values: description
| imdsSupport
| launchPermission
A new description for the AMI.
[required] The ID of the AMI.
A new launch permission for the AMI.
The operation type. This parameter can be used only when the Attribute
parameter is launchPermission
.
Not supported.
The user groups. This parameter can be used only when the Attribute
parameter is launchPermission
.
The Amazon Web Services account IDs. This parameter can be used only
when the Attribute
parameter is launchPermission
.
The value of the attribute being modified. This parameter can be used
only when the Attribute
parameter is description
or imdsSupport
.
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 is UnauthorizedOperation
.
The Amazon Resource Name (ARN) of an organization. This parameter can be
used only when the Attribute
parameter is launchPermission
.
The Amazon Resource Name (ARN) of an organizational unit (OU). This
parameter can be used only when the Attribute
parameter is
launchPermission
.
Set to v2.0
to indicate that IMDSv2 is specified in the AMI. Instances
launched from this AMI will have HttpTokens
automatically set to
required
so that, by default, the instance requires that IMDSv2 is
used when requesting instance metadata. In addition,
HttpPutResponseHopLimit
is set to 2
. 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.