aws-cdk-lib 2.145.0__py3-none-any.whl → 2.146.0__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.

@@ -8375,15 +8375,37 @@ class CfnScalingPolicy(
8375
8375
 
8376
8376
  # the properties below are optional
8377
8377
  customized_metric_specification=autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty(
8378
- metric_name="metricName",
8379
- namespace="namespace",
8380
- statistic="statistic",
8381
-
8382
- # the properties below are optional
8383
8378
  dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
8384
8379
  name="name",
8385
8380
  value="value"
8386
8381
  )],
8382
+ metric_name="metricName",
8383
+ metrics=[autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
8384
+ id="id",
8385
+
8386
+ # the properties below are optional
8387
+ expression="expression",
8388
+ label="label",
8389
+ metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
8390
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
8391
+ metric_name="metricName",
8392
+ namespace="namespace",
8393
+
8394
+ # the properties below are optional
8395
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
8396
+ name="name",
8397
+ value="value"
8398
+ )]
8399
+ ),
8400
+ stat="stat",
8401
+
8402
+ # the properties below are optional
8403
+ unit="unit"
8404
+ ),
8405
+ return_data=False
8406
+ )],
8407
+ namespace="namespace",
8408
+ statistic="statistic",
8387
8409
  unit="unit"
8388
8410
  ),
8389
8411
  disable_scale_in=False,
@@ -8670,10 +8692,11 @@ class CfnScalingPolicy(
8670
8692
  jsii_type="aws-cdk-lib.aws_autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty",
8671
8693
  jsii_struct_bases=[],
8672
8694
  name_mapping={
8695
+ "dimensions": "dimensions",
8673
8696
  "metric_name": "metricName",
8697
+ "metrics": "metrics",
8674
8698
  "namespace": "namespace",
8675
8699
  "statistic": "statistic",
8676
- "dimensions": "dimensions",
8677
8700
  "unit": "unit",
8678
8701
  },
8679
8702
  )
