Skip to content

ModifyImageAttributeRequest

Source code in docs_src/capo_ec2/types/modify_image_attribute_request.py
class ModifyImageAttributeRequest(TypedDict, closed=True):
    attribute: NotRequired["capo_ec2.types.string.String"]
    """<p>The name of the attribute to modify.</p> <p>Valid values: <code>description</code> | <code>imdsSupport</code> | <code>launchPermission</code> </p>"""
    description: NotRequired["capo_ec2.types.attribute_value.AttributeValue"]
    """<p>A new description for the AMI.</p>"""
    image_id: NotRequired["capo_ec2.types.image_id.ImageId"]
    """<p>The ID of the AMI.</p>"""
    launch_permission: NotRequired[
        "capo_ec2.types.launch_permission_modifications.LaunchPermissionModifications"
    ]
    """<p>A new launch permission for the AMI.</p>"""
    operation_type: NotRequired["capo_ec2.types.operation_type.OperationType"]
    """<p>The operation type. This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>"""
    product_codes: NotRequired[
        "capo_ec2.types.product_code_string_list.ProductCodeStringList"
    ]
    """<p>Not supported.</p>"""
    user_groups: NotRequired[
        "capo_ec2.types.user_group_string_list.UserGroupStringList"
    ]
    """<p>The user groups. This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>"""
    user_ids: NotRequired["capo_ec2.types.user_id_string_list.UserIdStringList"]
    """<p>The Amazon Web Services account IDs. This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>"""
    value: NotRequired["capo_ec2.types.string.String"]
    """<p>The value of the attribute being modified. This parameter can be used only when the <code>Attribute</code> parameter is <code>description</code> or <code>imdsSupport</code>.</p>"""
    organization_arns: NotRequired[
        "capo_ec2.types.organization_arn_string_list.OrganizationArnStringList"
    ]
    """<p>The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>"""
    organizational_unit_arns: NotRequired[
        "capo_ec2.types.organizational_unit_arn_string_list.OrganizationalUnitArnStringList"
    ]
    """<p>The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the <code>Attribute</code> parameter is <code>launchPermission</code>.</p>"""
    imds_support: NotRequired["capo_ec2.types.attribute_value.AttributeValue"]
    """<p>Set to <code>v2.0</code> to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p> <important> <p>Do not use this parameter unless your AMI software supports IMDSv2. After you set the value to <code>v2.0</code>, you can't undo it. The only way to “reset” your AMI is to create a new AMI from the underlying snapshot.</p> </important>"""
    dry_run: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"""

attribute instance-attribute

attribute: NotRequired[String]

The name of the attribute to modify.

Valid values: description | imdsSupport | launchPermission

description instance-attribute

description: NotRequired[AttributeValue]

A new description for the AMI.

dry_run instance-attribute

dry_run: NotRequired[Boolean]

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.

image_id instance-attribute

image_id: NotRequired[ImageId]

The ID of the AMI.

imds_support instance-attribute

imds_support: NotRequired[AttributeValue]

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.

launch_permission instance-attribute

launch_permission: NotRequired[LaunchPermissionModifications]

A new launch permission for the AMI.

operation_type instance-attribute

operation_type: NotRequired[OperationType]

The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

organization_arns instance-attribute

organization_arns: NotRequired[OrganizationArnStringList]

The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

organizational_unit_arns instance-attribute

organizational_unit_arns: NotRequired[OrganizationalUnitArnStringList]

The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

product_codes instance-attribute

product_codes: NotRequired[ProductCodeStringList]

Not supported.

user_groups instance-attribute

user_groups: NotRequired[UserGroupStringList]

The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

user_ids instance-attribute

user_ids: NotRequired[UserIdStringList]

The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

value instance-attribute

value: NotRequired[String]

The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description or imdsSupport.