Class CfnBackupSelection

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.639Z") @Stability(Stable) public class CfnBackupSelection extends CfnResource implements IInspectable
A CloudFormation AWS::Backup::BackupSelection.

Specifies a set of resources to assign to a backup plan.

For a sample AWS CloudFormation template, see the AWS Backup Developer Guide .

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.*;
 Object conditions;
 CfnBackupSelection cfnBackupSelection = CfnBackupSelection.Builder.create(this, "MyCfnBackupSelection")
         .backupPlanId("backupPlanId")
         .backupSelection(BackupSelectionResourceTypeProperty.builder()
                 .iamRoleArn("iamRoleArn")
                 .selectionName("selectionName")
                 // the properties below are optional
                 .conditions(conditions)
                 .listOfTags(List.of(ConditionResourceTypeProperty.builder()
                         .conditionKey("conditionKey")
                         .conditionType("conditionType")
                         .conditionValue("conditionValue")
                         .build()))
                 .notResources(List.of("notResources"))
                 .resources(List.of("resources"))
                 .build())
         .build();
 
  • 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

    • CfnBackupSelection

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

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

      @Stability(Stable) public CfnBackupSelection(@NotNull Construct scope, @NotNull String id, @NotNull CfnBackupSelectionProps props)
      Create a new AWS::Backup::BackupSelection.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • getAttrBackupPlanId

      @Stability(Stable) @NotNull public String getAttrBackupPlanId()
      Uniquely identifies a backup plan.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      Uniquely identifies the backup selection.
    • getAttrSelectionId

      @Stability(Stable) @NotNull public String getAttrSelectionId()
      Uniquely identifies a request to assign a set of resources to a backup plan.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getBackupPlanId()
      Uniquely identifies a backup plan.
    • setBackupPlanId

      @Stability(Stable) public void setBackupPlanId(@NotNull String value)
      Uniquely identifies a backup plan.
    • getBackupSelection

      @Stability(Stable) @NotNull public Object getBackupSelection()
      Specifies the body of a request to assign a set of resources to a backup plan.

      It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.

    • setBackupSelection

      @Stability(Stable) public void setBackupSelection(@NotNull IResolvable value)
      Specifies the body of a request to assign a set of resources to a backup plan.

      It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.

    • setBackupSelection

      @Stability(Stable) public void setBackupSelection(@NotNull CfnBackupSelection.BackupSelectionResourceTypeProperty value)
      Specifies the body of a request to assign a set of resources to a backup plan.

      It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.