@@ -8681,10 +8704,11 @@ class CfnScalingPolicy(
8681
8704
  def __init__(
8682
8705
  self,
8683
8706
  *,
8684
- metric_name: builtins.str,
8685
- namespace: builtins.str,
8686
- statistic: builtins.str,
8687
8707
  dimensions: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnScalingPolicy.MetricDimensionProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
8708
+ metric_name: typing.Optional[builtins.str] = None,
8709
+ metrics: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnScalingPolicy.TargetTrackingMetricDataQueryProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
8710
+ namespace: typing.Optional[builtins.str] = None,
8711
+ statistic: typing.Optional[builtins.str] = None,
8688
8712
  unit: typing.Optional[builtins.str] = None,
8689
8713
  ) -> None:
8690
8714
  '''Contains customized metric specification information for a target tracking scaling policy for Amazon EC2 Auto Scaling.
@@ -8698,10 +8722,11 @@ class CfnScalingPolicy(
8698
8722
 
8699
8723
  ``CustomizedMetricSpecification`` is a property of the `AWS::AutoScaling::ScalingPolicy TargetTrackingConfiguration <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html>`_ property type.
8700
8724
 
8725
+ :param dimensions: The dimensions of the metric. Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
8701
8726
  :param metric_name: The name of the metric. To get the exact metric name, namespace, and dimensions, inspect the `Metric <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html>`_ object that is returned by a call to `ListMetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html>`_ .
8727
+ :param metrics:
8702
8728
  :param namespace: The namespace of the metric.
8703
8729
  :param statistic: The statistic of the metric.
8704
- :param dimensions: The dimensions of the metric. Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
8705
8730
  :param unit: The unit of the metric. For a complete list of the units that CloudWatch supports, see the `MetricDatum <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html>`_ data type in the *Amazon CloudWatch API Reference* .
8706
8731
 
8707
8732
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html
@@ -8714,37 +8739,77 @@ class CfnScalingPolicy(
8714
8739
  from aws_cdk import aws_autoscaling as autoscaling
8715
8740
 
8716
8741
  customized_metric_specification_property = autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty(
8717
- metric_name="metricName",
8718
- namespace="namespace",
8719
- statistic="statistic",
8720
-
8721
- # the properties below are optional
8722
8742
  dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
8723
8743
  name="name",
8724
8744
  value="value"
8725
8745
  )],
8746
+ metric_name="metricName",
8747
+ metrics=[autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
8748
+ id="id",
8749
+
8750
+ # the properties below are optional
8751
+ expression="expression",
8752
+ label="label",
8753
+ metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
8754
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
8755
+ metric_name="metricName",
8756
+ namespace="namespace",
8757
+
8758
+ # the properties below are optional
8759
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
8760
+ name="name",
8761
+ value="value"
8762
+ )]
8763
+ ),
8764
+ stat="stat",
8765
+
8766
+ # the properties below are optional
8767
+ unit="unit"
8768
+ ),
8769
+ return_data=False
8770
+ )],
8771
+ namespace="namespace",
8772
+ statistic="statistic",
8726
8773
  unit="unit"
8727
8774
  )
8728
8775
  '''
8729
8776
  if __debug__:
8730
8777
  type_hints = typing.get_type_hints(_typecheckingstub__8e7031340719d237d3182678de0dc2931e386340d37c2dd60e36be75ada41bb3)
8778
+ check_type(argname="argument dimensions", value=dimensions, expected_type=type_hints["dimensions"])
8731
8779
  check_type(argname="argument metric_name", value=metric_name, expected_type=type_hints["metric_name"])
8780
+ check_type(argname="argument metrics", value=metrics, expected_type=type_hints["metrics"])
8732
8781
  check_type(argname="argument namespace", value=namespace, expected_type=type_hints["namespace"])
8733
8782
  check_type(argname="argument statistic", value=statistic, expected_type=type_hints["statistic"])
8734
- check_type(argname="argument dimensions", value=dimensions, expected_type=type_hints["dimensions"])
8735
8783
  check_type(argname="argument unit", value=unit, expected_type=type_hints["unit"])
8736
- self._values: typing.Dict[builtins.str, typing.Any] = {
8737
- "metric_name": metric_name,
8738
- "namespace": namespace,
8739
- "statistic": statistic,
8740
- }
8784
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
8741
8785
  if dimensions is not None:
8742
8786
  self._values["dimensions"] = dimensions
8787
+ if metric_name is not None:
8788
+ self._values["metric_name"] = metric_name
8789
+ if metrics is not None:
8790
+ self._values["metrics"] = metrics
8791
+ if namespace is not None:
8792
+ self._values["namespace"] = namespace
8793
+ if statistic is not None:
8794
+ self._values["statistic"] = statistic
8743
8795
  if unit is not None:
8744
8796
  self._values["unit"] = unit
8745
8797
 
8746
8798
  @builtins.property
8747
- def metric_name(self) -> builtins.str:
8799
+ def dimensions(
8800
+ self,
8801
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricDimensionProperty"]]]]:
8802
+ '''The dimensions of the metric.
8803
+
8804
+ Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
8805
+
8806
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-dimensions
8807
+ '''
8808
+ result = self._values.get("dimensions")
8809
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricDimensionProperty"]]]], result)
8810
+
8811
+ @builtins.property
8812
+ def metric_name(self) -> typing.Optional[builtins.str]:
8748
8813
  '''The name of the metric.
8749
8814
 
8750
8815
  To get the exact metric name, namespace, and dimensions, inspect the `Metric <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html>`_ object that is returned by a call to `ListMetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html>`_ .
@@ -8752,41 +8817,35 @@ class CfnScalingPolicy(
8752
8817
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-metricname
8753
8818
  '''
8754
8819
  result = self._values.get("metric_name")
8755
- assert result is not None, "Required property 'metric_name' is missing"
8756
- return typing.cast(builtins.str, result)
8820
+ return typing.cast(typing.Optional[builtins.str], result)
8757
8821
 
8758
8822
  @builtins.property
8759
- def namespace(self) -> builtins.str:
8823
+ def metrics(
8824
+ self,
8825
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.TargetTrackingMetricDataQueryProperty"]]]]:
8826
+ '''
8827
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-metrics
8828
+ '''
8829
+ result = self._values.get("metrics")
8830
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.TargetTrackingMetricDataQueryProperty"]]]], result)
8831
+
8832
+ @builtins.property
8833
+ def namespace(self) -> typing.Optional[builtins.str]:
8760
8834
  '''The namespace of the metric.
8761
8835
 
8762
8836
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-namespace
8763
8837
  '''
8764
8838
  result = self._values.get("namespace")
8765
- assert result is not None, "Required property 'namespace' is missing"
8766
- return typing.cast(builtins.str, result)
8839
+ return typing.cast(typing.Optional[builtins.str], result)
8767
8840
 
8768
8841
  @builtins.property
8769
- def statistic(self) -> builtins.str:
8842
+ def statistic(self) -> typing.Optional[builtins.str]:
8770
8843
  '''The statistic of the metric.
8771
8844
 
8772
8845
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-statistic
8773
8846
  '''
8774
8847
  result = self._values.get("statistic")
8775
- assert result is not None, "Required property 'statistic' is missing"
8776
- return typing.cast(builtins.str, result)
8777
-
8778
- @builtins.property
8779
- def dimensions(
8780
- self,
8781
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricDimensionProperty"]]]]:
8782
- '''The dimensions of the metric.
8783
-
8784
- Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
8785
-
8786
- :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-customizedmetricspecification.html#cfn-autoscaling-scalingpolicy-customizedmetricspecification-dimensions
8787
- '''
8788
- result = self._values.get("dimensions")
8789
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricDimensionProperty"]]]], result)
8848
+ return typing.cast(typing.Optional[builtins.str], result)
8790
8849
 
8791
8850
  @builtins.property
8792
8851
  def unit(self) -> typing.Optional[builtins.str]:
@@ -10572,15 +10631,37 @@ class CfnScalingPolicy(
10572
10631
 
10573
10632
  # the properties below are optional
10574
10633
  customized_metric_specification=autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty(
10575
- metric_name="metricName",
10576
- namespace="namespace",
10577
- statistic="statistic",
10578
-
10579
- # the properties below are optional
10580
10634
  dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
10581
10635
  name="name",
10582
10636
  value="value"
10583
10637
  )],
10638
+ metric_name="metricName",
10639
+ metrics=[autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
10640
+ id="id",
10641
+
10642
+ # the properties below are optional
10643
+ expression="expression",
10644
+ label="label",
10645
+ metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
10646
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
10647
+ metric_name="metricName",
10648
+ namespace="namespace",
10649
+
10650
+ # the properties below are optional
10651
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
10652
+ name="name",
10653
+ value="value"
10654
+ )]
10655
+ ),
10656
+ stat="stat",
10657
+
10658
+ # the properties below are optional
10659
+ unit="unit"
10660
+ ),
10661
+ return_data=False
10662
+ )],
10663
+ namespace="namespace",
10664
+ statistic="statistic",
10584
10665
  unit="unit"
