aws-cdk-lib 2.97.0__py3-none-any.whl → 2.97.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

@@ -703,7 +703,6 @@ import constructs as _constructs_77d1e7e8
703
703
  from .. import (
704
704
  CfnCreationPolicy as _CfnCreationPolicy_d904f690,
705
705
  CfnResource as _CfnResource_9df397a6,
706
- CronOptions as _CronOptions_dd1ff9ac,
707
706
  Duration as _Duration_4839e8c3,
708
707
  IAspect as _IAspect_118c810a,
709
708
  IInspectable as _IInspectable_c2943556,
@@ -711,9 +710,7 @@ from .. import (
711
710
  IResource as _IResource_c80c4260,
712
711
  ITaggable as _ITaggable_36806126,
713
712
  Resource as _Resource_45bc6135,
714
- Schedule as _Schedule_e7f843a1,
715
713
  TagManager as _TagManager_0a598cb3,
716
- TimeZone as _TimeZone_cdd72ac9,
717
714
  TreeInspector as _TreeInspector_488e0dd5,
718
715
  )
719
716
  from ..aws_cloudwatch import Alarm as _Alarm_9fbab1f1, IMetric as _IMetric_c7fd29de
@@ -1400,7 +1397,7 @@ class BasicScheduledActionProps:
1400
1397
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
1401
1398
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
1402
1399
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
1403
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
1400
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
1404
1401
 
1405
1402
  :exampleMetadata: infused
1406
1403
 
@@ -1515,7 +1512,7 @@ class BasicScheduledActionProps:
1515
1512
 
1516
1513
  @builtins.property
1517
1514
  def time_zone(self) -> typing.Optional[builtins.str]:
1518
- '''(deprecated) Specifies the time zone for a cron expression.
1515
+ '''Specifies the time zone for a cron expression.
1519
1516
 
1520
1517
  If a time zone is not provided, UTC is used by default.
1521
1518
 
@@ -1524,10 +1521,6 @@ class BasicScheduledActionProps:
1524
1521
  For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
1525
1522
 
1526
1523
  :default: - UTC
1527
-
1528
- :deprecated: use time zones as part of the schedule prop
1529
-
1530
- :stability: deprecated
1531
1524
  '''
1532
1525
  result = self._values.get("time_zone")
1533
1526
  return typing.cast(typing.Optional[builtins.str], result)
@@ -12248,18 +12241,16 @@ class CpuUtilizationScalingProps(BaseTargetTrackingProps):
12248
12241
 
12249
12242
  @jsii.data_type(
12250
12243
  jsii_type="aws-cdk-lib.aws_autoscaling.CronOptions",
12251
- jsii_struct_bases=[_CronOptions_dd1ff9ac],
12244
+ jsii_struct_bases=[],
12252
12245
  name_mapping={
12253
12246
  "day": "day",
12254
12247
  "hour": "hour",
12255
12248
  "minute": "minute",
12256
12249
  "month": "month",
12257
- "time_zone": "timeZone",
12258
12250
  "week_day": "weekDay",
12259
- "year": "year",
12260
12251
  },
12261
12252
  )
12262
- class CronOptions(_CronOptions_dd1ff9ac):
12253
+ class CronOptions:
12263
12254
  def __init__(
12264
12255
  self,
12265
12256
  *,
@@ -12267,11 +12258,9 @@ class CronOptions(_CronOptions_dd1ff9ac):
12267
12258
  hour: typing.Optional[builtins.str] = None,
12268
12259
  minute: typing.Optional[builtins.str] = None,
12269
12260
  month: typing.Optional[builtins.str] = None,
12270
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
12271
12261
  week_day: typing.Optional[builtins.str] = None,
12272
- year: typing.Optional[builtins.str] = None,
12273
12262
  ) -> None:
12274
- '''(deprecated) Options to configure a cron expression.
12263
+ '''Options to configure a cron expression.
12275
12264
 
12276
12265
  All fields are strings so you can use complex expressions. Absence of
12277
12266
  a field implies '*' or '?', whichever one is appropriate.
@@ -12280,33 +12269,24 @@ class CronOptions(_CronOptions_dd1ff9ac):
12280
12269
  :param hour: The hour to run this rule at. Default: - Every hour
12281
12270
  :param minute: The minute to run this rule at. Default: - Every minute
12282
12271
  :param month: The month to run this rule at. Default: - Every month
12283
- :param time_zone: Retrieve the expression for this schedule. Default: TimeZone.ETC_UTC
12284
12272
  :param week_day: The day of the week to run this rule at. Default: - Any day of the week
12285
- :param year: The year to run this rule at. Default: - Every year
12286
-
12287
- :deprecated: use core.CronOptions
12288
12273
 
12289
12274
  :see: http://crontab.org/
12290
- :stability: deprecated
12291
- :exampleMetadata: fixture=_generated
12275
+ :exampleMetadata: infused
12292
12276
 
12293
12277
  Example::
12294
12278
 
12295
- # The code below shows an example of how to instantiate this type.
12296
- # The values are placeholders you should change.
12297
- import aws_cdk as cdk
12298
- from aws_cdk import aws_autoscaling as autoscaling
12279
+ # auto_scaling_group: autoscaling.AutoScalingGroup
12280
+
12299
12281
 
12300
- # time_zone: cdk.TimeZone
12282
+ auto_scaling_group.scale_on_schedule("PrescaleInTheMorning",
12283
+ schedule=autoscaling.Schedule.cron(hour="8", minute="0"),
12284
+ min_capacity=20
12285
+ )
12301
12286
 
12302
- cron_options = autoscaling.CronOptions(
12303
- day="day",
12304
- hour="hour",
12305
- minute="minute",
12306
- month="month",
12307
- time_zone=time_zone,
12308
- week_day="weekDay",
12309
- year="year"
12287
+ auto_scaling_group.scale_on_schedule("AllowDownscalingAtNight",
12288
+ schedule=autoscaling.Schedule.cron(hour="20", minute="0"),
12289
+ min_capacity=1
12310
12290
  )
12311
12291
  '''
12312
12292
  if __debug__:
@@ -12315,9 +12295,7 @@ class CronOptions(_CronOptions_dd1ff9ac):
12315
12295
  check_type(argname="argument hour", value=hour, expected_type=type_hints["hour"])
12316
12296
  check_type(argname="argument minute", value=minute, expected_type=type_hints["minute"])
12317
12297
  check_type(argname="argument month", value=month, expected_type=type_hints["month"])
12318
- check_type(argname="argument time_zone", value=time_zone, expected_type=type_hints["time_zone"])
12319
12298
  check_type(argname="argument week_day", value=week_day, expected_type=type_hints["week_day"])
12320
- check_type(argname="argument year", value=year, expected_type=type_hints["year"])
12321
12299
  self._values: typing.Dict[builtins.str, typing.Any] = {}
12322
12300
  if day is not None:
12323
12301
  self._values["day"] = day
@@ -12327,12 +12305,8 @@ class CronOptions(_CronOptions_dd1ff9ac):
12327
12305
  self._values["minute"] = minute
12328
12306
  if month is not None:
12329
12307
  self._values["month"] = month
12330
- if time_zone is not None:
12331
- self._values["time_zone"] = time_zone
12332
12308
  if week_day is not None:
12333
12309
  self._values["week_day"] = week_day
12334
- if year is not None:
12335
- self._values["year"] = year
12336
12310
 
12337
12311
  @builtins.property
12338
12312
  def day(self) -> typing.Optional[builtins.str]:
@@ -12370,15 +12344,6 @@ class CronOptions(_CronOptions_dd1ff9ac):
12370
12344
  result = self._values.get("month")
12371
12345
  return typing.cast(typing.Optional[builtins.str], result)
12372
12346
 
12373
- @builtins.property
12374
- def time_zone(self) -> typing.Optional[_TimeZone_cdd72ac9]:
12375
- '''Retrieve the expression for this schedule.
12376
-
12377
- :default: TimeZone.ETC_UTC
12378
- '''
12379
- result = self._values.get("time_zone")
12380
- return typing.cast(typing.Optional[_TimeZone_cdd72ac9], result)
12381
-
12382
12347
  @builtins.property
12383
12348
  def week_day(self) -> typing.Optional[builtins.str]:
12384
12349
  '''The day of the week to run this rule at.
@@ -12388,15 +12353,6 @@ class CronOptions(_CronOptions_dd1ff9ac):
12388
12353
  result = self._values.get("week_day")
12389
12354
  return typing.cast(typing.Optional[builtins.str], result)
12390
12355
 
12391
- @builtins.property
12392
- def year(self) -> typing.Optional[builtins.str]:
12393
- '''The year to run this rule at.
12394
-
12395
- :default: - Every year
12396
- '''
12397
- result = self._values.get("year")
12398
- return typing.cast(typing.Optional[builtins.str], result)
12399
-
12400
12356
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
12401
12357
  return isinstance(rhs, self.__class__) and rhs._values == self._values
12402
12358
 
@@ -13223,7 +13179,7 @@ class IAutoScalingGroup(
13223
13179
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
13224
13180
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
13225
13181
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
13226
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
13182
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
13227
13183
  '''
13228
13184
  ...
13229
13185
 
@@ -13517,7 +13473,7 @@ class _IAutoScalingGroupProxy(
13517
13473
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
13518
13474
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
13519
13475
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
13520
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
13476
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
13521
13477
  '''
13522
13478
  if __debug__:
13523
13479
  type_hints = typing.get_type_hints(_typecheckingstub__fb399691f6facd38db7c6fafc541af1753d52ff948133ce68b6da663ac0cee9d)
@@ -15301,7 +15257,6 @@ class ScalingProcess(enum.Enum):
15301
15257
 
15302
15258
 
15303
15259
  class Schedule(
15304
- _Schedule_e7f843a1,
15305
15260
  metaclass=jsii.JSIIAbstractClass,
15306
15261
  jsii_type="aws-cdk-lib.aws_autoscaling.Schedule",
15307
15262
  ):
@@ -15337,9 +15292,7 @@ class Schedule(
15337
15292
  hour: typing.Optional[builtins.str] = None,
15338
15293
  minute: typing.Optional[builtins.str] = None,
15339
15294
  month: typing.Optional[builtins.str] = None,
15340
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
15341
15295
  week_day: typing.Optional[builtins.str] = None,
15342
- year: typing.Optional[builtins.str] = None,
15343
15296
  ) -> "Schedule":
15344
15297
  '''Create a schedule from a set of cron fields.
15345
15298
 
@@ -15347,48 +15300,42 @@ class Schedule(
15347
15300
  :param hour: The hour to run this rule at. Default: - Every hour
15348
15301
  :param minute: The minute to run this rule at. Default: - Every minute
15349
15302
  :param month: The month to run this rule at. Default: - Every month
15350
- :param time_zone: Retrieve the expression for this schedule. Default: TimeZone.ETC_UTC
15351
15303
  :param week_day: The day of the week to run this rule at. Default: - Any day of the week
15352
- :param year: The year to run this rule at. Default: - Every year
15353
15304
  '''
15354
- options = _CronOptions_dd1ff9ac(
15355
- day=day,
15356
- hour=hour,
15357
- minute=minute,
15358
- month=month,
15359
- time_zone=time_zone,
15360
- week_day=week_day,
15361
- year=year,
15305
+ options = CronOptions(
15306
+ day=day, hour=hour, minute=minute, month=month, week_day=week_day
15362
15307
  )
15363
15308
 
15364
15309
  return typing.cast("Schedule", jsii.sinvoke(cls, "cron", [options]))
15365
15310
 
15366
15311
  @jsii.member(jsii_name="expression")
15367
15312
  @builtins.classmethod
15368
- def expression(
15369
- cls,
15370
- expression: builtins.str,
15371
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
15372
- ) -> "Schedule":
15313
+ def expression(cls, expression: builtins.str) -> "Schedule":
15373
15314
  '''Construct a schedule from a literal schedule expression.
15374
15315
 
15375
15316
  :param expression: The expression to use. Must be in a format that AutoScaling will recognize
15376
- :param time_zone: -
15377
15317
 
15378
15318
  :see: http://crontab.org/
15379
15319
  '''
15380
15320
  if __debug__:
15381
15321
  type_hints = typing.get_type_hints(_typecheckingstub__a472ca2650776afb4c410eee0e25a484de0070b51e7dfc154b5506f87b8a6994)
15382
15322
  check_type(argname="argument expression", value=expression, expected_type=type_hints["expression"])
15383
- check_type(argname="argument time_zone", value=time_zone, expected_type=type_hints["time_zone"])
15384
- return typing.cast("Schedule", jsii.sinvoke(cls, "expression", [expression, time_zone]))
15323
+ return typing.cast("Schedule", jsii.sinvoke(cls, "expression", [expression]))
15385
15324
 
15325
+ @builtins.property
15326
+ @jsii.member(jsii_name="expressionString")
15327
+ @abc.abstractmethod
15328
+ def expression_string(self) -> builtins.str:
15329
+ '''Retrieve the expression for this schedule.'''
15330
+ ...
15386
15331
 
15387
- class _ScheduleProxy(
15388
- Schedule,
15389
- jsii.proxy_for(_Schedule_e7f843a1), # type: ignore[misc]
15390
- ):
15391
- pass
15332
+
15333
+ class _ScheduleProxy(Schedule):
15334
+ @builtins.property
15335
+ @jsii.member(jsii_name="expressionString")
15336
+ def expression_string(self) -> builtins.str:
15337
+ '''Retrieve the expression for this schedule.'''
15338
+ return typing.cast(builtins.str, jsii.get(self, "expressionString"))
15392
15339
 
15393
15340
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
15394
15341
  typing.cast(typing.Any, Schedule).__jsii_proxy_class__ = lambda : _ScheduleProxy
@@ -15450,7 +15397,7 @@ class ScheduledAction(
15450
15397
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
15451
15398
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
15452
15399
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
15453
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
15400
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
15454
15401
  '''
15455
15402
  if __debug__:
15456
15403
  type_hints = typing.get_type_hints(_typecheckingstub__74b3b8cb09553edb86fdacb4ea37f2427f0041f519ffb8025514989ca3a7ea4c)
@@ -15514,7 +15461,7 @@ class ScheduledActionProps(BasicScheduledActionProps):
15514
15461
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
15515
15462
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
15516
15463
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
15517
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
15464
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
15518
15465
  :param auto_scaling_group: The AutoScalingGroup to apply the scheduled actions to.
15519
15466
 
15520
15467
  :exampleMetadata: fixture=_generated
@@ -15639,7 +15586,7 @@ class ScheduledActionProps(BasicScheduledActionProps):
15639
15586
 
15640
15587
  @builtins.property
15641
15588
  def time_zone(self) -> typing.Optional[builtins.str]:
15642
- '''(deprecated) Specifies the time zone for a cron expression.
15589
+ '''Specifies the time zone for a cron expression.
15643
15590
 
15644
15591
  If a time zone is not provided, UTC is used by default.
15645
15592
 
@@ -15648,10 +15595,6 @@ class ScheduledActionProps(BasicScheduledActionProps):
15648
15595
  For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
15649
15596
 
15650
15597
  :default: - UTC
15651
-
15652
- :deprecated: use time zones as part of the schedule prop
15653
-
15654
- :stability: deprecated
15655
15598
  '''
15656
15599
  result = self._values.get("time_zone")
15657
15600
  return typing.cast(typing.Optional[builtins.str], result)
@@ -17759,7 +17702,7 @@ class AutoScalingGroup(
17759
17702
  :param max_capacity: The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
17760
17703
  :param min_capacity: The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
17761
17704
  :param start_time: When this scheduled action becomes active. Default: - The rule is activate immediately.
17762
- :param time_zone: (deprecated) Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
17705
+ :param time_zone: Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
17763
17706
  '''
17764
17707
  if __debug__:
17765
17708
  type_hints = typing.get_type_hints(_typecheckingstub__182512f6d585e187d1c3b075cba4994f259ac9adb6292cfbe68f8a73530920ad)
@@ -20379,9 +20322,7 @@ def _typecheckingstub__ff2ba980d042c09d15d4b7c8a2897accea72726b7fd7c61c4e35722c4
20379
20322
  hour: typing.Optional[builtins.str] = None,
20380
20323
  minute: typing.Optional[builtins.str] = None,
20381
20324
  month: typing.Optional[builtins.str] = None,
20382
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
20383
20325
  week_day: typing.Optional[builtins.str] = None,
20384
- year: typing.Optional[builtins.str] = None,
20385
20326
  ) -> None:
20386
20327
  """Type checking stubs"""
20387
20328
  pass
@@ -20680,7 +20621,6 @@ def _typecheckingstub__b560eae9332d2a2b0774bea52aea5a16c19db15d41968c9f1bcfba58f
20680
20621
 
20681
20622
  def _typecheckingstub__a472ca2650776afb4c410eee0e25a484de0070b51e7dfc154b5506f87b8a6994(
20682
20623
  expression: builtins.str,
20683
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
20684
20624
  ) -> None:
20685
20625
  """Type checking stubs"""
20686
20626
  pass
@@ -68,7 +68,7 @@ To add rules to a plan, use `addRule()`:
68
68
  plan.add_rule(backup.BackupPlanRule(
69
69
  completion_window=Duration.hours(2),
70
70
  start_window=Duration.hours(1),
71
- schedule=backup.Schedule.cron( # Only cron expressions are supported
71
+ schedule_expression=events.Schedule.cron( # Only cron expressions are supported
72
72
  day="15",
73
73
  hour="3",
74
74
  minute="30"),
@@ -255,15 +255,12 @@ import constructs as _constructs_77d1e7e8
255
255
  from .. import (
256
256
  CfnResource as _CfnResource_9df397a6,
257
257
  CfnTag as _CfnTag_f6864754,
258
- CronOptions as _CronOptions_dd1ff9ac,
259
258
  Duration as _Duration_4839e8c3,
260
259
  IInspectable as _IInspectable_c2943556,
261
260
  IResolvable as _IResolvable_da3f097b,
262
261
  IResource as _IResource_c80c4260,
263
262
  RemovalPolicy as _RemovalPolicy_9f93c814,
264
263
  Resource as _Resource_45bc6135,
265
- Schedule as _Schedule_e7f843a1,
266
- TimeZone as _TimeZone_cdd72ac9,
267
264
  TreeInspector as _TreeInspector_488e0dd5,
268
265
  )
269
266
  from ..aws_dynamodb import ITable as _ITable_504fd401
@@ -516,7 +513,6 @@ class BackupPlanRule(
516
513
  move_to_cold_storage_after: typing.Optional[_Duration_4839e8c3] = None,
517
514
  recovery_point_tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
518
515
  rule_name: typing.Optional[builtins.str] = None,
519
- schedule: typing.Optional["Schedule"] = None,
520
516
  schedule_expression: typing.Optional[_Schedule_c151d01f] = None,
521
517
  start_window: typing.Optional[_Duration_4839e8c3] = None,
522
518
  ) -> None:
@@ -529,8 +525,7 @@ class BackupPlanRule(
529
525
  :param move_to_cold_storage_after: Specifies the duration after creation that a recovery point is moved to cold storage. Default: - recovery point is never moved to cold storage
530
526
  :param recovery_point_tags: To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. Default: - no recovery point tags.
531
527
  :param rule_name: A display name for the backup rule. Default: - a CDK generated name
532
- :param schedule: A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
533
- :param schedule_expression: (deprecated) A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
528
+ :param schedule_expression: A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
534
529
  :param start_window: The duration after a backup is scheduled before a job is canceled if it doesn't start successfully. Default: - 8 hours
535
530
  '''
536
531
  props = BackupPlanRuleProps(
@@ -542,7 +537,6 @@ class BackupPlanRule(
542
537
  move_to_cold_storage_after=move_to_cold_storage_after,
543
538
  recovery_point_tags=recovery_point_tags,
544
539
  rule_name=rule_name,
545
- schedule=schedule,
546
540
  schedule_expression=schedule_expression,
547
541
  start_window=start_window,
548
542
  )
@@ -643,7 +637,6 @@ class BackupPlanRule(
643
637
  "move_to_cold_storage_after": "moveToColdStorageAfter",
644
638
  "recovery_point_tags": "recoveryPointTags",
645
639
  "rule_name": "ruleName",
646
- "schedule": "schedule",
647
640
  "schedule_expression": "scheduleExpression",
648
641
  "start_window": "startWindow",
649
642
  },
@@ -660,7 +653,6 @@ class BackupPlanRuleProps:
660
653
  move_to_cold_storage_after: typing.Optional[_Duration_4839e8c3] = None,
661
654
  recovery_point_tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
662
655
  rule_name: typing.Optional[builtins.str] = None,
663
- schedule: typing.Optional["Schedule"] = None,
664
656
  schedule_expression: typing.Optional[_Schedule_c151d01f] = None,
665
657
  start_window: typing.Optional[_Duration_4839e8c3] = None,
666
658
  ) -> None:
@@ -674,8 +666,7 @@ class BackupPlanRuleProps:
674
666
  :param move_to_cold_storage_after: Specifies the duration after creation that a recovery point is moved to cold storage. Default: - recovery point is never moved to cold storage
675
667
  :param recovery_point_tags: To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. Default: - no recovery point tags.
676
668
  :param rule_name: A display name for the backup rule. Default: - a CDK generated name
677
- :param schedule: A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
678
- :param schedule_expression: (deprecated) A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
669
+ :param schedule_expression: A CRON expression specifying when AWS Backup initiates a backup job. Default: - no schedule
679
670
  :param start_window: The duration after a backup is scheduled before a job is canceled if it doesn't start successfully. Default: - 8 hours
680
671
 
681
672
  :exampleMetadata: infused
@@ -703,7 +694,6 @@ class BackupPlanRuleProps:
703
694
  check_type(argname="argument move_to_cold_storage_after", value=move_to_cold_storage_after, expected_type=type_hints["move_to_cold_storage_after"])
704
695
  check_type(argname="argument recovery_point_tags", value=recovery_point_tags, expected_type=type_hints["recovery_point_tags"])
705
696
  check_type(argname="argument rule_name", value=rule_name, expected_type=type_hints["rule_name"])
706
- check_type(argname="argument schedule", value=schedule, expected_type=type_hints["schedule"])
707
697
  check_type(argname="argument schedule_expression", value=schedule_expression, expected_type=type_hints["schedule_expression"])
708
698
  check_type(argname="argument start_window", value=start_window, expected_type=type_hints["start_window"])
709
699
  self._values: typing.Dict[builtins.str, typing.Any] = {}
@@ -723,8 +713,6 @@ class BackupPlanRuleProps:
723
713
  self._values["recovery_point_tags"] = recovery_point_tags
724
714
  if rule_name is not None:
725
715
  self._values["rule_name"] = rule_name
726
- if schedule is not None:
727
- self._values["schedule"] = schedule
728
716
  if schedule_expression is not None:
729
717
  self._values["schedule_expression"] = schedule_expression
730
718
  if start_window is not None:
@@ -816,24 +804,11 @@ class BackupPlanRuleProps:
816
804
  result = self._values.get("rule_name")
817
805
  return typing.cast(typing.Optional[builtins.str], result)
818
806
 
819
- @builtins.property
820
- def schedule(self) -> typing.Optional["Schedule"]:
821
- '''A CRON expression specifying when AWS Backup initiates a backup job.
822
-
823
- :default: - no schedule
824
- '''
825
- result = self._values.get("schedule")
826
- return typing.cast(typing.Optional["Schedule"], result)
827
-
828
807
  @builtins.property
829
808
  def schedule_expression(self) -> typing.Optional[_Schedule_c151d01f]:
830
- '''(deprecated) A CRON expression specifying when AWS Backup initiates a backup job.
809
+ '''A CRON expression specifying when AWS Backup initiates a backup job.
831
810
 
832
811
  :default: - no schedule
833
-
834
- :deprecated: use schedule prop instead
835
-
836
- :stability: deprecated
837
812
  '''
838
813
  result = self._values.get("schedule_expression")
839
814
  return typing.cast(typing.Optional[_Schedule_c151d01f], result)
@@ -5303,96 +5278,6 @@ class LockConfiguration:
5303
5278
  )
5304
5279
 
5305
5280
 
5306
- class Schedule(
5307
- _Schedule_e7f843a1,
5308
- metaclass=jsii.JSIIAbstractClass,
5309
- jsii_type="aws-cdk-lib.aws_backup.Schedule",
5310
- ):
5311
- '''
5312
- :exampleMetadata: infused
5313
-
5314
- Example::
5315
-
5316
- # plan: backup.BackupPlan
5317
-
5318
- plan.add_rule(backup.BackupPlanRule(
5319
- completion_window=Duration.hours(2),
5320
- start_window=Duration.hours(1),
5321
- schedule=backup.Schedule.cron( # Only cron expressions are supported
5322
- day="15",
5323
- hour="3",
5324
- minute="30"),
5325
- move_to_cold_storage_after=Duration.days(30)
5326
- ))
5327
- '''
5328
-
5329
- def __init__(self) -> None:
5330
- jsii.create(self.__class__, self, [])
5331
-
5332
- @jsii.member(jsii_name="cron")
5333
- @builtins.classmethod
5334
- def cron(
5335
- cls,
5336
- *,
5337
- day: typing.Optional[builtins.str] = None,
5338
- hour: typing.Optional[builtins.str] = None,
5339
- minute: typing.Optional[builtins.str] = None,
5340
- month: typing.Optional[builtins.str] = None,
5341
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
5342
- week_day: typing.Optional[builtins.str] = None,
5343
- year: typing.Optional[builtins.str] = None,
5344
- ) -> "Schedule":
5345
- '''Construct a schedule from cron options.
5346
-
5347
- :param day: The day of the month to run this rule at. Default: - Every day of the month
5348
- :param hour: The hour to run this rule at. Default: - Every hour
5349
- :param minute: The minute to run this rule at. Default: - Every minute
5350
- :param month: The month to run this rule at. Default: - Every month
5351
- :param time_zone: Retrieve the expression for this schedule. Default: TimeZone.ETC_UTC
5352
- :param week_day: The day of the week to run this rule at. Default: - Any day of the week
5353
- :param year: The year to run this rule at. Default: - Every year
5354
- '''
5355
- options = _CronOptions_dd1ff9ac(
5356
- day=day,
5357
- hour=hour,
5358
- minute=minute,
5359
- month=month,
5360
- time_zone=time_zone,
5361
- week_day=week_day,
5362
- year=year,
5363
- )
5364
-
5365
- return typing.cast("Schedule", jsii.sinvoke(cls, "cron", [options]))
5366
-
5367
- @jsii.member(jsii_name="expression")
5368
- @builtins.classmethod
5369
- def expression(
5370
- cls,
5371
- expression: builtins.str,
5372
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
5373
- ) -> "Schedule":
5374
- '''Construct a schedule from a literal schedule expression.
5375
-
5376
- :param expression: The expression to use. Must be in a format that AWS Backup will recognize
5377
- :param time_zone: -
5378
- '''
5379
- if __debug__:
5380
- type_hints = typing.get_type_hints(_typecheckingstub__961c489eca07f1d2ad06099ec046a18760ee77c634ffa3fda2b48c0b5855320d)
5381
- check_type(argname="argument expression", value=expression, expected_type=type_hints["expression"])
5382
- check_type(argname="argument time_zone", value=time_zone, expected_type=type_hints["time_zone"])
5383
- return typing.cast("Schedule", jsii.sinvoke(cls, "expression", [expression, time_zone]))
5384
-
5385
-
5386
- class _ScheduleProxy(
5387
- Schedule,
5388
- jsii.proxy_for(_Schedule_e7f843a1), # type: ignore[misc]
5389
- ):
5390
- pass
5391
-
5392
- # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
5393
- typing.cast(typing.Any, Schedule).__jsii_proxy_class__ = lambda : _ScheduleProxy
5394
-
5395
-
5396
5281
  @jsii.data_type(
5397
5282
  jsii_type="aws-cdk-lib.aws_backup.TagCondition",
5398
5283
  jsii_struct_bases=[],
@@ -5893,7 +5778,6 @@ __all__ = [
5893
5778
  "IBackupPlan",
5894
5779
  "IBackupVault",
5895
5780
  "LockConfiguration",
5896
- "Schedule",
5897
5781
  "TagCondition",
5898
5782
  "TagOperation",
5899
5783
  ]
@@ -5959,7 +5843,6 @@ def _typecheckingstub__521e43eca71db1c8347b5dbf1e88135cbc1fd43f07248784b33b55d83
5959
5843
  move_to_cold_storage_after: typing.Optional[_Duration_4839e8c3] = None,
5960
5844
  recovery_point_tags: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
5961
5845
  rule_name: typing.Optional[builtins.str] = None,
5962
- schedule: typing.Optional[Schedule] = None,
5963
5846
  schedule_expression: typing.Optional[_Schedule_c151d01f] = None,
5964
5847
  start_window: typing.Optional[_Duration_4839e8c3] = None,
5965
5848
  ) -> None:
@@ -6527,13 +6410,6 @@ def _typecheckingstub__7f8085843c1a2a230e0c965fbb91f96b1b11b817ee7d9232b4d368b47
6527
6410
  """Type checking stubs"""
6528
6411
  pass
6529
6412
 
6530
- def _typecheckingstub__961c489eca07f1d2ad06099ec046a18760ee77c634ffa3fda2b48c0b5855320d(
6531
- expression: builtins.str,
6532
- time_zone: typing.Optional[_TimeZone_cdd72ac9] = None,
6533
- ) -> None:
6534
- """Type checking stubs"""
6535
- pass
6536
-
6537
6413
  def _typecheckingstub__ebec77480ee4239c5e74e693ea6942bce079e6a195e1db4021330679f19a3080(
6538
6414
  *,
6539
6415
  key: builtins.str,