Interface ModifyImageAttributeRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<ModifyImageAttributeRequest.Builder,
,ModifyImageAttributeRequest> Ec2Request.Builder
,SdkBuilder<ModifyImageAttributeRequest.Builder,
,ModifyImageAttributeRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
ModifyImageAttributeRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the attribute to modify.description
(Consumer<AttributeValue.Builder> description) A new description for the AMI.description
(AttributeValue description) A new description for the AMI.Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.The ID of the AMI.imdsSupport
(Consumer<AttributeValue.Builder> imdsSupport) Set tov2.0
to indicate that IMDSv2 is specified in the AMI.imdsSupport
(AttributeValue imdsSupport) Set tov2.0
to indicate that IMDSv2 is specified in the AMI.launchPermission
(Consumer<LaunchPermissionModifications.Builder> launchPermission) A new launch permission for the AMI.launchPermission
(LaunchPermissionModifications launchPermission) A new launch permission for the AMI.operationType
(String operationType) The operation type.operationType
(OperationType operationType) The operation type.organizationalUnitArns
(String... organizationalUnitArns) The Amazon Resource Name (ARN) of an organizational unit (OU).organizationalUnitArns
(Collection<String> organizationalUnitArns) The Amazon Resource Name (ARN) of an organizational unit (OU).organizationArns
(String... organizationArns) The Amazon Resource Name (ARN) of an organization.organizationArns
(Collection<String> organizationArns) The Amazon Resource Name (ARN) of an organization.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.productCodes
(String... productCodes) Not supported.productCodes
(Collection<String> productCodes) Not supported.userGroups
(String... userGroups) The user groups.userGroups
(Collection<String> userGroups) The user groups.The Amazon Web Services account IDs.userIds
(Collection<String> userIds) The Amazon Web Services account IDs.The value of the attribute being modified.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.ec2.model.Ec2Request.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
attribute
The name of the attribute to modify.
Valid values:
description
|imdsSupport
|launchPermission
- Parameters:
attribute
- The name of the attribute to modify.Valid values:
description
|imdsSupport
|launchPermission
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
A new description for the AMI.
- Parameters:
description
- A new description for the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
default ModifyImageAttributeRequest.Builder description(Consumer<AttributeValue.Builder> description) A new description for the AMI.
This is a convenience method that creates an instance of theAttributeValue.Builder
avoiding the need to create one manually viaAttributeValue.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todescription(AttributeValue)
.- Parameters:
description
- a consumer that will call methods onAttributeValue.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
imageId
The ID of the AMI.
- Parameters:
imageId
- The ID of the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchPermission
ModifyImageAttributeRequest.Builder launchPermission(LaunchPermissionModifications launchPermission) A new launch permission for the AMI.
- Parameters:
launchPermission
- A new launch permission for the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchPermission
default ModifyImageAttributeRequest.Builder launchPermission(Consumer<LaunchPermissionModifications.Builder> launchPermission) A new launch permission for the AMI.
This is a convenience method that creates an instance of theLaunchPermissionModifications.Builder
avoiding the need to create one manually viaLaunchPermissionModifications.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tolaunchPermission(LaunchPermissionModifications)
.- Parameters:
launchPermission
- a consumer that will call methods onLaunchPermissionModifications.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
operationType
The operation type. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
operationType
- The operation type. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
operationType
The operation type. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
operationType
- The operation type. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
productCodes
Not supported.
- Parameters:
productCodes
- Not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
Not supported.
- Parameters:
productCodes
- Not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userGroups
The user groups. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
userGroups
- The user groups. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userGroups
The user groups. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
userGroups
- The user groups. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIds
The Amazon Web Services account IDs. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
userIds
- The Amazon Web Services account IDs. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIds
The Amazon Web Services account IDs. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
userIds
- The Amazon Web Services account IDs. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
value
The value of the attribute being modified. This parameter can be used only when the
Attribute
parameter isdescription
orimdsSupport
.- Parameters:
value
- The value of the attribute being modified. This parameter can be used only when theAttribute
parameter isdescription
orimdsSupport
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dryRun
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
.- Parameters:
dryRun
- 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 isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationArns
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
organizationArns
- The Amazon Resource Name (ARN) of an organization. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationArns
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
organizationArns
- The Amazon Resource Name (ARN) of an organization. This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationalUnitArns
ModifyImageAttributeRequest.Builder organizationalUnitArns(Collection<String> organizationalUnitArns) The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
organizationalUnitArns
- The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationalUnitArns
The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
Attribute
parameter islaunchPermission
.- Parameters:
organizationalUnitArns
- The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when theAttribute
parameter islaunchPermission
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imdsSupport
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.- Parameters:
imdsSupport
- Set tov2.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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imdsSupport
default ModifyImageAttributeRequest.Builder imdsSupport(Consumer<AttributeValue.Builder> imdsSupport) 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.AttributeValue.Builder
avoiding the need to create one manually viaAttributeValue.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toimdsSupport(AttributeValue)
.- Parameters:
imdsSupport
- a consumer that will call methods onAttributeValue.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
ModifyImageAttributeRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
ModifyImageAttributeRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-