10585
10666
  ),
10586
10667
  disable_scale_in=False,
@@ -10672,6 +10753,238 @@ class CfnScalingPolicy(
10672
10753
  k + "=" + repr(v) for k, v in self._values.items()
10673
10754
  )
10674
10755
 
10756
+ @jsii.data_type(
10757
+ jsii_type="aws-cdk-lib.aws_autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty",
10758
+ jsii_struct_bases=[],
10759
+ name_mapping={
10760
+ "id": "id",
10761
+ "expression": "expression",
10762
+ "label": "label",
10763
+ "metric_stat": "metricStat",
10764
+ "return_data": "returnData",
10765
+ },
10766
+ )
10767
+ class TargetTrackingMetricDataQueryProperty:
10768
+ def __init__(
10769
+ self,
10770
+ *,
10771
+ id: builtins.str,
10772
+ expression: typing.Optional[builtins.str] = None,
10773
+ label: typing.Optional[builtins.str] = None,
10774
+ metric_stat: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnScalingPolicy.TargetTrackingMetricStatProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
10775
+ return_data: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
10776
+ ) -> None:
10777
+ '''
10778
+ :param id:
10779
+ :param expression:
10780
+ :param label:
10781
+ :param metric_stat:
10782
+ :param return_data:
10783
+
10784
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html
10785
+ :exampleMetadata: fixture=_generated
10786
+
10787
+ Example::
10788
+
10789
+ # The code below shows an example of how to instantiate this type.
10790
+ # The values are placeholders you should change.
10791
+ from aws_cdk import aws_autoscaling as autoscaling
10792
+
10793
+ target_tracking_metric_data_query_property = autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
10794
+ id="id",
10795
+
10796
+ # the properties below are optional
10797
+ expression="expression",
10798
+ label="label",
10799
+ metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
10800
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
10801
+ metric_name="metricName",
10802
+ namespace="namespace",
10803
+
10804
+ # the properties below are optional
10805
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
10806
+ name="name",
10807
+ value="value"
10808
+ )]
10809
+ ),
10810
+ stat="stat",
10811
+
10812
+ # the properties below are optional
10813
+ unit="unit"
10814
+ ),
10815
+ return_data=False
10816
+ )
10817
+ '''
10818
+ if __debug__:
10819
+ type_hints = typing.get_type_hints(_typecheckingstub__db2b2d9653863b1d1b8f67347857edde6d9dc3f6f755a593d8da143f90fe6fe7)
10820
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
10821
+ check_type(argname="argument expression", value=expression, expected_type=type_hints["expression"])
10822
+ check_type(argname="argument label", value=label, expected_type=type_hints["label"])
10823
+ check_type(argname="argument metric_stat", value=metric_stat, expected_type=type_hints["metric_stat"])
10824
+ check_type(argname="argument return_data", value=return_data, expected_type=type_hints["return_data"])
10825
+ self._values: typing.Dict[builtins.str, typing.Any] = {
10826
+ "id": id,
10827
+ }
10828
+ if expression is not None:
10829
+ self._values["expression"] = expression
10830
+ if label is not None:
10831
+ self._values["label"] = label
10832
+ if metric_stat is not None:
10833
+ self._values["metric_stat"] = metric_stat
10834
+ if return_data is not None:
10835
+ self._values["return_data"] = return_data
10836
+
10837
+ @builtins.property
10838
+ def id(self) -> builtins.str:
10839
+ '''
10840
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html#cfn-autoscaling-scalingpolicy-targettrackingmetricdataquery-id
10841
+ '''
10842
+ result = self._values.get("id")
10843
+ assert result is not None, "Required property 'id' is missing"
10844
+ return typing.cast(builtins.str, result)
10845
+
10846
+ @builtins.property
10847
+ def expression(self) -> typing.Optional[builtins.str]:
10848
+ '''
10849
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html#cfn-autoscaling-scalingpolicy-targettrackingmetricdataquery-expression
10850
+ '''
10851
+ result = self._values.get("expression")
10852
+ return typing.cast(typing.Optional[builtins.str], result)
10853
+
10854
+ @builtins.property
10855
+ def label(self) -> typing.Optional[builtins.str]:
10856
+ '''
10857
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html#cfn-autoscaling-scalingpolicy-targettrackingmetricdataquery-label
10858
+ '''
10859
+ result = self._values.get("label")
10860
+ return typing.cast(typing.Optional[builtins.str], result)
10861
+
10862
+ @builtins.property
10863
+ def metric_stat(
10864
+ self,
10865
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.TargetTrackingMetricStatProperty"]]:
10866
+ '''
10867
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html#cfn-autoscaling-scalingpolicy-targettrackingmetricdataquery-metricstat
10868
+ '''
10869
+ result = self._values.get("metric_stat")
10870
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.TargetTrackingMetricStatProperty"]], result)
10871
+
10872
+ @builtins.property
10873
+ def return_data(
10874
+ self,
10875
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
10876
+ '''
10877
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricdataquery.html#cfn-autoscaling-scalingpolicy-targettrackingmetricdataquery-returndata
10878
+ '''
10879
+ result = self._values.get("return_data")
10880
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
10881
+
10882
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
10883
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
10884
+
10885
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
10886
+ return not (rhs == self)
10887
+
10888
+ def __repr__(self) -> str:
10889
+ return "TargetTrackingMetricDataQueryProperty(%s)" % ", ".join(
10890
+ k + "=" + repr(v) for k, v in self._values.items()
10891
+ )
10892
+
10893
+ @jsii.data_type(
10894
+ jsii_type="aws-cdk-lib.aws_autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty",
10895
+ jsii_struct_bases=[],
10896
+ name_mapping={"metric": "metric", "stat": "stat", "unit": "unit"},
10897
+ )
10898
+ class TargetTrackingMetricStatProperty:
10899
+ def __init__(
10900
+ self,
10901
+ *,
10902
+ metric: typing.Union[_IResolvable_da3f097b, typing.Union["CfnScalingPolicy.MetricProperty", typing.Dict[builtins.str, typing.Any]]],
10903
+ stat: builtins.str,
10904
+ unit: typing.Optional[builtins.str] = None,
10905
+ ) -> None:
10906
+ '''
10907
+ :param metric:
10908
+ :param stat:
10909
+ :param unit:
10910
+
10911
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricstat.html
10912
+ :exampleMetadata: fixture=_generated
10913
+
10914
+ Example::
10915
+
10916
+ # The code below shows an example of how to instantiate this type.
10917
+ # The values are placeholders you should change.
10918
+ from aws_cdk import aws_autoscaling as autoscaling
10919
+
10920
+ target_tracking_metric_stat_property = autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
10921
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
10922
+ metric_name="metricName",
10923
+ namespace="namespace",
10924
+
10925
+ # the properties below are optional
10926
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
10927
+ name="name",
10928
+ value="value"
10929
+ )]
10930
+ ),
10931
+ stat="stat",
10932
+
10933
+ # the properties below are optional
10934
+ unit="unit"
10935
+ )
10936
+ '''
10937
+ if __debug__:
10938
+ type_hints = typing.get_type_hints(_typecheckingstub__75bb120fe0d7723abf802e828deb5b42b75d441e35d1a2974ff03b0a094adfb2)
10939
+ check_type(argname="argument metric", value=metric, expected_type=type_hints["metric"])
10940
+ check_type(argname="argument stat", value=stat, expected_type=type_hints["stat"])
10941
+ check_type(argname="argument unit", value=unit, expected_type=type_hints["unit"])
10942
+ self._values: typing.Dict[builtins.str, typing.Any] = {
10943
+ "metric": metric,
10944
+ "stat": stat,
10945
+ }
10946
+ if unit is not None:
10947
+ self._values["unit"] = unit
10948
+
10949
+ @builtins.property
10950
+ def metric(
10951
+ self,
10952
+ ) -> typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricProperty"]:
10953
+ '''
10954
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-autoscaling-scalingpolicy-targettrackingmetricstat-metric
10955
+ '''
10956
+ result = self._values.get("metric")
10957
+ assert result is not None, "Required property 'metric' is missing"
10958
+ return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnScalingPolicy.MetricProperty"], result)
10959
+
10960
+ @builtins.property
10961
+ def stat(self) -> builtins.str:
10962
+ '''
10963
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-autoscaling-scalingpolicy-targettrackingmetricstat-stat
10964
+ '''
10965
+ result = self._values.get("stat")
10966
+ assert result is not None, "Required property 'stat' is missing"
10967
+ return typing.cast(builtins.str, result)
10968
+
10969
+ @builtins.property
10970
+ def unit(self) -> typing.Optional[builtins.str]:
10971
+ '''
10972
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-autoscaling-scalingpolicy-targettrackingmetricstat-unit
10973
+ '''
10974
+ result = self._values.get("unit")
10975
+ return typing.cast(typing.Optional[builtins.str], result)
10976
+
10977
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
10978
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
10979
+
10980
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
10981
+ return not (rhs == self)
10982
+
10983
+ def __repr__(self) -> str:
10984
+ return "TargetTrackingMetricStatProperty(%s)" % ", ".join(
10985
+ k + "=" + repr(v) for k, v in self._values.items()
10986
+ )
10987
+
10675
10988
 
10676
10989
  @jsii.data_type(
10677
10990
  jsii_type="aws-cdk-lib.aws_autoscaling.CfnScalingPolicyProps",
@@ -10861,15 +11174,37 @@ class CfnScalingPolicyProps:
10861
11174
 
10862
11175
  # the properties below are optional
10863
11176
  customized_metric_specification=autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty(
10864
- metric_name="metricName",
10865
- namespace="namespace",
10866
- statistic="statistic",
10867
-
10868
- # the properties below are optional
10869
11177
  dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
10870
11178
  name="name",
10871
11179
  value="value"
10872
11180
  )],
11181
+ metric_name="metricName",
11182
+ metrics=[autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
11183
+ id="id",
11184
+
11185
+ # the properties below are optional
11186
+ expression="expression",
11187
+ label="label",
11188
+ metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
11189
+ metric=autoscaling.CfnScalingPolicy.MetricProperty(
11190
+ metric_name="metricName",
11191
+ namespace="namespace",
11192
+
11193
+ # the properties below are optional
11194
+ dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
11195
+ name="name",
11196
+ value="value"
11197
+ )]
11198
+ ),
11199
+ stat="stat",
11200
+
11201
+ # the properties below are optional
11202
+ unit="unit"
11203
+ ),
11204
+ return_data=False
11205
+ )],
11206
+ namespace="namespace",
11207
+ statistic="statistic",
10873
11208
  unit="unit"
