Class CfnRestoreTestingSelection

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.backup.CfnRestoreTestingSelection
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:58.061Z") @Stability(Stable) public class CfnRestoreTestingSelection extends CfnResource implements IInspectable
This request can be sent after CreateRestoreTestingPlan request returns successfully.

This is the second part of creating a resource testing plan, and it must be completed sequentially.

This consists of RestoreTestingSelectionName , ProtectedResourceType , and one of the following:

  • ProtectedResourceArns
  • ProtectedResourceConditions

Each protected resource type can have one single value.

A restore testing selection can include a wildcard value ("*") for ProtectedResourceArns along with ProtectedResourceConditions . Alternatively, you can include up to 30 specific protected resource ARNs in ProtectedResourceArns .

Cannot select by both protected resource types AND specific ARNs. Request will fail if both are included.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.backup.*;
 CfnRestoreTestingSelection cfnRestoreTestingSelection = CfnRestoreTestingSelection.Builder.create(this, "MyCfnRestoreTestingSelection")
         .iamRoleArn("iamRoleArn")
         .protectedResourceType("protectedResourceType")
         .restoreTestingPlanName("restoreTestingPlanName")
         .restoreTestingSelectionName("restoreTestingSelectionName")
         // the properties below are optional
         .protectedResourceArns(List.of("protectedResourceArns"))
         .protectedResourceConditions(ProtectedResourceConditionsProperty.builder()
                 .stringEquals(List.of(KeyValueProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .stringNotEquals(List.of(KeyValueProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .build())
         .restoreMetadataOverrides(Map.of(
                 "restoreMetadataOverridesKey", "restoreMetadataOverrides"))
         .validationWindowHours(123)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnRestoreTestingSelection

      protected CfnRestoreTestingSelection(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRestoreTestingSelection

      protected CfnRestoreTestingSelection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRestoreTestingSelection

      @Stability(Stable) public CfnRestoreTestingSelection(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRestoreTestingSelectionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getIamRoleArn

      @Stability(Stable) @NotNull public String getIamRoleArn()
      The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target resource;
    • setIamRoleArn

      @Stability(Stable) public void setIamRoleArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target resource;
    • getProtectedResourceType

      @Stability(Stable) @NotNull public String getProtectedResourceType()
      The type of AWS resource included in a resource testing selection;
    • setProtectedResourceType

      @Stability(Stable) public void setProtectedResourceType(@NotNull String value)
      The type of AWS resource included in a resource testing selection;
    • getRestoreTestingPlanName

      @Stability(Stable) @NotNull public String getRestoreTestingPlanName()
      Unique string that is the name of the restore testing plan.
    • setRestoreTestingPlanName

      @Stability(Stable) public void setRestoreTestingPlanName(@NotNull String value)
      Unique string that is the name of the restore testing plan.
    • getRestoreTestingSelectionName

      @Stability(Stable) @NotNull public String getRestoreTestingSelectionName()
      The unique name of the restore testing selection that belongs to the related restore testing plan.
    • setRestoreTestingSelectionName

      @Stability(Stable) public void setRestoreTestingSelectionName(@NotNull String value)
      The unique name of the restore testing selection that belongs to the related restore testing plan.
    • getProtectedResourceArns

      @Stability(Stable) @Nullable public List<String> getProtectedResourceArns()
      You can include specific ARNs, such as ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."] or you can include a wildcard: ProtectedResourceArns: ["*"] , but not both.
    • setProtectedResourceArns

      @Stability(Stable) public void setProtectedResourceArns(@Nullable List<String> value)
      You can include specific ARNs, such as ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."] or you can include a wildcard: ProtectedResourceArns: ["*"] , but not both.
    • getProtectedResourceConditions

      @Stability(Stable) @Nullable public Object getProtectedResourceConditions()
      In a resource testing selection, this parameter filters by specific conditions such as StringEquals or StringNotEquals .
    • setProtectedResourceConditions

      @Stability(Stable) public void setProtectedResourceConditions(@Nullable IResolvable value)
      In a resource testing selection, this parameter filters by specific conditions such as StringEquals or StringNotEquals .
    • setProtectedResourceConditions

      @Stability(Stable) public void setProtectedResourceConditions(@Nullable CfnRestoreTestingSelection.ProtectedResourceConditionsProperty value)
      In a resource testing selection, this parameter filters by specific conditions such as StringEquals or StringNotEquals .
    • getRestoreMetadataOverrides

      @Stability(Stable) @Nullable public Object getRestoreMetadataOverrides()
      You can override certain restore metadata keys by including the parameter RestoreMetadataOverrides in the body of RestoreTestingSelection .
    • setRestoreMetadataOverrides

      @Stability(Stable) public void setRestoreMetadataOverrides(@Nullable IResolvable value)
      You can override certain restore metadata keys by including the parameter RestoreMetadataOverrides in the body of RestoreTestingSelection .
    • setRestoreMetadataOverrides

      @Stability(Stable) public void setRestoreMetadataOverrides(@Nullable Map<String,String> value)
      You can override certain restore metadata keys by including the parameter RestoreMetadataOverrides in the body of RestoreTestingSelection .
    • getValidationWindowHours

      @Stability(Stable) @Nullable public Number getValidationWindowHours()
      This is amount of hours (1 to 168) available to run a validation script on the data.
    • setValidationWindowHours

      @Stability(Stable) public void setValidationWindowHours(@Nullable Number value)
      This is amount of hours (1 to 168) available to run a validation script on the data.