Class: AWSCDK::Backup::CfnRestoreTestingPlanProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
backup/cfn_restore_testing_plan_props.rb

Overview

Properties for defining a CfnRestoreTestingPlan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(recovery_point_selection:, restore_testing_plan_name:, schedule_expression:, schedule_expression_timezone: nil, start_window_hours: nil, tags: nil) ⇒ CfnRestoreTestingPlanProps

Returns a new instance of CfnRestoreTestingPlanProps.

Parameters:

  • recovery_point_selection (AWSCDK::IResolvable, AWSCDK::Backup::CfnRestoreTestingPlan::RestoreTestingRecoveryPointSelectionProperty)

    The specified criteria to assign a set of resources, such as recovery point types or backup vaults.

  • restore_testing_plan_name (String)

    The RestoreTestingPlanName is a unique string that is the name of the restore testing plan.

  • schedule_expression (String)

    A CRON expression in specified timezone when a restore testing plan is executed.

  • schedule_expression_timezone (String, nil) (defaults to: nil)

    Optional.

  • start_window_hours (Numeric, nil) (defaults to: nil)

    Defaults to 24 hours.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Optional tags to include.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'backup/cfn_restore_testing_plan_props.rb', line 15

def initialize(recovery_point_selection:, restore_testing_plan_name:, schedule_expression:, schedule_expression_timezone: nil, start_window_hours: nil, tags: nil)
  @recovery_point_selection = recovery_point_selection.is_a?(Hash) ? ::AWSCDK::Backup::CfnRestoreTestingPlan::RestoreTestingRecoveryPointSelectionProperty.new(**recovery_point_selection.transform_keys(&:to_sym)) : recovery_point_selection
  Jsii::Type.check_type(@recovery_point_selection, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYWNrdXAuQ2ZuUmVzdG9yZVRlc3RpbmdQbGFuLlJlc3RvcmVUZXN0aW5nUmVjb3ZlcnlQb2ludFNlbGVjdGlvblByb3BlcnR5In1dfX0=")), "recoveryPointSelection")
  @restore_testing_plan_name = restore_testing_plan_name
  Jsii::Type.check_type(@restore_testing_plan_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restoreTestingPlanName")
  @schedule_expression = schedule_expression
  Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression")
  @schedule_expression_timezone = schedule_expression_timezone
  Jsii::Type.check_type(@schedule_expression_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpressionTimezone") unless @schedule_expression_timezone.nil?
  @start_window_hours = start_window_hours
  Jsii::Type.check_type(@start_window_hours, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startWindowHours") unless @start_window_hours.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#recovery_point_selectionAWSCDK::IResolvable, AWSCDK::Backup::CfnRestoreTestingPlan::RestoreTestingRecoveryPointSelectionProperty (readonly)

The specified criteria to assign a set of resources, such as recovery point types or backup vaults.



34
35
36
# File 'backup/cfn_restore_testing_plan_props.rb', line 34

def recovery_point_selection
  @recovery_point_selection
end

#restore_testing_plan_nameString (readonly)

The RestoreTestingPlanName is a unique string that is the name of the restore testing plan.

This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.



41
42
43
# File 'backup/cfn_restore_testing_plan_props.rb', line 41

def restore_testing_plan_name
  @restore_testing_plan_name
end

#schedule_expressionString (readonly)

A CRON expression in specified timezone when a restore testing plan is executed.

When no CRON expression is provided, AWS Backup will use the default expression cron(0 5 ? * * *) .



48
49
50
# File 'backup/cfn_restore_testing_plan_props.rb', line 48

def schedule_expression
  @schedule_expression
end

#schedule_expression_timezoneString? (readonly)

Optional.

This is the timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.



55
56
57
# File 'backup/cfn_restore_testing_plan_props.rb', line 55

def schedule_expression_timezone
  @schedule_expression_timezone
end

#start_window_hoursNumeric? (readonly)

Defaults to 24 hours.

A value in hours after a restore test is scheduled before a job will be canceled if it doesn't start successfully. This value is optional. If this value is included, this parameter has a maximum value of 168 hours (one week).



62
63
64
# File 'backup/cfn_restore_testing_plan_props.rb', line 62

def start_window_hours
  @start_window_hours
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Optional tags to include.

A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters,numbers, spaces, and the following characters: + - = . _ : /.



69
70
71
# File 'backup/cfn_restore_testing_plan_props.rb', line 69

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



71
72
73
74
75
76
77
78
79
80
# File 'backup/cfn_restore_testing_plan_props.rb', line 71

def self.jsii_properties
  {
    :recovery_point_selection => "recoveryPointSelection",
    :restore_testing_plan_name => "restoreTestingPlanName",
    :schedule_expression => "scheduleExpression",
    :schedule_expression_timezone => "scheduleExpressionTimezone",
    :start_window_hours => "startWindowHours",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



82
83
84
85
86
87
88
89
90
91
92
93
# File 'backup/cfn_restore_testing_plan_props.rb', line 82

def to_jsii
  result = {}
  result.merge!({
    "recoveryPointSelection" => @recovery_point_selection,
    "restoreTestingPlanName" => @restore_testing_plan_name,
    "scheduleExpression" => @schedule_expression,
    "scheduleExpressionTimezone" => @schedule_expression_timezone,
    "startWindowHours" => @start_window_hours,
    "tags" => @tags,
  })
  result.compact
end