10874
11209
  ),
10875
11210
  disable_scale_in=False,
@@ -20617,10 +20952,11 @@ def _typecheckingstub__c7edad0553749ec58702ad72a2bc68104268b76221c11cb19d8dd477a
20617
20952
 
20618
20953
  def _typecheckingstub__8e7031340719d237d3182678de0dc2931e386340d37c2dd60e36be75ada41bb3(
20619
20954
  *,
20620
- metric_name: builtins.str,
20621
- namespace: builtins.str,
20622
- statistic: builtins.str,
20623
20955
  dimensions: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnScalingPolicy.MetricDimensionProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
20956
+ metric_name: typing.Optional[builtins.str] = None,
20957
+ metrics: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnScalingPolicy.TargetTrackingMetricDataQueryProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
20958
+ namespace: typing.Optional[builtins.str] = None,
20959
+ statistic: typing.Optional[builtins.str] = None,
20624
20960
  unit: typing.Optional[builtins.str] = None,
20625
20961
  ) -> None:
20626
20962
  """Type checking stubs"""
@@ -20759,6 +21095,26 @@ def _typecheckingstub__406f504322f9bf5761a5c07083390725c370252fcf12bd54230e1f028
20759
21095
  """Type checking stubs"""
20760
21096
  pass
20761
21097
 
