Interface CreateRuleRequest.Builder

  • Method Details

    • retentionPeriod

      CreateRuleRequest.Builder retentionPeriod(RetentionPeriod retentionPeriod)

      Information about the retention period for which the retention rule is to retain resources.

      Parameters:
      retentionPeriod - Information about the retention period for which the retention rule is to retain resources.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • retentionPeriod

      default CreateRuleRequest.Builder retentionPeriod(Consumer<RetentionPeriod.Builder> retentionPeriod)

      Information about the retention period for which the retention rule is to retain resources.

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

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

      Parameters:
      retentionPeriod - a consumer that will call methods on RetentionPeriod.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • description

      CreateRuleRequest.Builder description(String description)

      The retention rule description.

      Parameters:
      description - The retention rule description.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Information about the tags to assign to the retention rule.

      Parameters:
      tags - Information about the tags to assign to the retention rule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Information about the tags to assign to the retention rule.

      Parameters:
      tags - Information about the tags to assign to the retention rule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Information about the tags to assign to the retention rule.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • resourceType

      CreateRuleRequest.Builder resourceType(String resourceType)

      The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To retain EBS-backed AMIs, specify EC2_IMAGE.

      Parameters:
      resourceType - The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To retain EBS-backed AMIs, specify EC2_IMAGE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • resourceType

      CreateRuleRequest.Builder resourceType(ResourceType resourceType)

      The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To retain EBS-backed AMIs, specify EC2_IMAGE.

      Parameters:
      resourceType - The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To retain EBS-backed AMIs, specify EC2_IMAGE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • resourceTags

      CreateRuleRequest.Builder resourceTags(Collection<ResourceTag> resourceTags)

      [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

      You can add the same tag key and value pair to a maximum or five retention rules.

      To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

      Parameters:
      resourceTags - [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

      You can add the same tag key and value pair to a maximum or five retention rules.

      To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceTags

      CreateRuleRequest.Builder resourceTags(ResourceTag... resourceTags)

      [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

      You can add the same tag key and value pair to a maximum or five retention rules.

      To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

      Parameters:
      resourceTags - [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

      You can add the same tag key and value pair to a maximum or five retention rules.

      To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • resourceTags

      CreateRuleRequest.Builder resourceTags(Consumer<ResourceTag.Builder>... resourceTags)

      [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

      You can add the same tag key and value pair to a maximum or five retention rules.

      To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to resourceTags(List<ResourceTag>).

      Parameters:
      resourceTags - a consumer that will call methods on ResourceTag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • lockConfiguration

      CreateRuleRequest.Builder lockConfiguration(LockConfiguration lockConfiguration)

      Information about the retention rule lock configuration.

      Parameters:
      lockConfiguration - Information about the retention rule lock configuration.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lockConfiguration

      default CreateRuleRequest.Builder lockConfiguration(Consumer<LockConfiguration.Builder> lockConfiguration)

      Information about the retention rule lock configuration.

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

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

      Parameters:
      lockConfiguration - a consumer that will call methods on LockConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • excludeResourceTags

      CreateRuleRequest.Builder excludeResourceTags(Collection<ResourceTag> excludeResourceTags)

      [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.

      You can't specify exclusion tags for tag-level retention rules.

      Parameters:
      excludeResourceTags - [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.

      You can't specify exclusion tags for tag-level retention rules.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • excludeResourceTags

      CreateRuleRequest.Builder excludeResourceTags(ResourceTag... excludeResourceTags)

      [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.

      You can't specify exclusion tags for tag-level retention rules.

      Parameters:
      excludeResourceTags - [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.

      You can't specify exclusion tags for tag-level retention rules.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • excludeResourceTags

      CreateRuleRequest.Builder excludeResourceTags(Consumer<ResourceTag.Builder>... excludeResourceTags)

      [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.

      You can't specify exclusion tags for tag-level retention rules.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to excludeResourceTags(List<ResourceTag>).

      Parameters:
      excludeResourceTags - a consumer that will call methods on ResourceTag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • overrideConfiguration

      CreateRuleRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.