Interface ModifyImageAttributeRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<ModifyImageAttributeRequest.Builder,ModifyImageAttributeRequest>,Ec2Request.Builder,SdkBuilder<ModifyImageAttributeRequest.Builder,ModifyImageAttributeRequest>,SdkPojo,SdkRequest.Builder
- Enclosing class:
- ModifyImageAttributeRequest
@Mutable @NotThreadSafe public static interface ModifyImageAttributeRequest.Builder extends Ec2Request.Builder, SdkPojo, CopyableBuilder<ModifyImageAttributeRequest.Builder,ModifyImageAttributeRequest>
-
-
Method Summary
-
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, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
attribute
ModifyImageAttributeRequest.Builder attribute(String 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
ModifyImageAttributeRequest.Builder description(AttributeValue 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.Builderavoiding the need to create one manually viaAttributeValue.builder().When the
Consumercompletes,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:
description(AttributeValue)
-
imageId
ModifyImageAttributeRequest.Builder imageId(String 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.Builderavoiding the need to create one manually viaLaunchPermissionModifications.builder().When the
Consumercompletes,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:
launchPermission(LaunchPermissionModifications)
-
operationType
ModifyImageAttributeRequest.Builder operationType(String operationType)
The operation type. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
operationType- The operation type. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OperationType,OperationType
-
operationType
ModifyImageAttributeRequest.Builder operationType(OperationType operationType)
The operation type. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
operationType- The operation type. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OperationType,OperationType
-
productCodes
ModifyImageAttributeRequest.Builder productCodes(Collection<String> productCodes)
Not supported.
- Parameters:
productCodes- Not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
ModifyImageAttributeRequest.Builder productCodes(String... productCodes)
Not supported.
- Parameters:
productCodes- Not supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userGroups
ModifyImageAttributeRequest.Builder userGroups(Collection<String> userGroups)
The user groups. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
userGroups- The user groups. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userGroups
ModifyImageAttributeRequest.Builder userGroups(String... userGroups)
The user groups. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
userGroups- The user groups. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIds
ModifyImageAttributeRequest.Builder userIds(Collection<String> userIds)
The Amazon Web Services account IDs. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
userIds- The Amazon Web Services account IDs. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIds
ModifyImageAttributeRequest.Builder userIds(String... userIds)
The Amazon Web Services account IDs. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
userIds- The Amazon Web Services account IDs. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
value
ModifyImageAttributeRequest.Builder value(String value)
The value of the attribute being modified. This parameter can be used only when the
Attributeparameter isdescriptionorimdsSupport.- Parameters:
value- The value of the attribute being modified. This parameter can be used only when theAttributeparameter isdescriptionorimdsSupport.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationArns
ModifyImageAttributeRequest.Builder organizationArns(Collection<String> organizationArns)
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
organizationArns- The Amazon Resource Name (ARN) of an organization. This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationArns
ModifyImageAttributeRequest.Builder organizationArns(String... organizationArns)
The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
organizationArns- The Amazon Resource Name (ARN) of an organization. This parameter can be used only when theAttributeparameter 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
Attributeparameter islaunchPermission.- Parameters:
organizationalUnitArns- The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
organizationalUnitArns
ModifyImageAttributeRequest.Builder organizationalUnitArns(String... organizationalUnitArns)
The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the
Attributeparameter islaunchPermission.- Parameters:
organizationalUnitArns- The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when theAttributeparameter islaunchPermission.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imdsSupport
ModifyImageAttributeRequest.Builder imdsSupport(AttributeValue imdsSupport)
Set to
v2.0to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis 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.0to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis 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.0to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will haveHttpTokensautomatically set torequiredso that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition,HttpPutResponseHopLimitis set to2. For more information, see Configure the AMI in the Amazon EC2 User Guide. This is a convenience method that creates an instance of theDo 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.Builderavoiding the need to create one manually viaAttributeValue.builder().When the
Consumercompletes,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:
imdsSupport(AttributeValue)
-
dryRun
ModifyImageAttributeRequest.Builder dryRun(Boolean 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.
-
overrideConfiguration
ModifyImageAttributeRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
overrideConfiguration
ModifyImageAttributeRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
-