21098
+ def _typecheckingstub__db2b2d9653863b1d1b8f67347857edde6d9dc3f6f755a593d8da143f90fe6fe7(
21099
+ *,
21100
+ id: builtins.str,
21101
+ expression: typing.Optional[builtins.str] = None,
21102
+ label: typing.Optional[builtins.str] = None,
21103
+ metric_stat: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnScalingPolicy.TargetTrackingMetricStatProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
21104
+ return_data: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
21105
+ ) -> None:
21106
+ """Type checking stubs"""
21107
+ pass
21108
+
21109
+ def _typecheckingstub__75bb120fe0d7723abf802e828deb5b42b75d441e35d1a2974ff03b0a094adfb2(
21110
+ *,
21111
+ metric: typing.Union[_IResolvable_da3f097b, typing.Union[CfnScalingPolicy.MetricProperty, typing.Dict[builtins.str, typing.Any]]],
21112
+ stat: builtins.str,
21113
+ unit: typing.Optional[builtins.str] = None,
21114
+ ) -> None:
21115
+ """Type checking stubs"""
21116
+ pass
21117
+
20762
21118
  def _typecheckingstub__fa1549144f025fb75ca19967d6520b5eaada79209726c0ec131f1146e087fc7d(
20763
21119
  *,
20764
21120
  auto_scaling_group_name: builtins.str,
@@ -77,7 +77,8 @@ git_hub_source = codebuild.Source.git_hub(
77
77
  webhook=True, # optional, default: true if `webhookFilters` were provided, false otherwise
78
78
  webhook_triggers_batch_build=True, # optional, default is false
79
79
  webhook_filters=[
80
- codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message")
80
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message"),
81
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.RELEASED).and_branch_is("main")
81
82
  ]
82
83
  )
