#[non_exhaustive]pub struct ModifyImageAttributeInput {Show 13 fields
pub attribute: Option<String>,
pub description: Option<AttributeValue>,
pub image_id: Option<String>,
pub launch_permission: Option<LaunchPermissionModifications>,
pub operation_type: Option<OperationType>,
pub product_codes: Option<Vec<String>>,
pub user_groups: Option<Vec<String>>,
pub user_ids: Option<Vec<String>>,
pub value: Option<String>,
pub dry_run: Option<bool>,
pub organization_arns: Option<Vec<String>>,
pub organizational_unit_arns: Option<Vec<String>>,
pub imds_support: Option<AttributeValue>,
}
Expand description
Contains the parameters for ModifyImageAttribute.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.attribute: Option<String>
The name of the attribute to modify.
Valid values: description
| imdsSupport
| launchPermission
description: Option<AttributeValue>
A new description for the AMI.
image_id: Option<String>
The ID of the AMI.
launch_permission: Option<LaunchPermissionModifications>
A new launch permission for the AMI.
operation_type: Option<OperationType>
The operation type. This parameter can be used only when the Attribute
parameter is launchPermission
.
product_codes: Option<Vec<String>>
Not supported.
user_groups: Option<Vec<String>>
The user groups. This parameter can be used only when the Attribute
parameter is launchPermission
.
user_ids: Option<Vec<String>>
The Amazon Web Services account IDs. This parameter can be used only when the Attribute
parameter is launchPermission
.
value: Option<String>
The value of the attribute being modified. This parameter can be used only when the Attribute
parameter is description
or imdsSupport
.
dry_run: Option<bool>
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
.
organization_arns: Option<Vec<String>>
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute
parameter is launchPermission
.
organizational_unit_arns: Option<Vec<String>>
The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute
parameter is launchPermission
.
imds_support: Option<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.
Implementations§
source§impl ModifyImageAttributeInput
impl ModifyImageAttributeInput
sourcepub fn attribute(&self) -> Option<&str>
pub fn attribute(&self) -> Option<&str>
The name of the attribute to modify.
Valid values: description
| imdsSupport
| launchPermission
sourcepub fn description(&self) -> Option<&AttributeValue>
pub fn description(&self) -> Option<&AttributeValue>
A new description for the AMI.
sourcepub fn launch_permission(&self) -> Option<&LaunchPermissionModifications>
pub fn launch_permission(&self) -> Option<&LaunchPermissionModifications>
A new launch permission for the AMI.
sourcepub fn operation_type(&self) -> Option<&OperationType>
pub fn operation_type(&self) -> Option<&OperationType>
The operation type. This parameter can be used only when the Attribute
parameter is launchPermission
.
sourcepub fn product_codes(&self) -> Option<&[String]>
pub fn product_codes(&self) -> Option<&[String]>
Not supported.
sourcepub fn user_groups(&self) -> Option<&[String]>
pub fn user_groups(&self) -> Option<&[String]>
The user groups. This parameter can be used only when the Attribute
parameter is launchPermission
.
sourcepub fn user_ids(&self) -> Option<&[String]>
pub fn user_ids(&self) -> Option<&[String]>
The Amazon Web Services account IDs. This parameter can be used only when the Attribute
parameter is launchPermission
.
sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
The value of the attribute being modified. This parameter can be used only when the Attribute
parameter is description
or imdsSupport
.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
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
.
sourcepub fn organization_arns(&self) -> Option<&[String]>
pub fn organization_arns(&self) -> Option<&[String]>
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute
parameter is launchPermission
.
sourcepub fn organizational_unit_arns(&self) -> Option<&[String]>
pub fn organizational_unit_arns(&self) -> Option<&[String]>
The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute
parameter is launchPermission
.
sourcepub fn imds_support(&self) -> Option<&AttributeValue>
pub fn imds_support(&self) -> Option<&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.
source§impl ModifyImageAttributeInput
impl ModifyImageAttributeInput
sourcepub fn builder() -> ModifyImageAttributeInputBuilder
pub fn builder() -> ModifyImageAttributeInputBuilder
Creates a new builder-style object to manufacture ModifyImageAttributeInput
.
Trait Implementations§
source§impl Clone for ModifyImageAttributeInput
impl Clone for ModifyImageAttributeInput
source§fn clone(&self) -> ModifyImageAttributeInput
fn clone(&self) -> ModifyImageAttributeInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ModifyImageAttributeInput
impl Debug for ModifyImageAttributeInput
source§impl PartialEq<ModifyImageAttributeInput> for ModifyImageAttributeInput
impl PartialEq<ModifyImageAttributeInput> for ModifyImageAttributeInput
source§fn eq(&self, other: &ModifyImageAttributeInput) -> bool
fn eq(&self, other: &ModifyImageAttributeInput) -> bool
self
and other
values to be equal, and is used
by ==
.