Interface ModifyImageAttributeRequest.Builder

    • 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.
      • 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.
      • operationType

        ModifyImageAttributeRequest.Builder operationType​(String operationType)

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

        Parameters:
        operationType - The operation type. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        operationType - The operation type. This parameter can be used only when the Attribute parameter is launchPermission.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        OperationType, OperationType
      • 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 Attribute parameter is launchPermission.

        Parameters:
        userGroups - The user groups. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        userGroups - The user groups. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        userIds - The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is description or imdsSupport.

        Parameters:
        value - The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description or imdsSupport.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • 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 is UnauthorizedOperation.

        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 is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        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 Attribute parameter is launchPermission.

        Parameters:
        organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        organizationArns - The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.
        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 is launchPermission.

        Parameters:
        organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.
        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 Attribute parameter is launchPermission.

        Parameters:
        organizationalUnitArns - The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • imdsSupport

        ModifyImageAttributeRequest.Builder imdsSupport​(AttributeValue imdsSupport)

        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.

        Parameters:
        imdsSupport - 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.

        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 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.

        This is a convenience method that creates an instance of the AttributeValue.Builder avoiding the need to create one manually via AttributeValue.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to imdsSupport(AttributeValue).

        Parameters:
        imdsSupport - a consumer that will call methods on AttributeValue.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        imdsSupport(AttributeValue)