83
84
  ```
@@ -8185,7 +8186,8 @@ class EventAction(enum.Enum):
8185
8186
  webhook=True, # optional, default: true if `webhookFilters` were provided, false otherwise
8186
8187
  webhook_triggers_batch_build=True, # optional, default is false
8187
8188
  webhook_filters=[
8188
- codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message")
8189
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message"),
8190
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.RELEASED).and_branch_is("main")
8189
8191
  ]
8190
8192
  )
8191
8193
  '''
@@ -8196,6 +8198,8 @@ class EventAction(enum.Enum):
8196
8198
  '''Creating a Pull Request.'''
8197
8199
  PULL_REQUEST_UPDATED = "PULL_REQUEST_UPDATED"
8198
8200
  '''Updating a Pull Request.'''
8201
+ PULL_REQUEST_CLOSED = "PULL_REQUEST_CLOSED"
8202
+ '''Closing a Pull Request.'''
8199
8203
  PULL_REQUEST_MERGED = "PULL_REQUEST_MERGED"
8200
8204
  '''Merging a Pull Request.'''
8201
8205
  PULL_REQUEST_REOPENED = "PULL_REQUEST_REOPENED"
@@ -8203,6 +8207,21 @@ class EventAction(enum.Enum):
8203
8207
 
8204
8208
  Note that this event is only supported for GitHub and GitHubEnterprise sources.
8205
8209
  '''
8210
+ RELEASED = "RELEASED"
8211
+ '''A release is created in the repository.
8212
+
8213
+ Works with GitHub only.
8214
+ '''
8215
+ PRERELEASED = "PRERELEASED"
8216
+ '''A prerelease is created in the repository.
8217
+
8218
+ Works with GitHub only.
8219
+ '''
8220
+ WORKFLOW_JOB_QUEUED = "WORKFLOW_JOB_QUEUED"
8221
+ '''A workflow job is queued in the repository.
8222
+
8223
+ Works with GitHub only.
8224
+ '''
8206
8225
 
8207
8226
 
8208
8227
  @jsii.data_type(
@@ -8349,7 +8368,8 @@ class FilterGroup(
8349
8368
  webhook=True, # optional, default: true if `webhookFilters` were provided, false otherwise
8350
8369
  webhook_triggers_batch_build=True, # optional, default is false
8351
8370
  webhook_filters=[
8352
- codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message")
8371
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.PUSH).and_branch_is("main").and_commit_message_is("the commit message"),
8372
+ codebuild.FilterGroup.in_event_of(codebuild.EventAction.RELEASED).and_branch_is("main")
8353
8373
  ]
8354
8374
  )
8355
8375
  '''