# packages

pkgId: 5f820c6983578e28a6fae033aabcbbd027ffcc16f456af119411fb7fddfdd129
name: python-aws-cdk.aws-iot-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::IoT
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-iot-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  AWS IoT Core lets you connect billions of IoT devices and route trillions of
  messages to AWS services without managing infrastructure.

  Create a topic rule that give your devices the ability to interact with AWS services.
  You can create a topic rule with an action that invoke the Lambda action as following:
  ```python
  func = lambda_.Function(self, "MyFunction",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_inline("""
              exports.handler = (event) => {
                console.log("It is test for lambda action of AWS IoT Rule.", event);
              };""")
  )
  iot.TopicRule(self, "TopicRule",
      topic_rule_name="MyTopicRule",  # optional
      description="invokes the lambda function",  # optional
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      actions=[actions.LambdaFunctionAction(func)]
  )
  ```
  Or, you can add an action after constructing the `TopicRule` instance as following:
  ```python

  topic_rule = iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'")
  )
  topic_rule.add_action(actions.LambdaFunctionAction(func))
  ```
  You can also supply `errorAction` as following,
  and the IoT Rule will trigger it if a rule's action is unable to perform:
  ```python
  import aws_cdk.aws_logs as logs
  log_group = logs.LogGroup(self, "MyLogGroup")
  iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      error_action=actions.CloudWatchLogsAction(log_group)
  )
  ```
  If you wanna make the topic rule disable, add property `enabled: false` as following:
  ```python
  iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      enabled=False
  )
  ```
  See also [@aws-cdk/aws-iot-actions-alpha](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-iot-actions-alpha-readme.html) for other actions.

  AWS IoT provides a [logging feature](https://docs.aws.amazon.com/iot/latest/developerguide/configure-logging.html) that allows you to monitor and log AWS IoT activity.
  You can enable IoT logging with the following code:
  ```python
  iot.Logging(self, "Logging",
      log_level=iot.LogLevel.INFO
  )
  ```
  **Note**: All logs are forwarded to the `AWSIotLogsV2` log group in CloudWatch.

  An [AWS IoT Device Defender audit looks](https://docs.aws.amazon.com/iot-device-defender/latest/devguide/device-defender-audit.html) at account- and device-related settings and policies to ensure security measures are in place.
  An audit can help you detect any drifts from security best practices or access policies.

  The IoT audit includes [various audit checks](https://docs.aws.amazon.com/iot-device-defender/latest/devguide/device-defender-audit-checks.html), and it is necessary to configure settings to enable those checks.
  You can enable an account audit configuration with the following code:
  ```python


  iot.AccountAuditConfiguration(self, "AuditConfiguration",
      target_topic=target_topic
  )
  ```
  By default, all audit checks are enabled, but it is also possible to enable only specific audit checks.
  ```python
  iot.AccountAuditConfiguration(self, "AuditConfiguration",
      check_configuration=iot.CheckConfiguration(
          
          authenticated_cognito_role_overly_permissive_check=True,
          
          ca_certificate_expiring_check=undefined,
          
          ca_certificate_key_quality_check=False,
          conflicting_client_ids_check=False,
          device_certificate_expiring_check=False,
          device_certificate_key_quality_check=False,
          device_certificate_shared_check=False,
          intermediate_ca_revoked_for_active_device_certificates_check=False,
          io_tPolicy_potential_mis_configuration_check=False,
          iot_policy_overly_permissive_check=False,
          iot_role_alias_allows_access_to_unused_services_check=False,
          iot_role_alias_overly_permissive_check=False,
          logging_disabled_check=False,
          revoked_ca_certificate_still_active_check=False,
          revoked_device_certificate_still_active_check=False,
          unauthenticated_cognito_role_overly_permissive_check=False
      )
  )
  ```


pkgId: 1945674c46dd68a91d6b80dc06a9ff78918eeb13ba2c1e139ca6a9e8d9138dd9
name: python-aws-cdk.aws-iot-alpha
arch: src
version: 2.166.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::IoT
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-iot-alpha-2.166.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  AWS IoT Core lets you connect billions of IoT devices and route trillions of
  messages to AWS services without managing infrastructure.

  Create a topic rule that give your devices the ability to interact with AWS services.
  You can create a topic rule with an action that invoke the Lambda action as following:
  ```python
  func = lambda_.Function(self, "MyFunction",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_inline("""
              exports.handler = (event) => {
                console.log("It is test for lambda action of AWS IoT Rule.", event);
              };""")
  )
  iot.TopicRule(self, "TopicRule",
      topic_rule_name="MyTopicRule",  # optional
      description="invokes the lambda function",  # optional
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      actions=[actions.LambdaFunctionAction(func)]
  )
  ```
  Or, you can add an action after constructing the `TopicRule` instance as following:
  ```python

  topic_rule = iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'")
  )
  topic_rule.add_action(actions.LambdaFunctionAction(func))
  ```
  You can also supply `errorAction` as following,
  and the IoT Rule will trigger it if a rule's action is unable to perform:
  ```python
  import aws_cdk.aws_logs as logs
  log_group = logs.LogGroup(self, "MyLogGroup")
  iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      error_action=actions.CloudWatchLogsAction(log_group)
  )
  ```
  If you wanna make the topic rule disable, add property `enabled: false` as following:
  ```python
  iot.TopicRule(self, "TopicRule",
      sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, timestamp() as timestamp FROM 'device/+/data'"),
      enabled=False
  )
  ```
  See also [@aws-cdk/aws-iot-actions-alpha](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-iot-actions-alpha-readme.html) for other actions.

  AWS IoT provides a [logging feature](https://docs.aws.amazon.com/iot/latest/developerguide/configure-logging.html) that allows you to monitor and log AWS IoT activity.
  You can enable IoT logging with the following code:
  ```python
  iot.Logging(self, "Logging",
      log_level=iot.LogLevel.INFO
  )
  ```
  **Note**: All logs are forwarded to the `AWSIotLogsV2` log group in CloudWatch.

  An [AWS IoT Device Defender audit looks](https://docs.aws.amazon.com/iot-device-defender/latest/devguide/device-defender-audit.html) at account- and device-related settings and policies to ensure security measures are in place.
  An audit can help you detect any drifts from security best practices or access policies.

  The IoT audit includes [various audit checks](https://docs.aws.amazon.com/iot-device-defender/latest/devguide/device-defender-audit-checks.html), and it is necessary to configure settings to enable those checks.
  You can enable an account audit configuration with the following code:
  ```python


  iot.AccountAuditConfiguration(self, "AuditConfiguration",
      target_topic=target_topic
  )
  ```
  By default, all audit checks are enabled, but it is also possible to enable only specific audit checks.
  ```python
  iot.AccountAuditConfiguration(self, "AuditConfiguration",
      check_configuration=iot.CheckConfiguration(
          
          authenticated_cognito_role_overly_permissive_check=True,
          
          ca_certificate_expiring_check=undefined,
          
          ca_certificate_key_quality_check=False,
          conflicting_client_ids_check=False,
          device_certificate_expiring_check=False,
          device_certificate_key_quality_check=False,
          device_certificate_shared_check=False,
          intermediate_ca_revoked_for_active_device_certificates_check=False,
          io_tPolicy_potential_mis_configuration_check=False,
          iot_policy_overly_permissive_check=False,
          iot_role_alias_allows_access_to_unused_services_check=False,
          iot_role_alias_overly_permissive_check=False,
          logging_disabled_check=False,
          revoked_ca_certificate_still_active_check=False,
          revoked_device_certificate_still_active_check=False,
          unauthenticated_cognito_role_overly_permissive_check=False
      )
  )
  ```

  You can create a [scheduled audit](https://docs.aws.amazon.com/iot-device-defender/latest/devguide/AuditCommands.html#device-defender-AuditCommandsManageSchedules) that is run at a specified time interval. Checks must be enabled for your account by creating `AccountAuditConfiguration`.
  ```python


  daily_audit = iot.ScheduledAudit(self, "DailyAudit",
      account_audit_configuration=config,
      frequency=iot.Frequency.DAILY,
      audit_checks=[iot.AuditCheck.AUTHENTICATED_COGNITO_ROLE_OVERLY_PERMISSIVE_CHECK
      ]
  )

  weekly_audit = iot.ScheduledAudit(self, "WeeklyAudit",
      account_audit_configuration=config,
      frequency=iot.Frequency.WEEKLY,
      day_of_week=iot.DayOfWeek.SUNDAY,
      audit_checks=[iot.AuditCheck.CA_CERTIFICATE_EXPIRING_CHECK
      ]
  )

  monthly_audit = iot.ScheduledAudit(self, "MonthlyAudit",
      account_audit_configuration=config,
      frequency=iot.Frequency.MONTHLY,
      day_of_month=iot.DayOfMonth.of(1),
      audit_checks=[iot.AuditCheck.CA_CERTIFICATE_KEY_QUALITY_CHECK
      ]
  )
  ```


pkgId: f0e9df26caa325b66864a15f17f295df088f2ec30a62bb9aa98d01f1cf10f05a
name: python-aws-cdk.aws-iotevents-actions-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: Receipt Detector Model actions for AWS IoT Events
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-iotevents-actions-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This library contains integration classes to specify actions of state events of Detector Model in `@aws-cdk/aws-iotevents-alpha`.
  Instances of these classes should be passed to `State` defined in `@aws-cdk/aws-iotevents-alpha`
  You can define built-in actions to use a timer or set a variable, or send data to other AWS resources.
  This library contains integration classes to use a timer or set a variable, or send data to other AWS resources.
  AWS IoT Events can trigger actions when it detects a specified event or transition event.
  Currently supported are:
  * Use timer
  * Set variable to detector instance
  * Invoke a Lambda function

  The code snippet below creates an Action that creates the timer with duration in seconds.
  ```python

  import aws_cdk.aws_iotevents_alpha as iotevents
  import aws_cdk.aws_iotevents_actions_alpha as actions

  state = iotevents.State(
      state_name="MyState",
      on_enter=[iotevents.Event(
          event_name="test-event",
          condition=iotevents.Expression.current_input(input),
          actions=[
              actions.SetTimerAction("MyTimer", {
                  "duration": cdk.Duration.seconds(60)
              })
          ]
      )]
  )
  ```
  Setting duration by [IoT Events Expression](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html):
  ```python

  actions.SetTimerAction("MyTimer",
      duration_expression=iotevents.Expression.input_attribute(input, "payload.durationSeconds")
  )
  ```
  And the timer can be reset and cleared. Below is an example of general
  [Device HeartBeat](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-examples-dhb.html)
  Detector Model:
  ```python

  online = iotevents.State(
      state_name="Online",
      on_enter=[{
          "event_name": "enter-event",
          "condition": iotevents.Expression.current_input(input),
          "actions": [
              actions.SetTimerAction("MyTimer",
                  duration=cdk.Duration.seconds(60)
              )
          ]
      }],
      on_input=[{
          "event_name": "input-event",
          "condition": iotevents.Expression.current_input(input),
          "actions": [
              actions.ResetTimerAction("MyTimer")
          ]
      }],
      on_exit=[{
          "event_name": "exit-event",
          "actions": [
              actions.ClearTimerAction("MyTimer")
          ]
      }]
  )
  offline = iotevents.State(state_name="Offline")
  online.transition_to(offline, when=iotevents.Expression.timeout("MyTimer"))
  offline.transition_to(online, when=iotevents.Expression.current_input(input))
  ```

  The code snippet below creates an Action that set variable to detector instance
  when it is triggered.
  ```python
  import aws_cdk.aws_iotevents_alpha as iotevents
  import aws_cdk.aws_iotevents_actions_alpha as actions

  state = iotevents.State(
      state_name="MyState",
      on_enter=[iotevents.Event(
          event_name="test-event",
          condition=iotevents.Expression.current_input(input),
          actions=[
              actions.SetVariableAction("MyVariable",
                  iotevents.Expression.input_attribute(input, "payload.temperature"))
          ]
      )]
  )
  ```

  The code snippet below creates an Action that invoke a Lambda function
  when it is triggered.
  ```python
  import aws_cdk.aws_iotevents_alpha as iotevents
  import aws_cdk.aws_iotevents_actions_alpha as actions
  import aws_cdk.aws_lambda as lambda_


  state = iotevents.State(
      state_name="MyState",
      on_enter=[iotevents.Event(
          event_name="test-event",
          condition=iotevents.Expression.current_input(input),
          actions=[actions.LambdaInvokeAction(func)]
      )]
  )
  ```


pkgId: 1b4df00f5f8fe94c71ea996685ee1400a9c582149601fcf9db12484e4c0649d9
name: python-aws-cdk.aws-iotevents-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::IoTEvents
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-iotevents-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  AWS IoT Events enables you to monitor your equipment or device fleets for
  failures or changes in operation, and to trigger actions when such events
  occur.

  The following example creates an AWS IoT Events detector model to your stack.
  The detector model need a reference to at least one AWS IoT Events input.
  AWS IoT Events inputs enable the detector to get MQTT payload values from IoT Core rules.
  You can define built-in actions to use a timer or set a variable, or send data to other AWS resources.
  See also [@aws-cdk/aws-iotevents-actions-alpha](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-iotevents-actions-alpha-readme.html) for other actions.
  ```python
  import aws_cdk.aws_iotevents_alpha as iotevents
  import aws_cdk.aws_iotevents_actions_alpha as actions
  import aws_cdk.aws_lambda as lambda_

  input = iotevents.Input(self, "MyInput",
      input_name="my_input",  # optional
      attribute_json_paths=["payload.deviceId", "payload.temperature"]
  )
  warm_state = iotevents.State(
      state_name="warm",
      on_enter=[iotevents.Event(
          event_name="test-enter-event",
          condition=iotevents.Expression.current_input(input),
          actions=[actions.LambdaInvokeAction(func)]
      )],
      on_input=[iotevents.Event( # optional
          event_name="test-input-event",
          actions=[actions.LambdaInvokeAction(func)])],
      on_exit=[iotevents.Event( # optional
          event_name="test-exit-event",
          actions=[actions.LambdaInvokeAction(func)])]
  )
  cold_state = iotevents.State(
      state_name="cold"
  )

  warm_state.transition_to(cold_state,
      event_name="to_coldState",  # optional property, default by combining the names of the States
      when=iotevents.Expression.lt(
          iotevents.Expression.input_attribute(input, "payload.temperature"),
          iotevents.Expression.from_string("15")),
      executing=[actions.LambdaInvokeAction(func)]
  )

  cold_state.transition_to(warm_state,
      when=iotevents.Expression.gte(
          iotevents.Expression.input_attribute(input, "payload.temperature"),
          iotevents.Expression.from_string("15"))
  )
  iotevents.DetectorModel(self, "MyDetectorModel",
      detector_model_name="test-detector-model",  # optional
      description="test-detector-model-description",  # optional property, default is none
      evaluation_method=iotevents.EventEvaluation.SERIAL,  # optional property, default is iotevents.EventEvaluation.BATCH
      detector_key="payload.deviceId",  # optional property, default is none and single detector instance will be created and all inputs will be routed to it
      initial_state=warm_state
  )
  ```
  To grant permissions to put messages in the input,
  you can use the `grantWrite()` method:
  ```python
  import aws_cdk.aws_iam as iam
  import aws_cdk.aws_iotevents_alpha as iotevents

  input = iotevents.Input.from_input_name(self, "MyInput", "my_input")
  input.grant_write(grantable)
  ```


pkgId: f61c100a61e46ebd02b2833c5a6db8b215cf6bb9fa97ab707d2234d4fe3621a9
name: python-aws-cdk.aws-ivs-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::IVS
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-ivs-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  Amazon Interactive Video Service (Amazon IVS) is a managed live streaming
  solution that is quick and easy to set up, and ideal for creating interactive
  video experiences. Send your live streams to Amazon IVS using streaming software
  and the service does everything you need to make low-latency live video
  available to any viewer around the world, letting you focus on building
  interactive experiences alongside the live video. You can easily customize and
  enhance the audience experience through the Amazon IVS player SDK and timed
  metadata APIs, allowing you to build a more valuable relationship with your
  viewers on your own websites and applications.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

  An Amazon IVS channel stores configuration information related to your live
  stream. You first create a channel and then contribute video to it using the
  channel’s stream key to start your live stream.
  You can create a channel
  ```python
  my_channel = ivs.Channel(self, "Channel")
  ```
  You can use Advanced Channel type by setting the `type` property to
  `ivs.ChannelType.ADVANCED_HD` or `ivs.ChannelType.ADVANCED_SD`.
  Additionally, when using the Advanced Channel type, you can set
  the `preset` property to `ivs.Preset.CONSTRAINED_BANDWIDTH_DELIVERY`
  or `ivs.Preset.HIGHER_BANDWIDTH_DELIVERY`.
  For more information, see [Amazon IVS Streaming Configuration](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/streaming-config.html).
  ```python
  my_channel = ivs.Channel(self, "myChannel",
      type=ivs.ChannelType.ADVANCED_HD,
      preset=ivs.Preset.CONSTRAINED_BANDWIDTH_DELIVERY
  )
  ```
  If you want to use RTMP ingest, set `insecureIngest` property to `true`.
  By default, `insecureIngest` is `false` which means using RTMPS ingest.
  **⚠ Note:** RTMP ingest might result in reduced security for your streams. AWS recommends that you use RTMPS for ingest, unless you have specific and verified use cases. For more information, see [Encoder Settings](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/streaming-config.html#streaming-config-settings).
  ```python
  my_rtmp_channel = ivs.Channel(self, "myRtmpChannel",
      type=ivs.ChannelType.STANDARD,
      insecure_ingest=True
  )
  ```

  You can reference an existing channel, for example, if you need to create a
  stream key for an existing channel
  ```python
  my_channel = ivs.Channel.from_channel_arn(self, "Channel", my_channel_arn)
  ```

  A Stream Key is used by a broadcast encoder to initiate a stream and identify
  to Amazon IVS which customer and channel the stream is for. If you are
  storing this value, it should be treated as if it were a password.
  You can create a stream key for a given channel
  ```python
  my_stream_key = my_channel.add_stream_key("StreamKey")
  ```

  Amazon IVS offers the ability to create private channels, allowing
  you to restrict your streams by channel or viewer. You control access
  to video playback by enabling playback authorization on channels and
  generating signed JSON Web Tokens (JWTs) for authorized playback requests.
  A playback token is a JWT that you sign (with a playback authorization key)
  and include with every playback request for a channel that has playback
  authorization enabled.
  In order for Amazon IVS to validate the token, you need to upload
  the public key that corresponds to the private key you use to sign the token.
  ```python
  key_pair = ivs.PlaybackKeyPair(self, "PlaybackKeyPair",
      public_key_material=my_public_key_pem_string
  )
  ```
  Then, when creating a channel, specify the authorized property
  ```python
  my_channel = ivs.Channel(self, "Channel",
      authorized=True
  )
  ```


pkgId: 71df0e835546a8a374e349b1f4fba0fba3e84f21dde32972d53aee1b55785987
name: python-aws-cdk.aws-ivs-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::IVS
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-ivs-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  Amazon Interactive Video Service (Amazon IVS) is a managed live streaming
  solution that is quick and easy to set up, and ideal for creating interactive
  video experiences. Send your live streams to Amazon IVS using streaming software
  and the service does everything you need to make low-latency live video
  available to any viewer around the world, letting you focus on building
  interactive experiences alongside the live video. You can easily customize and
  enhance the audience experience through the Amazon IVS player SDK and timed
  metadata APIs, allowing you to build a more valuable relationship with your
  viewers on your own websites and applications.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

  An Amazon IVS channel stores configuration information related to your live
  stream. You first create a channel and then contribute video to it using the
  channel’s stream key to start your live stream.
  You can create a channel
  ```python
  my_channel = ivs.Channel(self, "Channel")
  ```
  You can use Advanced Channel type by setting the `type` property to
  `ivs.ChannelType.ADVANCED_HD` or `ivs.ChannelType.ADVANCED_SD`.
  Additionally, when using the Advanced Channel type, you can set
  the `preset` property to `ivs.Preset.CONSTRAINED_BANDWIDTH_DELIVERY`
  or `ivs.Preset.HIGHER_BANDWIDTH_DELIVERY`.
  For more information, see [Amazon IVS Streaming Configuration](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/streaming-config.html).
  ```python
  my_channel = ivs.Channel(self, "myChannel",
      type=ivs.ChannelType.ADVANCED_HD,
      preset=ivs.Preset.CONSTRAINED_BANDWIDTH_DELIVERY
  )
  ```
  If you want to use RTMP ingest, set `insecureIngest` property to `true`.
  By default, `insecureIngest` is `false` which means using RTMPS ingest.
  **⚠ Note:** RTMP ingest might result in reduced security for your streams. AWS recommends that you use RTMPS for ingest, unless you have specific and verified use cases. For more information, see [Encoder Settings](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/streaming-config.html#streaming-config-settings).
  ```python
  my_rtmp_channel = ivs.Channel(self, "myRtmpChannel",
      type=ivs.ChannelType.STANDARD,
      insecure_ingest=True
  )
  ```

  You can reference an existing channel, for example, if you need to create a
  stream key for an existing channel
  ```python
  my_channel = ivs.Channel.from_channel_arn(self, "Channel", my_channel_arn)
  ```

  A Stream Key is used by a broadcast encoder to initiate a stream and identify
  to Amazon IVS which customer and channel the stream is for. If you are
  storing this value, it should be treated as if it were a password.
  You can create a stream key for a given channel
  ```python
  my_stream_key = my_channel.add_stream_key("StreamKey")
  ```

  Amazon IVS offers the ability to create private channels, allowing
  you to restrict your streams by channel or viewer. You control access
  to video playback by enabling playback authorization on channels and
  generating signed JSON Web Tokens (JWTs) for authorized playback requests.
  A playback token is a JWT that you sign (with a playback authorization key)
  and include with every playback request for a channel that has playback
  authorization enabled.
  In order for Amazon IVS to validate the token, you need to upload
  the public key that corresponds to the private key you use to sign the token.
  ```python
  key_pair = ivs.PlaybackKeyPair(self, "PlaybackKeyPair",
      public_key_material=my_public_key_pem_string
  )
  ```
  Then, when creating a channel, specify the authorized property
  ```python
  my_channel = ivs.Channel(self, "Channel",
      authorized=True
  )
  ```

  An Amazon IVS Recording Configuration stores settings that specify how a channel's live streams should be recorded.
  You can configure video quality, thumbnail generation, and where recordings are stored in Amazon S3.
  For more information about IVS recording, see [IVS Auto-Record to Amazon S3 | Low-Latency Streaming](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/record-to-s3.html).
  You can create a recording configuration:
  ```python

  recording_bucket = s3.Bucket(self, "RecordingBucket")

  recording_configuration = ivs.RecordingConfiguration(self, "RecordingConfiguration",
      bucket=recording_bucket
  )
  ```

  When you stream content to an Amazon IVS channel, auto-record-to-s3 uses the source video to generate multiple renditions.
  For more information, see [Discovering the Renditions of a Recording](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/record-to-s3.html#r2s3-recording-renditions).
  ```python

  recording_configuration = ivs.RecordingConfiguration(self, "RecordingConfiguration",
      bucket=recording_bucket,
      
      rendition_configuration=ivs.RenditionConfiguration.custom([ivs.Resolution.HD, ivs.Resolution.SD])
  )
  ```

  You can enable or disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.
  Thumbnail intervals may range from 1 second to 60 seconds; by default, thumbnail recording is enabled, at an interval of 60 seconds.
  For more information, see [Thumbnails](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/record-to-s3.html#r2s3-thumbnails).
  ```python

  recording_configuration = ivs.RecordingConfiguration(self, "RecordingConfiguration",
      bucket=recording_bucket,
      
      thumbnail_configuration=ivs.ThumbnailConfiguration.interval(ivs.Resolution.HD, [ivs.Storage.LATEST, ivs.Storage.SEQUENTIAL], Duration.seconds(30))
  )
  ```

  The `recordingReconnectWindow` property allows you to specify a window of time (in seconds) during which, if your stream is interrupted and a new stream is started, Amazon IVS tries to record to the same S3 prefix as the previous stream.
  In other words, if a broadcast disconnects and then reconnects within the specified interval, the multiple streams are considered a single broadcast and merged together.
  For more information, see [Merge Fragmented Streams](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/record-to-s3.html#r2s3-merge-fragmented-streams).
  ```python

  recording_configuration = ivs.RecordingConfiguration(self, "RecordingConfiguration",
      bucket=recording_bucket,
      
      recording_reconnect_window=Duration.seconds(60)
  )
  ```

  To enable recording for a channel, specify the recording configuration when creating the channel:
  ```python

  channel = ivs.Channel(self, "Channel",
      
      recording_configuration=recording_configuration
  )
  ```


pkgId: adf0dd367f39e1f3a435774b084d26a8796ccecb153890574369f1e38f22b5d9
name: python-aws-cdk.aws-kinesisanalytics-flink-alpha
arch: src
version: 2.166.0a0
epoch: 0
release: 1
summary: A CDK Construct Library for Kinesis Analytics Flink applications
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-kinesisanalytics-flink-alpha-2.166.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This package provides constructs for creating Kinesis Analytics Flink
  applications. To learn more about using using managed Flink applications, see
  the [AWS developer
  guide](https://docs.aws.amazon.com/kinesisanalytics/latest/java/).

  To create a new Flink application, use the `Application` construct:
  ```python
  import path as path
  import aws_cdk.aws_cloudwatch as cloudwatch
  import aws_cdk as core
  import aws_cdk.integ_tests_alpha as integ
  import aws_cdk.aws_kinesisanalytics_flink_alpha as flink
  app = core.App()
  stack = core.Stack(app, "FlinkAppTest")
  flink_runtimes = [flink.Runtime.FLINK_1_6, flink.Runtime.FLINK_1_8, flink.Runtime.FLINK_1_11, flink.Runtime.FLINK_1_13, flink.Runtime.FLINK_1_15, flink.Runtime.FLINK_1_18, flink.Runtime.FLINK_1_19, flink.Runtime.FLINK_1_20
  ]
  flink_runtimes.for_each((runtime) => {
        const flinkApp = new flink.Application(stack, `App-${runtime.value}`, {
          code: flink.ApplicationCode.fromAsset(path.join(__dirname, 'code-asset')),
          runtime: runtime,
        });
        new cloudwatch.Alarm(stack, `Alarm-${runtime.value}`, {
          metric: flinkApp.metricFullRestarts(),
          evaluationPeriods: 1,
          threshold: 3,
        });
      })
  integ.IntegTest(app, "ApplicationTest",
      test_cases=[stack]
  )
  ```
  The `code` property can use `fromAsset` as shown above to reference a local jar
  file in s3 or `fromBucket` to reference a file in s3.
  ```python
  import path as path
  import aws_cdk.aws_s3_assets as assets
  import aws_cdk as core
  import aws_cdk.aws_kinesisanalytics_flink_alpha as flink
  app = core.App()
  stack = core.Stack(app, "FlinkAppCodeFromBucketTest")
  asset = assets.Asset(stack, "CodeAsset",
      path=path.join(__dirname, "code-asset")
  )
  bucket = asset.bucket
  file_key = asset.s3_object_key
  flink.Application(stack, "App",
      code=flink.ApplicationCode.from_bucket(bucket, file_key),
      runtime=flink.Runtime.FLINK_1_19
  )
  app.synth()
  ```
  The `propertyGroups` property provides a way of passing arbitrary runtime
  properties to your Flink application. You can use the
  aws-kinesisanalytics-runtime library to [retrieve these
  properties](https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-properties.html#how-properties-access).
  ```python

  flink_app = flink.Application(self, "Application",
      property_groups={
          "FlinkApplicationProperties": {
              "input_stream_name": "my-input-kinesis-stream",
              "output_stream_name": "my-output-kinesis-stream"
          }
      },
      
      runtime=flink.Runtime.FLINK_1_20,
      code=flink.ApplicationCode.from_bucket(bucket, "my-app.jar")
  )
  ```
  Flink applications also have specific configuration for passing parameters
  when the Flink job starts. These include parameters for checkpointing,
  snapshotting, monitoring, and parallelism.
  ```python

  flink_app = flink.Application(self, "Application",
      code=flink.ApplicationCode.from_bucket(bucket, "my-app.jar"),
      runtime=flink.Runtime.FLINK_1_20,
      checkpointing_enabled=True,  # default is true
      checkpoint_interval=Duration.seconds(30),  # default is 1 minute
      min_pause_between_checkpoints=Duration.seconds(10),  # default is 5 seconds
      log_level=flink.LogLevel.ERROR,  # default is INFO
      metrics_level=flink.MetricsLevel.PARALLELISM,  # default is APPLICATION
      auto_scaling_enabled=False,  # default is true
      parallelism=32,  # default is 1
      parallelism_per_kpu=2,  # default is 1
      snapshots_enabled=False,  # default is true
      log_group=logs.LogGroup(self, "LogGroup")
  )
  ```
  Flink applications can optionally be deployed in a VPC:
  ```python


  flink_app = flink.Application(self, "Application",
      code=flink.ApplicationCode.from_bucket(bucket, "my-app.jar"),
      runtime=flink.Runtime.FLINK_1_20,
      vpc=vpc
  )
  ```


pkgId: 84efb5c38e7f8f6895d22a1738a25663b31c3fb7e86b9dbdbf73e34638fd414d
name: python-aws-cdk.aws-kinesisfirehose-alpha
arch: src
version: 2.159.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::KinesisFirehose
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-kinesisfirehose-alpha-2.159.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon Kinesis Data Firehose](https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html)
  is a service for fully-managed delivery of real-time streaming data to storage services
  such as Amazon S3, Amazon Redshift, Amazon Elasticsearch, Splunk, or any custom HTTP
  endpoint or third-party services such as Datadog, Dynatrace, LogicMonitor, MongoDB, New
  Relic, and Sumo Logic.
  Kinesis Data Firehose delivery streams are distinguished from Kinesis data streams in
  their models of consumption. Whereas consumers read from a data stream by actively pulling
  data from the stream, a delivery stream pushes data to its destination on a regular
  cadence. This means that data streams are intended to have consumers that do on-demand
  processing, like AWS Lambda or Amazon EC2. On the other hand, delivery streams are
  intended to have destinations that are sources for offline processing and analytics, such
  as Amazon S3 and Amazon Redshift.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk)
  project. It allows you to define Kinesis Data Firehose delivery streams.

  In order to define a Delivery Stream, you must specify a destination. An S3 bucket can be
  used as a destination. More supported destinations are covered [below](#destinations).
  ```python
  bucket = s3.Bucket(self, "Bucket")
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destinations.S3Bucket(bucket)]
  )
  ```
  The above example defines the following resources:
  * An S3 bucket
  * A Kinesis Data Firehose delivery stream with Direct PUT as the source and CloudWatch
    error logging turned on.
  * An IAM role which gives the delivery stream permission to write to the S3 bucket.

  There are two main methods of sourcing input data: Kinesis Data Streams and via a "direct
  put".
  See: [Sending Data to a Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-write.html)
  in the *Kinesis Data Firehose Developer Guide*.

  A delivery stream can read directly from a Kinesis data stream as a consumer of the data
  stream. Configure this behaviour by providing a data stream in the `sourceStream`
  property when constructing a delivery stream:
  ```python

  source_stream = kinesis.Stream(self, "Source Stream")
  firehose.DeliveryStream(self, "Delivery Stream",
      source_stream=source_stream,
      destinations=[destination]
  )
  ```

  Data must be provided via "direct put", ie., by using a `PutRecord` or
  `PutRecordBatch` API call. There are a number of ways of doing so, such as:
  * Kinesis Agent: a standalone Java application that monitors and delivers files while
    handling file rotation, checkpointing, and retries. See: [Writing to Kinesis Data Firehose Using Kinesis Agent](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-agents.html)
    in the *Kinesis Data Firehose Developer Guide*.
  * AWS SDK: a general purpose solution that allows you to deliver data to a delivery stream
    from anywhere using Java, .NET, Node.js, Python, or Ruby. See: [Writing to Kinesis Data Firehose Using the AWS SDK](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-sdk.html)
    in the *Kinesis Data Firehose Developer Guide*.
  * CloudWatch Logs: subscribe to a log group and receive filtered log events directly into
    a delivery stream. See: [logs-destinations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-logs-destinations-readme.html).
  * Eventbridge: add an event rule target to send events to a delivery stream based on the
    rule filtering. See: [events-targets](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-events-targets-readme.html).
  * SNS: add a subscription to send all notifications from the topic to a delivery
    stream. See: [sns-subscriptions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-sns-subscriptions-readme.html).
  * IoT: add an action to an IoT rule to send various IoT information to a delivery stream

  The following destinations are supported. See [kinesisfirehose-destinations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-kinesisfirehose-destinations-readme.html)
  for the implementations of these destinations.

  Defining a delivery stream with an S3 bucket destination:
  ```python

  s3_destination = destinations.S3Bucket(bucket)
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[s3_destination]
  )
  ```
  The S3 destination also supports custom dynamic prefixes. `dataOutputPrefix`
  will be used for files successfully delivered to S3. `errorOutputPrefix` will be added to
  failed records before writing them to S3.
  ```python

  s3_destination = destinations.S3Bucket(bucket,
      data_output_prefix="myFirehose/DeliveredYear=!{timestamp:yyyy}/anyMonth/rand=!{firehose:random-string}",
      error_output_prefix="myFirehoseFailures/!{firehose:error-output-type}/!{timestamp:yyyy}/anyMonth/!{timestamp:dd}"
  )
  ```
  See: [Custom S3 Prefixes](https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html)
  in the *Kinesis Data Firehose Developer Guide*.

  Enabling server-side encryption (SSE) requires Kinesis Data Firehose to encrypt all data
  sent to delivery stream when it is stored at rest. This means that data is encrypted
  before being written to the service's internal storage layer and decrypted after it is
  received from the internal storage layer. The service manages keys and cryptographic
  operations so that sources and destinations do not need to, as the data is encrypted and
  decrypted at the boundaries of the service (i.e., before the data is delivered to a
  destination). By default, delivery streams do not have SSE enabled.
  The Key Management Service keys (KMS keys) used for SSE can either be AWS-owned or
  customer-managed. AWS-owned KMS keys are created, owned and managed by AWS for use in
  multiple AWS accounts. As a customer, you cannot view, use, track, or manage these keys,
  and you are not charged for their use. On the other hand, customer-managed KMS keys are
  created and owned within your account and managed entirely by you. As a customer, you are
  responsible for managing access, rotation, aliases, and deletion for these keys, and you
  are changed for their use.
  See: [AWS KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys)
  in the *KMS Developer Guide*.
  ```python




  firehose.DeliveryStream(self, "Delivery Stream AWS Owned",
      encryption=firehose.StreamEncryption.aws_owned_key(),
      destinations=[destination]
  )

  firehose.DeliveryStream(self, "Delivery Stream Implicit Customer Managed",
      encryption=firehose.StreamEncryption.customer_managed_key(),
      destinations=[destination]
  )
  firehose.DeliveryStream(self, "Delivery Stream Explicit Customer Managed",
      encryption=firehose.StreamEncryption.customer_managed_key(key),
      destinations=[destination]
  )
  ```
  See: [Data Protection](https://docs.aws.amazon.com/firehose/latest/dev/encryption.html)
  in the *Kinesis Data Firehose Developer Guide*.

  Kinesis Data Firehose is integrated with CloudWatch, so you can monitor the performance of
  your delivery streams via logs and metrics.

  Kinesis Data Firehose will send logs to CloudWatch when data transformation or data
  delivery fails. The CDK will enable logging by default and create a CloudWatch LogGroup
  and LogStream for your Delivery Stream.
  When you create a destination, you can specify a log group. In this log group, The CDK
  will create log streams where log events will be sent:
  ```python
  import aws_cdk.aws_logs as logs

  log_group = logs.LogGroup(self, "Log Group")
  destination = destinations.S3Bucket(bucket,
      log_group=log_group
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destination]
  )
  ```
  Logging can also be disabled:
  ```python

  destination = destinations.S3Bucket(bucket,
      logging=False
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destination]
  )
  ```
  See: [Monitoring using CloudWatch Logs](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-logs.html)
  in the *Kinesis Data Firehose Developer Guide*.

  Kinesis Data Firehose sends metrics to CloudWatch so that you can collect and analyze the
  performance of the delivery stream, including data delivery, data ingestion, data
  transformation, format conversion, API usage, encryption, and resource usage. You can then
  use CloudWatch alarms to alert you, for example, when data freshness (the age of the
  oldest record in the delivery stream) exceeds the buffering limit (indicating that data is
  not being delivered to your destination), or when the rate of incoming records exceeds the
  limit of records per second (indicating data is flowing into your delivery stream faster
  than it is configured to process).
  CDK provides methods for accessing delivery stream metrics with default configuration,
  such as `metricIncomingBytes`, and `metricIncomingRecords` (see [`IDeliveryStream`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kinesisfirehose.IDeliveryStream.html)
  for a full list). CDK also provides a generic `metric` method that can be used to produce
  metric configurations for any metric provided by Kinesis Data Firehose; the configurations
  are pre-populated with the correct dimensions for the delivery stream.
  ```python
  import aws_cdk.aws_cloudwatch as cloudwatch


  incoming_bytes_percent_of_limit = cloudwatch.MathExpression(
      expression="incomingBytes / 300 / bytePerSecLimit",
      using_metrics={
          "incoming_bytes": delivery_stream.metric_incoming_bytes(statistic=cloudwatch.Statistic.SUM),
          "byte_per_sec_limit": delivery_stream.metric("BytesPerSecondLimit")
      }
  )
  cloudwatch.Alarm(self, "Alarm",
      metric=incoming_bytes_percent_of_limit,
      threshold=0.9,
      evaluation_periods=3
  )
  ```
  See: [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-metrics.html)
  in the *Kinesis Data Firehose Developer Guide*.

  Your data can automatically be compressed when it is delivered to S3 as either a final or
  an intermediary/backup destination. Supported compression formats are: gzip, Snappy,
  Hadoop-compatible Snappy, and ZIP, except for Redshift destinations, where Snappy
  (regardless of Hadoop-compatibility) and ZIP are not supported. By default, data is
  delivered to S3 without compression.
  ```python


  s3_destination = destinations.S3Bucket(bucket,
      compression=destinations.Compression.SNAPPY
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[s3_destination]
  )
  ```

  Incoming data is buffered before it is delivered to the specified destination. The
  delivery stream will wait until the amount of incoming data has exceeded some threshold
  (the "buffer size") or until the time since the last data delivery occurred exceeds some
  threshold (the "buffer interval"), whichever happens first. You can configure these
  thresholds based on the capabilities of the destination and your use-case. By default, the
  buffer size is 5 MiB and the buffer interval is 5 minutes.
  ```python


  destination = destinations.S3Bucket(bucket,
      buffering_interval=Duration.minutes(10),
      buffering_size=Size.mebibytes(8)
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destination]
  )
  ```
  See: [Data Delivery Frequency](https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#frequency)
  in the *Kinesis Data Firehose Developer Guide*.
  Zero buffering, where Amazon Kinesis Data Firehose stream can be configured to not buffer data before delivery, is supported by
  setting the "buffer interval" to 0.
  ```python


  destination = destinations.S3Bucket(bucket,
      buffering_interval=Duration.seconds(0)
  )
  firehose.DeliveryStream(self, "ZeroBufferDeliveryStream",
      destinations=[destination]
  )
  ```
  See: [Buffering Hints](https://docs.aws.amazon.com/firehose/latest/dev/buffering-hints.html).

  Your data can be automatically encrypted when it is delivered to S3 as a final or an
  intermediary/backup destination. Kinesis Data Firehose supports Amazon S3 server-side
  encryption with AWS Key Management Service (AWS KMS) for encrypting delivered data in
  Amazon S3. You can choose to not encrypt the data or to encrypt with a key from the list
  of AWS KMS keys that you own. For more information,
  see [Protecting Data Using Server-Side Encryption with AWS KMS–Managed Keys (SSE-KMS)](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
  Data is not encrypted by default.
  ```python


  destination = destinations.S3Bucket(bucket,
      encryption_key=key
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destination]
  )
  ```

  A delivery stream can be configured to back up data to S3 that it attempted to deliver to
  the configured destination. Backed up data can be all the data that the delivery stream
  attempted to deliver or just data that it failed to deliver (Redshift and S3 destinations
  can only back up all data). CDK can create a new S3 bucket where it will back up data, or
  you can provide a bucket where data will be backed up. You can also provide a prefix under
  which your backed-up data will be placed within the bucket. By default, source data is not
  backed up to S3.
  ```python




  firehose.DeliveryStream(self, "Delivery Stream Backup All",
      destinations=[
          destinations.S3Bucket(bucket,
              s3_backup=destinations.DestinationS3BackupProps(
                  mode=destinations.BackupMode.ALL
              )
          )
      ]
  )
  firehose.DeliveryStream(self, "Delivery Stream Backup All Explicit Bucket",
      destinations=[
          destinations.S3Bucket(bucket,
              s3_backup=destinations.DestinationS3BackupProps(
                  bucket=backup_bucket
              )
          )
      ]
  )

  firehose.DeliveryStream(self, "Delivery Stream Backup All Explicit Prefix",
      destinations=[
          destinations.S3Bucket(bucket,
              s3_backup=destinations.DestinationS3BackupProps(
                  mode=destinations.BackupMode.ALL,
                  data_output_prefix="mybackup"
              )
          )
      ]
  )
  ```
  If any Data Processing or Transformation is configured on your Delivery Stream, the source
  records will be backed up in their original format.

  Data can be transformed before being delivered to destinations. There are two types of
  data processing for delivery streams: record transformation with AWS Lambda, and record
  format conversion using a schema stored in an AWS Glue table. If both types of data
  processing are configured, then the Lambda transformation is performed first. By default,
  no data processing occurs. This construct library currently only supports data
  transformation with AWS Lambda. See [#15501](https://github.com/aws/aws-cdk/issues/15501)
  to track the status of adding support for record format conversion.

  To transform the data, Kinesis Data Firehose will call a Lambda function that you provide
  and deliver the data returned in place of the source record. The function must return a
  result that contains records in a specific format, including the following fields:
  * `recordId` -- the ID of the input record that corresponds the results.
  * `result` -- the status of the transformation of the record: "Ok" (success), "Dropped"
    (not processed intentionally), or "ProcessingFailed" (not processed due to an error).
  * `data` -- the transformed data, Base64-encoded.
  The data is buffered up to 1 minute and up to 3 MiB by default before being sent to the
  function, but can be configured using `bufferInterval` and `bufferSize`
  in the processor configuration (see: [Buffering](#buffering)). If the function invocation
  fails due to a network timeout or because of hitting an invocation limit, the invocation
  is retried 3 times by default, but can be configured using `retries` in the processor
  configuration.
  ```python



  lambda_function = lambda_.Function(self, "Processor",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_asset(path.join(__dirname, "process-records"))
  )
  lambda_processor = firehose.LambdaFunctionProcessor(lambda_function,
      buffer_interval=Duration.minutes(5),
      buffer_size=Size.mebibytes(5),
      retries=5
  )
  s3_destination = destinations.S3Bucket(bucket,
      processor=lambda_processor
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[s3_destination]
  )
  ```
  ```python
  import path as path
  import aws_cdk.aws_kinesisfirehose_alpha as firehose
  import aws_cdk.aws_kms as kms
  import aws_cdk.aws_lambda_nodejs as lambdanodejs
  import aws_cdk.aws_logs as logs
  import aws_cdk.aws_s3 as s3
  import aws_cdk as cdk
  import aws_cdk.aws_kinesisfirehose_destinations_alpha as destinations
  app = cdk.App()
  stack = cdk.Stack(app, "aws-cdk-firehose-delivery-stream-s3-all-properties")
  bucket = s3.Bucket(stack, "Bucket",
      removal_policy=cdk.RemovalPolicy.DESTROY,
      auto_delete_objects=True
  )
  backup_bucket = s3.Bucket(stack, "BackupBucket",
      removal_policy=cdk.RemovalPolicy.DESTROY,
      auto_delete_objects=True
  )
  log_group = logs.LogGroup(stack, "LogGroup",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  data_processor_function = lambdanodejs.NodejsFunction(stack, "DataProcessorFunction",
      entry=path.join(__dirname, "lambda-data-processor.js"),
      timeout=cdk.Duration.minutes(1)
  )
  processor = firehose.LambdaFunctionProcessor(data_processor_function,
      buffer_interval=cdk.Duration.seconds(60),
      buffer_size=cdk.Size.mebibytes(1),
      retries=1
  )
  key = kms.Key(stack, "Key",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  backup_key = kms.Key(stack, "BackupKey",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  firehose.DeliveryStream(stack, "Delivery Stream",
      destinations=[destinations.S3Bucket(bucket,
          logging=True,
          log_group=log_group,
          processor=processor,
          compression=destinations.Compression.GZIP,
          data_output_prefix="regularPrefix",
          error_output_prefix="errorPrefix",
          buffering_interval=cdk.Duration.seconds(60),
          buffering_size=cdk.Size.mebibytes(1),
          encryption_key=key,
          s3_backup=destinations.DestinationS3BackupProps(
              mode=destinations.BackupMode.ALL,
              bucket=backup_bucket,
              compression=destinations.Compression.ZIP,
              data_output_prefix="backupPrefix",
              error_output_prefix="backupErrorPrefix",
              buffering_interval=cdk.Duration.seconds(60),
              buffering_size=cdk.Size.mebibytes(1),
              encryption_key=backup_key
          )
      )]
  )
  firehose.DeliveryStream(stack, "ZeroBufferingDeliveryStream",
      destinations=[destinations.S3Bucket(bucket,
          compression=destinations.Compression.GZIP,
          data_output_prefix="regularPrefix",
          error_output_prefix="errorPrefix",
          buffering_interval=cdk.Duration.seconds(0)
      )]
  )
  app.synth()
  ```
  See: [Data Transformation](https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html)
  in the *Kinesis Data Firehose Developer Guide*.

  The DeliveryStream class automatically creates IAM service roles with all the minimum
  necessary permissions for Kinesis Data Firehose to access the resources referenced by your
  delivery stream. One service role is created for the delivery stream that allows Kinesis
  Data Firehose to read from a Kinesis data stream (if one is configured as the delivery
  stream source) and for server-side encryption. Note that if the DeliveryStream is created
  without specifying `sourceStream` or `encryptionKey`, this role is not created as it is not needed.
  Another service role is created for each destination, which gives Kinesis Data Firehose write
  access to the destination resource, as well as the ability to invoke data transformers and
  read schemas for record format conversion. If you wish, you may specify your own IAM role for
  either the delivery stream or the destination service role, or both. It must have the correct
  trust policy (it must allow Kinesis Data Firehose to assume it) or delivery stream creation or
  data delivery will fail. Other required permissions to destination resources, encryption keys, etc.,
  will be provided automatically.
  ```python






  delivery_stream_role = iam.Role(self, "Delivery Stream Role",
      assumed_by=iam.ServicePrincipal("firehose.amazonaws.com")
  )
  destination_role = iam.Role(self, "Destination Role",
      assumed_by=iam.ServicePrincipal("firehose.amazonaws.com")
  )
  destination = destinations.S3Bucket(bucket, role=destination_role)
  firehose.DeliveryStream(self, "Delivery Stream",
      destinations=[destination],
      role=delivery_stream_role
  )
  ```
  See [Controlling Access](https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html)
  in the *Kinesis Data Firehose Developer Guide*.

  IAM roles, users or groups which need to be able to work with delivery streams should be
  granted IAM permissions.
  Any object that implements the `IGrantable` interface (i.e., has an associated principal)
  can be granted permissions to a delivery stream by calling:
  * `grantPutRecords(principal)` - grants the principal the ability to put records onto the
    delivery stream
  * `grant(principal, ...actions)` - grants the principal permission to a custom set of
    actions
  ```python


  lambda_role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
  )
  delivery_stream.grant_put_records(lambda_role)
  ```
  The following write permissions are provided to a service principal by the
  `grantPutRecords()` method:
  * `firehose:PutRecord`
  * `firehose:PutRecordBatch`

  Conversely to the above, Kinesis Data Firehose requires permissions in order for delivery
  streams to interact with resources that you own. For example, if an S3 bucket is specified
  as a destination of a delivery stream, the delivery stream must be granted permissions to
  put and get objects from the bucket. When using the built-in AWS service destinations
  found in the `@aws-cdk/aws-kinesisfirehose-destinations-alpha` module, the CDK grants the
  permissions automatically. However, custom or third-party destinations may require custom
  permissions. In this case, use the delivery stream as an `IGrantable`, as follows:
  ```python

  fn = lambda_.Function(self, "Function",
      code=lambda_.Code.from_inline("exports.handler = (event) => {}"),
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler"
  )
  fn.grant_invoke(delivery_stream)
  ```

  Though the delivery stream allows specifying an array of destinations, only one
  destination per delivery stream is currently allowed. This limitation is enforced at CDK
  synthesis time and will throw an error.


pkgId: 68cbaf0394e2cc36d381c031f79f5c6f5a3d893934445eb8287c7aebcbc1382e
name: python-aws-cdk.aws-kinesisfirehose-alpha
arch: src
version: 2.166.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::KinesisFirehose
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-kinesisfirehose-alpha-2.166.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon Data Firehose](https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html), [formerly known as Amazon Kinesis Data Firehose](https://aws.amazon.com/about-aws/whats-new/2024/02/amazon-data-firehose-formerly-kinesis-data-firehose/),
  is a service for fully-managed delivery of real-time streaming data to storage services
  such as Amazon S3, Amazon Redshift, Amazon Elasticsearch, Splunk, or any custom HTTP
  endpoint or third-party services such as Datadog, Dynatrace, LogicMonitor, MongoDB, New
  Relic, and Sumo Logic.
  Amazon Data Firehose delivery streams are distinguished from Kinesis data streams in
  their models of consumption. Whereas consumers read from a data stream by actively pulling
  data from the stream, a delivery stream pushes data to its destination on a regular
  cadence. This means that data streams are intended to have consumers that do on-demand
  processing, like AWS Lambda or Amazon EC2. On the other hand, delivery streams are
  intended to have destinations that are sources for offline processing and analytics, such
  as Amazon S3 and Amazon Redshift.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk)
  project. It allows you to define Amazon Data Firehose delivery streams.

  In order to define a Delivery Stream, you must specify a destination. An S3 bucket can be
  used as a destination. Currently the CDK supports only S3 as a destination which is covered [below](#destinations).
  ```python
  bucket = s3.Bucket(self, "Bucket")
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destinations.S3Bucket(bucket)
  )
  ```
  The above example defines the following resources:
  * An S3 bucket
  * An Amazon Data Firehose delivery stream with Direct PUT as the source and CloudWatch
    error logging turned on.
  * An IAM role which gives the delivery stream permission to write to the S3 bucket.

  An Amazon Data Firehose delivery stream can accept data from three main sources: Kinesis Data Streams, Managed Streaming for Apache Kafka (MSK), or via a "direct put" (API calls). Currently only Kinesis Data Streams and direct put are supported in the CDK.
  See: [Sending Data to a Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-write.html)
  in the *Amazon Data Firehose Developer Guide*.

  A delivery stream can read directly from a Kinesis data stream as a consumer of the data
  stream. Configure this behaviour by passing in a data stream in the `source`
  property via the `KinesisStreamSource` class when constructing a delivery stream:
  ```python

  source_stream = kinesis.Stream(self, "Source Stream")
  firehose.DeliveryStream(self, "Delivery Stream",
      source=firehose.KinesisStreamSource(source_stream),
      destination=destination
  )
  ```

  Data must be provided via "direct put", ie., by using a `PutRecord` or
  `PutRecordBatch` API call. There are a number of ways of doing so, such as:
  * Kinesis Agent: a standalone Java application that monitors and delivers files while
    handling file rotation, checkpointing, and retries. See: [Writing to Amazon Data Firehose Using Kinesis Agent](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-agents.html)
    in the *Amazon Data Firehose Developer Guide*.
  * AWS SDK: a general purpose solution that allows you to deliver data to a delivery stream
    from anywhere using Java, .NET, Node.js, Python, or Ruby. See: [Writing to Amazon Data Firehose Using the AWS SDK](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-sdk.html)
    in the *Amazon Data Firehose Developer Guide*.
  * CloudWatch Logs: subscribe to a log group and receive filtered log events directly into
    a delivery stream. See: [logs-destinations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-logs-destinations-readme.html).
  * Eventbridge: add an event rule target to send events to a delivery stream based on the
    rule filtering. See: [events-targets](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-events-targets-readme.html).
  * SNS: add a subscription to send all notifications from the topic to a delivery
    stream. See: [sns-subscriptions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-sns-subscriptions-readme.html).
  * IoT: add an action to an IoT rule to send various IoT information to a delivery stream

  Amazon Data Firehose supports multiple AWS and third-party services as destinations, including Amazon S3, Amazon Redshift, and more. You can find the full list of supported destination [here](https://docs.aws.amazon.com/firehose/latest/dev/create-destination.html).
  Currently in the AWS CDK, only S3 is implemented as an L2 construct destination. Other destinations can still be configured using L1 constructs. See [kinesisfirehose-destinations](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-kinesisfirehose-destinations-readme.html)
  for the implementations of these destinations.

  Defining a delivery stream with an S3 bucket destination:
  ```python

  s3_destination = destinations.S3Bucket(bucket)
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=s3_destination
  )
  ```
  The S3 destination also supports custom dynamic prefixes. `dataOutputPrefix`
  will be used for files successfully delivered to S3. `errorOutputPrefix` will be added to
  failed records before writing them to S3.
  ```python

  s3_destination = destinations.S3Bucket(bucket,
      data_output_prefix="myFirehose/DeliveredYear=!{timestamp:yyyy}/anyMonth/rand=!{firehose:random-string}",
      error_output_prefix="myFirehoseFailures/!{firehose:error-output-type}/!{timestamp:yyyy}/anyMonth/!{timestamp:dd}"
  )
  ```
  See: [Custom S3 Prefixes](https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html)
  in the *Amazon Data Firehose Developer Guide*.

  Enabling server-side encryption (SSE) requires Amazon Data Firehose to encrypt all data
  sent to delivery stream when it is stored at rest. This means that data is encrypted
  before being written to the service's internal storage layer and decrypted after it is
  received from the internal storage layer. The service manages keys and cryptographic
  operations so that sources and destinations do not need to, as the data is encrypted and
  decrypted at the boundaries of the service (i.e., before the data is delivered to a
  destination). By default, delivery streams do not have SSE enabled.
  The Key Management Service keys (KMS keys) used for SSE can either be AWS-owned or
  customer-managed. AWS-owned KMS keys are created, owned and managed by AWS for use in
  multiple AWS accounts. As a customer, you cannot view, use, track, or manage these keys,
  and you are not charged for their use. On the other hand, customer-managed KMS keys are
  created and owned within your account and managed entirely by you. As a customer, you are
  responsible for managing access, rotation, aliases, and deletion for these keys, and you
  are changed for their use.
  See: [AWS KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys)
  in the *KMS Developer Guide*.
  ```python




  firehose.DeliveryStream(self, "Delivery Stream with AWS Owned Key",
      encryption=firehose.StreamEncryption.aws_owned_key(),
      destination=destination
  )

  firehose.DeliveryStream(self, "Delivery Stream with Customer Managed Key",
      encryption=firehose.StreamEncryption.customer_managed_key(),
      destination=destination
  )
  firehose.DeliveryStream(self, "Delivery Stream with Customer Managed and Provided Key",
      encryption=firehose.StreamEncryption.customer_managed_key(key),
      destination=destination
  )
  ```
  See: [Data Protection](https://docs.aws.amazon.com/firehose/latest/dev/encryption.html)
  in the *Amazon Data Firehose Developer Guide*.

  Amazon Data Firehose is integrated with CloudWatch, so you can monitor the performance of
  your delivery streams via logs and metrics.

  Amazon Data Firehose will send logs to CloudWatch when data transformation or data
  delivery fails. The CDK will enable logging by default and create a CloudWatch LogGroup
  and LogStream with default settings for your Delivery Stream.
  When creating a destination, you can provide an `ILoggingConfig`, which can either be an `EnableLogging` or `DisableLogging` instance.
  If you use `EnableLogging`, the CDK will create a CloudWatch LogGroup and LogStream with all CloudFormation default settings for you, or you can optionally
  specify your own log group to be used for capturing and storing log events. For example:
  ```python
  import aws_cdk.aws_logs as logs

  log_group = logs.LogGroup(self, "Log Group")
  destination = destinations.S3Bucket(bucket,
      logging_config=destinations.EnableLogging(log_group)
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destination
  )
  ```
  Logging can also be disabled:
  ```python

  destination = destinations.S3Bucket(bucket,
      logging_config=destinations.DisableLogging()
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destination
  )
  ```
  See: [Monitoring using CloudWatch Logs](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-logs.html)
  in the *Amazon Data Firehose Developer Guide*.

  Amazon Data Firehose sends metrics to CloudWatch so that you can collect and analyze the
  performance of the delivery stream, including data delivery, data ingestion, data
  transformation, format conversion, API usage, encryption, and resource usage. You can then
  use CloudWatch alarms to alert you, for example, when data freshness (the age of the
  oldest record in the delivery stream) exceeds the buffering limit (indicating that data is
  not being delivered to your destination), or when the rate of incoming records exceeds the
  limit of records per second (indicating data is flowing into your delivery stream faster
  than it is configured to process).
  CDK provides methods for accessing delivery stream metrics with default configuration,
  such as `metricIncomingBytes`, and `metricIncomingRecords` (see [`IDeliveryStream`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-kinesisfirehose.IDeliveryStream.html)
  for a full list). CDK also provides a generic `metric` method that can be used to produce
  metric configurations for any metric provided by Amazon Data Firehose; the configurations
  are pre-populated with the correct dimensions for the delivery stream.
  ```python
  import aws_cdk.aws_cloudwatch as cloudwatch


  incoming_bytes_percent_of_limit = cloudwatch.MathExpression(
      expression="incomingBytes / 300 / bytePerSecLimit",
      using_metrics={
          "incoming_bytes": delivery_stream.metric_incoming_bytes(statistic=cloudwatch.Statistic.SUM),
          "byte_per_sec_limit": delivery_stream.metric("BytesPerSecondLimit")
      }
  )
  cloudwatch.Alarm(self, "Alarm",
      metric=incoming_bytes_percent_of_limit,
      threshold=0.9,
      evaluation_periods=3
  )
  ```
  See: [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/firehose/latest/dev/monitoring-with-cloudwatch-metrics.html)
  in the *Amazon Data Firehose Developer Guide*.

  Your data can automatically be compressed when it is delivered to S3 as either a final or
  an intermediary/backup destination. Supported compression formats are: gzip, Snappy,
  Hadoop-compatible Snappy, and ZIP, except for Redshift destinations, where Snappy
  (regardless of Hadoop-compatibility) and ZIP are not supported. By default, data is
  delivered to S3 without compression.
  ```python


  s3_destination = destinations.S3Bucket(bucket,
      compression=destinations.Compression.SNAPPY
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=s3_destination
  )
  ```

  Incoming data is buffered before it is delivered to the specified destination. The
  delivery stream will wait until the amount of incoming data has exceeded some threshold
  (the "buffer size") or until the time since the last data delivery occurred exceeds some
  threshold (the "buffer interval"), whichever happens first. You can configure these
  thresholds based on the capabilities of the destination and your use-case. By default, the
  buffer size is 5 MiB and the buffer interval is 5 minutes.
  ```python


  destination = destinations.S3Bucket(bucket,
      buffering_interval=Duration.minutes(10),
      buffering_size=Size.mebibytes(8)
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destination
  )
  ```
  See: [Data Delivery Frequency](https://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#frequency)
  in the *Amazon Data Firehose Developer Guide*.
  Zero buffering, where Amazon Data Firehose stream can be configured to not buffer data before delivery, is supported by
  setting the "buffer interval" to 0.
  ```python


  destination = destinations.S3Bucket(bucket,
      buffering_interval=Duration.seconds(0)
  )
  firehose.DeliveryStream(self, "ZeroBufferDeliveryStream",
      destination=destination
  )
  ```
  See: [Buffering Hints](https://docs.aws.amazon.com/firehose/latest/dev/buffering-hints.html).

  Your data can be automatically encrypted when it is delivered to S3 as a final or an
  intermediary/backup destination. Amazon Data Firehose supports Amazon S3 server-side
  encryption with AWS Key Management Service (AWS KMS) for encrypting delivered data in
  Amazon S3. You can choose to not encrypt the data or to encrypt with a key from the list
  of AWS KMS keys that you own. For more information,
  see [Protecting Data Using Server-Side Encryption with AWS KMS–Managed Keys (SSE-KMS)](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
  By default, encryption isn’t directly enabled on the delivery stream; instead, it uses the default encryption settings of the destination S3 bucket.
  ```python


  destination = destinations.S3Bucket(bucket,
      encryption_key=key
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destination
  )
  ```

  A delivery stream can be configured to back up data to S3 that it attempted to deliver to
  the configured destination. Backed up data can be all the data that the delivery stream
  attempted to deliver or just data that it failed to deliver (Redshift and S3 destinations
  can only back up all data). CDK can create a new S3 bucket where it will back up data, or
  you can provide a bucket where data will be backed up. You can also provide a prefix under
  which your backed-up data will be placed within the bucket. By default, source data is not
  backed up to S3.
  ```python




  firehose.DeliveryStream(self, "Delivery Stream Backup All",
      destination=
      destinations.S3Bucket(bucket,
          s3_backup=destinations.DestinationS3BackupProps(
              mode=destinations.BackupMode.ALL
          )
      )
  )
  firehose.DeliveryStream(self, "Delivery Stream Backup All Explicit Bucket",
      destination=
      destinations.S3Bucket(bucket,
          s3_backup=destinations.DestinationS3BackupProps(
              bucket=backup_bucket
          )
      )
  )

  firehose.DeliveryStream(self, "Delivery Stream Backup All Explicit Prefix",
      destination=
      destinations.S3Bucket(bucket,
          s3_backup=destinations.DestinationS3BackupProps(
              mode=destinations.BackupMode.ALL,
              data_output_prefix="mybackup"
          )
      )
  )
  ```
  If any Data Processing or Transformation is configured on your Delivery Stream, the source
  records will be backed up in their original format.

  Data can be transformed before being delivered to destinations. There are two types of
  data processing for delivery streams: record transformation with AWS Lambda, and record
  format conversion using a schema stored in an AWS Glue table. If both types of data
  processing are configured, then the Lambda transformation is performed first. By default,
  no data processing occurs. This construct library currently only supports data
  transformation with AWS Lambda. See [#15501](https://github.com/aws/aws-cdk/issues/15501)
  to track the status of adding support for record format conversion.

  To transform the data, Amazon Data Firehose will call a Lambda function that you provide
  and deliver the data returned in place of the source record. The function must return a
  result that contains records in a specific format, including the following fields:
  * `recordId` -- the ID of the input record that corresponds the results.
  * `result` -- the status of the transformation of the record: "Ok" (success), "Dropped"
    (not processed intentionally), or "ProcessingFailed" (not processed due to an error).
  * `data` -- the transformed data, Base64-encoded.
  The data is buffered up to 1 minute and up to 3 MiB by default before being sent to the
  function, but can be configured using `bufferInterval` and `bufferSize`
  in the processor configuration (see: [Buffering](#buffering)). If the function invocation
  fails due to a network timeout or because of hitting an invocation limit, the invocation
  is retried 3 times by default, but can be configured using `retries` in the processor
  configuration.
  ```python



  lambda_function = lambda_.Function(self, "Processor",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_asset(path.join(__dirname, "process-records"))
  )
  lambda_processor = firehose.LambdaFunctionProcessor(lambda_function,
      buffer_interval=Duration.minutes(5),
      buffer_size=Size.mebibytes(5),
      retries=5
  )
  s3_destination = destinations.S3Bucket(bucket,
      processor=lambda_processor
  )
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=s3_destination
  )
  ```
  ```python
  import path as path
  import aws_cdk.aws_kinesisfirehose_alpha as firehose
  import aws_cdk.aws_kms as kms
  import aws_cdk.aws_lambda_nodejs as lambdanodejs
  import aws_cdk.aws_logs as logs
  import aws_cdk.aws_s3 as s3
  import aws_cdk as cdk
  import aws_cdk.aws_kinesisfirehose_destinations_alpha as destinations
  app = cdk.App()
  stack = cdk.Stack(app, "aws-cdk-firehose-delivery-stream-s3-all-properties")
  bucket = s3.Bucket(stack, "Bucket",
      removal_policy=cdk.RemovalPolicy.DESTROY,
      auto_delete_objects=True
  )
  backup_bucket = s3.Bucket(stack, "BackupBucket",
      removal_policy=cdk.RemovalPolicy.DESTROY,
      auto_delete_objects=True
  )
  log_group = logs.LogGroup(stack, "LogGroup",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  data_processor_function = lambdanodejs.NodejsFunction(stack, "DataProcessorFunction",
      entry=path.join(__dirname, "lambda-data-processor.js"),
      timeout=cdk.Duration.minutes(1)
  )
  processor = firehose.LambdaFunctionProcessor(data_processor_function,
      buffer_interval=cdk.Duration.seconds(60),
      buffer_size=cdk.Size.mebibytes(1),
      retries=1
  )
  key = kms.Key(stack, "Key",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  backup_key = kms.Key(stack, "BackupKey",
      removal_policy=cdk.RemovalPolicy.DESTROY
  )
  firehose.DeliveryStream(stack, "Delivery Stream",
      destination=destinations.S3Bucket(bucket,
          logging_config=destinations.EnableLogging(log_group),
          processor=processor,
          compression=destinations.Compression.GZIP,
          data_output_prefix="regularPrefix",
          error_output_prefix="errorPrefix",
          buffering_interval=cdk.Duration.seconds(60),
          buffering_size=cdk.Size.mebibytes(1),
          encryption_key=key,
          s3_backup=destinations.DestinationS3BackupProps(
              mode=destinations.BackupMode.ALL,
              bucket=backup_bucket,
              compression=destinations.Compression.ZIP,
              data_output_prefix="backupPrefix",
              error_output_prefix="backupErrorPrefix",
              buffering_interval=cdk.Duration.seconds(60),
              buffering_size=cdk.Size.mebibytes(1),
              encryption_key=backup_key
          )
      )
  )
  firehose.DeliveryStream(stack, "ZeroBufferingDeliveryStream",
      destination=destinations.S3Bucket(bucket,
          compression=destinations.Compression.GZIP,
          data_output_prefix="regularPrefix",
          error_output_prefix="errorPrefix",
          buffering_interval=cdk.Duration.seconds(0)
      )
  )
  app.synth()
  ```
  See: [Data Transformation](https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html)
  in the *Amazon Data Firehose Developer Guide*.

  The DeliveryStream class automatically creates IAM service roles with all the minimum
  necessary permissions for Amazon Data Firehose to access the resources referenced by your
  delivery stream. One service role is created for the delivery stream that allows Amazon
  Data Firehose to read from a Kinesis data stream (if one is configured as the delivery
  stream source) and for server-side encryption. Note that if the DeliveryStream is created
  without specifying a `source` or `encryptionKey`, this role is not created as it is not needed.
  Another service role is created for each destination, which gives Amazon Data Firehose write
  access to the destination resource, as well as the ability to invoke data transformers and
  read schemas for record format conversion. If you wish, you may specify your own IAM role for
  either the delivery stream or the destination service role, or both. It must have the correct
  trust policy (it must allow Amazon Data Firehose to assume it) or delivery stream creation or
  data delivery will fail. Other required permissions to destination resources, encryption keys, etc.,
  will be provided automatically.
  ```python






  delivery_stream_role = iam.Role(self, "Delivery Stream Role",
      assumed_by=iam.ServicePrincipal("firehose.amazonaws.com")
  )
  destination_role = iam.Role(self, "Destination Role",
      assumed_by=iam.ServicePrincipal("firehose.amazonaws.com")
  )
  destination = destinations.S3Bucket(bucket, role=destination_role)
  firehose.DeliveryStream(self, "Delivery Stream",
      destination=destination,
      role=delivery_stream_role
  )
  ```
  See [Controlling Access](https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html)
  in the *Amazon Data Firehose Developer Guide*.

  IAM roles, users or groups which need to be able to work with delivery streams should be
  granted IAM permissions.
  Any object that implements the `IGrantable` interface (i.e., has an associated principal)
  can be granted permissions to a delivery stream by calling:
  * `grantPutRecords(principal)` - grants the principal the ability to put records onto the
    delivery stream
  * `grant(principal, ...actions)` - grants the principal permission to a custom set of
    actions
  ```python


  lambda_role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
  )
  delivery_stream.grant_put_records(lambda_role)
  ```
  The following write permissions are provided to a service principal by the
  `grantPutRecords()` method:
  * `firehose:PutRecord`
  * `firehose:PutRecordBatch`

  Conversely to the above, Amazon Data Firehose requires permissions in order for delivery
  streams to interact with resources that you own. For example, if an S3 bucket is specified
  as a destination of a delivery stream, the delivery stream must be granted permissions to
  put and get objects from the bucket. When using the built-in AWS service destinations
  found in the `@aws-cdk/aws-kinesisfirehose-destinations-alpha` module, the CDK grants the
  permissions automatically. However, custom or third-party destinations may require custom
  permissions. In this case, use the delivery stream as an `IGrantable`, as follows:
  ```python

  fn = lambda_.Function(self, "Function",
      code=lambda_.Code.from_inline("exports.handler = (event) => {}"),
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler"
  )
  fn.grant_invoke(delivery_stream)
  ```


pkgId: 433673b0518648e6fa901cb889a2ca79d86e427d1b095925bb2587a9b6e3196f
name: python-aws-cdk.aws-kinesisfirehose-destinations-alpha
arch: src
version: 2.159.0a0
epoch: 0
release: 1
summary: CDK Destinations Constructs for AWS Kinesis Firehose
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-kinesisfirehose-destinations-alpha-2.159.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This library provides constructs for adding destinations to a Amazon Kinesis Data Firehose
  delivery stream. Destinations can be added by specifying the `destinations` prop when
  defining a delivery stream.
  See [Amazon Kinesis Data Firehose module README](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-kinesisfirehose-readme.html) for usage examples.
  ```python
  import aws_cdk.aws_kinesisfirehose_destinations_alpha as destinations
  ```


pkgId: 1e11356aa687c14464d86e76ed72ba310d78153d7bfee44e9c364236a9b14e20
name: python-aws-cdk.aws-lambda-go-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS Lambda in Golang
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-lambda-go-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This library provides constructs for Golang Lambda functions.
  To use this module you will either need to have `Go` installed (`go1.11` or later) or `Docker` installed.
  See [Local Bundling](#local-bundling)/[Docker Bundling](#docker-bundling) for more information.
  This module also requires that your Golang application is
  using a Go version >= 1.11 and is using [Go modules](https://golang.org/ref/mod).

  Define a `GoFunction`:
  ```python
  go.GoFunction(self, "handler",
      entry="lambda-app/cmd/api"
  )
  ```
  By default, if `entry` points to a directory, then the construct will assume there is a Go entry file (i.e. `main.go`).
  Let's look at an example Go project:
  ```bash
  lambda-app
  ├── cmd
  │   └── api
  │       └── main.go
  ├── go.mod
  ├── go.sum
  ├── pkg
  │   ├── auth
  │   │   └── auth.go
  │   └── middleware
  │       └── middleware.go
  └── vendor
      ├── github.com
      │   └── aws
      │       └── aws-lambda-go
      └── modules.txt
  ```
  With the above layout I could either provide the `entry` as `lambda-app/cmd/api` or `lambda-app/cmd/api/main.go`, either will work.
  When the construct builds the golang binary this will be translated `go build ./cmd/api` & `go build ./cmd/api/main.go` respectively.
  The construct will figure out where it needs to run the `go build` command from, in this example it would be from
  the `lambda-app` directory. It does this by determining the [mod file path](#mod-file-path), which is explained in the
  next section.

  The `GoFunction` tries to automatically determine your project root, that is
  the root of your golang project. This is usually where the top level `go.mod` file or
  `vendor` folder of your project is located. When bundling in a Docker container, the
  `moduleDir` is used as the source (`/asset-input`) for the volume mounted in
  the container.
  The CDK will walk up parent folders starting from
  the current working directory until it finds a folder containing a `go.mod` file.
  Alternatively, you can specify the `moduleDir` prop manually. In this case you
  need to ensure that this path includes `entry` and any module/dependencies used
  by your function. Otherwise bundling will fail.

  The `GoFunction` can be used with either the `GO_1_X` runtime or the provided runtimes (`PROVIDED`/`PROVIDED_AL2`).
  By default it will use the `PROVIDED_AL2` runtime. The `GO_1_X` runtime does not support things like
  [Lambda Extensions](https://docs.aws.amazon.com/lambda/latest/dg/using-extensions.html), whereas the provided runtimes do.
  The [aws-lambda-go](https://github.com/aws/aws-lambda-go) library has built in support for the provided runtime as long as
  you name the handler `bootstrap` (which we do by default).

  The construct will attempt to figure out how to handle the dependencies for your function. It will
  do this by determining whether or not you are vendoring your dependencies. It makes this determination
  by looking to see if there is a `vendor` folder at the [mod file path](#mod-file-path).
  With this information the construct can determine what commands to run. You will
  generally fall into two scenarios:
  1. You are using vendoring (indicated by the presence of a `vendor` folder)
     In this case `go build` will be run with `-mod=vendor` set
  2. You are not using vendoring (indicated by the absence of a `vendor` folder)
     If you are not vendoring then `go build` will be run without `-mod=vendor`
     since the default behavior is to download dependencies
  All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk-lib/aws-lambda).

  By default the following environment variables are set for you:
  * `GOOS=linux`
  * `GOARCH`: based on the target architecture of the Lambda function
  * `GO111MODULE=on`
  Use the `environment` prop to define additional environment variables when go runs:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          environment={
              "HELLO": "WORLD"
          }
      )
  )
  ```

  If `Go` is installed locally and the version is >= `go1.11` then it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-go1.x) with the Docker platform based on the target architecture of the Lambda function.
  For macOS the recommended approach is to install `Go` as Docker volume performance is really poor.
  `Go` can be installed by following the [installation docs](https://golang.org/doc/install).

  To force bundling in a docker container even if `Go` is available in your environment, set the `forceDockerBundling` prop to `true`. This is useful if you want to make sure that your function is built in a consistent Lambda compatible environment.
  Use the `buildArgs` prop to pass build arguments when building the bundling image:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          build_args={
              "HTTPS_PROXY": "https://127.0.0.1:3001"
          }
      )
  )
  ```
  Use the `bundling.dockerImage` prop to use a custom bundling image:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          docker_image=DockerImage.from_build("/path/to/Dockerfile")
      )
  )
  ```
  Use the `bundling.goBuildFlags` prop to pass additional build flags to `go build`:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          go_build_flags=["-ldflags \"-s -w\""]
      )
  )
  ```
  By default this construct doesn't use any Go module proxies. This is contrary to
  a standard Go installation, which would use the Google proxy by default. To
  recreate that behavior, do the following:
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          go_proxies=[go.GoFunction.GOOGLE_GOPROXY, "direct"]
      )
  )
  ```
  You can set additional Docker options to configure the build environment:
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          network="host",
          security_opt="no-new-privileges",
          user="user:group",
          volumes_from=["777f7dc92da7"],
          volumes=[DockerVolume(host_path="/host-path", container_path="/container-path")]
      )
  )
  ```

  It is  possible to run additional commands by specifying the `commandHooks` prop:
  ```text
  // This example only available in TypeScript
  // Run additional commands on a GoFunction via `commandHooks` property
  new go.GoFunction(this, 'handler', {
    bundling: {
      commandHooks: {
        // run tests
        beforeBundling(inputDir: string): string[] {
          return ['go test ./cmd/api -v'];
        },
        // ...
      },
    },
  });
  ```
  The following hooks are available:
  * `beforeBundling`: runs before all bundling commands
  * `afterBundling`: runs after all bundling commands
  They all receive the directory containing the `go.mod` file (`inputDir`) and the
  directory where the bundled asset will be output (`outputDir`). They must return
  an array of commands to run. Commands are chained with `&&`.
  The commands will run in the environment in which bundling occurs: inside the
  container for Docker bundling or on the host OS for local bundling.

  Depending on how you structure your Golang application, you may want to change the `assetHashType` parameter.
  By default this parameter is set to `AssetHashType.OUTPUT` which means that the CDK will calculate the asset hash
  (and determine whether or not your code has changed) based on the Golang executable that is created.
  If you specify `AssetHashType.SOURCE`, the CDK will calculate the asset hash by looking at the folder
  that contains your `go.mod` file. If you are deploying a single Lambda function, or you want to redeploy
  all of your functions if anything changes, then `AssetHashType.SOURCE` will probably work.
  For example, if my app looked like this:
  ```bash
  lambda-app
  ├── cmd
  │   └── api
  │       └── main.go
  ├── go.mod
  ├── go.sum
  └── pkg
      └── auth
          └── auth.go
  ```
  With this structure I would provide the `entry` as `cmd/api` which means that the CDK
  will determine that the protect root is `lambda-app` (it contains the `go.mod` file).
  Since I only have a single Lambda function, and any update to files within the `lambda-app` directory
  should trigger a new deploy, I could specify `AssetHashType.SOURCE`.
  On the other hand, if I had a project that deployed multiple Lambda functions, for example:
  ```bash
  lambda-app
  ├── cmd
  │   ├── api
  │   │   └── main.go
  │   └── anotherApi
  │       └── main.go
  ├── go.mod
  ├── go.sum
  └── pkg
      ├── auth
      │   └── auth.go
      └── middleware
          └── middleware.go
  ```
  Then I would most likely want `AssetHashType.OUTPUT`. With `OUTPUT`
  the CDK will only recognize changes if the Golang executable has changed,
  and Go only includes dependencies that are used in the executable. So in this case
  if `cmd/api` used the `auth` & `middleware` packages, but `cmd/anotherApi` did not, then
  an update to `auth` or `middleware` would only trigger an update to the `cmd/api` Lambda
  Function.

  By default the input and output of Docker based bundling is handled via bind mounts.
  In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          bundling_file_access=BundlingFileAccess.VOLUME_COPY
      )
  )
  ```


pkgId: c98e6b60f7c5d7dc0a647875be886d2ce61de29dcd387bf9adcd3a19a581d19b
name: python-aws-cdk.aws-lambda-go-alpha
arch: src
version: 2.166.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS Lambda in Golang
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-lambda-go-alpha-2.166.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This library provides constructs for Golang Lambda functions.
  To use this module you will either need to have `Go` installed (`go1.11` or later) or `Docker` installed.
  See [Local Bundling](#local-bundling)/[Docker Bundling](#docker-bundling) for more information.
  This module also requires that your Golang application is
  using a Go version >= 1.11 and is using [Go modules](https://golang.org/ref/mod).

  Define a `GoFunction`:
  ```python
  go.GoFunction(self, "handler",
      entry="lambda-app/cmd/api"
  )
  ```
  By default, if `entry` points to a directory, then the construct will assume there is a Go entry file (i.e. `main.go`).
  Let's look at an example Go project:
  ```bash
  lambda-app
  ├── cmd
  │   └── api
  │       └── main.go
  ├── go.mod
  ├── go.sum
  ├── pkg
  │   ├── auth
  │   │   └── auth.go
  │   └── middleware
  │       └── middleware.go
  └── vendor
      ├── github.com
      │   └── aws
      │       └── aws-lambda-go
      └── modules.txt
  ```
  With the above layout I could either provide the `entry` as `lambda-app/cmd/api` or `lambda-app/cmd/api/main.go`, either will work.
  When the construct builds the golang binary this will be translated `go build ./cmd/api` & `go build ./cmd/api/main.go` respectively.
  The construct will figure out where it needs to run the `go build` command from, in this example it would be from
  the `lambda-app` directory. It does this by determining the [mod file path](#mod-file-path), which is explained in the
  next section.

  The `GoFunction` tries to automatically determine your project root, that is
  the root of your golang project. This is usually where the top level `go.mod` file or
  `vendor` folder of your project is located. When bundling in a Docker container, the
  `moduleDir` is used as the source (`/asset-input`) for the volume mounted in
  the container.
  The CDK will walk up parent folders starting from
  the current working directory until it finds a folder containing a `go.mod` file.
  Alternatively, you can specify the `moduleDir` prop manually. In this case you
  need to ensure that this path includes `entry` and any module/dependencies used
  by your function. Otherwise bundling will fail.

  The `GoFunction` can be used with either the `GO_1_X` runtime or the provided runtimes (`PROVIDED`/`PROVIDED_AL2`).
  By default it will use the `PROVIDED_AL2` runtime. The `GO_1_X` runtime does not support things like
  [Lambda Extensions](https://docs.aws.amazon.com/lambda/latest/dg/using-extensions.html), whereas the provided runtimes do.
  The [aws-lambda-go](https://github.com/aws/aws-lambda-go) library has built in support for the provided runtime as long as
  you name the handler `bootstrap` (which we do by default).

  The construct will attempt to figure out how to handle the dependencies for your function. It will
  do this by determining whether or not you are vendoring your dependencies. It makes this determination
  by looking to see if there is a `vendor` folder at the [mod file path](#mod-file-path).
  With this information the construct can determine what commands to run. You will
  generally fall into two scenarios:
  1. You are using vendoring (indicated by the presence of a `vendor` folder)
     In this case `go build` will be run with `-mod=vendor` set
  2. You are not using vendoring (indicated by the absence of a `vendor` folder)
     If you are not vendoring then `go build` will be run without `-mod=vendor`
     since the default behavior is to download dependencies
  All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk-lib/aws-lambda).

  By default the following environment variables are set for you:
  * `GOOS=linux`
  * `GOARCH`: based on the target architecture of the Lambda function
  * `GO111MODULE=on`
  Use the `environment` prop to define additional environment variables when go runs:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          environment={
              "HELLO": "WORLD"
          }
      )
  )
  ```

  If `Go` is installed locally and the version is >= `go1.11` then it will be used to bundle your code in your environment. Otherwise, bundling will happen in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-provided.al2023) with the Docker platform based on the target architecture of the Lambda function.
  For macOS the recommended approach is to install `Go` as Docker volume performance is really poor.
  `Go` can be installed by following the [installation docs](https://golang.org/doc/install).

  To force bundling in a docker container even if `Go` is available in your environment, set the `forceDockerBundling` prop to `true`. This is useful if you want to make sure that your function is built in a consistent Lambda compatible environment.
  Use the `buildArgs` prop to pass build arguments when building the bundling image:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          build_args={
              "HTTPS_PROXY": "https://127.0.0.1:3001"
          }
      )
  )
  ```
  Use the `bundling.dockerImage` prop to use a custom bundling image:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          docker_image=DockerImage.from_build("/path/to/Dockerfile")
      )
  )
  ```
  Use the `bundling.goBuildFlags` prop to pass additional build flags to `go build`:
  ```python
  go.GoFunction(self, "handler",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          go_build_flags=["-ldflags \"-s -w\""]
      )
  )
  ```
  By default this construct doesn't use any Go module proxies. This is contrary to
  a standard Go installation, which would use the Google proxy by default. To
  recreate that behavior, do the following:
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          go_proxies=[go.GoFunction.GOOGLE_GOPROXY, "direct"]
      )
  )
  ```
  You can set additional Docker options to configure the build environment:
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          network="host",
          security_opt="no-new-privileges",
          user="user:group",
          volumes_from=["777f7dc92da7"],
          volumes=[DockerVolume(host_path="/host-path", container_path="/container-path")]
      )
  )
  ```

  It is  possible to run additional commands by specifying the `commandHooks` prop:
  ```text
  // This example only available in TypeScript
  // Run additional commands on a GoFunction via `commandHooks` property
  new go.GoFunction(this, 'handler', {
    bundling: {
      commandHooks: {
        // run tests
        beforeBundling(inputDir: string): string[] {
          return ['go test ./cmd/api -v'];
        },
        // ...
      },
    },
  });
  ```
  The following hooks are available:
  * `beforeBundling`: runs before all bundling commands
  * `afterBundling`: runs after all bundling commands
  They all receive the directory containing the `go.mod` file (`inputDir`) and the
  directory where the bundled asset will be output (`outputDir`). They must return
  an array of commands to run. Commands are chained with `&&`.
  The commands will run in the environment in which bundling occurs: inside the
  container for Docker bundling or on the host OS for local bundling.

  Depending on how you structure your Golang application, you may want to change the `assetHashType` parameter.
  By default this parameter is set to `AssetHashType.OUTPUT` which means that the CDK will calculate the asset hash
  (and determine whether or not your code has changed) based on the Golang executable that is created.
  If you specify `AssetHashType.SOURCE`, the CDK will calculate the asset hash by looking at the folder
  that contains your `go.mod` file. If you are deploying a single Lambda function, or you want to redeploy
  all of your functions if anything changes, then `AssetHashType.SOURCE` will probably work.
  For example, if my app looked like this:
  ```bash
  lambda-app
  ├── cmd
  │   └── api
  │       └── main.go
  ├── go.mod
  ├── go.sum
  └── pkg
      └── auth
          └── auth.go
  ```
  With this structure I would provide the `entry` as `cmd/api` which means that the CDK
  will determine that the protect root is `lambda-app` (it contains the `go.mod` file).
  Since I only have a single Lambda function, and any update to files within the `lambda-app` directory
  should trigger a new deploy, I could specify `AssetHashType.SOURCE`.
  On the other hand, if I had a project that deployed multiple Lambda functions, for example:
  ```bash
  lambda-app
  ├── cmd
  │   ├── api
  │   │   └── main.go
  │   └── anotherApi
  │       └── main.go
  ├── go.mod
  ├── go.sum
  └── pkg
      ├── auth
      │   └── auth.go
      └── middleware
          └── middleware.go
  ```
  Then I would most likely want `AssetHashType.OUTPUT`. With `OUTPUT`
  the CDK will only recognize changes if the Golang executable has changed,
  and Go only includes dependencies that are used in the executable. So in this case
  if `cmd/api` used the `auth` & `middleware` packages, but `cmd/anotherApi` did not, then
  an update to `auth` or `middleware` would only trigger an update to the `cmd/api` Lambda
  Function.

  By default the input and output of Docker based bundling is handled via bind mounts.
  In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.
  ```python
  go.GoFunction(self, "GoFunction",
      entry="app/cmd/api",
      bundling=go.BundlingOptions(
          bundling_file_access=BundlingFileAccess.VOLUME_COPY
      )
  )
  ```


pkgId: 0135fce8d7c6cfab5b807aadddf274c03659778111dfb7b210110133b67bd75b
name: python-aws-cdk.aws-lambda-python-alpha
arch: src
version: 2.158.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS Lambda in Python
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-lambda-python-alpha-2.158.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This library provides constructs for Python Lambda functions.
  To use this module, you will need to have Docker installed.

  Define a `PythonFunction`:
  ```python
  python.PythonFunction(self, "MyFunction",
      entry="/path/to/my/function",  # required
      runtime=Runtime.PYTHON_3_8,  # required
      index="my_index.py",  # optional, defaults to 'index.py'
      handler="my_exported_func"
  )
  ```
  All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk-lib/aws-lambda).

  You may create a python-based lambda layer with `PythonLayerVersion`. If `PythonLayerVersion` detects a `requirements.txt`
  or `Pipfile` or `poetry.lock` with the associated `pyproject.toml` at the entry path, then `PythonLayerVersion` will include the dependencies inline with your code in the
  layer.
  Define a `PythonLayerVersion`:
  ```python
  python.PythonLayerVersion(self, "MyLayer",
      entry="/path/to/my/layer"
  )
  ```
  A layer can also be used as a part of a `PythonFunction`:
  ```python
  python.PythonFunction(self, "MyFunction",
      entry="/path/to/my/function",
      runtime=Runtime.PYTHON_3_8,
      layers=[
          python.PythonLayerVersion(self, "MyLayer",
              entry="/path/to/my/layer"
          )
      ]
  )
  ```

  If `requirements.txt`, `Pipfile` or `poetry.lock` exists at the entry path, the construct will handle installing all required modules in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-python3.7) according to the `runtime` and with the Docker platform based on the target architecture of the Lambda function.
  Python bundles are only recreated and published when a file in a source directory has changed.
  Therefore (and as a general best-practice), it is highly recommended to commit a lockfile with a
  list of all transitive dependencies and their exact versions. This will ensure that when any dependency version is updated, the bundle asset is recreated and uploaded.
  To that end, we recommend using [`pipenv`] or [`poetry`] which have lockfile support.
  * [`pipenv`](https://pipenv-fork.readthedocs.io/en/latest/basics.html#example-pipfile-lock)
  * [`poetry`](https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control)
  Packaging is executed using the `Packaging` class, which:
  1. Infers the packaging type based on the files present.
  2. If it sees a `Pipfile` or a `poetry.lock` file, it exports it to a compatible `requirements.txt` file with credentials (if they're available in the source files or in the bundling container).
  3. Installs dependencies using `pip`.
  4. Copies the dependencies into an asset that is bundled for the Lambda package.
  **Lambda with a requirements.txt**
  ```plaintext
  .
  ├── lambda_function.py # exports a function named 'handler'
  ├── requirements.txt # has to be present at the entry path
  ```
  **Lambda with a Pipfile**
  ```plaintext
  .
  ├── lambda_function.py # exports a function named 'handler'
  ├── Pipfile # has to be present at the entry path
  ├── Pipfile.lock # your lock file
  ```
  **Lambda with a poetry.lock**
  ```plaintext
  .
  ├── lambda_function.py # exports a function named 'handler'
  ├── pyproject.toml # your poetry project definition
  ├── poetry.lock # your poetry lock file has to be present at the entry path
  ```
  **Excluding source files**
  You can exclude files from being copied using the optional bundling string array parameter `assetExcludes`:
  ```python
  python.PythonFunction(self, "function",
      entry="/path/to/poetry-function",
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          
          asset_excludes=[".venv"]
      )
  )
  ```
  **Including hashes**
  You can include hashes in `poetry` using the optional boolean parameter `poetryIncludeHashes`:
  ```python
  python.PythonFunction(self, "function",
      entry="/path/to/poetry-function",
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          poetry_include_hashes=True
      )
  )
  ```
  **Excluding URLs**
  You can exclude URLs in `poetry` using the optional boolean parameter `poetryWithoutUrls`:
  ```python
  python.PythonFunction(self, "function",
      entry="/path/to/poetry-function",
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          poetry_without_urls=True
      )
  )
  ```

  Custom bundling can be performed by passing in additional build arguments that point to index URLs to private repos, or by using an entirely custom Docker images for bundling dependencies. The build args currently supported are:
  * `PIP_INDEX_URL`
  * `PIP_EXTRA_INDEX_URL`
  * `HTTPS_PROXY`
  Additional build args for bundling that refer to PyPI indexes can be specified as:
  ```python
  entry = "/path/to/function"
  image = DockerImage.from_build(entry)
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          build_args={"PIP_INDEX_URL": "https://your.index.url/simple/", "PIP_EXTRA_INDEX_URL": "https://your.extra-index.url/simple/"}
      )
  )
  ```
  If using a custom Docker image for bundling, the dependencies are installed with `pip`, `pipenv` or `poetry` by using the `Packaging` class. A different bundling Docker image that is in the same directory as the function can be specified as:
  ```python
  entry = "/path/to/function"
  image = DockerImage.from_build(entry)
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(image=image)
  )
  ```
  You can set additional Docker options to configure the build environment:
  ```python
  entry = "/path/to/function"
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          network="host",
          security_opt="no-new-privileges",
          user="user:group",
          volumes_from=["777f7dc92da7"],
          volumes=[DockerVolume(host_path="/host-path", container_path="/container-path")]
      )
  )
  ```

  To use a Code Artifact PyPI repo, the `PIP_INDEX_URL` for bundling the function can be customized (requires AWS CLI in the build environment):
  ```python
  from child_process import exec_sync
  entry = "/path/to/function"
  image = DockerImage.from_build(entry)
  domain = "my-domain"
  domain_owner = "111122223333"
  repo_name = "my_repo"
  region = "us-east-1"
  code_artifact_auth_token = exec_sync(f"aws codeartifact get-authorization-token --domain {domain} --domain-owner {domainOwner} --query authorizationToken --output text").to_string().trim()
  index_url = f"https://aws:{codeArtifactAuthToken}@{domain}-{domainOwner}.d.codeartifact.{region}.amazonaws.com/pypi/{repoName}/simple/"
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          environment={"PIP_INDEX_URL": index_url}
      )
  )
  ```
  The index URL or the token are only used during bundling and thus not included in the final asset. Setting only environment variable for `PIP_INDEX_URL` or `PIP_EXTRA_INDEX_URL` should work for accesing private Python repositories with `pip`, `pipenv` and `poetry` based dependencies.
  If you also want to use the Code Artifact repo for building the base Docker image for bundling, use `buildArgs`. However, note that setting custom build args for bundling will force the base bundling image to be rebuilt every time (i.e. skip the Docker cache). Build args can be customized as:
  ```python
  from child_process import exec_sync
  entry = "/path/to/function"
  image = DockerImage.from_build(entry)
  domain = "my-domain"
  domain_owner = "111122223333"
  repo_name = "my_repo"
  region = "us-east-1"
  code_artifact_auth_token = exec_sync(f"aws codeartifact get-authorization-token --domain {domain} --domain-owner {domainOwner} --query authorizationToken --output text").to_string().trim()
  index_url = f"https://aws:{codeArtifactAuthToken}@{domain}-{domainOwner}.d.codeartifact.{region}.amazonaws.com/pypi/{repoName}/simple/"
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          build_args={"PIP_INDEX_URL": index_url}
      )
  )
  ```

  It is  possible to run additional commands by specifying the `commandHooks` prop:
  ```python
  entry = "/path/to/function"
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          command_hooks={
              
              def before_bundling(self, input_dir):
                  return ["pytest"],
              def after_bundling(self, input_dir):
                  return ["pylint"]
          }
      )
  )
  ```
  The following hooks are available:
  * `beforeBundling`: runs before all bundling commands
  * `afterBundling`: runs after all bundling commands
  They all receive the directory containing the dependencies file (`inputDir`) and the
  directory where the bundled asset will be output (`outputDir`). They must return
  an array of commands to run. Commands are chained with `&&`.
  The commands will run in the environment in which bundling occurs: inside the
  container for Docker bundling or on the host OS for local bundling.

  By default the input and output of Docker based bundling is handled via bind mounts.
  In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.
  ```python
  entry = "/path/to/function"
  python.PythonFunction(self, "function",
      entry=entry,
      runtime=Runtime.PYTHON_3_8,
      bundling=python.BundlingOptions(
          bundling_file_access=BundlingFileAccess.VOLUME_COPY
      )
  )
  ```


  If you are on a Mac, using [Finch](https://github.com/runfinch/finch) instead of Docker, and see an error
  like this:
  ```txt
  lstat /private/var/folders/zx/d5wln9n10sn0tcj1v9798f1c0000gr/T/jsii-kernel-9VYgrO/node_modules/@aws-cdk/aws-lambda-python-alpha/lib/Containerfile: no such file or directory
  ```
  That is a sign that your temporary directory has not been mapped into the Finch VM. Add the following to `~/.finch/finch.yaml`:
  ```yaml
  additional_directories:
    - path: /private/var/folders/
    - path: /var/folders/
  ```
  Then restart the Finch VM by running `finch vm stop && finch vm start`.


pkgId: ecd0b2533d173d93714ca7c75f81319ac699a463acffd37115b25f7763234e93
name: python-aws-cdk.aws-location-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Location
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-location-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
  Amazon Location Service lets you add location data and functionality to applications, which
  includes capabilities such as maps, points of interest, geocoding, routing, geofences, and
  tracking. Amazon Location provides location-based services (LBS) using high-quality data from
  global, trusted providers Esri and HERE. With affordable data, tracking and geofencing
  capabilities, and built-in metrics for health monitoring, you can build sophisticated
  location-enabled applications.

  A key function of Amazon Location Service is the ability to search the geolocation information.
  Amazon Location provides this functionality via the Place index resource. The place index includes
  which [data provider](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html)
  to use for the search.
  To create a place index, define a `PlaceIndex`:
  ```python
  location.PlaceIndex(self, "PlaceIndex",
      place_index_name="MyPlaceIndex",  # optional, defaults to a generated name
      data_source=location.DataSource.HERE
  )
  ```
  Use the `grant()` or `grantSearch()` method to grant the given identity permissions to perform actions
  on the place index:
  ```python

  place_index = location.PlaceIndex(self, "PlaceIndex")
  place_index.grant_search(role)
  ```

  Geofence collection resources allow you to store and manage geofences—virtual boundaries on a map.
  You can evaluate locations against a geofence collection resource and get notifications when the location
  update crosses the boundary of any of the geofences in the geofence collection.
  ```python

  location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection",  # optional, defaults to a generated name
      kms_key=key
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the geofence collection:
  ```python

  geofence_collection = location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection"
  )
  geofence_collection.grant_read(role)
  ```

  Route calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.
  For more information, see [Routes](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html).
  To create a route calculator, define a `RouteCalculator`:
  ```python
  location.RouteCalculator(self, "RouteCalculator",
      route_calculator_name="MyRouteCalculator",  # optional, defaults to a generated name
      data_source=location.DataSource.ESRI
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the route calculator:
  ```python

  route_calculator = location.RouteCalculator(self, "RouteCalculator",
      data_source=location.DataSource.ESRI
  )
  route_calculator.grant_read(role)
  ```


pkgId: f1dd202905dd2a22def35a8a9de705265c603a37145379e64f10a81467bcda66
name: python-aws-cdk.aws-location-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Location
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-location-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
  Amazon Location Service lets you add location data and functionality to applications, which
  includes capabilities such as maps, points of interest, geocoding, routing, geofences, and
  tracking. Amazon Location provides location-based services (LBS) using high-quality data from
  global, trusted providers Esri and HERE. With affordable data, tracking and geofencing
  capabilities, and built-in metrics for health monitoring, you can build sophisticated
  location-enabled applications.

  A key function of Amazon Location Service is the ability to search the geolocation information.
  Amazon Location provides this functionality via the Place index resource. The place index includes
  which [data provider](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html)
  to use for the search.
  To create a place index, define a `PlaceIndex`:
  ```python
  location.PlaceIndex(self, "PlaceIndex",
      place_index_name="MyPlaceIndex",  # optional, defaults to a generated name
      data_source=location.DataSource.HERE
  )
  ```
  Use the `grant()` or `grantSearch()` method to grant the given identity permissions to perform actions
  on the place index:
  ```python

  place_index = location.PlaceIndex(self, "PlaceIndex")
  place_index.grant_search(role)
  ```

  Geofence collection resources allow you to store and manage geofences—virtual boundaries on a map.
  You can evaluate locations against a geofence collection resource and get notifications when the location
  update crosses the boundary of any of the geofences in the geofence collection.
  ```python

  location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection",  # optional, defaults to a generated name
      kms_key=key
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the geofence collection:
  ```python

  geofence_collection = location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection"
  )
  geofence_collection.grant_read(role)
  ```

  Route calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.
  For more information, see [Routes](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html).
  To create a route calculator, define a `RouteCalculator`:
  ```python
  location.RouteCalculator(self, "RouteCalculator",
      route_calculator_name="MyRouteCalculator",  # optional, defaults to a generated name
      data_source=location.DataSource.ESRI
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the route calculator:
  ```python

  route_calculator = location.RouteCalculator(self, "RouteCalculator",
      data_source=location.DataSource.ESRI
  )
  route_calculator.grant_read(role)
  ```

  A tracker stores position updates for a collection of devices. The tracker can be used to query the devices' current location or location history. It stores the updates, but reduces storage space and visual noise by filtering the locations before storing them.
  For more information, see [Trackers](https://docs.aws.amazon.com/location/latest/developerguide/geofence-tracker-concepts.html#tracking-overview).
  To create a tracker, define a `Tracker`:
  ```python

  location.Tracker(self, "Tracker",
      tracker_name="MyTracker",  # optional, defaults to a generated name
      kms_key=key
  )
  ```
  Use the `grant()`, `grantUpdateDevicePositions` or `grantRead()` method to grant the given identity permissions to perform actions
  on the geofence collection:
  ```python

  tracker = location.Tracker(self, "Tracker",
      tracker_name="MyTracker"
  )
  tracker.grant_read(role)
  ```
  If you want to associate a tracker with geofence collections, define a `geofenceCollections` property or use `addGeofenceCollections` method.
  ```python



  tracker = location.Tracker(self, "Tracker",
      tracker_name="MyTracker",
      geofence_collections=[geofence_collection]
  )
  tracker.add_geofence_collections(geofence_collection_for_add)
  ```


pkgId: 21823d957a2a851f2fb04c28af0eeedbf82132c6e25e3c382609b78dbeee26cc
name: python-aws-cdk.aws-location-alpha
arch: src
version: 2.169.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Location
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-location-alpha-2.169.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
  Amazon Location Service lets you add location data and functionality to applications, which
  includes capabilities such as maps, points of interest, geocoding, routing, geofences, and
  tracking. Amazon Location provides location-based services (LBS) using high-quality data from
  global, trusted providers Esri and HERE. With affordable data, tracking and geofencing
  capabilities, and built-in metrics for health monitoring, you can build sophisticated
  location-enabled applications.

  The Amazon Location Service Map resource gives you access to the underlying basemap data for a map.
  You use the Map resource with a map rendering library to add an interactive map to your application.
  You can add other functionality to your map, such as markers (or pins), routes, and polygon areas, as needed for your application.
  For information about how to use map resources in practice, see [Using Amazon Location Maps in your application](https://docs.aws.amazon.com/location/latest/developerguide/using-maps.html).
  To create a map, define a `Map`:
  ```python
  location.Map(self, "Map",
      map_name="my-map",
      style=location.Style.VECTOR_ESRI_NAVIGATION,
      custom_layers=[location.CustomLayer.POI]
  )
  ```
  Use the `grant()` or `grantRendering()` method to grant the given identity permissions to perform actions
  on the map:
  ```python

  map = location.Map(self, "Map",
      style=location.Style.VECTOR_ESRI_NAVIGATION
  )
  map.grant_rendering(role)
  ```

  A key function of Amazon Location Service is the ability to search the geolocation information.
  Amazon Location provides this functionality via the Place index resource. The place index includes
  which [data provider](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html)
  to use for the search.
  To create a place index, define a `PlaceIndex`:
  ```python
  location.PlaceIndex(self, "PlaceIndex",
      place_index_name="MyPlaceIndex",  # optional, defaults to a generated name
      data_source=location.DataSource.HERE
  )
  ```
  Use the `grant()` or `grantSearch()` method to grant the given identity permissions to perform actions
  on the place index:
  ```python

  place_index = location.PlaceIndex(self, "PlaceIndex")
  place_index.grant_search(role)
  ```

  Geofence collection resources allow you to store and manage geofences—virtual boundaries on a map.
  You can evaluate locations against a geofence collection resource and get notifications when the location
  update crosses the boundary of any of the geofences in the geofence collection.
  ```python

  location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection",  # optional, defaults to a generated name
      kms_key=key
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the geofence collection:
  ```python

  geofence_collection = location.GeofenceCollection(self, "GeofenceCollection",
      geofence_collection_name="MyGeofenceCollection"
  )
  geofence_collection.grant_read(role)
  ```

  Route calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.
  For more information, see [Routes](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html).
  To create a route calculator, define a `RouteCalculator`:
  ```python
  location.RouteCalculator(self, "RouteCalculator",
      route_calculator_name="MyRouteCalculator",  # optional, defaults to a generated name
      data_source=location.DataSource.ESRI
  )
  ```
  Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
  on the route calculator:
  ```python

  route_calculator = location.RouteCalculator(self, "RouteCalculator",
      data_source=location.DataSource.ESRI
  )
  route_calculator.grant_read(role)
  ```

  A tracker stores position updates for a collection of devices. The tracker can be used to query the devices' current location or location history. It stores the updates, but reduces storage space and visual noise by filtering the locations before storing them.
  For more information, see [Trackers](https://docs.aws.amazon.com/location/latest/developerguide/geofence-tracker-concepts.html#tracking-overview).
  To create a tracker, define a `Tracker`:
  ```python

  location.Tracker(self, "Tracker",
      tracker_name="MyTracker",  # optional, defaults to a generated name
      kms_key=key
  )
  ```
  Use the `grant()`, `grantUpdateDevicePositions` or `grantRead()` method to grant the given identity permissions to perform actions
  on the geofence collection:
  ```python

  tracker = location.Tracker(self, "Tracker",
      tracker_name="MyTracker"
  )
  tracker.grant_read(role)
  ```
  If you want to associate a tracker with geofence collections, define a `geofenceCollections` property or use `addGeofenceCollections` method.
  ```python



  tracker = location.Tracker(self, "Tracker",
      tracker_name="MyTracker",
      geofence_collections=[geofence_collection]
  )
  tracker.add_geofence_collections(geofence_collection_for_add)
  ```


pkgId: b8b79222709514d083732c79cbe791c34b0c78e6c4f90ada7cbc230a90772404
name: python-aws-cdk.aws-msk-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::MSK
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-msk-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon MSK](https://aws.amazon.com/msk/) is a fully managed service that makes it easy for you to build and run applications that use Apache Kafka to process streaming data.
  The following example creates an MSK Cluster.
  ```python

  cluster = msk.Cluster(self, "Cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc
  )
  ```

  To control who can access the Cluster, use the `.connections` attribute. For a list of ports used by MSK, refer to the [MSK documentation](https://docs.aws.amazon.com/msk/latest/developerguide/client-access.html#port-info).
  ```python

  cluster = msk.Cluster(self, "Cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc
  )
  cluster.connections.allow_from(
      ec2.Peer.ipv4("1.2.3.4/8"),
      ec2.Port.tcp(2181))
  cluster.connections.allow_from(
      ec2.Peer.ipv4("1.2.3.4/8"),
      ec2.Port.tcp(9094))
  ```

  You can use the following attributes to get a list of the Kafka broker or ZooKeeper node endpoints
  ```python

  CfnOutput(self, "BootstrapBrokers", value=cluster.bootstrap_brokers)
  CfnOutput(self, "BootstrapBrokersTls", value=cluster.bootstrap_brokers_tls)
  CfnOutput(self, "BootstrapBrokersSaslScram", value=cluster.bootstrap_brokers_sasl_scram)
  CfnOutput(self, "BootstrapBrokerStringSaslIam", value=cluster.bootstrap_brokers_sasl_iam)
  CfnOutput(self, "ZookeeperConnection", value=cluster.zookeeper_connection_string)
  CfnOutput(self, "ZookeeperConnectionTls", value=cluster.zookeeper_connection_string_tls)
  ```

  To import an existing MSK cluster into your CDK app use the `.fromClusterArn()` method.
  ```python
  cluster = msk.Cluster.from_cluster_arn(self, "Cluster", "arn:aws:kafka:us-west-2:1234567890:cluster/a-cluster/11111111-1111-1111-1111-111111111111-1")
  ```

  [MSK supports](https://docs.aws.amazon.com/msk/latest/developerguide/kafka_apis_iam.html) the following authentication mechanisms.

  To enable client authentication with TLS set the `certificateAuthorityArns` property to reference your ACM Private CA. [More info on Private CAs.](https://docs.aws.amazon.com/msk/latest/developerguide/msk-authentication.html)
  ```python
  import aws_cdk.aws_acmpca as acmpca

  cluster = msk.Cluster(self, "Cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc,
      encryption_in_transit=msk.EncryptionInTransitConfig(
          client_broker=msk.ClientBrokerEncryption.TLS
      ),
      client_authentication=msk.ClientAuthentication.tls(
          certificate_authorities=[
              acmpca.CertificateAuthority.from_certificate_authority_arn(self, "CertificateAuthority", "arn:aws:acm-pca:us-west-2:1234567890:certificate-authority/11111111-1111-1111-1111-111111111111")
          ]
      )
  )
  ```

  Enable client authentication with [SASL/SCRAM](https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html):
  ```python

  cluster = msk.Cluster(self, "cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc,
      encryption_in_transit=msk.EncryptionInTransitConfig(
          client_broker=msk.ClientBrokerEncryption.TLS
      ),
      client_authentication=msk.ClientAuthentication.sasl(
          scram=True
      )
  )
  ```

  Enable client authentication with [IAM](https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html):
  ```python

  cluster = msk.Cluster(self, "cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc,
      encryption_in_transit=msk.EncryptionInTransitConfig(
          client_broker=msk.ClientBrokerEncryption.TLS
      ),
      client_authentication=msk.ClientAuthentication.sasl(
          iam=True
      )
  )
  ```

  Enable client authentication with [IAM](https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html)
  as well as enable client authentication with TLS by setting the `certificateAuthorityArns` property to reference your ACM Private CA. [More info on Private CAs.](https://docs.aws.amazon.com/msk/latest/developerguide/msk-authentication.html)
  ```python
  import aws_cdk.aws_acmpca as acmpca

  cluster = msk.Cluster(self, "Cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc,
      encryption_in_transit=msk.EncryptionInTransitConfig(
          client_broker=msk.ClientBrokerEncryption.TLS
      ),
      client_authentication=msk.ClientAuthentication.sasl_tls(
          iam=True,
          certificate_authorities=[
              acmpca.CertificateAuthority.from_certificate_authority_arn(self, "CertificateAuthority", "arn:aws:acm-pca:us-west-2:1234567890:certificate-authority/11111111-1111-1111-1111-111111111111")
          ]
      )
  )
  ```

  You can deliver Apache Kafka broker logs to one or more of the following destination types:
  Amazon CloudWatch Logs, Amazon S3, Amazon Kinesis Data Firehose.
  To configure logs to be sent to an S3 bucket, provide a bucket in the `logging` config.
  ```python


  cluster = msk.Cluster(self, "cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V2_8_1,
      vpc=vpc,
      logging=msk.BrokerLogging(
          s3=msk.S3LoggingConfiguration(
              bucket=bucket
          )
      )
  )
  ```
  When the S3 destination is configured, AWS will automatically create an S3 bucket policy
  that allows the service to write logs to the bucket. This makes it impossible to later update
  that bucket policy. To have CDK create the bucket policy so that future updates can be made,
  the `@aws-cdk/aws-s3:createDefaultLoggingPolicy` [feature flag](https://docs.aws.amazon.com/cdk/v2/guide/featureflags.html) can be used. This can be set
  in the `cdk.json` file.
  ```json
  {
    "context": {
      "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true
    }
  }
  ```

  You can configure an MSK cluster storage mode using the `storageMode` property.
  Tiered storage is a low-cost storage tier for Amazon MSK that scales to virtually unlimited storage,
  making it cost-effective to build streaming data applications.
  > Visit [Tiered storage](https://docs.aws.amazon.com/msk/latest/developerguide/msk-tiered-storage.html)
  > to see the list of compatible Kafka versions and for more details.
  ```python


  cluster = msk.Cluster(self, "cluster",
      cluster_name="myCluster",
      kafka_version=msk.KafkaVersion.V3_6_0,
      vpc=vpc,
      storage_mode=msk.StorageMode.TIERED
  )
  ```


pkgId: 6209c8bd57981f2aeff8fe0aec452dd09b95bd95473be3e9474d1be4efda51d8
name: python-aws-cdk.aws-neptune-alpha
arch: src
version: 2.166.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Neptune
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-neptune-alpha-2.166.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  Amazon Neptune is a fast, reliable, fully managed graph database service that makes it easy to build and run applications that work with highly connected datasets. The core of Neptune is a purpose-built, high-performance graph database engine. This engine is optimized for storing billions of relationships and querying the graph with milliseconds latency. Neptune supports the popular graph query languages Apache TinkerPop Gremlin and W3C’s SPARQL, enabling you to build queries that efficiently navigate highly connected datasets.
  The `@aws-cdk/aws-neptune-alpha` package contains primitives for setting up Neptune database clusters and instances.
  ```python
  import aws_cdk.aws_neptune_alpha as neptune
  ```

  To set up a Neptune database, define a `DatabaseCluster`. You must always launch a database in a VPC.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE
  )
  ```
  By default only writer instance is provisioned with this construct.

  To control who can access the cluster, use the `.connections` attribute. Neptune databases have a default port, so
  you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoints to access your database cluster will be available as the `.clusterEndpoint` and `.clusterReadEndpoint`
  attributes:
  ```python
  write_address = cluster.cluster_endpoint.socket_address
  ```

  You can also authenticate to a database cluster using AWS Identity and Access Management (IAM) database authentication;
  See [https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth.html](https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth.html) for more information and a list of supported
  versions and limitations.
  The following example shows enabling IAM authentication for a database cluster and granting connection access to an IAM role.
  ```python
  cluster = neptune.DatabaseCluster(self, "Cluster",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      iam_authentication=True
  )
  role = iam.Role(self, "DBRole", assumed_by=iam.AccountPrincipal(self.account))

  cluster.grant_connect(role) # Grant the role neptune-db:* access to the DB
  cluster.grant(role, "neptune-db:ReadDataViaQuery", "neptune-db:WriteDataViaQuery")
  ```

  Neptune allows configuring database behavior by supplying custom parameter groups.  For more details, refer to the
  following link: [https://docs.aws.amazon.com/neptune/latest/userguide/parameters.html](https://docs.aws.amazon.com/neptune/latest/userguide/parameters.html)
  ```python
  cluster_params = neptune.ClusterParameterGroup(self, "ClusterParams",
      description="Cluster parameter group",
      parameters={
          "neptune_enable_audit_log": "1"
      }
  )
  db_params = neptune.ParameterGroup(self, "DbParams",
      description="Db parameter group",
      parameters={
          "neptune_query_timeout": "120000"
      }
  )
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      cluster_parameter_group=cluster_params,
      parameter_group=db_params
  )
  ```
  Note: To use the Neptune engine versions `1.2.0.0` or later, including the newly added `1.3` series, it's necessary to specify the appropriate `engineVersion` prop in `neptune.DatabaseCluster`. Additionally, for both 1.2 and 1.3 series, the corresponding `family` prop must be set to `ParameterGroupFamily.NEPTUNE_1_2` or `ParameterGroupFamily.NEPTUNE_1_3` respectively in `neptune.ClusterParameterGroup` and `neptune.ParameterGroup`.

  `DatabaseCluster` allows launching replicas along with the writer instance. This can be specified using the `instanceCount`
  attribute.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      instances=2
  )
  ```
  Additionally, it is also possible to add replicas using `DatabaseInstance` for an existing cluster.
  ```python
  replica1 = neptune.DatabaseInstance(self, "Instance",
      cluster=cluster,
      instance_type=neptune.InstanceType.R5_LARGE
  )
  ```

  By setting `autoMinorVersionUpgrade` to true, Neptune will automatically update
  the engine of the entire cluster to the latest minor version after a stabilization
  window of 2 to 3 weeks.
  ```python
  neptune.DatabaseCluster(self, "Cluster",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      auto_minor_version_upgrade=True
  )
  ```

  By default, Neptune uses port `8182`. You can override the default port by specifying the `port` property:
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      port=12345
  )
  ```

  Neptune supports various methods for monitoring performance and usage. One of those methods is logging
  1. Neptune provides logs e.g. audit logs which can be viewed or downloaded via the AWS Console. Audit logs can be enabled using the `neptune_enable_audit_log` parameter in `ClusterParameterGroup` or `ParameterGroup`
  2. Neptune provides the ability to export those logs to CloudWatch Logs
  ```python

  cluster_parameter_group = neptune.ClusterParameterGroup(self, "ClusterParams",
      description="Cluster parameter group",
      parameters={
          "neptune_enable_audit_log": "1"
      }
  )
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      
      cluster_parameter_group=cluster_parameter_group,
      
      cloudwatch_logs_exports=[neptune.LogType.AUDIT],
      
      cloudwatch_logs_retention=logs.RetentionDays.ONE_MONTH
  )
  ```
  For more information on monitoring, refer to https://docs.aws.amazon.com/neptune/latest/userguide/monitoring.html.
  For more information on audit logs, refer to https://docs.aws.amazon.com/neptune/latest/userguide/auditing.html.
  For more information on exporting logs to CloudWatch Logs, refer to https://docs.aws.amazon.com/neptune/latest/userguide/cloudwatch-logs.html.

  Both `DatabaseCluster` and `DatabaseInstance` provide a `metric()` method to help with cluster-level and instance-level monitoring.
  ```python


  cluster.metric("SparqlRequestsPerSec") # cluster-level SparqlErrors metric
  instance.metric("SparqlRequestsPerSec")
  ```
  For more details on the available metrics, refer to https://docs.aws.amazon.com/neptune/latest/userguide/cw-metrics.html

  By setting `copyTagsToSnapshot` to true, all tags of the cluster are copied to the snapshots when they are created.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      copy_tags_to_snapshot=True
  )
  ```

  You can configure a Neptune Serverless cluster using the dedicated instance type along with the
  `serverlessScalingConfiguration` property.
  > Visit [Using Amazon Neptune Serverless](https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) for more details.
  ```python
  cluster = neptune.DatabaseCluster(self, "ServerlessDatabase",
      vpc=vpc,
      instance_type=neptune.InstanceType.SERVERLESS,
      serverless_scaling_configuration=neptune.ServerlessScalingConfiguration(
          min_capacity=1,
          max_capacity=5
      )
  )
  ```


pkgId: dfd3760f5db142159bfe399c4292bfc97bf513ab3ed383feab6d93813ed0727e
name: python-aws-cdk.aws-neptune-alpha
arch: src
version: 2.172.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Neptune
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-neptune-alpha-2.172.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  Amazon Neptune is a fast, reliable, fully managed graph database service that makes it easy to build and run applications that work with highly connected datasets. The core of Neptune is a purpose-built, high-performance graph database engine. This engine is optimized for storing billions of relationships and querying the graph with milliseconds latency. Neptune supports the popular graph query languages Apache TinkerPop Gremlin and W3C’s SPARQL, enabling you to build queries that efficiently navigate highly connected datasets.
  The `@aws-cdk/aws-neptune-alpha` package contains primitives for setting up Neptune database clusters and instances.
  ```python
  import aws_cdk.aws_neptune_alpha as neptune
  ```

  To set up a Neptune database, define a `DatabaseCluster`. You must always launch a database in a VPC.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE
  )
  ```
  By default only writer instance is provisioned with this construct.

  To control who can access the cluster, use the `.connections` attribute. Neptune databases have a default port, so
  you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoints to access your database cluster will be available as the `.clusterEndpoint` and `.clusterReadEndpoint`
  attributes:
  ```python
  write_address = cluster.cluster_endpoint.socket_address
  ```

  You can also authenticate to a database cluster using AWS Identity and Access Management (IAM) database authentication;
  See [https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth.html](https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth.html) for more information and a list of supported
  versions and limitations.
  The following example shows enabling IAM authentication for a database cluster and granting connection access to an IAM role.
  ```python
  cluster = neptune.DatabaseCluster(self, "Cluster",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      iam_authentication=True
  )
  role = iam.Role(self, "DBRole", assumed_by=iam.AccountPrincipal(self.account))

  cluster.grant_connect(role) # Grant the role neptune-db:* access to the DB
  cluster.grant(role, "neptune-db:ReadDataViaQuery", "neptune-db:WriteDataViaQuery")
  ```

  Neptune allows configuring database behavior by supplying custom parameter groups.  For more details, refer to the
  following link: [https://docs.aws.amazon.com/neptune/latest/userguide/parameters.html](https://docs.aws.amazon.com/neptune/latest/userguide/parameters.html)
  ```python
  cluster_params = neptune.ClusterParameterGroup(self, "ClusterParams",
      description="Cluster parameter group",
      parameters={
          "neptune_enable_audit_log": "1"
      }
  )
  db_params = neptune.ParameterGroup(self, "DbParams",
      description="Db parameter group",
      parameters={
          "neptune_query_timeout": "120000"
      }
  )
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      cluster_parameter_group=cluster_params,
      parameter_group=db_params
  )
  ```
  Note: To use the Neptune engine versions `1.2.0.0` or later, including the newly added `1.3` series, it's necessary to specify the appropriate `engineVersion` prop in `neptune.DatabaseCluster`. Additionally, for both 1.2 and 1.3 series, the corresponding `family` prop must be set to `ParameterGroupFamily.NEPTUNE_1_2` or `ParameterGroupFamily.NEPTUNE_1_3` respectively in `neptune.ClusterParameterGroup` and `neptune.ParameterGroup`.

  `DatabaseCluster` allows launching replicas along with the writer instance. This can be specified using the `instanceCount`
  attribute.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      instances=2
  )
  ```
  Additionally, it is also possible to add replicas using `DatabaseInstance` for an existing cluster.
  ```python
  replica1 = neptune.DatabaseInstance(self, "Instance",
      cluster=cluster,
      instance_type=neptune.InstanceType.R5_LARGE
  )
  ```

  By setting `autoMinorVersionUpgrade` to true, Neptune will automatically update
  the engine of the entire cluster to the latest minor version after a stabilization
  window of 2 to 3 weeks.
  ```python
  neptune.DatabaseCluster(self, "Cluster",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      auto_minor_version_upgrade=True
  )
  ```
  You can also specify `autoMinorVersionUpgrade` to a database instance.
  Even within the same cluster, you can modify the `autoMinorVersionUpgrade` setting on a per-instance basis.
  ```python
  neptune.DatabaseInstance(self, "Instance",
      cluster=cluster,
      instance_type=neptune.InstanceType.R5_LARGE,
      auto_minor_version_upgrade=True
  )
  ```

  By default, Neptune uses port `8182`. You can override the default port by specifying the `port` property:
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      port=12345
  )
  ```

  Neptune supports various methods for monitoring performance and usage. One of those methods is logging
  1. Neptune provides logs e.g. audit logs which can be viewed or downloaded via the AWS Console. Audit logs can be enabled using the `neptune_enable_audit_log` parameter in `ClusterParameterGroup` or `ParameterGroup`
  2. Neptune provides the ability to export those logs to CloudWatch Logs
  ```python

  cluster_parameter_group = neptune.ClusterParameterGroup(self, "ClusterParams",
      description="Cluster parameter group",
      parameters={
          "neptune_enable_audit_log": "1"
      }
  )
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      
      cluster_parameter_group=cluster_parameter_group,
      
      cloudwatch_logs_exports=[neptune.LogType.AUDIT],
      
      cloudwatch_logs_retention=logs.RetentionDays.ONE_MONTH
  )
  ```
  For more information on monitoring, refer to https://docs.aws.amazon.com/neptune/latest/userguide/monitoring.html.
  For more information on audit logs, refer to https://docs.aws.amazon.com/neptune/latest/userguide/auditing.html.
  For more information on exporting logs to CloudWatch Logs, refer to https://docs.aws.amazon.com/neptune/latest/userguide/cloudwatch-logs.html.

  Both `DatabaseCluster` and `DatabaseInstance` provide a `metric()` method to help with cluster-level and instance-level monitoring.
  ```python


  cluster.metric("SparqlRequestsPerSec") # cluster-level SparqlErrors metric
  instance.metric("SparqlRequestsPerSec")
  ```
  For more details on the available metrics, refer to https://docs.aws.amazon.com/neptune/latest/userguide/cw-metrics.html

  By setting `copyTagsToSnapshot` to true, all tags of the cluster are copied to the snapshots when they are created.
  ```python
  cluster = neptune.DatabaseCluster(self, "Database",
      vpc=vpc,
      instance_type=neptune.InstanceType.R5_LARGE,
      copy_tags_to_snapshot=True
  )
  ```

  You can configure a Neptune Serverless cluster using the dedicated instance type along with the
  `serverlessScalingConfiguration` property.
  > Visit [Using Amazon Neptune Serverless](https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) for more details.
  ```python
  cluster = neptune.DatabaseCluster(self, "ServerlessDatabase",
      vpc=vpc,
      instance_type=neptune.InstanceType.SERVERLESS,
      serverless_scaling_configuration=neptune.ServerlessScalingConfiguration(
          min_capacity=1,
          max_capacity=5
      )
  )
  ```


pkgId: b56852dcae92756c6dafb2aef4a505f95a19ca52ba1d2707e066244452937e01
name: python-aws-cdk.aws-pipes-alpha
arch: src
version: 2.164.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-alpha-2.164.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes let you create source to target connections between several
  aws services. While transporting messages from a source to a target the messages
  can be filtered, transformed and enriched.
  ![diagram of pipes](https://d1.awsstatic.com/product-marketing/EventBridge/Product-Page-Diagram_Amazon-EventBridge-Pipes.cd7961854be4432d63f6158ffd18271d6c9fa3ec.png)
  For more details see the service documentation:
  [Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html)

  [EventBridge Pipes](https://aws.amazon.com/blogs/aws/new-create-point-to-point-integrations-between-event-producers-and-consumers-with-amazon-eventbridge-pipes/)
  is a fully managed service that enables point-to-point integrations between
  event producers and consumers. Pipes can be used to connect several AWS services
  to each other, or to connect AWS services to external services.
  A Pipe has a source and a target. The source events can be filtered and enriched
  before reaching the target.

  > The following code examples use an example implementation of a [source](#source) and [target](#target). In the future there will be separate packages for the sources and targets.
  To define a pipe you need to create a new `Pipe` construct. The `Pipe` construct needs a source and a target.
  ```python


  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue)
  )
  ```
  This minimal example creates a pipe with a SQS queue as source and a SQS queue as target.
  Messages from the source are put into the body of the target message.

  A source is a AWS Service that is polled. The following Sources are
  possible:
  * [Amazon DynamoDB stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-dynamodb.html)
  * [Amazon Kinesis stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kinesis.html)
  * [Amazon MQ broker](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-mq.html)
  * [Amazon MSK stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-msk.html)
  * [Self managed Apache Kafka stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kafka.html)
  * [Amazon SQS queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-sqs.html)
  > Currently no implementation exist for any of the supported sources. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.

  ```python
  @jsii.implements(pipes.ISource)
  class SqsSource:
      def __init__(self, queue):
          self.queue = queue
          self.source_arn = queue.queue_arn
      def bind(self, _pipe):
          return pipes.SourceConfig(
              source_parameters=self.source_parameters
          )
      def grant_read(self, pipe_role):
          self.queue.grant_consume_messages(pipe_role)
  ```
  A source implementation needs to provide the `sourceArn`, `sourceParameters` and grant the pipe role read access to the source.

  A Filter can be used to filter the events from the source before they are
  forwarded to the enrichment or, if no enrichment is present, target step. Multiple filter expressions are possible.
  If one of the filter expressions matches the event is forwarded to the enrichment or target step.

  ```python


  source_filter = pipes.Filter([
      pipes.FilterPattern.from_object({
          "body": {
              
              "customer_type": ["B2B", "B2C"]
          }
      })
  ])
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      filter=source_filter
  )
  ```
  This example shows a filter that only forwards events with the `customerType` B2B or B2C from the source messages. Messages that are not matching the filter are not forwarded to the enrichment or target step.
  You can define multiple filter pattern which are combined with a logical `OR`.
  Additional filter pattern and details can be found in the EventBridge pipes [docs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-filtering.html)

  For enrichments and targets the input event can be transformed. The transformation is applied for each item of the batch.
  A transformation has access to the input event as well to some context information of the pipe itself like the name of the pipe.
  See [docs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html) for details.

  The input transformation can be created from an object. The object can contain static values, dynamic values or pipe variables.
  ```python


  target_input_transformation = pipes.InputTransformation.from_object({
      "static_field": "static value",
      "dynamic_field": pipes.DynamicInput.from_event_path("$.body.payload"),
      "pipe_variable": pipes.DynamicInput.pipe_name
  })
  pipe = pipes.Pipe(self, "Pipe",
      pipe_name="MyPipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue, {
          "input_transformation": target_input_transformation
      })
  )
  ```
  This example shows a transformation that adds a static field, a dynamic field and a pipe variable to the input event. The dynamic field is extracted from the input event. The pipe variable is extracted from the pipe context.
  So when the following batch of input events is processed by the pipe
  ```json
  [
    {
      "body": "{\"payload\": \"Test message.\"}",
    }
  ]
  ```
  it is converted into the following payload.
  ```json
  [
    {
      "staticField": "static value",
      "dynamicField": "Test message.",
      "pipeVariable": "MyPipe",
    }
  ]
  ```
  If the transformation is applied to a target it might be converted to a string representation. E.g. the resulting SQS message body looks like this.
  ```json
  [
    {
      "body": "{\"staticField\": \"static value\", \"dynamicField\": \"Test message.\", \"pipeVariable\": \"MyPipe\"}",
    }
  ]
  ```

  In cases where you want to forward only a part of the event to the target you can use the transformation event path.
  > This only works for targets because the enrichment needs to have a valid json as input.
  ```python


  target_input_transformation = pipes.InputTransformation.from_event_path("$.body.payload")
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue, {
          "input_transformation": target_input_transformation
      })
  )
  ```
  This transformation extracts the body of the event.
  So when the following batch of input events is processed by the pipe
  ```json
   [
    {
      "body": "\"{\"payload\": \"Test message.\"}\"",
    }
  ]
  ```
  it is converted into the following target payload.
  ```json
  [
    {
      "body": "Test message."
    }
  ]
  ```
  > The [implicit payload parsing](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html#input-transform-implicit) (e.g. SQS message body to JSON) only works if the input is the source payload. Implicit body parsing is not applied on enrichment results.

  In cases where you want to forward a static text to the target or use your own formatted `inputTemplate` you can use the transformation from text.
  ```python


  target_input_transformation = pipes.InputTransformation.from_text("My static text")
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue, {
          "input_transformation": target_input_transformation
      })
  )
  ```
  This transformation forwards the static text to the target.
  ```json
  [
    {
      "body": "My static text"
    }
  ]
  ```

  In the enrichment step the (un)filtered payloads from the source can be used to
  invoke one of the following services
  * API destination
  * Amazon API Gateway
  * Lambda function
  * Step Functions state machine
    * only express workflow

  > Currently no implementation exist for any of the supported enrichments. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.
  ```python
  @jsii.implements(pipes.IEnrichment)
  class LambdaEnrichment:
      def __init__(self, lambda_, props=None):
          self.enrichment_arn = lambda_.function_arn
          self.input_transformation = props.input_transformation
      def bind(self, pipe):
          return pipes.EnrichmentParametersConfig(
              enrichment_parameters=cdk.aws_pipes.CfnPipe.PipeEnrichmentParametersProperty(
                  input_template=self.input_transformation.bind(pipe).input_template
              )
          )
      def grant_invoke(self, pipe_role):
          self.lambda_.grant_invoke(pipe_role)
  ```
  An enrichment implementation needs to provide the `enrichmentArn`, `enrichmentParameters` and grant the pipe role invoke access to the enrichment.

  ```python



  enrichment_input_transformation = pipes.InputTransformation.from_object({
      "static_field": "static value",
      "dynamic_field": pipes.DynamicInput.from_event_path("$.body.payload"),
      "pipe_variable": pipes.DynamicInput.pipe_name
  })
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      enrichment=LambdaEnrichment(enrichment_lambda, {
          "input_transformation": enrichment_input_transformation
      })
  )
  ```
  This example adds a lambda function as enrichment to the pipe. The lambda function is invoked with the batch of messages from the source after applying the transformation. The lambda function can return a result which is forwarded to the target.
  So the following batch of input events is processed by the pipe
  ```json
  [
    {
      "body": "{\"payload\": \"Test message.\"}",
    }
  ]
  ```
  it is converted into the following payload which is sent to the lambda function.
  ```json
  [
    {
      "staticField": "static value",
      "dynamicField": "Test message.",
      "pipeVariable": "MyPipe",
    }
  ]
  ```
  The lambda function can return a result which is forwarded to the target.
  For example a lambda function that returns a concatenation of the static field, dynamic field and pipe variable
  ```python
  def handler(event):
      return event.static_field + "-" + event.dynamic_field + "-" + event.pipe_variable
  ```
  will produce the following target message in the target SQS queue.
  ```json
  [
    {
      "body": "static value-Test message.-MyPipe",
    }
  ]
  ```

  A Target is the end of the Pipe. After the payload from the source is pulled,
  filtered and enriched it is forwarded to the target. For now the following
  targets are supported:
  * [API destination](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html)
  * [API Gateway](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-gateway-target.html)
  * [Batch job queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-batch)
  * [CloudWatch log group](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-cwl)
  * [ECS task](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-ecs-task)
  * Event bus in the same account and Region
  * Firehose delivery stream
  * Inspector assessment template
  * Kinesis stream
  * Lambda function (SYNC or ASYNC)
  * Redshift cluster data API queries
  * SageMaker Pipeline
  * SNS topic
  * SQS queue
  * Step Functions state machine
    * Express workflows (ASYNC)
    * Standard workflows (SYNC or ASYNC)
  The target event can be transformed before it is forwarded to the target using
  the same input transformation as in the enrichment step.

  > Currently no implementation exist for any of the supported targets. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.
  ```python
  @jsii.implements(pipes.ITarget)
  class SqsTarget:
      def __init__(self, queue, props=None):
          self.queue = queue
          self.target_arn = queue.queue_arn
          self.input_transformation = props.input_transformation
      def bind(self, _pipe):
          return pipes.TargetConfig(
              target_parameters=cdk.aws_pipes.CfnPipe.PipeTargetParametersProperty(
                  input_template=self.input_transformation.bind(_pipe).input_template
              )
          )
      def grant_push(self, pipe_role):
          self.queue.grant_send_messages(pipe_role)
  ```
  A target implementation needs to provide the `targetArn`, `enrichmentParameters` and grant the pipe role invoke access to the enrichment.

  A pipe can produce log events that are forwarded to different log destinations.
  You can configure multiple destinations, but all the destination share the same log level and log data.
  For details check the official [documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html).
  The log level and data that is included in the log events is configured on the pipe class itself.
  Whereas the actual destination is defined independent.

  > Currently no implementation exist for any of the supported enrichments. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.
  ```python
  @jsii.implements(pipes.ILogDestination)
  class CloudwatchDestination:
      def __init__(self, log_group):
          self.log_group = log_group
          self.parameters = pipes.LogDestinationParameters(
              cloudwatch_logs_log_destination=cdk.aws_pipes.CfnPipe.CloudwatchLogsLogDestinationProperty(
                  log_group_arn=log_group.log_group_arn
              )
          )
      def bind(self, _pipe):
          return pipes.LogDestinationConfig(
              parameters=self.parameters
          )
      def grant_push(self, pipe_role):
          self.log_group.grant_write(pipe_role)
  ```

  ```python



  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      log_level=pipes.LogLevel.TRACE,
      log_include_execution_data=[pipes.IncludeExecutionData.ALL],
      log_destinations=[
          CloudwatchDestination(loggroup)
      ]
  )
  ```
  This example uses a cloudwatch loggroup to store the log emitted during a pipe execution. The log level is set to `TRACE` so all steps of the pipe are logged.
  Additionally all execution data is logged as well.


pkgId: e947c081ee1ad64b061bd50d7d19650ac5b3fe02f2adc9c10d224c40d6be370e
name: python-aws-cdk.aws-pipes-alpha
arch: src
version: 2.172.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-alpha-2.172.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes let you create source to target connections between several
  AWS services. While transporting messages from a source to a target the messages
  can be filtered, transformed and enriched.
  ![diagram of pipes](https://d1.awsstatic.com/product-marketing/EventBridge/Product-Page-Diagram_Amazon-EventBridge-Pipes.cd7961854be4432d63f6158ffd18271d6c9fa3ec.png)
  For more details see the [service documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html).

  [EventBridge Pipes](https://aws.amazon.com/blogs/aws/new-create-point-to-point-integrations-between-event-producers-and-consumers-with-amazon-eventbridge-pipes/)
  is a fully managed service that enables point-to-point integrations between
  event producers and consumers. Pipes can be used to connect several AWS services
  to each other, or to connect AWS services to external services.
  A pipe has a source and a target. The source events can be filtered and enriched
  before reaching the target.

  > The following code examples use an example implementation of a [source](#source) and [target](#target).
  To define a pipe you need to create a new `Pipe` construct. The `Pipe` construct needs a source and a target.
  ```python


  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue)
  )
  ```
  This minimal example creates a pipe with a SQS queue as source and a SQS queue as target.
  Messages from the source are put into the body of the target message.

  A source is a AWS Service that is polled. The following sources are possible:
  * [Amazon DynamoDB stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-dynamodb.html)
  * [Amazon Kinesis stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kinesis.html)
  * [Amazon MQ broker](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-mq.html)
  * [Amazon MSK stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-msk.html)
  * [Amazon SQS queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-sqs.html)
  * [Apache Kafka stream](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kafka.html)
  Currently, DynamoDB, Kinesis, and SQS are supported. If you are interested in support for additional sources,
  kindly let us know by opening a GitHub issue or raising a PR.

  ```python

  pipe_source = SqsSource(source_queue)
  ```

  A filter can be used to filter the events from the source before they are
  forwarded to the enrichment or, if no enrichment is present, target step. Multiple filter expressions are possible.
  If one of the filter expressions matches, the event is forwarded to the enrichment or target step.

  ```python


  source_filter = pipes.Filter([
      pipes.FilterPattern.from_object({
          "body": {
              
              "customer_type": ["B2B", "B2C"]
          }
      })
  ])
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      filter=source_filter
  )
  ```
  This example shows a filter that only forwards events with the `customerType` B2B or B2C from the source messages. Messages that are not matching the filter are not forwarded to the enrichment or target step.
  You can define multiple filter pattern which are combined with a logical `OR`.
  Additional filter pattern and details can be found in the EventBridge pipes [docs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-filtering.html).

  For enrichments and targets the input event can be transformed. The transformation is applied for each item of the batch.
  A transformation has access to the input event as well to some context information of the pipe itself like the name of the pipe.
  See [docs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html) for details.

  The input transformation can be created from an object. The object can contain static values, dynamic values or pipe variables.
  ```python


  target_input_transformation = pipes.InputTransformation.from_object({
      "static_field": "static value",
      "dynamic_field": pipes.DynamicInput.from_event_path("$.body.payload"),
      "pipe_variable": pipes.DynamicInput.pipe_name
  })
  pipe = pipes.Pipe(self, "Pipe",
      pipe_name="MyPipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue,
          input_transformation=target_input_transformation
      )
  )
  ```
  This example shows a transformation that adds a static field, a dynamic field and a pipe variable to the input event. The dynamic field is extracted from the input event. The pipe variable is extracted from the pipe context.
  So when the following batch of input events is processed by the pipe
  ```json
  [
    {
      "body": "{\"payload\": \"Test message.\"}",
    }
  ]
  ```
  it is converted into the following payload:
  ```json
  [
    {
      "staticField": "static value",
      "dynamicField": "Test message.",
      "pipeVariable": "MyPipe",
    }
  ]
  ```
  If the transformation is applied to a target it might be converted to a string representation. For example, the resulting SQS message body looks like this:
  ```json
  [
    {
      "body": "{\"staticField\": \"static value\", \"dynamicField\": \"Test message.\", \"pipeVariable\": \"MyPipe\"}",
    }
  ]
  ```

  In cases where you want to forward only a part of the event to the target you can use the transformation event path.
  > This only works for targets because the enrichment needs to have a valid json as input.
  ```python


  target_input_transformation = pipes.InputTransformation.from_event_path("$.body.payload")
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue,
          input_transformation=target_input_transformation
      )
  )
  ```
  This transformation extracts the body of the event.
  So when the following batch of input events is processed by the pipe
  ```json
   [
    {
      "body": "\"{\"payload\": \"Test message.\"}\"",
    }
  ]
  ```
  it is converted into the following target payload:
  ```json
  [
    {
      "body": "Test message."
    }
  ]
  ```
  > The [implicit payload parsing](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html#input-transform-implicit) (e.g. SQS message body to JSON) only works if the input is the source payload. Implicit body parsing is not applied on enrichment results.

  In cases where you want to forward a static text to the target or use your own formatted `inputTemplate` you can use the transformation from text.
  ```python


  target_input_transformation = pipes.InputTransformation.from_text("My static text")
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue,
          input_transformation=target_input_transformation
      )
  )
  ```
  This transformation forwards the static text to the target.
  ```json
  [
    {
      "body": "My static text"
    }
  ]
  ```

  In the enrichment step the (un)filtered payloads from the source can be used to invoke one of the following services:
  * API destination
  * Amazon API Gateway
  * Lambda function
  * Step Functions state machine
    * only express workflow

  > Currently no implementation exist for any of the supported enrichments. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.
  ```python
  @jsii.implements(pipes.IEnrichment)
  class LambdaEnrichment:
      def __init__(self, lambda_, props=None):
          self.enrichment_arn = lambda_.function_arn
          self.input_transformation = props.input_transformation
      def bind(self, pipe):
          return pipes.EnrichmentParametersConfig(
              enrichment_parameters=cdk.aws_pipes.CfnPipe.PipeEnrichmentParametersProperty(
                  input_template=self.input_transformation.bind(pipe).input_template
              )
          )
      def grant_invoke(self, pipe_role):
          self.lambda_.grant_invoke(pipe_role)
  ```
  An enrichment implementation needs to provide the `enrichmentArn`, `enrichmentParameters` and grant the pipe role invoke access to the enrichment.

  ```python



  enrichment_input_transformation = pipes.InputTransformation.from_object({
      "static_field": "static value",
      "dynamic_field": pipes.DynamicInput.from_event_path("$.body.payload"),
      "pipe_variable": pipes.DynamicInput.pipe_name
  })
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      enrichment=LambdaEnrichment(enrichment_lambda, {
          "input_transformation": enrichment_input_transformation
      })
  )
  ```
  This example adds a lambda function as enrichment to the pipe. The lambda function is invoked with the batch of messages from the source after applying the transformation. The lambda function can return a result which is forwarded to the target.
  So the following batch of input events is processed by the pipe
  ```json
  [
    {
      "body": "{\"payload\": \"Test message.\"}",
    }
  ]
  ```
  it is converted into the following payload which is sent to the lambda function.
  ```json
  [
    {
      "staticField": "static value",
      "dynamicField": "Test message.",
      "pipeVariable": "MyPipe",
    }
  ]
  ```
  The lambda function can return a result which is forwarded to the target.
  For example a lambda function that returns a concatenation of the static field, dynamic field and pipe variable
  ```python
  def handler(event):
      return event.static_field + "-" + event.dynamic_field + "-" + event.pipe_variable
  ```
  will produce the following target message in the target SQS queue.
  ```json
  [
    {
      "body": "static value-Test message.-MyPipe",
    }
  ]
  ```

  A Target is the end of the Pipe. After the payload from the source is pulled,
  filtered and enriched it is forwarded to the target. For now the following
  targets are supported:
  * [API destination](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html)
  * [API Gateway](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-gateway-target.html)
  * [Batch job queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-batch)
  * [CloudWatch log group](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-cwl)
  * [ECS task](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html#pipes-targets-specifics-ecs-task)
  * Event bus in the same account and Region
  * Firehose delivery stream
  * Inspector assessment template
  * Kinesis stream
  * Lambda function (SYNC or ASYNC)
  * Redshift cluster data API queries
  * SageMaker Pipeline
  * SNS topic
  * SQS queue
  * Step Functions state machine
    * Express workflows (ASYNC)
    * Standard workflows (SYNC or ASYNC)
  The target event can be transformed before it is forwarded to the target using
  the same input transformation as in the enrichment step.

  ```python

  pipe_target = SqsTarget(target_queue)
  ```

  A pipe can produce log events that are forwarded to different log destinations.
  You can configure multiple destinations, but all the destination share the same log level and log data.
  For details check the official [documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html).
  The log level and data that is included in the log events is configured on the pipe class itself.
  The actual destination is defined independently, and there are three options:
  1. `CloudwatchLogsLogDestination`
  2. `FirehoseLogDestination`
  3. `S3LogDestination`

  ```python



  cwl_log_destination = pipes.CloudwatchLogsLogDestination(log_group)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=SqsTarget(target_queue),
      log_level=pipes.LogLevel.TRACE,
      log_include_execution_data=[pipes.IncludeExecutionData.ALL],
      log_destinations=[cwl_log_destination]
  )
  ```
  This example uses a CloudWatch Logs log group to store the log emitted during a pipe execution.
  The log level is set to `TRACE` so all steps of the pipe are logged.
  Additionally all execution data is logged as well.


pkgId: 5f2dc2fe60b507f1823317da663bf184cbbccda3b12f66fb433f94d0ed498669
name: python-aws-cdk.aws-pipes-enrichments-alpha
arch: src
version: 2.164.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Enrichments
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-enrichments-alpha-2.164.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Enrichments let you create enrichments for an EventBridge Pipe.
  For more details see the service documentation:
  [Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html)

  Pipe enrichments are invoked prior to sending the events to a target of a EventBridge Pipe.

  A Lambda function can be used to enrich events of a pipe.
  ```python



  enrichment = enrichments.LambdaEnrichment(enrichment_function)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```

  Step Functions state machine can be used to enrich events of a pipe.
  **Note:** EventBridge Pipes only supports Express workflows invoked synchronously.
  > Visit [Amazon EventBridge Pipes event enrichment](https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html) for more details.
  ```python



  enrichment = enrichments.StepFunctionsEnrichment(enrichment_state_machine)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```

  API destination can be used to enrich events of a pipe.
  ```python



  enrichment = enrichments.ApiDestinationEnrichment(api_destination)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```


pkgId: a10b83789eda2e7d01a24a82c1e050eac3a19fbd864e2a8fb5bf98feb29cc2a2
name: python-aws-cdk.aws-pipes-enrichments-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Enrichments
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-enrichments-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Enrichments let you create enrichments for an EventBridge Pipe.
  For more details see the service documentation:
  [Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html)

  Pipe enrichments are invoked prior to sending the events to a target of a EventBridge Pipe.

  A Lambda function can be used to enrich events of a pipe.
  ```python



  enrichment = enrichments.LambdaEnrichment(enrichment_function)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```

  Step Functions state machine can be used to enrich events of a pipe.
  **Note:** EventBridge Pipes only supports Express workflows invoked synchronously.
  > Visit [Amazon EventBridge Pipes event enrichment](https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html) for more details.
  ```python



  enrichment = enrichments.StepFunctionsEnrichment(enrichment_state_machine)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```

  API destination can be used to enrich events of a pipe.
  ```python



  enrichment = enrichments.ApiDestinationEnrichment(api_destination)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```

  API Gateway can be used to enrich events of a pipe.
  Pipes only supports API Gateway REST APIs. HTTP APIs are not supported.
  ```python



  enrichment = enrichments.ApiGatewayEnrichment(rest_api)
  pipe = pipes.Pipe(self, "Pipe",
      source=SomeSource(source_queue),
      enrichment=enrichment,
      target=SomeTarget(target_queue)
  )
  ```


pkgId: c10d4617c97b8000a0435ada8dc1bfc7ea91f263521496e2458a758a6393d382
name: python-aws-cdk.aws-pipes-sources-alpha
arch: src
version: 2.164.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Sources
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-sources-alpha-2.164.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Sources let you create a source for a EventBridge Pipe.
  For more details see the service documentation:
  [Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html)

  Pipe sources are the starting point of a EventBridge Pipe. They are the source of the events that are sent to the pipe.

  A SQS message queue can be used as a source for a pipe. The queue will be polled for new messages and the messages will be sent to the pipe.
  ```python


  pipe_source = sources.SqsSource(source_queue)
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SomeTarget(target_queue)
  )
  ```
  The polling configuration can be customized:
  ```python


  pipe_source = sources.SqsSource(source_queue,
      batch_size=10,
      maximum_batching_window=cdk.Duration.seconds(10)
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SomeTarget(target_queue)
  )
  ```

  A Kinesis stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
  ```python


  pipe_source = sources.KinesisSource(source_stream,
      starting_position=sources.KinesisStartingPosition.LATEST
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SomeTarget(target_queue)
  )
  ```

  A DynamoDB stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
  ```python

  table = ddb.TableV2(self, "MyTable",
      partition_key=ddb.Attribute(
          name="id",
          type=ddb.AttributeType.STRING
      ),
      dynamo_stream=ddb.StreamViewType.NEW_IMAGE
  )
  pipe_source = sources.DynamoDBSource(table,
      starting_position=sources.DynamoDBStartingPosition.LATEST
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SomeTarget(target_queue)
  )
  ```


pkgId: 0c57db6e311ef3d301848520ee3a904c0f32dabfa7040ff57f311d6a33ba7e12
name: python-aws-cdk.aws-pipes-sources-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Sources
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-sources-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Sources let you create a source for a EventBridge Pipe.
  For more details see the service documentation:
  [Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html)

  Pipe sources are the starting point of a EventBridge Pipe. They are the source of the events that are sent to the pipe.

  A SQS message queue can be used as a source for a pipe. The queue will be polled for new messages and the messages will be sent to the pipe.
  ```python


  pipe_source = sources.SqsSource(source_queue)
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SqsTarget(target_queue)
  )
  ```
  The polling configuration can be customized:
  ```python


  pipe_source = sources.SqsSource(source_queue,
      batch_size=10,
      maximum_batching_window=cdk.Duration.seconds(10)
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SqsTarget(target_queue)
  )
  ```

  A Kinesis stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
  ```python


  pipe_source = sources.KinesisSource(source_stream,
      starting_position=sources.KinesisStartingPosition.LATEST
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SqsTarget(target_queue)
  )
  ```

  A DynamoDB stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
  ```python

  table = ddb.TableV2(self, "MyTable",
      partition_key=ddb.Attribute(
          name="id",
          type=ddb.AttributeType.STRING
      ),
      dynamo_stream=ddb.StreamViewType.NEW_IMAGE
  )
  pipe_source = sources.DynamoDBSource(table,
      starting_position=sources.DynamoDBStartingPosition.LATEST
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=pipe_source,
      target=SqsTarget(target_queue)
  )
  ```


pkgId: 54a187a4e67e2ec4b77bab3e67699d9b8d7a62742a09a2c7fe161ae2ee9f8f6b
name: python-aws-cdk.aws-pipes-targets-alpha
arch: src
version: 2.164.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Targets
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-targets-alpha-2.164.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Targets let you create a target for an EventBridge Pipe.
  For more details see the [service documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html).

  Pipe targets are the end point of an EventBridge Pipe. The following targets are supported:
  * `targets.ApiDestinationTarget`: [Send event source to an EventBridge API destination](#amazon-eventbridge-api-destination)
  * `targets.CloudWatchLogsTarget`: [Send event source to a CloudWatch Logs log group](#amazon-cloudwatch-logs-log-group)
  * `targets.EventBridgeTarget`: [Send event source to an EventBridge event bus](#amazon-eventbridge-event-bus)
  * `targets.KinesisTarget`: [Send event source to a Kinesis data stream](#amazon-kinesis-data-stream)
  * `targets.LambdaFunction`: [Send event source to a Lambda function](#aws-lambda-function)
  * `targets.SfnStateMachine`: [Invoke a Step Functions state machine from an event source](#aws-step-functions-state-machine)
  * `targets.SqsTarget`: [Send event source to an SQS queue](#amazon-sqs)

  An EventBridge API destination can be used as a target for a pipe.
  The API destination will receive the (enriched/filtered) source payload.
  ```python


  api_target = targets.ApiDestinationTarget(dest)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```
  The input to the target API destination can be transformed:
  ```python


  api_target = targets.ApiDestinationTarget(dest,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```

  A CloudWatch Logs log group can be used as a target for a pipe.
  The log group will receive the (enriched/filtered) source payload.
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```
  The input to the target log group can be transformed:
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```

  An EventBridge event bus can be used as a target for a pipe.
  The event bus will receive the (enriched/filtered) source payload.
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```
  The input to the target event bus can be transformed:
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```

  A Kinesis data stream can be used as a target for a pipe.
  The data stream will receive the (enriched/filtered) source payload.
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk"
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```
  The input to the target data stream can be transformed:
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk",
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```

  A Lambda function can be used as a target for a pipe.
  The Lambda function will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.LambdaFunction(target_function)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target Lambda function is invoked synchronously by default. You can also choose to invoke the Lambda Function asynchronously by setting `invocationType` property to `FIRE_AND_FORGET`.
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      invocation_type=targets.LambdaFunctionInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target Lambda Function can be transformed:
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  A Step Functions state machine can be used as a target for a pipe.
  The state machine will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  You can specify the invocation type when the target state machine is invoked:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target state machine can be transformed:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      input_transformation=pipes.InputTransformation.from_object({"body": "<$.body>"}),
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  An SQS queue can be used as a target for a pipe.
  The queue will receive the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SqsTarget(target_queue)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target input can be transformed:
  ```python


  pipe_target = targets.SqsTarget(target_queue,
      input_transformation=pipes.InputTransformation.from_object({
          "SomeKey": pipes.DynamicInput.from_event_path("$.body")
      })
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```


pkgId: cead32ecee136dfe8a9e8015a6435006b14f159b11f85b0ec7292c04951a65f7
name: python-aws-cdk.aws-pipes-targets-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Targets
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-targets-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Targets let you create a target for an EventBridge Pipe.
  For more details see the [service documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html).

  Pipe targets are the end point of an EventBridge Pipe. The following targets are supported:
  * `targets.ApiDestinationTarget`: [Send event source to an EventBridge API destination](#amazon-eventbridge-api-destination)
  * `targets.CloudWatchLogsTarget`: [Send event source to a CloudWatch Logs log group](#amazon-cloudwatch-logs-log-group)
  * `targets.EventBridgeTarget`: [Send event source to an EventBridge event bus](#amazon-eventbridge-event-bus)
  * `targets.KinesisTarget`: [Send event source to a Kinesis data stream](#amazon-kinesis-data-stream)
  * `targets.LambdaFunction`: [Send event source to a Lambda function](#aws-lambda-function)
  * `targets.SageMakerTarget`: [Send event source to a SageMaker pipeline](#amazon-sagemaker-pipeline)
  * `targets.SfnStateMachine`: [Invoke a Step Functions state machine from an event source](#aws-step-functions-state-machine)
  * `targets.SqsTarget`: [Send event source to an SQS queue](#amazon-sqs)

  An EventBridge API destination can be used as a target for a pipe.
  The API destination will receive the (enriched/filtered) source payload.
  ```python


  api_target = targets.ApiDestinationTarget(dest)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```
  The input to the target API destination can be transformed:
  ```python


  api_target = targets.ApiDestinationTarget(dest,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```

  A CloudWatch Logs log group can be used as a target for a pipe.
  The log group will receive the (enriched/filtered) source payload.
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```
  The input to the target log group can be transformed:
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```

  An EventBridge event bus can be used as a target for a pipe.
  The event bus will receive the (enriched/filtered) source payload.
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```
  The input to the target event bus can be transformed:
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```

  A Kinesis data stream can be used as a target for a pipe.
  The data stream will receive the (enriched/filtered) source payload.
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk"
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```
  The input to the target data stream can be transformed:
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk",
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```

  A Lambda function can be used as a target for a pipe.
  The Lambda function will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.LambdaFunction(target_function)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target Lambda function is invoked synchronously by default. You can also choose to invoke the Lambda Function asynchronously by setting `invocationType` property to `FIRE_AND_FORGET`.
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      invocation_type=targets.LambdaFunctionInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target Lambda Function can be transformed:
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  A SageMaker pipeline can be used as a target for a pipe.
  The pipeline will receive the (enriched/filtered) source payload.
  ```python


  pipeline_target = targets.SageMakerTarget(target_pipeline)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipeline_target
  )
  ```
  The input to the target pipeline can be transformed:
  ```python


  pipeline_target = targets.SageMakerTarget(target_pipeline,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipeline_target
  )
  ```

  A Step Functions state machine can be used as a target for a pipe.
  The state machine will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  You can specify the invocation type when the target state machine is invoked:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target state machine can be transformed:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      input_transformation=pipes.InputTransformation.from_object({"body": "<$.body>"}),
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  An SQS queue can be used as a target for a pipe.
  The queue will receive the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SqsTarget(target_queue)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target input can be transformed:
  ```python


  pipe_target = targets.SqsTarget(target_queue,
      input_transformation=pipes.InputTransformation.from_object({
          "SomeKey": pipes.DynamicInput.from_event_path("$.body")
      })
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```


pkgId: 991c6c69e56ebbcffabea4aac170b10f8c04b48b93438539735e465e9194a5c8
name: python-aws-cdk.aws-pipes-targets-alpha
arch: src
version: 2.172.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon EventBridge Pipes Targets
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-pipes-targets-alpha-2.172.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  EventBridge Pipes Targets let you create a target for an EventBridge Pipe.
  For more details see the [service documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html).

  Pipe targets are the end point of an EventBridge Pipe. The following targets are supported:
  * `targets.ApiDestinationTarget`: [Send event source to an EventBridge API destination](#amazon-eventbridge-api-destination)
  * `targets.ApiGatewayTarget`: [Send event source to an API Gateway REST API](#amazon-api-gateway-rest-api)
  * `targets.CloudWatchLogsTarget`: [Send event source to a CloudWatch Logs log group](#amazon-cloudwatch-logs-log-group)
  * `targets.EventBridgeTarget`: [Send event source to an EventBridge event bus](#amazon-eventbridge-event-bus)
  * `targets.KinesisTarget`: [Send event source to a Kinesis data stream](#amazon-kinesis-data-stream)
  * `targets.LambdaFunction`: [Send event source to a Lambda function](#aws-lambda-function)
  * `targets.SageMakerTarget`: [Send event source to a SageMaker pipeline](#amazon-sagemaker-pipeline)
  * `targets.SfnStateMachine`: [Invoke a Step Functions state machine from an event source](#aws-step-functions-state-machine)
  * `targets.SqsTarget`: [Send event source to an SQS queue](#amazon-sqs)

  An EventBridge API destination can be used as a target for a pipe.
  The API destination will receive the (enriched/filtered) source payload.
  ```python


  api_target = targets.ApiDestinationTarget(dest)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```
  The input to the target API destination can be transformed:
  ```python


  api_target = targets.ApiDestinationTarget(dest,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```

  A REST API can be used as a target for a pipe.
  The REST API will receive the (enriched/filtered) source payload.
  ```python

  fn = lambda_.Function(self, "MyFunc",
      handler="index.handler",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      code=lambda_.Code.from_inline("exports.handler = e => {}")
  )
  rest_api = api.LambdaRestApi(self, "MyRestAPI", handler=fn)
  api_target = targets.ApiGatewayTarget(rest_api)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```
  The input to the target REST API can be transformed:
  ```python

  fn = lambda_.Function(self, "MyFunc",
      handler="index.handler",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      code=lambda_.Code.from_inline("exports.handler = e => {}")
  )
  rest_api = api.LambdaRestApi(self, "MyRestAPI", handler=fn)
  api_target = targets.ApiGatewayTarget(rest_api,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=api_target
  )
  ```

  A CloudWatch Logs log group can be used as a target for a pipe.
  The log group will receive the (enriched/filtered) source payload.
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```
  The input to the target log group can be transformed:
  ```python


  log_group_target = targets.CloudWatchLogsTarget(target_log_group,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=log_group_target
  )
  ```

  An EventBridge event bus can be used as a target for a pipe.
  The event bus will receive the (enriched/filtered) source payload.
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```
  The input to the target event bus can be transformed:
  ```python


  event_bus_target = targets.EventBridgeTarget(target_event_bus,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=event_bus_target
  )
  ```

  A Kinesis data stream can be used as a target for a pipe.
  The data stream will receive the (enriched/filtered) source payload.
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk"
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```
  The input to the target data stream can be transformed:
  ```python


  stream_target = targets.KinesisTarget(target_stream,
      partition_key="pk",
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=stream_target
  )
  ```

  A Lambda function can be used as a target for a pipe.
  The Lambda function will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.LambdaFunction(target_function)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target Lambda function is invoked synchronously by default. You can also choose to invoke the Lambda Function asynchronously by setting `invocationType` property to `FIRE_AND_FORGET`.
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      invocation_type=targets.LambdaFunctionInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target Lambda Function can be transformed:
  ```python


  pipe_target = targets.LambdaFunction(target_function,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  A SageMaker pipeline can be used as a target for a pipe.
  The pipeline will receive the (enriched/filtered) source payload.
  ```python


  pipeline_target = targets.SageMakerTarget(target_pipeline)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipeline_target
  )
  ```
  The input to the target pipeline can be transformed:
  ```python


  pipeline_target = targets.SageMakerTarget(target_pipeline,
      input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipeline_target
  )
  ```

  A Step Functions state machine can be used as a target for a pipe.
  The state machine will be invoked with the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  You can specify the invocation type when the target state machine is invoked:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The input to the target state machine can be transformed:
  ```python


  pipe_target = targets.SfnStateMachine(target_state_machine,
      input_transformation=pipes.InputTransformation.from_object({"body": "<$.body>"}),
      invocation_type=targets.StateMachineInvocationType.FIRE_AND_FORGET
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```

  An SQS queue can be used as a target for a pipe.
  The queue will receive the (enriched/filtered) source payload.
  ```python


  pipe_target = targets.SqsTarget(target_queue)
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```
  The target input can be transformed:
  ```python


  pipe_target = targets.SqsTarget(target_queue,
      input_transformation=pipes.InputTransformation.from_object({
          "SomeKey": pipes.DynamicInput.from_event_path("$.body")
      })
  )
  pipe = pipes.Pipe(self, "Pipe",
      source=SqsSource(source_queue),
      target=pipe_target
  )
  ```


pkgId: d04e9225f4233553591daaae422871eaa88b6b293878f5208dbd87b086602e2e
name: python-aws-cdk.aws-redshift-alpha
arch: src
version: 2.159.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Redshift
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-redshift-alpha-2.159.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->

  To set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.
  You can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  ```
  By default, the master password will be generated and stored in AWS Secrets Manager.
  A default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.
  By default, the cluster will not be publicly accessible.
  Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.

  Amazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_s3 as s3
  vpc = ec2.Vpc(self, "Vpc")
  bucket = s3.Bucket.from_bucket_name(self, "bucket", "logging-bucket")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      logging_properties=LoggingProperties(
          logging_bucket=bucket,
          logging_key_prefix="prefix"
      )
  )
  ```

  To control who can access the cluster, use the `.connections` attribute. Redshift Clusters have
  a default port, so you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:
  ```python
  cluster.cluster_endpoint.socket_address
  ```

  This module allows for the creation of non-CloudFormation database resources such as users
  and tables. This allows you to manage identities, permissions, and stateful resources
  within your Redshift cluster from your CDK application.
  Because these resources are not available in CloudFormation, this library leverages
  [custom
  resources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)
  to manage them. In addition to the IAM permissions required to make Redshift service
  calls, the execution role for the custom resource handler requires database credentials to
  create resources within the cluster.
  These database credentials can be supplied explicitly through the `adminUser` properties
  of the various database resource constructs. Alternatively, the credentials can be
  automatically pulled from the Redshift cluster's default administrator
  credentials. However, this option is only available if the password for the credentials
  was generated by the CDK application (ie., no value vas provided for [the `masterPassword`
  property](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)
  of
  [`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).

  Create a user within a Redshift cluster database by instantiating a `User` construct. This
  will generate a username and password, store the credentials in a [AWS Secrets Manager
  `Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),
  and make a query to the Redshift cluster to create a new database user with the
  credentials.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, the user credentials are encrypted with your AWS account's default Secrets
  Manager encryption key. You can specify the encryption key used for this purpose by
  supplying a key in the `encryptionKey` property.
  ```python
  import aws_cdk.aws_kms as kms
  encryption_key = kms.Key(self, "Key")
  User(self, "User",
      encryption_key=encryption_key,
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, a username is automatically generated from the user construct ID and its path
  in the construct tree. You can specify a particular username by providing a value for the
  `username` property. Usernames must be valid identifiers; see: [Names and
  identifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon
  Redshift Database Developer Guide*.
  ```python
  User(self, "User",
      username="myuser",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The user password is generated by AWS Secrets Manager using the default configuration
  found in
  [`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),
  except with password length `30` and some SQL-incompliant characters excluded. The
  plaintext for the password will never be present in the CDK application; instead, a
  [CloudFormation Dynamic
  Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)
  will be used wherever the password value is required.

  Create a table within a Redshift cluster database by instantiating a `Table`
  construct. This will make a query to the Redshift cluster to create a new database table
  with the supplied schema.
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Tables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.
  Therefore, changing of table names for <= v2.114.1 have been disabled.
  ```python

  Table(self, "Table",
      table_name="oldTableName",  # This value can be change for versions greater than v2.114.1
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The table can be configured to have distStyle attribute and a distKey column:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", dist_key=True), Column(name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      dist_style=TableDistStyle.KEY
  )
  ```
  The table can also be configured to have sortStyle attribute and sortKey columns:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", sort_key=True), Column(name="col2", data_type="float", sort_key=True)
      ],
      cluster=cluster,
      database_name="databaseName",
      sort_style=TableSortStyle.COMPOUND
  )
  ```
  Tables and their respective columns can be configured to contain comments:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", comment="This is a column comment"), Column(name="col2", data_type="float", comment="This is a another column comment")
      ],
      cluster=cluster,
      database_name="databaseName",
      table_comment="This is a table comment"
  )
  ```
  Table columns can be configured to use a specific compression encoding:
  ```python
  from aws_cdk.aws_redshift_alpha import ColumnEncoding
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", encoding=ColumnEncoding.TEXT32K), Column(name="col2", data_type="float", encoding=ColumnEncoding.DELTA32K)
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Table columns can also contain an `id` attribute, which can allow table columns to be renamed.
  **NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.
  ```python
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```

  You can give a user privileges to perform certain actions on a table by using the
  `Table.grant()` method.
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.DROP, TableAction.SELECT)
  ```
  Take care when managing privileges via the CDK, as attempting to manage a user's
  privileges on the same table in multiple CDK applications could lead to accidentally
  overriding these permissions. Consider the following two CDK applications which both refer
  to the same user and table. In application 1, the resources are created and the user is
  given `INSERT` permissions on the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User(self, "User",
      username=username,
      cluster=cluster,
      database_name=database_name
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name=database_name
  )
  table.grant(user, TableAction.INSERT)
  ```
  In application 2, the resources are imported and the user is given `INSERT` permissions on
  the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User.from_user_attributes(self, "User",
      username=username,
      password=SecretValue.unsafe_plain_text("NOT_FOR_PRODUCTION"),
      cluster=cluster,
      database_name=database_name
  )
  table = Table.from_table_attributes(self, "Table",
      table_name=table_name,
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.INSERT)
  ```
  Both applications attempt to grant the user the appropriate privilege on the table by
  submitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these
  two calls will have no effect since the user has already been granted the privilege.
  Now, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is
  submitted to the Redshift cluster. In general, application 1 does not know that
  application 2 has also granted this permission and thus cannot decide not to issue the
  revocation. This leads to the undesirable state where application 2 still contains the
  call to `grant` but the user does not have the specified permission.
  Note that this does not occur when duplicate privileges are granted within the same
  application, as such privileges are de-duplicated before any SQL query is submitted.

  When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:
  ```python
  cluster.add_rotation_single_user()
  ```
  The multi user rotation scheme is also available:
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  cluster.add_rotation_multi_user("MultiUserRotation",
      secret=user.secret
  )
  ```

  You can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.
  ```python
  from aws_cdk.aws_redshift_alpha import ClusterParameterGroup
  params = ClusterParameterGroup(self, "Params",
      description="desc",
      parameters={
          "require_ssl": "true"
      }
  )
  params.add_parameter("enable_user_activity_logging", "true")
  ```
  Additionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  ```

  In most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  cluster.enable_reboot_for_parameter_changes()
  ```

  If you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      publicly_accessible=True,
      elastic_ip="10.123.123.255"
  )
  ```
  If the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "VPC",
      enable_dns_support=True,
      enable_dns_hostnames=True
  )
  ```
  Note that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.

  The elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.

  In some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.

  When you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      enhanced_vpc_routing=True
  )
  ```
  If enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.

  Some Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.
  When you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role],
      default_role=default_role
  )
  ```
  A default role can also be added to a cluster using the `addDefaultIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  redshift_cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role]
  )
  redshift_cluster.add_default_iam_role(default_role)
  ```

  Attaching IAM roles to a Redshift Cluster grants permissions to the Redshift service to perform actions on your behalf.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[role]
  )
  ```
  Additional IAM roles can be attached to a cluster using the `addIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  cluster.add_iam_role(role)
  ```

  Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.
  By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.
  To create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.
  ```python


  redshift.Cluster(stack, "Cluster",
      master_user={
          "master_username": "admin"
      },
      vpc=vpc,  # 3 AZs are required for Multi-AZ
      node_type=redshift.NodeType.RA3_XLPLUS,  # must be RA3 node type
      cluster_type=redshift.ClusterType.MULTI_NODE,  # must be MULTI_NODE
      number_of_nodes=2,  # must be 2 or more
      multi_az=True
  )
  ```

  As your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,
  it's important to resize it via CDK so the change is registered in the AWS CloudFormation template.
  There are two types of resize operations:
  * Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,
    as it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:
    * dc1.large (if your cluster is in a VPC)
    * dc1.8xlarge (if your cluster is in a VPC)
    * dc2.large
    * dc2.8xlarge
    * ds2.xlarge
    * ds2.8xlarge
    * ra3.xlplus
    * ra3.4xlarge
    * ra3.16xlarge
  * Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,
    but is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,
    you can set the `classicResizing` flag when creating the cluster.
  There are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are
  limits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.


pkgId: f35b760b714dbddce9fdcf4b7919c20fb467eb3863185e9b2e5277b4646fce49
name: python-aws-cdk.aws-redshift-alpha
arch: src
version: 2.161.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Redshift
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-redshift-alpha-2.161.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->

  To set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.
  You can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  ```
  By default, the master password will be generated and stored in AWS Secrets Manager.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          exclude_characters="\"@/\\ '`"
      ),
      vpc=vpc
  )
  ```
  A default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.
  By default, the cluster will not be publicly accessible.
  Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.

  Amazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_s3 as s3
  vpc = ec2.Vpc(self, "Vpc")
  bucket = s3.Bucket.from_bucket_name(self, "bucket", "logging-bucket")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      logging_properties=LoggingProperties(
          logging_bucket=bucket,
          logging_key_prefix="prefix"
      )
  )
  ```

  To control who can access the cluster, use the `.connections` attribute. Redshift Clusters have
  a default port, so you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:
  ```python
  cluster.cluster_endpoint.socket_address
  ```

  This module allows for the creation of non-CloudFormation database resources such as users
  and tables. This allows you to manage identities, permissions, and stateful resources
  within your Redshift cluster from your CDK application.
  Because these resources are not available in CloudFormation, this library leverages
  [custom
  resources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)
  to manage them. In addition to the IAM permissions required to make Redshift service
  calls, the execution role for the custom resource handler requires database credentials to
  create resources within the cluster.
  These database credentials can be supplied explicitly through the `adminUser` properties
  of the various database resource constructs. Alternatively, the credentials can be
  automatically pulled from the Redshift cluster's default administrator
  credentials. However, this option is only available if the password for the credentials
  was generated by the CDK application (ie., no value vas provided for [the `masterPassword`
  property](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)
  of
  [`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).

  Create a user within a Redshift cluster database by instantiating a `User` construct. This
  will generate a username and password, store the credentials in a [AWS Secrets Manager
  `Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),
  and make a query to the Redshift cluster to create a new database user with the
  credentials.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, the user credentials are encrypted with your AWS account's default Secrets
  Manager encryption key. You can specify the encryption key used for this purpose by
  supplying a key in the `encryptionKey` property.
  ```python
  import aws_cdk.aws_kms as kms
  encryption_key = kms.Key(self, "Key")
  User(self, "User",
      encryption_key=encryption_key,
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, a username is automatically generated from the user construct ID and its path
  in the construct tree. You can specify a particular username by providing a value for the
  `username` property. Usernames must be valid identifiers; see: [Names and
  identifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon
  Redshift Database Developer Guide*.
  ```python
  User(self, "User",
      username="myuser",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The user password is generated by AWS Secrets Manager using the default configuration
  found in
  [`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),
  except with password length `30` and some SQL-incompliant characters excluded. The
  plaintext for the password will never be present in the CDK application; instead, a
  [CloudFormation Dynamic
  Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)
  will be used wherever the password value is required.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName",
      exclude_characters="\"@/\\ '`"
  )
  ```

  Create a table within a Redshift cluster database by instantiating a `Table`
  construct. This will make a query to the Redshift cluster to create a new database table
  with the supplied schema.
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Tables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.
  Therefore, changing of table names for <= v2.114.1 have been disabled.
  ```python

  Table(self, "Table",
      table_name="oldTableName",  # This value can be change for versions greater than v2.114.1
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The table can be configured to have distStyle attribute and a distKey column:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", dist_key=True), Column(name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      dist_style=TableDistStyle.KEY
  )
  ```
  The table can also be configured to have sortStyle attribute and sortKey columns:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", sort_key=True), Column(name="col2", data_type="float", sort_key=True)
      ],
      cluster=cluster,
      database_name="databaseName",
      sort_style=TableSortStyle.COMPOUND
  )
  ```
  Tables and their respective columns can be configured to contain comments:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", comment="This is a column comment"), Column(name="col2", data_type="float", comment="This is a another column comment")
      ],
      cluster=cluster,
      database_name="databaseName",
      table_comment="This is a table comment"
  )
  ```
  Table columns can be configured to use a specific compression encoding:
  ```python
  from aws_cdk.aws_redshift_alpha import ColumnEncoding
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", encoding=ColumnEncoding.TEXT32K), Column(name="col2", data_type="float", encoding=ColumnEncoding.DELTA32K)
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Table columns can also contain an `id` attribute, which can allow table columns to be renamed.
  **NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.
  ```python
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```

  You can give a user privileges to perform certain actions on a table by using the
  `Table.grant()` method.
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.DROP, TableAction.SELECT)
  ```
  Take care when managing privileges via the CDK, as attempting to manage a user's
  privileges on the same table in multiple CDK applications could lead to accidentally
  overriding these permissions. Consider the following two CDK applications which both refer
  to the same user and table. In application 1, the resources are created and the user is
  given `INSERT` permissions on the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User(self, "User",
      username=username,
      cluster=cluster,
      database_name=database_name
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name=database_name
  )
  table.grant(user, TableAction.INSERT)
  ```
  In application 2, the resources are imported and the user is given `INSERT` permissions on
  the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User.from_user_attributes(self, "User",
      username=username,
      password=SecretValue.unsafe_plain_text("NOT_FOR_PRODUCTION"),
      cluster=cluster,
      database_name=database_name
  )
  table = Table.from_table_attributes(self, "Table",
      table_name=table_name,
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.INSERT)
  ```
  Both applications attempt to grant the user the appropriate privilege on the table by
  submitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these
  two calls will have no effect since the user has already been granted the privilege.
  Now, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is
  submitted to the Redshift cluster. In general, application 1 does not know that
  application 2 has also granted this permission and thus cannot decide not to issue the
  revocation. This leads to the undesirable state where application 2 still contains the
  call to `grant` but the user does not have the specified permission.
  Note that this does not occur when duplicate privileges are granted within the same
  application, as such privileges are de-duplicated before any SQL query is submitted.

  When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:
  ```python
  cluster.add_rotation_single_user()
  ```
  The multi user rotation scheme is also available:
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  cluster.add_rotation_multi_user("MultiUserRotation",
      secret=user.secret
  )
  ```

  You can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.
  ```python
  from aws_cdk.aws_redshift_alpha import ClusterParameterGroup
  params = ClusterParameterGroup(self, "Params",
      description="desc",
      parameters={
          "require_ssl": "true"
      }
  )
  params.add_parameter("enable_user_activity_logging", "true")
  ```
  Additionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  ```

  In most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  cluster.enable_reboot_for_parameter_changes()
  ```

  If you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      publicly_accessible=True,
      elastic_ip="10.123.123.255"
  )
  ```
  If the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "VPC",
      enable_dns_support=True,
      enable_dns_hostnames=True
  )
  ```
  Note that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.

  The elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.

  In some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.

  When you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      enhanced_vpc_routing=True
  )
  ```
  If enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.

  Some Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.
  When you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role],
      default_role=default_role
  )
  ```
  A default role can also be added to a cluster using the `addDefaultIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  redshift_cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role]
  )
  redshift_cluster.add_default_iam_role(default_role)
  ```

  Attaching IAM roles to a Redshift Cluster grants permissions to the Redshift service to perform actions on your behalf.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[role]
  )
  ```
  Additional IAM roles can be attached to a cluster using the `addIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  cluster.add_iam_role(role)
  ```

  Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.
  By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.
  To create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.
  ```python


  redshift.Cluster(stack, "Cluster",
      master_user={
          "master_username": "admin"
      },
      vpc=vpc,  # 3 AZs are required for Multi-AZ
      node_type=redshift.NodeType.RA3_XLPLUS,  # must be RA3 node type
      cluster_type=redshift.ClusterType.MULTI_NODE,  # must be MULTI_NODE
      number_of_nodes=2,  # must be 2 or more
      multi_az=True
  )
  ```

  As your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,
  it's important to resize it via CDK so the change is registered in the AWS CloudFormation template.
  There are two types of resize operations:
  * Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,
    as it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:
    * dc1.large (if your cluster is in a VPC)
    * dc1.8xlarge (if your cluster is in a VPC)
    * dc2.large
    * dc2.8xlarge
    * ds2.xlarge
    * ds2.8xlarge
    * ra3.xlplus
    * ra3.4xlarge
    * ra3.16xlarge
  * Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,
    but is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,
    you can set the `classicResizing` flag when creating the cluster.
  There are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are
  limits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.


pkgId: 43b22d636442fe98cb8cace4ad0b0389ec62bf3a85f4ee00160314e2799aa08f
name: python-aws-cdk.aws-redshift-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Redshift
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-redshift-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->

  To set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.
  You can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  ```
  By default, the master password will be generated and stored in AWS Secrets Manager.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          exclude_characters="\"@/\\ '`"
      ),
      vpc=vpc
  )
  ```
  A default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.
  By default, the cluster will not be publicly accessible.
  Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.

  Amazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_s3 as s3
  vpc = ec2.Vpc(self, "Vpc")
  bucket = s3.Bucket.from_bucket_name(self, "bucket", "amzn-s3-demo-bucket")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      logging_properties=LoggingProperties(
          logging_bucket=bucket,
          logging_key_prefix="prefix"
      )
  )
  ```

  By using [relocation in Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-recovery.html), you allow Amazon Redshift to move a cluster to another Availability Zone (AZ) without any loss of data or changes to your applications.
  This feature can be applied to both new and existing clusters.
  To enable this feature, set the `availabilityZoneRelocation` property to `true`.
  ```python

  import aws_cdk.aws_ec2 as ec2

  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      node_type=NodeType.RA3_XLPLUS,
      availability_zone_relocation=True
  )
  ```
  **Note**: The `availabilityZoneRelocation` property is only available for RA3 node types.

  To control who can access the cluster, use the `.connections` attribute. Redshift Clusters have
  a default port, so you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:
  ```python
  cluster.cluster_endpoint.socket_address
  ```

  This module allows for the creation of non-CloudFormation database resources such as users
  and tables. This allows you to manage identities, permissions, and stateful resources
  within your Redshift cluster from your CDK application.
  Because these resources are not available in CloudFormation, this library leverages
  [custom
  resources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)
  to manage them. In addition to the IAM permissions required to make Redshift service
  calls, the execution role for the custom resource handler requires database credentials to
  create resources within the cluster.
  These database credentials can be supplied explicitly through the `adminUser` properties
  of the various database resource constructs. Alternatively, the credentials can be
  automatically pulled from the Redshift cluster's default administrator
  credentials. However, this option is only available if the password for the credentials
  was generated by the CDK application (ie., no value vas provided for [the `masterPassword`
  property](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)
  of
  [`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).

  Create a user within a Redshift cluster database by instantiating a `User` construct. This
  will generate a username and password, store the credentials in a [AWS Secrets Manager
  `Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),
  and make a query to the Redshift cluster to create a new database user with the
  credentials.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, the user credentials are encrypted with your AWS account's default Secrets
  Manager encryption key. You can specify the encryption key used for this purpose by
  supplying a key in the `encryptionKey` property.
  ```python
  import aws_cdk.aws_kms as kms
  encryption_key = kms.Key(self, "Key")
  User(self, "User",
      encryption_key=encryption_key,
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, a username is automatically generated from the user construct ID and its path
  in the construct tree. You can specify a particular username by providing a value for the
  `username` property. Usernames must be valid identifiers; see: [Names and
  identifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon
  Redshift Database Developer Guide*.
  ```python
  User(self, "User",
      username="myuser",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The user password is generated by AWS Secrets Manager using the default configuration
  found in
  [`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),
  except with password length `30` and some SQL-incompliant characters excluded. The
  plaintext for the password will never be present in the CDK application; instead, a
  [CloudFormation Dynamic
  Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)
  will be used wherever the password value is required.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName",
      exclude_characters="\"@/\\ '`"
  )
  ```

  Create a table within a Redshift cluster database by instantiating a `Table`
  construct. This will make a query to the Redshift cluster to create a new database table
  with the supplied schema.
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Tables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.
  Therefore, changing of table names for <= v2.114.1 have been disabled.
  ```python

  Table(self, "Table",
      table_name="oldTableName",  # This value can be change for versions greater than v2.114.1
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The table can be configured to have distStyle attribute and a distKey column:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", dist_key=True), Column(name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      dist_style=TableDistStyle.KEY
  )
  ```
  The table can also be configured to have sortStyle attribute and sortKey columns:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", sort_key=True), Column(name="col2", data_type="float", sort_key=True)
      ],
      cluster=cluster,
      database_name="databaseName",
      sort_style=TableSortStyle.COMPOUND
  )
  ```
  Tables and their respective columns can be configured to contain comments:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", comment="This is a column comment"), Column(name="col2", data_type="float", comment="This is a another column comment")
      ],
      cluster=cluster,
      database_name="databaseName",
      table_comment="This is a table comment"
  )
  ```
  Table columns can be configured to use a specific compression encoding:
  ```python
  from aws_cdk.aws_redshift_alpha import ColumnEncoding
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", encoding=ColumnEncoding.TEXT32K), Column(name="col2", data_type="float", encoding=ColumnEncoding.DELTA32K)
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Table columns can also contain an `id` attribute, which can allow table columns to be renamed.
  **NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.
  ```python
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Query execution duration is limited to 1 minute by default. You can change this by setting the `timeout` property.
  Valid timeout values are between 1 seconds and 15 minutes.
  ```python
  from aws_cdk import Duration
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      timeout=Duration.minutes(15)
  )
  ```

  You can give a user privileges to perform certain actions on a table by using the
  `Table.grant()` method.
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.DROP, TableAction.SELECT)
  ```
  Take care when managing privileges via the CDK, as attempting to manage a user's
  privileges on the same table in multiple CDK applications could lead to accidentally
  overriding these permissions. Consider the following two CDK applications which both refer
  to the same user and table. In application 1, the resources are created and the user is
  given `INSERT` permissions on the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User(self, "User",
      username=username,
      cluster=cluster,
      database_name=database_name
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name=database_name
  )
  table.grant(user, TableAction.INSERT)
  ```
  In application 2, the resources are imported and the user is given `INSERT` permissions on
  the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User.from_user_attributes(self, "User",
      username=username,
      password=SecretValue.unsafe_plain_text("NOT_FOR_PRODUCTION"),
      cluster=cluster,
      database_name=database_name
  )
  table = Table.from_table_attributes(self, "Table",
      table_name=table_name,
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.INSERT)
  ```
  Both applications attempt to grant the user the appropriate privilege on the table by
  submitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these
  two calls will have no effect since the user has already been granted the privilege.
  Now, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is
  submitted to the Redshift cluster. In general, application 1 does not know that
  application 2 has also granted this permission and thus cannot decide not to issue the
  revocation. This leads to the undesirable state where application 2 still contains the
  call to `grant` but the user does not have the specified permission.
  Note that this does not occur when duplicate privileges are granted within the same
  application, as such privileges are de-duplicated before any SQL query is submitted.

  When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:
  ```python
  cluster.add_rotation_single_user()
  ```
  The multi user rotation scheme is also available:
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  cluster.add_rotation_multi_user("MultiUserRotation",
      secret=user.secret
  )
  ```

  You can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.
  ```python
  from aws_cdk.aws_redshift_alpha import ClusterParameterGroup
  params = ClusterParameterGroup(self, "Params",
      description="desc",
      parameters={
          "require_ssl": "true"
      }
  )
  params.add_parameter("enable_user_activity_logging", "true")
  ```
  Additionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  ```

  In most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  cluster.enable_reboot_for_parameter_changes()
  ```

  If you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      publicly_accessible=True,
      elastic_ip="10.123.123.255"
  )
  ```
  If the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "VPC",
      enable_dns_support=True,
      enable_dns_hostnames=True
  )
  ```
  Note that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.

  The elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.

  In some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.

  When you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      enhanced_vpc_routing=True
  )
  ```
  If enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.

  Some Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.
  When you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role],
      default_role=default_role
  )
  ```
  A default role can also be added to a cluster using the `addDefaultIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  redshift_cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role]
  )
  redshift_cluster.add_default_iam_role(default_role)
  ```

  Attaching IAM roles to a Redshift Cluster grants permissions to the Redshift service to perform actions on your behalf.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[role]
  )
  ```
  Additional IAM roles can be attached to a cluster using the `addIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  cluster.add_iam_role(role)
  ```

  Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.
  By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.
  To create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.
  ```python


  redshift.Cluster(stack, "Cluster",
      master_user={
          "master_username": "admin"
      },
      vpc=vpc,  # 3 AZs are required for Multi-AZ
      node_type=redshift.NodeType.RA3_XLPLUS,  # must be RA3 node type
      cluster_type=redshift.ClusterType.MULTI_NODE,  # must be MULTI_NODE
      number_of_nodes=2,  # must be 2 or more
      multi_az=True
  )
  ```

  As your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,
  it's important to resize it via CDK so the change is registered in the AWS CloudFormation template.
  There are two types of resize operations:
  * Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,
    as it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:
    * dc1.large (if your cluster is in a VPC)
    * dc1.8xlarge (if your cluster is in a VPC)
    * dc2.large
    * dc2.8xlarge
    * ds2.xlarge
    * ds2.8xlarge
    * ra3.xlplus
    * ra3.4xlarge
    * ra3.16xlarge
  * Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,
    but is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,
    you can set the `classicResizing` flag when creating the cluster.
  There are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are
  limits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.


pkgId: 840d0567fc1e5f317241408906b43905e16d6f5d89673321d2c3fb0abe7ccfc7
name: python-aws-cdk.aws-redshift-alpha
arch: src
version: 2.172.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Redshift
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-redshift-alpha-2.172.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->

  To set up a Redshift cluster, define a `Cluster`. It will be launched in a VPC.
  You can specify a VPC, otherwise one will be created. The nodes are always launched in private subnets and are encrypted by default.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  ```
  By default, the master password will be generated and stored in AWS Secrets Manager.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "Vpc")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          exclude_characters="\"@/\\ '`"
      ),
      vpc=vpc
  )
  ```
  A default database named `default_db` will be created in the cluster. To change the name of this database set the `defaultDatabaseName` attribute in the constructor properties.
  By default, the cluster will not be publicly accessible.
  Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.

  Amazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_s3 as s3
  vpc = ec2.Vpc(self, "Vpc")
  bucket = s3.Bucket.from_bucket_name(self, "bucket", "amzn-s3-demo-bucket")
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      logging_properties=LoggingProperties(
          logging_bucket=bucket,
          logging_key_prefix="prefix"
      )
  )
  ```

  By using [relocation in Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-recovery.html), you allow Amazon Redshift to move a cluster to another Availability Zone (AZ) without any loss of data or changes to your applications.
  This feature can be applied to both new and existing clusters.
  To enable this feature, set the `availabilityZoneRelocation` property to `true`.
  ```python

  import aws_cdk.aws_ec2 as ec2

  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      node_type=NodeType.RA3_XLPLUS,
      availability_zone_relocation=True
  )
  ```
  **Note**: The `availabilityZoneRelocation` property is only available for RA3 node types.

  To control who can access the cluster, use the `.connections` attribute. Redshift Clusters have
  a default port, so you don't need to specify the port:
  ```python
  cluster.connections.allow_default_port_from_any_ipv4("Open to the world")
  ```
  The endpoint to access your database cluster will be available as the `.clusterEndpoint` attribute:
  ```python
  cluster.cluster_endpoint.socket_address
  ```

  This module allows for the creation of non-CloudFormation database resources such as users
  and tables. This allows you to manage identities, permissions, and stateful resources
  within your Redshift cluster from your CDK application.
  Because these resources are not available in CloudFormation, this library leverages
  [custom
  resources](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html)
  to manage them. In addition to the IAM permissions required to make Redshift service
  calls, the execution role for the custom resource handler requires database credentials to
  create resources within the cluster.
  These database credentials can be supplied explicitly through the `adminUser` properties
  of the various database resource constructs. Alternatively, the credentials can be
  automatically pulled from the Redshift cluster's default administrator
  credentials. However, this option is only available if the password for the credentials
  was generated by the CDK application (ie., no value vas provided for [the `masterPassword`
  property](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Login.html#masterpasswordspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)
  of
  [`Cluster.masterUser`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.Cluster.html#masteruserspan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan)).

  Create a user within a Redshift cluster database by instantiating a `User` construct. This
  will generate a username and password, store the credentials in a [AWS Secrets Manager
  `Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html),
  and make a query to the Redshift cluster to create a new database user with the
  credentials.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, the user credentials are encrypted with your AWS account's default Secrets
  Manager encryption key. You can specify the encryption key used for this purpose by
  supplying a key in the `encryptionKey` property.
  ```python
  import aws_cdk.aws_kms as kms
  encryption_key = kms.Key(self, "Key")
  User(self, "User",
      encryption_key=encryption_key,
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  By default, a username is automatically generated from the user construct ID and its path
  in the construct tree. You can specify a particular username by providing a value for the
  `username` property. Usernames must be valid identifiers; see: [Names and
  identifiers](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html) in the *Amazon
  Redshift Database Developer Guide*.
  ```python
  User(self, "User",
      username="myuser",
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The user password is generated by AWS Secrets Manager using the default configuration
  found in
  [`secretsmanager.SecretStringGenerator`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretStringGenerator.html),
  except with password length `30` and some SQL-incompliant characters excluded. The
  plaintext for the password will never be present in the CDK application; instead, a
  [CloudFormation Dynamic
  Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html)
  will be used wherever the password value is required.
  You can specify characters to not include in generated passwords by setting `excludeCharacters` property.
  ```python
  User(self, "User",
      cluster=cluster,
      database_name="databaseName",
      exclude_characters="\"@/\\ '`"
  )
  ```

  Create a table within a Redshift cluster database by instantiating a `Table`
  construct. This will make a query to the Redshift cluster to create a new database table
  with the supplied schema.
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Tables greater than v2.114.1 can have their table name changed, for versions <= v2.114.1, this would not be possible.
  Therefore, changing of table names for <= v2.114.1 have been disabled.
  ```python

  Table(self, "Table",
      table_name="oldTableName",  # This value can be change for versions greater than v2.114.1
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  The table can be configured to have distStyle attribute and a distKey column:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", dist_key=True), Column(name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      dist_style=TableDistStyle.KEY
  )
  ```
  The table can also be configured to have sortStyle attribute and sortKey columns:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", sort_key=True), Column(name="col2", data_type="float", sort_key=True)
      ],
      cluster=cluster,
      database_name="databaseName",
      sort_style=TableSortStyle.COMPOUND
  )
  ```
  Tables and their respective columns can be configured to contain comments:
  ```python
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", comment="This is a column comment"), Column(name="col2", data_type="float", comment="This is a another column comment")
      ],
      cluster=cluster,
      database_name="databaseName",
      table_comment="This is a table comment"
  )
  ```
  Table columns can be configured to use a specific compression encoding:
  ```python
  from aws_cdk.aws_redshift_alpha import ColumnEncoding
  Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)", encoding=ColumnEncoding.TEXT32K), Column(name="col2", data_type="float", encoding=ColumnEncoding.DELTA32K)
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Table columns can also contain an `id` attribute, which can allow table columns to be renamed.
  **NOTE** To use the `id` attribute, you must also enable the `@aws-cdk/aws-redshift:columnId` feature flag.
  ```python
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName"
  )
  ```
  Query execution duration is limited to 1 minute by default. You can change this by setting the `timeout` property.
  Valid timeout values are between 1 seconds and 15 minutes.
  ```python
  from aws_cdk import Duration
  Table(self, "Table",
      table_columns=[Column(id="col1", name="col1", data_type="varchar(4)"), Column(id="col2", name="col2", data_type="float")
      ],
      cluster=cluster,
      database_name="databaseName",
      timeout=Duration.minutes(15)
  )
  ```

  You can give a user privileges to perform certain actions on a table by using the
  `Table.grant()` method.
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.DROP, TableAction.SELECT)
  ```
  Take care when managing privileges via the CDK, as attempting to manage a user's
  privileges on the same table in multiple CDK applications could lead to accidentally
  overriding these permissions. Consider the following two CDK applications which both refer
  to the same user and table. In application 1, the resources are created and the user is
  given `INSERT` permissions on the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User(self, "User",
      username=username,
      cluster=cluster,
      database_name=database_name
  )
  table = Table(self, "Table",
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name=database_name
  )
  table.grant(user, TableAction.INSERT)
  ```
  In application 2, the resources are imported and the user is given `INSERT` permissions on
  the table:
  ```python
  database_name = "databaseName"
  username = "myuser"
  table_name = "mytable"
  user = User.from_user_attributes(self, "User",
      username=username,
      password=SecretValue.unsafe_plain_text("NOT_FOR_PRODUCTION"),
      cluster=cluster,
      database_name=database_name
  )
  table = Table.from_table_attributes(self, "Table",
      table_name=table_name,
      table_columns=[Column(name="col1", data_type="varchar(4)"), Column(name="col2", data_type="float")],
      cluster=cluster,
      database_name="databaseName"
  )
  table.grant(user, TableAction.INSERT)
  ```
  Both applications attempt to grant the user the appropriate privilege on the table by
  submitting a `GRANT USER` SQL query to the Redshift cluster. Note that the latter of these
  two calls will have no effect since the user has already been granted the privilege.
  Now, if application 1 were to remove the call to `grant`, a `REVOKE USER` SQL query is
  submitted to the Redshift cluster. In general, application 1 does not know that
  application 2 has also granted this permission and thus cannot decide not to issue the
  revocation. This leads to the undesirable state where application 2 still contains the
  call to `grant` but the user does not have the specified permission.
  Note that this does not occur when duplicate privileges are granted within the same
  application, as such privileges are de-duplicated before any SQL query is submitted.

  When the master password is generated and stored in AWS Secrets Manager, it can be rotated automatically:
  ```python
  cluster.add_rotation_single_user()
  ```
  The multi user rotation scheme is also available:
  ```python
  user = User(self, "User",
      cluster=cluster,
      database_name="databaseName"
  )
  cluster.add_rotation_multi_user("MultiUserRotation",
      secret=user.secret
  )
  ```

  You can add a parameter to a parameter group with`ClusterParameterGroup.addParameter()`.
  ```python
  from aws_cdk.aws_redshift_alpha import ClusterParameterGroup
  params = ClusterParameterGroup(self, "Params",
      description="desc",
      parameters={
          "require_ssl": "true"
      }
  )
  params.add_parameter("enable_user_activity_logging", "true")
  ```
  Additionally, you can add a parameter to the cluster's associated parameter group with `Cluster.addToParameterGroup()`. If the cluster does not have an associated parameter group, a new parameter group is created.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  ```

  In most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  cluster = Cluster(self, "Cluster",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc
  )
  cluster.add_to_parameter_group("enable_user_activity_logging", "true")
  cluster.enable_reboot_for_parameter_changes()
  ```

  You can perform various actions on the Redshift resource by specifying the `resourceAction` property,
  including [pausing and resuming the cluster](https://docs.aws.amazon.com/redshift/latest/mgmt/rs-mgmt-pause-resume-cluster.html), as well as initiating [failover for Multi-AZ clusters](https://docs.aws.amazon.com/redshift/latest/mgmt/test-cluster-multi-az.html).
  ```python

  import aws_cdk.aws_ec2 as ec2
  from aws_cdk.aws_redshift_alpha import ResourceAction


  Cluster(self, "PausedCluster",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      resource_action=ResourceAction.PAUSE
  )

  Cluster(self, "ResumedCluster",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      resource_action=ResourceAction.RESUME
  )

  Cluster(self, "FailOverCluster",
      master_user=Login(
          master_username="admin"
      ),
      
      vpc=vpc,
      
      multi_az=True,
      resource_action=ResourceAction.FAILOVER_PRIMARY_COMPUTE
  )
  ```

  If you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      publicly_accessible=True,
      elastic_ip="10.123.123.255"
  )
  ```
  If the Cluster is in a VPC and you want to connect to it using the private IP address from within the cluster, it is important to enable *DNS resolution* and *DNS hostnames* in the VPC config. If these parameters would not be set, connections from within the VPC would connect to the elastic IP address and not the private IP address.
  ```python
  import aws_cdk.aws_ec2 as ec2
  vpc = ec2.Vpc(self, "VPC",
      enable_dns_support=True,
      enable_dns_hostnames=True
  )
  ```
  Note that if there is already an existing, public accessible Cluster, which VPC configuration is changed to use *DNS hostnames* and *DNS resolution*, connections still use the elastic IP address until the cluster is resized.

  The elastic IP address is an external IP address for accessing the cluster outside of a VPC. It's not related to the cluster node public IP addresses and private IP addresses that are accessible via the `clusterEndpoint` property. The public and private cluster node IP addresses appear regardless of whether the cluster is publicly accessible or not. They are used only in certain circumstances to configure ingress rules on the remote host. These circumstances occur when you load data from an Amazon EC2 instance or other remote host using a Secure Shell (SSH) connection.

  In some cases, you might want to associate the cluster with an elastic IP address or change an elastic IP address that is associated with the cluster. To attach an elastic IP address after the cluster is created, first update the cluster so that it is not publicly accessible, then make it both publicly accessible and add an Elastic IP address in the same operation.

  When you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC) based on the Amazon VPC service. By using enhanced VPC routing, you can use standard VPC features, such as VPC security groups, network access control lists (ACLs), VPC endpoints, VPC endpoint policies, internet gateways, and Domain Name System (DNS) servers, as described in the Amazon VPC User Guide. You use these features to tightly manage the flow of data between your Amazon Redshift cluster and other resources. When you use enhanced VPC routing to route traffic through your VPC, you can also use VPC flow logs to monitor COPY and UNLOAD traffic.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk as cdk

  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin",
          master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
      ),
      vpc=vpc,
      enhanced_vpc_routing=True
  )
  ```
  If enhanced VPC routing is not enabled, Amazon Redshift routes traffic through the internet, including traffic to other services within the AWS network.

  Some Amazon Redshift features require Amazon Redshift to access other AWS services on your behalf. For your Amazon Redshift clusters to act on your behalf, you supply security credentials to your clusters. The preferred method to supply security credentials is to specify an AWS Identity and Access Management (IAM) role.
  When you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role],
      default_role=default_role
  )
  ```
  A default role can also be added to a cluster using the `addDefaultIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  default_role = iam.Role(self, "DefaultRole",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  redshift_cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[default_role]
  )
  redshift_cluster.add_default_iam_role(default_role)
  ```

  Attaching IAM roles to a Redshift Cluster grants permissions to the Redshift service to perform actions on your behalf.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc,
      roles=[role]
  )
  ```
  Additional IAM roles can be attached to a cluster using the `addIamRole` method.
  ```python
  import aws_cdk.aws_ec2 as ec2
  import aws_cdk.aws_iam as iam

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("redshift.amazonaws.com")
  )
  cluster = Cluster(self, "Redshift",
      master_user=Login(
          master_username="admin"
      ),
      vpc=vpc
  )
  cluster.add_iam_role(role)
  ```

  Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters.
  By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone.
  To create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster.
  ```python


  redshift.Cluster(stack, "Cluster",
      master_user={
          "master_username": "admin"
      },
      vpc=vpc,  # 3 AZs are required for Multi-AZ
      node_type=redshift.NodeType.RA3_XLPLUS,  # must be RA3 node type
      cluster_type=redshift.ClusterType.MULTI_NODE,  # must be MULTI_NODE
      number_of_nodes=2,  # must be 2 or more
      multi_az=True
  )
  ```

  As your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK,
  it's important to resize it via CDK so the change is registered in the AWS CloudFormation template.
  There are two types of resize operations:
  * Elastic resize - Number of nodes and node type can be changed, but not at the same time. Elastic resize is the default behavior,
    as it's a fast operation and typically completes in minutes. Elastic resize is only supported on clusters of the following types:
    * dc1.large (if your cluster is in a VPC)
    * dc1.8xlarge (if your cluster is in a VPC)
    * dc2.large
    * dc2.8xlarge
    * ds2.xlarge
    * ds2.8xlarge
    * ra3.xlplus
    * ra3.4xlarge
    * ra3.16xlarge
  * Classic resize - Number of nodes, node type, or both, can be changed. This operation takes longer to complete,
    but is useful when the resize operation doesn't meet the criteria of an elastic resize. If you prefer classic resizing,
    you can set the `classicResizing` flag when creating the cluster.
  There are other constraints to be aware of, for example, elastic resizing does not support single-node clusters and there are
  limits on the number of nodes you can add to a cluster. See the [AWS Redshift Documentation](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#rs-resize-tutorial) and [AWS API Documentation](https://docs.aws.amazon.com/redshift/latest/APIReference/API_ResizeCluster.html) for more details.


pkgId: 87fbe00b33d11877e8a67bc83633d4d47a67e263c098e11d93abf39c43c96f28
name: python-aws-cdk.aws-route53resolver-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::Route53Resolver
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-route53resolver-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->

  With Route 53 Resolver DNS Firewall, you can filter and regulate outbound DNS traffic for your
  virtual private connections (VPCs). To do this, you create reusable collections of filtering rules
  in DNS Firewall rule groups and associate the rule groups to your VPC.
  DNS Firewall provides protection for outbound DNS requests from your VPCs. These requests route
  through Resolver for domain name resolution. A primary use of DNS Firewall protections is to help
  prevent DNS exfiltration of your data. DNS exfiltration can happen when a bad actor compromises
  an application instance in your VPC and then uses DNS lookup to send data out of the VPC to a domain
  that they control. With DNS Firewall, you can monitor and control the domains that your applications
  can query. You can deny access to the domains that you know to be bad and allow all other queries
  to pass through. Alternately, you can deny access to all domains except for the ones that you
  explicitly trust.

  Domain lists can be created using a list of strings, a text file stored in Amazon S3 or a local
  text file:
  ```python
  block_list = route53resolver.FirewallDomainList(self, "BlockList",
      domains=route53resolver.FirewallDomains.from_list(["bad-domain.com", "bot-domain.net"])
  )
  s3_list = route53resolver.FirewallDomainList(self, "S3List",
      domains=route53resolver.FirewallDomains.from_s3_url("s3://bucket/prefix/object")
  )
  asset_list = route53resolver.FirewallDomainList(self, "AssetList",
      domains=route53resolver.FirewallDomains.from_asset("/path/to/domains.txt")
  )
  ```
  The file must be a text file and must contain a single domain per line.
  Use `FirewallDomainList.fromFirewallDomainListId()` to import an existing or [AWS managed domain list](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-dns-firewall-managed-domain-lists.html):
  ```python

  malware_list = route53resolver.FirewallDomainList.from_firewall_domain_list_id(self, "Malware", "rslvr-fdl-2c46f2ecbfec4dcc")
  ```

  Create a rule group:
  ```python

  route53resolver.FirewallRuleGroup(self, "RuleGroup",
      rules=[route53resolver.FirewallRule(
          priority=10,
          firewall_domain_list=my_block_list,
          
          action=route53resolver.FirewallRuleAction.block()
      )
      ]
  )
  ```
  Rules can be added at construction time or using `addRule()`:
  ```python


  rule_group.add_rule(
      priority=10,
      firewall_domain_list=my_block_list,
      
      action=route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.nx_domain())
  )
  rule_group.add_rule(
      priority=20,
      firewall_domain_list=my_block_list,
      
      action=route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.override("amazon.com"))
  )
  ```
  Use `associate()` to associate a rule group with a VPC:
  ```python
  import aws_cdk.aws_ec2 as ec2


  rule_group.associate("Association",
      priority=101,
      vpc=my_vpc
  )
  ```


pkgId: f7a1cceabfb224e6d1a8b1325904fe229dd1f7dff9db9b0dea1b54dbd1105259
name: python-aws-cdk.aws-s3objectlambda-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::S3ObjectLambda
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-s3objectlambda-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  This construct library allows you to define S3 object lambda access points.
  ```python
  import aws_cdk.aws_lambda as lambda_
  import aws_cdk.aws_s3 as s3
  import aws_cdk.aws_s3objectlambda_alpha as s3objectlambda
  import aws_cdk as cdk
  stack = cdk.Stack()
  bucket = s3.Bucket(stack, "MyBucket")
  handler = lambda_.Function(stack, "MyFunction",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_asset("lambda.zip")
  )
  s3objectlambda.AccessPoint(stack, "MyObjectLambda",
      bucket=bucket,
      handler=handler,
      access_point_name="my-access-point",
      payload={
          "prop": "value"
      }
  )
  ```

  Lambdas are currently limited to only transforming `GetObject` requests. However, they can additionally support `GetObject-Range` and `GetObject-PartNumber` requests, which needs to be specified in the access point configuration:
  ```python
  import aws_cdk.aws_lambda as lambda_
  import aws_cdk.aws_s3 as s3
  import aws_cdk.aws_s3objectlambda_alpha as s3objectlambda
  import aws_cdk as cdk
  stack = cdk.Stack()
  bucket = s3.Bucket(stack, "MyBucket")
  handler = lambda_.Function(stack, "MyFunction",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_asset("lambda.zip")
  )
  s3objectlambda.AccessPoint(stack, "MyObjectLambda",
      bucket=bucket,
      handler=handler,
      access_point_name="my-access-point",
      supports_get_object_range=True,
      supports_get_object_part_number=True
  )
  ```

  You can specify an additional object that provides supplemental data to the Lambda function used to transform objects. The data is delivered as a JSON payload to the Lambda:
  ```python
  import aws_cdk.aws_lambda as lambda_
  import aws_cdk.aws_s3 as s3
  import aws_cdk.aws_s3objectlambda_alpha as s3objectlambda
  import aws_cdk as cdk
  stack = cdk.Stack()
  bucket = s3.Bucket(stack, "MyBucket")
  handler = lambda_.Function(stack, "MyFunction",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_asset("lambda.zip")
  )
  s3objectlambda.AccessPoint(stack, "MyObjectLambda",
      bucket=bucket,
      handler=handler,
      access_point_name="my-access-point",
      payload={
          "prop": "value"
      }
  )
  ```


pkgId: 3e3ca505641512e93901d6bb48b4464f9890b97488de42f2ea4b959957e8bdb5
name: python-aws-cdk.aws-sagemaker-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::SageMaker
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-sagemaker-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  Amazon SageMaker provides every developer and data scientist with the ability to build, train, and
  deploy machine learning models quickly. Amazon SageMaker is a fully-managed service that covers the
  entire machine learning workflow to label and prepare your data, choose an algorithm, train the
  model, tune and optimize it for deployment, make predictions, and take action. Your models get to
  production faster with much less effort and lower cost.

  To create a machine learning model with Amazon Sagemaker, use the `Model` construct. This construct
  includes properties that can be configured to define model components, including the model inference
  code as a Docker image and an optional set of separate model data artifacts. See the [AWS
  documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-marketplace-develop.html)
  to learn more about SageMaker models.

  In the event that a single container is sufficient for your inference use-case, you can define a
  single-container model:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  import path as path
  image = sagemaker.ContainerImage.from_asset(path.join("path", "to", "Dockerfile", "directory"))
  model_data = sagemaker.ModelData.from_asset(path.join("path", "to", "artifact", "file.tar.gz"))
  model = sagemaker.Model(self, "PrimaryContainerModel",
      containers=[sagemaker.ContainerDefinition(
          image=image,
          model_data=model_data
      )
      ]
  )
  ```

  An inference pipeline is an Amazon SageMaker model that is composed of a linear sequence of multiple
  containers that process requests for inferences on data. See the [AWS
  documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipelines.html) to learn
  more about SageMaker inference pipelines. To define an inference pipeline, you can provide
  additional containers for your model:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker






  model = sagemaker.Model(self, "InferencePipelineModel",
      containers=[sagemaker.ContainerDefinition(image=image1, model_data=model_data1), sagemaker.ContainerDefinition(image=image2, model_data=model_data2), sagemaker.ContainerDefinition(image=image3, model_data=model_data3)
      ]
  )
  ```


  If you enable [network isolation](https://docs.aws.amazon.com/sagemaker/latest/dg/mkt-algo-model-internet-free.html), the containers can't make any outbound network calls, even to other AWS services such as Amazon S3. Additionally, no AWS credentials are made available to the container runtime environment.
  To enable network isolation, set the `networkIsolation` property to `true`:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker


  model = sagemaker.Model(self, "ContainerModel",
      containers=[sagemaker.ContainerDefinition(
          image=image,
          model_data=model_data
      )
      ],
      network_isolation=True
  )
  ```

  Inference code can be stored in the Amazon EC2 Container Registry (Amazon ECR), which is specified
  via `ContainerDefinition`'s `image` property which accepts a class that extends the `ContainerImage`
  abstract base class.

  Reference a local directory containing a Dockerfile:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  import path as path
  image = sagemaker.ContainerImage.from_asset(path.join("path", "to", "Dockerfile", "directory"))
  ```

  Reference an image available within ECR:
  ```python
  import aws_cdk.aws_ecr as ecr
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  repository = ecr.Repository.from_repository_name(self, "Repository", "repo")
  image = sagemaker.ContainerImage.from_ecr_repository(repository, "tag")
  ```

  Reference a deep learning container image:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  repository_name = "huggingface-pytorch-training"
  tag = "1.13.1-transformers4.26.0-gpu-py39-cu117-ubuntu20.04"
  image = sagemaker.ContainerImage.from_dlc(repository_name, tag)
  ```

  If you choose to decouple your model artifacts from your inference code (as is natural given
  different rates of change between inference code and model artifacts), the artifacts can be
  specified via the `modelData` property which accepts a class that extends the `ModelData` abstract
  base class. The default is to have no model artifacts associated with a model.

  Reference local model data:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  import path as path
  model_data = sagemaker.ModelData.from_asset(path.join("path", "to", "artifact", "file.tar.gz"))
  ```

  Reference an S3 bucket and object key as the artifacts for a model:
  ```python
  import aws_cdk.aws_s3 as s3
  import aws_cdk.aws_sagemaker_alpha as sagemaker
  bucket = s3.Bucket(self, "MyBucket")
  model_data = sagemaker.ModelData.from_bucket(bucket, "path/to/artifact/file.tar.gz")
  ```

  Amazon SageMaker provides model hosting services for model deployment. Amazon SageMaker provides an
  HTTPS endpoint where your machine learning model is available to provide inferences.

  By using the `EndpointConfig` construct, you can define a set of endpoint configuration which can be
  used to provision one or more endpoints. In this configuration, you identify one or more models to
  deploy and the resources that you want Amazon SageMaker to provision. You define one or more
  production variants, each of which identifies a model. Each production variant also describes the
  resources that you want Amazon SageMaker to provision. If you are hosting multiple models, you also
  assign a variant weight to specify how much traffic you want to allocate to each model. For example,
  suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1
  for model B. Amazon SageMaker distributes two-thirds of the traffic to Model A, and one-third to
  model B:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker


  endpoint_config = sagemaker.EndpointConfig(self, "EndpointConfig",
      instance_production_variants=[sagemaker.InstanceProductionVariantProps(
          model=model_a,
          variant_name="modelA",
          initial_variant_weight=2
      ), sagemaker.InstanceProductionVariantProps(
          model=model_b,
          variant_name="variantB",
          initial_variant_weight=1
      )
      ]
  )
  ```

  When you create an endpoint from an `EndpointConfig`, Amazon SageMaker launches the ML compute
  instances and deploys the model or models as specified in the configuration. To get inferences from
  the model, client applications send requests to the Amazon SageMaker Runtime HTTPS endpoint. For
  more information about the API, see the
  [InvokeEndpoint](https://docs.aws.amazon.com/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html)
  API. Defining an endpoint requires at minimum the associated endpoint configuration:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker

  endpoint = sagemaker.Endpoint(self, "Endpoint", endpoint_config=endpoint_config)
  ```

  To enable autoscaling on the production variant, use the `autoScaleInstanceCount` method:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker

  variant_name = "my-variant"
  endpoint_config = sagemaker.EndpointConfig(self, "EndpointConfig",
      instance_production_variants=[sagemaker.InstanceProductionVariantProps(
          model=model,
          variant_name=variant_name
      )
      ]
  )
  endpoint = sagemaker.Endpoint(self, "Endpoint", endpoint_config=endpoint_config)
  production_variant = endpoint.find_instance_production_variant(variant_name)
  instance_count = production_variant.auto_scale_instance_count(
      max_capacity=3
  )
  instance_count.scale_on_invocations("LimitRPS",
      max_requests_per_second=30
  )
  ```
  For load testing guidance on determining the maximum requests per second per instance, please see
  this [documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-scaling-loadtest.html).

  To monitor CloudWatch metrics for a production variant, use one or more of the metric convenience
  methods:
  ```python
  import aws_cdk.aws_sagemaker_alpha as sagemaker

  endpoint = sagemaker.Endpoint(self, "Endpoint", endpoint_config=endpoint_config)
  production_variant = endpoint.find_instance_production_variant("my-variant")
  production_variant.metric_model_latency().create_alarm(self, "ModelLatencyAlarm",
      threshold=100000,
      evaluation_periods=3
  )
  ```


pkgId: b8fa5098250fb848e4362a380fc401d0df9af30f63db5121466cf9ce831a3fd7
name: python-aws-cdk.aws-scheduler-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon Scheduler
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-scheduler-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
  that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens
  of millions of tasks across many AWS services without provisioning or managing underlying infrastructure.
  1. **Schedule**: A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke.
  2. **Targets**: A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler
     supports two types of targets: templated targets and universal targets. Templated targets invoke common API operations across a core groups of
     services. For example, EventBridge Scheduler supports templated targets for invoking AWS Lambda Function or starting execution of Step Function state
     machine. For API operations that are not supported by templated targets you can use customizable universal targets. Universal targets support calling
     more than 6,000 API operations across over 270 AWS services.
  3. **Schedule Group**: A schedule group is an Amazon EventBridge Scheduler resource that you use to organize your schedules. Your AWS account comes
     with a default scheduler group. A new schedule will always be added to a scheduling group. If you do not provide a scheduling group to add to, it
     will be added to the default scheduling group. You can create up to 500 schedule groups in your AWS account. Groups can be used to organize the
     schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Scheduling groups support tagging:
     with EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. It allows you to define Event Bridge Schedules.
  > This module is in active development. Some features may not be implemented yet.

  ```python

  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test schedule that invokes lambda function every 10 minutes."
  )
  ```

  You can choose from three schedule types when configuring your schedule: rate-based, cron-based, and one-time schedules.
  Both rate-based and cron-based schedules are recurring schedules. You can configure each recurring schedule type using a schedule expression. For
  cron-based schedule you can specify a time zone in which EventBridge Scheduler evaluates the expression.
  ```python

  rate_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test rate-based schedule"
  )
  cron_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.cron(
          minute="0",
          hour="23",
          day="20",
          month="11",
          time_zone=TimeZone.AMERICA_NEW_YORK
      ),
      target=target,
      description="This is a test cron-based schedule that will run at 11:00 PM, on day 20 of the month, only in November in New York timezone"
  )
  ```
  A one-time schedule is a schedule that invokes a target only once. You configure a one-time schedule when by specifying the time of the day, date,
  and time zone in which EventBridge Scheduler evaluates the schedule.
  ```python

  one_time_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.at(
          Date(2022, 10, 20, 19, 20, 23), TimeZone.AMERICA_NEW_YORK),
      target=target,
      description="This is a one-time schedule in New York timezone"
  )
  ```

  Your AWS account comes with a default scheduler group. You can access default group in CDK with:
  ```python
  default_group = Group.from_default_group(self, "DefaultGroup")
  ```
  If not specified a schedule is added to the default group. However, you can also add the schedule to a custom scheduling group managed by you:
  ```python

  group = Group(self, "Group",
      group_name="MyGroup"
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      group=group
  )
  ```

  By default, a schedule will be enabled. You can disable a schedule by setting the `enabled` property to false:
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      enabled=False
  )
  ```

  If you choose a recurring schedule, you can set the start and end time of the Schedule by specifying the `start` and `end`.
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(cdk.Duration.hours(12)),
      target=target,
      start=Date("2023-01-01T00:00:00.000Z"),
      end=Date("2023-02-01T00:00:00.000Z")
  )
  ```

  The `@aws-cdk/aws-scheduler-targets-alpha` module includes classes that implement the `IScheduleTarget` interface for
  various AWS services. EventBridge Scheduler supports two types of targets: templated targets invoke common API
  operations across a core groups of services, and customizable universal targets that you can use to call more
  than 6,000 operations across over 270 services. A list of supported targets can be found at `@aws-cdk/aws-scheduler-targets-alpha`.

  Target can be invoked with a custom input. Class `ScheduleTargetInput` supports free form text input and JSON-formatted object input:
  ```python
  input = ScheduleTargetInput.from_object({
      "QueueName": "MyQueue"
  })
  ```
  You can include context attributes in your target payload. EventBridge Scheduler will replace each keyword with
  its respective value and deliver it to the target. See
  [full list of supported context attributes](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html):
  1. `ContextAttribute.scheduleArn()` – The ARN of the schedule.
  2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, for example, 2022-03-22T18:59:43Z.
  3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, for example, d32c5kddcf5bb8c3.
  4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, for example, 1.
  ```python
  text = f"Attempt number: {ContextAttribute.attemptNumber}"
  input = ScheduleTargetInput.from_text(text)
  ```

  An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.
  The classes for templated schedule targets automatically create an IAM role with all the minimum necessary
  permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets
  will grant minimal required permissions. For example: for invoking Lambda function target `LambdaInvoke` will grant
  execution IAM role permission to `lambda:InvokeFunction`.
  ```python

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("scheduler.amazonaws.com")
  )
  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      }),
      role=role
  )
  ```

  Executing cross-account and cross-region targets are not supported yet.

  EventBridge Scheduler integrates with AWS Key Management Service (AWS KMS) to encrypt and decrypt your data using an AWS KMS key.
  EventBridge Scheduler supports two types of KMS keys: AWS owned keys, and customer managed keys.
  By default, all events in Scheduler are encrypted with a key that AWS owns and manages.
  If you wish you can also provide a customer managed key to encrypt and decrypt the payload that your schedule delivers to its target using the `key` property.
  Target classes will automatically add AWS KMS Decrypt permission to your schedule's execution role permissions policy.
  ```python


  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      key=key
  )
  ```
  > Visit [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details.

  You can configure flexible time windows by specifying the `timeWindow` property.
  Flexible time windows is disabled by default.
  ```python

  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(12)),
      target=target,
      time_window=TimeWindow.flexible(Duration.hours(10))
  )
  ```
  > Visit [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details.

  You can configure how your schedule handles failures, when EventBridge Scheduler is unable to deliver an event
  successfully to a target, by using two primary mechanisms: a retry policy, and a dead-letter queue (DLQ).
  A retry policy determines the number of times EventBridge Scheduler must retry a failed event, and how long
  to keep an unprocessed event.
  A DLQ is a standard Amazon SQS queue EventBridge Scheduler uses to deliver failed events to, after the retry
  policy has been exhausted. You can use a DLQ to troubleshoot issues with your schedule or its downstream target.
  If you've configured a retry policy for your schedule, EventBridge Scheduler delivers the dead-letter event after
  exhausting the maximum number of retries you set in the retry policy.
  ```python

  dlq = sqs.Queue(self, "DLQ",
      queue_name="MyDLQ"
  )
  target = targets.LambdaInvoke(fn,
      dead_letter_queue=dlq,
      max_event_age=Duration.minutes(1),
      retry_attempts=3
  )
  ```

  If you wish to reuse the same target in multiple schedules, you can override target properties like `input`,
  `retryAttempts` and `maxEventAge` when creating a Schedule using the `targetOverrides` parameter:
  ```python

  one_time_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(cdk.Duration.hours(12)),
      target=target,
      target_overrides=ScheduleTargetProps(
          input=ScheduleTargetInput.from_text("Overriding Target Input"),
          max_event_age=Duration.seconds(180),
          retry_attempts=5
      )
  )
  ```

  You can monitor Amazon EventBridge Scheduler using CloudWatch, which collects raw data
  and processes it into readable, near real-time metrics. EventBridge Scheduler emits
  a set of metrics for all schedules, and an additional set of metrics for schedules that
  have an associated dead-letter queue (DLQ). If you configure a DLQ for your schedule,
  EventBridge Scheduler publishes additional metrics when your schedule exhausts its retry policy.

  Class `Schedule` provides static methods for accessing all schedules metrics with default configuration,
  such as `metricAllErrors` for viewing errors when executing targets.
  ```python
  cloudwatch.Alarm(self, "SchedulesErrorAlarm",
      metric=Schedule.metric_all_errors(),
      threshold=0,
      evaluation_periods=1
  )
  ```

  To view metrics for a specific group you can use methods on class `Group`:
  ```python
  group = Group(self, "Group",
      group_name="MyGroup"
  )
  cloudwatch.Alarm(self, "MyGroupErrorAlarm",
      metric=group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )

  default_group = Group.from_default_group(self, "DefaultGroup")
  cloudwatch.Alarm(self, "DefaultGroupErrorAlarm",
      metric=default_group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )
  ```
  See full list of metrics and their description at
  [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/scheduler/latest/UserGuide/monitoring-cloudwatch.html)
  in the *AWS Event Bridge Scheduler User Guide*.


pkgId: e2075fd96266f5a371fb270ff4ca16481b49c73ee0732fc888c6b254ea4d5d18
name: python-aws-cdk.aws-scheduler-alpha
arch: src
version: 2.167.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon Scheduler
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-scheduler-alpha-2.167.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
  that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens
  of millions of tasks across many AWS services without provisioning or managing underlying infrastructure.
  1. **Schedule**: A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke.
  2. **Target**: A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler
     supports two types of targets: templated targets and universal targets. Templated targets invoke common API operations across a core groups of
     services. For example, EventBridge Scheduler supports templated targets for invoking AWS Lambda Function or starting execution of Step Functions state
     machine. For API operations that are not supported by templated targets you can use customizable universal targets. Universal targets support calling
     more than 6,000 API operations across over 270 AWS services.
  3. **Schedule Group**: A schedule group is an Amazon EventBridge Scheduler resource that you use to organize your schedules. Your AWS account comes
     with a default scheduler group. A new schedule will always be added to a scheduling group. If you do not provide a scheduling group to add to, it
     will be added to the default scheduling group. You can create up to 500 schedule groups in your AWS account. Groups can be used to organize the
     schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Scheduling groups support tagging:
     with EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources.
  This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. It allows you to define Event Bridge Schedules.
  > This module is in active development. Some features may not be implemented yet.

  ```python

  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test schedule that invokes lambda function every 10 minutes."
  )
  ```

  You can choose from three schedule types when configuring your schedule: rate-based, cron-based, and one-time schedules.
  Both rate-based and cron-based schedules are recurring schedules. You can configure each recurring schedule type using a schedule expression.
  For
  cron-based schedules you can specify a time zone in which EventBridge Scheduler evaluates the expression.
  ```python

  rate_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test rate-based schedule"
  )
  cron_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.cron(
          minute="0",
          hour="23",
          day="20",
          month="11",
          time_zone=TimeZone.AMERICA_NEW_YORK
      ),
      target=target,
      description="This is a test cron-based schedule that will run at 11:00 PM, on day 20 of the month, only in November in New York timezone"
  )
  ```
  A one-time schedule is a schedule that invokes a target only once. You configure a one-time schedule by specifying the time of day, date,
  and time zone in which EventBridge Scheduler evaluates the schedule.
  ```python

  one_time_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.at(
          Date(2022, 10, 20, 19, 20, 23), TimeZone.AMERICA_NEW_YORK),
      target=target,
      description="This is a one-time schedule in New York timezone"
  )
  ```

  Your AWS account comes with a default scheduler group. You can access the default group in CDK with:
  ```python
  default_group = Group.from_default_group(self, "DefaultGroup")
  ```
  You can add a schedule to a custom scheduling group managed by you. If a custom group is not specified, the schedule is added to the default group.
  ```python

  group = Group(self, "Group",
      group_name="MyGroup"
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      group=group
  )
  ```

  By default, a schedule will be enabled. You can disable a schedule by setting the `enabled` property to false:
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      enabled=False
  )
  ```

  If you choose a recurring schedule, you can set the start and end time of the Schedule by specifying the `start` and `end`.
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(cdk.Duration.hours(12)),
      target=target,
      start=Date("2023-01-01T00:00:00.000Z"),
      end=Date("2023-02-01T00:00:00.000Z")
  )
  ```

  The `@aws-cdk/aws-scheduler-targets-alpha` module includes classes that implement the `IScheduleTarget` interface for
  various AWS services. EventBridge Scheduler supports two types of targets:
  1. **Templated targets** which invoke common API
     operations across a core groups of services, and
  2. **Universal targets** that you can customize to call more
     than 6,000 operations across over 270 services.
  A list of supported targets can be found at `@aws-cdk/aws-scheduler-targets-alpha`.

  Targets can be invoked with a custom input. The `ScheduleTargetInput`class supports free-form text input and JSON-formatted object input:
  ```python
  input = ScheduleTargetInput.from_object({
      "QueueName": "MyQueue"
  })
  ```
  You can include context attributes in your target payload. EventBridge Scheduler will replace each keyword with
  its respective value and deliver it to the target. See
  [full list of supported context attributes](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html):
  1. `ContextAttribute.scheduleArn()` – The ARN of the schedule.
  2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, for example, 2022-03-22T18:59:43Z.
  3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, for example, d32c5kddcf5bb8c3.
  4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, for example, 1.
  ```python
  text = f"Attempt number: {ContextAttribute.attemptNumber}"
  input = ScheduleTargetInput.from_text(text)
  ```

  An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.
  The classes for templated schedule targets automatically create an IAM role with all the minimum necessary
  permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets
  will grant minimal required permissions. For example, the target `LambdaInvoke` will grant the
  IAM execution role `lambda:InvokeFunction` permission to invoke the Lambda function.
  ```python

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("scheduler.amazonaws.com")
  )
  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      }),
      role=role
  )
  ```

  EventBridge Scheduler integrates with AWS Key Management Service (AWS KMS) to encrypt and decrypt your data using an AWS KMS key.
  EventBridge Scheduler supports two types of KMS keys: AWS owned keys, and customer managed keys.
  By default, all events in Scheduler are encrypted with a key that AWS owns and manages.
  If you wish you can also provide a customer managed key to encrypt and decrypt the payload that your schedule delivers to its target using the `key` property.
  Target classes will automatically add AWS `kms:Decrypt` permission to your schedule's execution role permissions policy.
  ```python


  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      key=key
  )
  ```
  > Visit [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details.

  You can configure flexible time windows by specifying the `timeWindow` property.
  Flexible time windows is disabled by default.
  ```python

  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(12)),
      target=target,
      time_window=TimeWindow.flexible(Duration.hours(10))
  )
  ```
  > Visit [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details.

  You can configure how your schedule handles failures, when EventBridge Scheduler is unable to deliver an event
  successfully to a target, by using two primary mechanisms: a retry policy, and a dead-letter queue (DLQ).
  A retry policy determines the number of times EventBridge Scheduler must retry a failed event, and how long
  to keep an unprocessed event.
  A DLQ is a standard Amazon SQS queue EventBridge Scheduler uses to deliver failed events to, after the retry
  policy has been exhausted. You can use a DLQ to troubleshoot issues with your schedule or its downstream target.
  If you've configured a retry policy for your schedule, EventBridge Scheduler delivers the dead-letter event after
  exhausting the maximum number of retries you set in the retry policy.
  ```python

  dlq = sqs.Queue(self, "DLQ",
      queue_name="MyDLQ"
  )
  target = targets.LambdaInvoke(fn,
      dead_letter_queue=dlq,
      max_event_age=Duration.minutes(1),
      retry_attempts=3
  )
  ```

  You can monitor Amazon EventBridge Scheduler using CloudWatch, which collects raw data
  and processes it into readable, near real-time metrics. EventBridge Scheduler emits
  a set of metrics for all schedules, and an additional set of metrics for schedules that
  have an associated dead-letter queue (DLQ). If you configure a DLQ for your schedule,
  EventBridge Scheduler publishes additional metrics when your schedule exhausts its retry policy.

  Class `Schedule` provides static methods for accessing all schedules metrics with default configuration,
  such as `metricAllErrors` for viewing errors when executing targets.
  ```python
  cloudwatch.Alarm(self, "SchedulesErrorAlarm",
      metric=Schedule.metric_all_errors(),
      threshold=0,
      evaluation_periods=1
  )
  ```

  To view metrics for a specific group you can use methods on class `Group`:
  ```python
  group = Group(self, "Group",
      group_name="MyGroup"
  )
  cloudwatch.Alarm(self, "MyGroupErrorAlarm",
      metric=group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )

  default_group = Group.from_default_group(self, "DefaultGroup")
  cloudwatch.Alarm(self, "DefaultGroupErrorAlarm",
      metric=default_group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )
  ```
  See full list of metrics and their description at
  [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/scheduler/latest/UserGuide/monitoring-cloudwatch.html)
  in the *AWS Event Bridge Scheduler User Guide*.


pkgId: 744f8f16aab9a642811d69703d703a7e4b3844b9b13c5b9db2d41918bdb96ba3
name: python-aws-cdk.aws-scheduler-alpha
arch: src
version: 2.171.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon Scheduler
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-scheduler-alpha-2.171.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
  that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure.
  1. **Schedule**: A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke.
  2. **Target**: A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler
     supports two types of targets: templated targets and universal targets. Templated targets invoke common API operations across a core groups of
     services. For example, EventBridge Scheduler supports templated targets for invoking AWS Lambda Function or starting execution of Step Functions state
     machine. For API operations that are not supported by templated targets you can use customizable universal targets. Universal targets support calling
     more than 6,000 API operations across over 270 AWS services.
  3. **Schedule Group**: A schedule group is an Amazon EventBridge Scheduler resource that you use to organize your schedules. Your AWS account comes
     with a default scheduler group. A new schedule will always be added to a scheduling group. If you do not provide a scheduling group to add to, it
     will be added to the default scheduling group. You can create up to 500 schedule groups in your AWS account. Groups can be used to organize the
     schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Schedule groups support tagging.
     With EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources.

  ```python

  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test schedule that invokes a lambda function every 10 minutes."
  )
  ```

  You can choose from three schedule types when configuring your schedule: rate-based, cron-based, and one-time schedules.
  Both rate-based and cron-based schedules are recurring schedules. You can configure each recurring schedule type using a schedule expression.
  For
  cron-based schedules you can specify a time zone in which EventBridge Scheduler evaluates the expression.
  ```python

  rate_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      description="This is a test rate-based schedule"
  )
  cron_based_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.cron(
          minute="0",
          hour="23",
          day="20",
          month="11",
          time_zone=TimeZone.AMERICA_NEW_YORK
      ),
      target=target,
      description="This is a test cron-based schedule that will run at 11:00 PM, on day 20 of the month, only in November in New York timezone"
  )
  ```
  A one-time schedule is a schedule that invokes a target only once. You configure a one-time schedule by specifying the time of day, date,
  and time zone in which EventBridge Scheduler evaluates the schedule.
  ```python

  one_time_schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.at(
          Date(2022, 10, 20, 19, 20, 23), TimeZone.AMERICA_NEW_YORK),
      target=target,
      description="This is a one-time schedule in New York timezone"
  )
  ```

  Your AWS account comes with a default scheduler group. You can access the default group in CDK with:
  ```python
  default_group = Group.from_default_group(self, "DefaultGroup")
  ```
  You can add a schedule to a custom scheduling group managed by you. If a custom group is not specified, the schedule is added to the default group.
  ```python

  group = Group(self, "Group",
      group_name="MyGroup"
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      group=group
  )
  ```

  By default, a schedule will be enabled. You can disable a schedule by setting the `enabled` property to false:
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      enabled=False
  )
  ```

  If you choose a recurring schedule, you can set the start and end time of the Schedule by specifying the `start` and `end`.
  ```python

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(cdk.Duration.hours(12)),
      target=target,
      start=Date("2023-01-01T00:00:00.000Z"),
      end=Date("2023-02-01T00:00:00.000Z")
  )
  ```

  The `@aws-cdk/aws-scheduler-targets-alpha` module includes classes that implement the `IScheduleTarget` interface for
  various AWS services. EventBridge Scheduler supports two types of targets:
  1. **Templated targets** which invoke common API
     operations across a core groups of services, and
  2. **Universal targets** that you can customize to call more
     than 6,000 operations across over 270 services.
  A list of supported targets can be found at `@aws-cdk/aws-scheduler-targets-alpha`.

  Targets can be invoked with a custom input. The `ScheduleTargetInput` class supports free-form text input and JSON-formatted object input:
  ```python
  input = ScheduleTargetInput.from_object({
      "QueueName": "MyQueue"
  })
  ```
  You can include context attributes in your target payload. EventBridge Scheduler will replace each keyword with
  its respective value and deliver it to the target. See
  [full list of supported context attributes](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html):
  1. `ContextAttribute.scheduleArn()` – The ARN of the schedule.
  2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, e.g., 2022-03-22T18:59:43Z.
  3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, e.g., d32c5kddcf5bb8c3.
  4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, e.g., 1.
  ```python
  text = f"Attempt number: {ContextAttribute.attemptNumber}"
  input = ScheduleTargetInput.from_text(text)
  ```

  An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.
  The classes for templated schedule targets automatically create an IAM role with all the minimum necessary
  permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets
  will grant minimal required permissions. For example, the `LambdaInvoke` target will grant the
  IAM execution role `lambda:InvokeFunction` permission to invoke the Lambda function.
  ```python

  role = iam.Role(self, "Role",
      assumed_by=iam.ServicePrincipal("scheduler.amazonaws.com")
  )
  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      }),
      role=role
  )
  ```

  EventBridge Scheduler integrates with AWS Key Management Service (AWS KMS) to encrypt and decrypt your data using an AWS KMS key.
  EventBridge Scheduler supports two types of KMS keys: AWS owned keys, and customer managed keys.
  By default, all events in Scheduler are encrypted with a key that AWS owns and manages.
  If you wish you can also provide a customer managed key to encrypt and decrypt the payload that your schedule delivers to its target using the `key` property.
  Target classes will automatically add AWS `kms:Decrypt` permission to your schedule's execution role permissions policy.
  ```python


  target = targets.LambdaInvoke(fn,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(10)),
      target=target,
      key=key
  )
  ```
  > See [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details.

  You can configure flexible time windows by specifying the `timeWindow` property.
  Flexible time windows are disabled by default.
  ```python

  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(12)),
      target=target,
      time_window=TimeWindow.flexible(Duration.hours(10))
  )
  ```
  > See [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details.

  You can configure how your schedule handles failures, when EventBridge Scheduler is unable to deliver an event
  successfully to a target, by using two primary mechanisms: a retry policy, and a dead-letter queue (DLQ).
  A retry policy determines the number of times EventBridge Scheduler must retry a failed event, and how long
  to keep an unprocessed event.
  A DLQ is a standard Amazon SQS queue EventBridge Scheduler uses to deliver failed events to, after the retry
  policy has been exhausted. You can use a DLQ to troubleshoot issues with your schedule or its downstream target.
  If you've configured a retry policy for your schedule, EventBridge Scheduler delivers the dead-letter event after
  exhausting the maximum number of retries you set in the retry policy.
  ```python

  dlq = sqs.Queue(self, "DLQ",
      queue_name="MyDLQ"
  )
  target = targets.LambdaInvoke(fn,
      dead_letter_queue=dlq,
      max_event_age=Duration.minutes(1),
      retry_attempts=3
  )
  ```

  You can monitor Amazon EventBridge Scheduler using CloudWatch, which collects raw data
  and processes it into readable, near real-time metrics. EventBridge Scheduler emits
  a set of metrics for all schedules, and an additional set of metrics for schedules that
  have an associated dead-letter queue (DLQ). If you configure a DLQ for your schedule,
  EventBridge Scheduler publishes additional metrics when your schedule exhausts its retry policy.

  The `Schedule` class provides static methods for accessing all schedules metrics with default configuration, such as `metricAllErrors` for viewing errors when executing targets.
  ```python
  cloudwatch.Alarm(self, "SchedulesErrorAlarm",
      metric=Schedule.metric_all_errors(),
      threshold=0,
      evaluation_periods=1
  )
  ```

  To view metrics for a specific group you can use methods on class `Group`:
  ```python
  group = Group(self, "Group",
      group_name="MyGroup"
  )
  cloudwatch.Alarm(self, "MyGroupErrorAlarm",
      metric=group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )

  default_group = Group.from_default_group(self, "DefaultGroup")
  cloudwatch.Alarm(self, "DefaultGroupErrorAlarm",
      metric=default_group.metric_target_errors(),
      evaluation_periods=1,
      threshold=0
  )
  ```
  See full list of metrics and their description at
  [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/scheduler/latest/UserGuide/monitoring-cloudwatch.html)
  in the *AWS EventBridge Scheduler User Guide*.


pkgId: b7f5807118b36295df5b1095aac00eef5dde447f81a8bcae9d201e4458431c79
name: python-aws-cdk.aws-scheduler-targets-alpha
arch: src
version: 2.163.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon Scheduler Targets
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-scheduler-targets-alpha-2.163.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
  that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens
  of millions of tasks across many AWS services without provisioning or managing underlying infrastructure.
  This library contains integration classes for Amazon EventBridge Scheduler to call any
  number of supported AWS Services.
  The following targets are supported:
  1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function))
  2. `targets.StepFunctionsStartExecution`: [Start an AWS Step Function](#start-an-aws-step-function)
  3. `targets.CodeBuildStartBuild`: [Start a CodeBuild job](#start-a-codebuild-job)
  4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-sqs-queue)
  5. `targets.SnsPublish`: [Publish messages to an Amazon SNS topic](#publish-messages-to-an-amazon-sns-topic)
  6. `targets.EventBridgePutEvents`: [Put Events on EventBridge](#send-events-to-an-eventbridge-event-bus)
  7. `targets.InspectorStartAssessmentRun`: [Start an Amazon Inspector assessment run](#start-an-amazon-inspector-assessment-run)
  8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Streams](#put-a-record-to-an-amazon-kinesis-data-streams)
  9. `targets.KinesisDataFirehosePutRecord`: [Put a record to a Kinesis Data Firehose](#put-a-record-to-a-kinesis-data-firehose)
  10. `targets.CodePipelineStartPipelineExecution`: [Start a CodePipeline execution](#start-a-codepipeline-execution)
  11. `targets.SageMakerStartPipelineExecution`: [Start a SageMaker pipeline execution](#start-a-sagemaker-pipeline-execution)

  Use the `LambdaInvoke` target to invoke a lambda function.
  The code snippet below creates an event rule with a Lambda function as a target
  called every hour by Event Bridge Scheduler with custom payload. You can optionally attach a
  [dead letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html).
  ```python
  import aws_cdk.aws_lambda as lambda_
  fn = lambda_.Function(self, "MyFunc",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_inline("exports.handler = handler.toString()")
  )
  dlq = sqs.Queue(self, "DLQ",
      queue_name="MyDLQ"
  )
  target = targets.LambdaInvoke(fn,
      dead_letter_queue=dlq,
      max_event_age=Duration.minutes(1),
      retry_attempts=3,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=target
  )
  ```

  Use the `StepFunctionsStartExecution` target to start a new execution on a StepFunction.
  The code snippet below creates an event rule with a Step Function as a target
  called every hour by Event Bridge Scheduler with a custom payload.
  ```python
  import aws_cdk.aws_stepfunctions as sfn
  import aws_cdk.aws_stepfunctions_tasks as tasks
  payload = {
      "Name": "MyParameter",
      "Value": "🌥️"
  }
  put_parameter_step = tasks.CallAwsService(self, "PutParameter",
      service="ssm",
      action="putParameter",
      iam_resources=["*"],
      parameters={
          "Name.$": "$.Name",
          "Value.$": "$.Value",
          "Type": "String",
          "Overwrite": True
      }
  )
  state_machine = sfn.StateMachine(self, "StateMachine",
      definition_body=sfn.DefinitionBody.from_chainable(put_parameter_step)
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=targets.StepFunctionsStartExecution(state_machine,
          input=ScheduleTargetInput.from_object(payload)
      )
  )
  ```

  Use the `CodeBuildStartBuild` target to start a new build run on a CodeBuild project.
  The code snippet below creates an event rule with a CodeBuild project as target which is
  called every hour by Event Bridge Scheduler.
  ```python
  import aws_cdk.aws_codebuild as codebuild

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.CodeBuildStartBuild(project)
  )
  ```

  Use the `SqsSendMessage` target to send a message to SQS Queue.
  The code snippet below creates an event rule with a SQS Queue as a target
  called every hour by Event Bridge Scheduler with a custom payload.
  Contains the `messageGroupId` to use when the target is a FIFO queue. If you specify
  a FIFO queue as a target, the queue must have content-based deduplication enabled.
  ```python
  payload = "test"
  message_group_id = "id"
  queue = sqs.Queue(self, "MyQueue",
      fifo=True,
      content_based_deduplication=True
  )
  target = targets.SqsSendMessage(queue,
      input=ScheduleTargetInput.from_text(payload),
      message_group_id=message_group_id
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(1)),
      target=target
  )
  ```

  Use the `SnsPublish` target to publish messages to an Amazon SNS topic.
  The code snippets below create an event rule with a Amazon SNS topic as a target.
  It's called every hour by Amazon Event Bridge Scheduler with custom payload.
  ```python
  import aws_cdk.aws_sns as sns
  topic = sns.Topic(self, "Topic")
  payload = {
      "message": "Hello scheduler!"
  }
  target = targets.SnsPublish(topic,
      input=ScheduleTargetInput.from_object(payload)
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=target
  )
  ```

  Use the `EventBridgePutEvents` target to send events to an EventBridge event bus.
  The code snippet below creates an event rule with an EventBridge event bus as a target
  called every hour by Event Bridge Scheduler with a custom event payload.
  ```python
  import aws_cdk.aws_events as events
  event_bus = events.EventBus(self, "EventBus",
      event_bus_name="DomainEvents"
  )
  event_entry = targets.EventBridgePutEventsEntry(
      event_bus=event_bus,
      source="PetService",
      detail=ScheduleTargetInput.from_object({"Name": "Fluffy"}),
      detail_type="🐶"
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=targets.EventBridgePutEvents(event_entry)
  )
  ```

  Use the `InspectorStartAssessmentRun` target to start an Inspector assessment run.
  The code snippet below creates an event rule with an assessment template as target which is
  called every hour by Event Bridge Scheduler.
  ```python
  import aws_cdk.aws_inspector as inspector

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.InspectorStartAssessmentRun(assessment_template)
  )
  ```

  Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Streams.
  The code snippet below creates an event rule with a stream as target which is
  called every hour by Event Bridge Scheduler.
  ```python
  import aws_cdk.aws_kinesis as kinesis
  stream = kinesis.Stream(self, "MyStream")
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.KinesisStreamPutRecord(stream,
          partition_key="key"
      )
  )
  ```

  Use the `KinesisDataFirehosePutRecord` target to put a record to a Kinesis Data Firehose delivery stream.
  The code snippet below creates an event rule with a delivery stream as a target
  called every hour by Event Bridge Scheduler with a custom payload.
  ```python
  import aws_cdk.aws_kinesisfirehose as firehose

  payload = {
      "Data": "record"
  }
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.KinesisDataFirehosePutRecord(delivery_stream,
          input=ScheduleTargetInput.from_object(payload)
      )
  )
  ```

  Use the `CodePipelineStartPipelineExecution` target to start a new execution for a CodePipeline pipeline.
  The code snippet below creates an event rule with a CodePipeline pipeline as target which is
  called every hour by Event Bridge Scheduler.
  ```python
  import aws_cdk.aws_codepipeline as codepipeline

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.CodePipelineStartPipelineExecution(pipeline)
  )
  ```

  Use the `SageMakerStartPipelineExecution` target to start a new execution for a SageMaker pipeline.
  The code snippet below creates an event rule with a SageMaker pipeline as target which is
  called every hour by Event Bridge Scheduler.
  ```python
  import aws_cdk.aws_sagemaker as sagemaker

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.SageMakerStartPipelineExecution(pipeline,
          pipeline_parameter_list=[targets.SageMakerPipelineParameter(
              name="parameter-name",
              value="parameter-value"
          )]
      )
  )
  ```


pkgId: 0589a2f78e3676a141570f7b102734f6f2d09853b536b29c9a6eb69605382c9b
name: python-aws-cdk.aws-scheduler-targets-alpha
arch: src
version: 2.171.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for Amazon Scheduler Targets
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-scheduler-targets-alpha-2.171.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
  that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure.
  This library contains integration classes for Amazon EventBridge Scheduler to call any
  number of supported AWS Services.
  The following targets are supported:
  1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function)
  2. `targets.StepFunctionsStartExecution`: [Start an AWS Step Function](#start-an-aws-step-function)
  3. `targets.CodeBuildStartBuild`: [Start a CodeBuild job](#start-a-codebuild-job)
  4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-an-sqs-queue)
  5. `targets.SnsPublish`: [Publish messages to an Amazon SNS topic](#publish-messages-to-an-amazon-sns-topic)
  6. `targets.EventBridgePutEvents`: [Put Events on EventBridge](#send-events-to-an-eventbridge-event-bus)
  7. `targets.InspectorStartAssessmentRun`: [Start an Amazon Inspector assessment run](#start-an-amazon-inspector-assessment-run)
  8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Stream](#put-a-record-to-an-amazon-kinesis-data-stream)
  9. `targets.KinesisDataFirehosePutRecord`: [Put a record to a Kinesis Data Firehose](#put-a-record-to-a-kinesis-data-firehose)
  10. `targets.CodePipelineStartPipelineExecution`: [Start a CodePipeline execution](#start-a-codepipeline-execution)
  11. `targets.SageMakerStartPipelineExecution`: [Start a SageMaker pipeline execution](#start-a-sagemaker-pipeline-execution)

  Use the `LambdaInvoke` target to invoke a lambda function.
  The code snippet below creates an event rule with a Lambda function as a target
  called every hour by EventBridge Scheduler with a custom payload. You can optionally attach a
  [dead letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html).
  ```python
  import aws_cdk.aws_lambda as lambda_
  fn = lambda_.Function(self, "MyFunc",
      runtime=lambda_.Runtime.NODEJS_LATEST,
      handler="index.handler",
      code=lambda_.Code.from_inline("exports.handler = handler.toString()")
  )
  dlq = sqs.Queue(self, "DLQ",
      queue_name="MyDLQ"
  )
  target = targets.LambdaInvoke(fn,
      dead_letter_queue=dlq,
      max_event_age=Duration.minutes(1),
      retry_attempts=3,
      input=ScheduleTargetInput.from_object({
          "payload": "useful"
      })
  )
  schedule = Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=target
  )
  ```

  Use the `StepFunctionsStartExecution` target to start a new execution on a StepFunction.
  The code snippet below creates an event rule with a Step Function as a target
  called every hour by EventBridge Scheduler with a custom payload.
  ```python
  import aws_cdk.aws_stepfunctions as sfn
  import aws_cdk.aws_stepfunctions_tasks as tasks
  payload = {
      "Name": "MyParameter",
      "Value": "🌥️"
  }
  put_parameter_step = tasks.CallAwsService(self, "PutParameter",
      service="ssm",
      action="putParameter",
      iam_resources=["*"],
      parameters={
          "Name.$": "$.Name",
          "Value.$": "$.Value",
          "Type": "String",
          "Overwrite": True
      }
  )
  state_machine = sfn.StateMachine(self, "StateMachine",
      definition_body=sfn.DefinitionBody.from_chainable(put_parameter_step)
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=targets.StepFunctionsStartExecution(state_machine,
          input=ScheduleTargetInput.from_object(payload)
      )
  )
  ```

  Use the `CodeBuildStartBuild` target to start a new build run on a CodeBuild project.
  The code snippet below creates an event rule with a CodeBuild project as target which is
  called every hour by EventBridge Scheduler.
  ```python
  import aws_cdk.aws_codebuild as codebuild

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.CodeBuildStartBuild(project)
  )
  ```

  Use the `SqsSendMessage` target to send a message to an SQS Queue.
  The code snippet below creates an event rule with an SQS Queue as a target
  called every hour by EventBridge Scheduler with a custom payload.
  Contains the `messageGroupId` to use when the target is a FIFO queue. If you specify
  a FIFO queue as a target, the queue must have content-based deduplication enabled.
  ```python
  payload = "test"
  message_group_id = "id"
  queue = sqs.Queue(self, "MyQueue",
      fifo=True,
      content_based_deduplication=True
  )
  target = targets.SqsSendMessage(queue,
      input=ScheduleTargetInput.from_text(payload),
      message_group_id=message_group_id
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(1)),
      target=target
  )
  ```

  Use the `SnsPublish` target to publish messages to an Amazon SNS topic.
  The code snippets below create an event rule with a Amazon SNS topic as a target.
  It's called every hour by Amazon EventBridge Scheduler with a custom payload.
  ```python
  import aws_cdk.aws_sns as sns
  topic = sns.Topic(self, "Topic")
  payload = {
      "message": "Hello scheduler!"
  }
  target = targets.SnsPublish(topic,
      input=ScheduleTargetInput.from_object(payload)
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=target
  )
  ```

  Use the `EventBridgePutEvents` target to send events to an EventBridge event bus.
  The code snippet below creates an event rule with an EventBridge event bus as a target
  called every hour by EventBridge Scheduler with a custom event payload.
  ```python
  import aws_cdk.aws_events as events
  event_bus = events.EventBus(self, "EventBus",
      event_bus_name="DomainEvents"
  )
  event_entry = targets.EventBridgePutEventsEntry(
      event_bus=event_bus,
      source="PetService",
      detail=ScheduleTargetInput.from_object({"Name": "Fluffy"}),
      detail_type="🐶"
  )
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.hours(1)),
      target=targets.EventBridgePutEvents(event_entry)
  )
  ```

  Use the `InspectorStartAssessmentRun` target to start an Inspector assessment run.
  The code snippet below creates an event rule with an assessment template as the target which is
  called every hour by EventBridge Scheduler.
  ```python
  import aws_cdk.aws_inspector as inspector

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.InspectorStartAssessmentRun(assessment_template)
  )
  ```

  Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Stream.
  The code snippet below creates an event rule with a stream as the target which is
  called every hour by EventBridge Scheduler.
  ```python
  import aws_cdk.aws_kinesis as kinesis
  stream = kinesis.Stream(self, "MyStream")
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.KinesisStreamPutRecord(stream,
          partition_key="key"
      )
  )
  ```

  Use the `KinesisDataFirehosePutRecord` target to put a record to a Kinesis Data Firehose delivery stream.
  The code snippet below creates an event rule with a delivery stream as a target
  called every hour by EventBridge Scheduler with a custom payload.
  ```python
  import aws_cdk.aws_kinesisfirehose_alpha as firehose

  payload = {
      "Data": "record"
  }
  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.KinesisDataFirehosePutRecord(delivery_stream,
          input=ScheduleTargetInput.from_object(payload)
      )
  )
  ```

  Use the `CodePipelineStartPipelineExecution` target to start a new execution for a CodePipeline pipeline.
  The code snippet below creates an event rule with a CodePipeline pipeline as the target which is
  called every hour by EventBridge Scheduler.
  ```python
  import aws_cdk.aws_codepipeline as codepipeline

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.CodePipelineStartPipelineExecution(pipeline)
  )
  ```

  Use the `SageMakerStartPipelineExecution` target to start a new execution for a SageMaker pipeline.
  The code snippet below creates an event rule with a SageMaker pipeline as the target which is
  called every hour by EventBridge Scheduler.
  ```python
  import aws_cdk.aws_sagemaker as sagemaker

  Schedule(self, "Schedule",
      schedule=ScheduleExpression.rate(Duration.minutes(60)),
      target=targets.SageMakerStartPipelineExecution(pipeline,
          pipeline_parameter_list=[targets.SageMakerPipelineParameter(
              name="parameter-name",
              value="parameter-value"
          )]
      )
  )
  ```


pkgId: f7acd6cafb45dfe27d74574a3ad827572b7fff02614995d087370565294a5e26
name: python-aws-cdk.aws-servicecatalog-alpha
arch: src
version: 2.22.0a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::ServiceCatalog
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-servicecatalog-alpha-2.22.0a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [AWS Service Catalog](https://docs.aws.amazon.com/servicecatalog/latest/dg/what-is-service-catalog.html)
  enables organizations to create and manage catalogs of products for their end users that are approved for use on AWS.

  * [Portfolio](#portfolio)
    * [Granting access to a portfolio](#granting-access-to-a-portfolio)
    * [Sharing a portfolio with another AWS account](#sharing-a-portfolio-with-another-aws-account)
  * [Product](#product)
    * [Creating a product from a local asset](#creating-a-product-from-local-asset)
    * [Creating a product from a stack](#creating-a-product-from-a-stack)
    * [Adding a product to a portfolio](#adding-a-product-to-a-portfolio)
  * [TagOptions](#tag-options)
  * [Constraints](#constraints)
    * [Tag update constraint](#tag-update-constraint)
    * [Notify on stack events](#notify-on-stack-events)
    * [CloudFormation template parameters constraint](#cloudformation-template-parameters-constraint)
    * [Set launch role](#set-launch-role)
    * [Deploy with StackSets](#deploy-with-stacksets)
  The `@aws-cdk/aws-servicecatalog` package contains resources that enable users to automate governance and management of their AWS resources at scale.
  ```python
  import aws_cdk.aws_servicecatalog_alpha as servicecatalog
  ```

  AWS Service Catalog portfolios allow administrators to organize, manage, and distribute cloud resources for their end users.
  Using the CDK, a new portfolio can be created with the `Portfolio` construct:
  ```python
  servicecatalog.Portfolio(self, "Portfolio",
      display_name="MyPortfolio",
      provider_name="MyTeam"
  )
  ```
  You can also specify optional metadata properties such as `description` and `messageLanguage`
  to help better catalog and manage your portfolios.
  ```python
  servicecatalog.Portfolio(self, "Portfolio",
      display_name="MyFirstPortfolio",
      provider_name="SCAdmin",
      description="Portfolio for a project",
      message_language=servicecatalog.MessageLanguage.EN
  )
  ```
  Read more at [Creating and Managing Portfolios](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios.html).
  To reference an existing portfolio into your CDK application, use the `Portfolio.fromPortfolioArn()` factory method:
  ```python
  portfolio = servicecatalog.Portfolio.from_portfolio_arn(self, "ReferencedPortfolio", "arn:aws:catalog:region:account-id:portfolio/port-abcdefghi")
  ```

  You can grant access to and manage the `IAM` users, groups, or roles that have access to the products within a portfolio.
  Entities with granted access will be able to utilize the portfolios resources and products via the console or AWS CLI.
  Once resources are deployed end users will be able to access them via the console or service catalog CLI.
  ```python
  import aws_cdk.aws_iam as iam

  user = iam.User(self, "User")
  portfolio.give_access_to_user(user)
  role = iam.Role(self, "Role",
      assumed_by=iam.AccountRootPrincipal()
  )
  portfolio.give_access_to_role(role)
  group = iam.Group(self, "Group")
  portfolio.give_access_to_group(group)
  ```

  You can use account-to-account sharing to distribute a reference to your portfolio to other AWS accounts by passing the recipient account number.
  After the share is initiated, the recipient account can accept the share via CLI or console by importing the portfolio ID.
  Changes made to the shared portfolio will automatically propagate to recipients.
  ```python

  portfolio.share_with_account("012345678901")
  ```

  Products are version friendly infrastructure-as-code templates that admins create and add to portfolios for end users to provision and create AWS resources.
  Service Catalog supports products from AWS Marketplace or ones defined by a CloudFormation template.
  The CDK currently only supports adding products of type CloudFormation.
  Using the CDK, a new Product can be created with the `CloudFormationProduct` construct.
  You can use `CloudFormationTemplate.fromUrl` to create a Product from a CloudFormation template directly from a URL that points to the template in S3, GitHub, or CodeCommit:
  ```python
  product = servicecatalog.CloudFormationProduct(self, "MyFirstProduct",
      product_name="My Product",
      owner="Product Owner",
      product_versions=[servicecatalog.CloudFormationProductVersion(
          product_version_name="v1",
          cloud_formation_template=servicecatalog.CloudFormationTemplate.from_url("https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml")
      )
      ]
  )
  ```

  A `CloudFormationProduct` can also be created by using a CloudFormation template held locally on disk using Assets.
  Assets are files that are uploaded to an S3 Bucket before deployment.
  `CloudFormationTemplate.fromAsset` can be utilized to create a Product by passing the path to a local template file on your disk:
  ```python
  import path as path
  product = servicecatalog.CloudFormationProduct(self, "Product",
      product_name="My Product",
      owner="Product Owner",
      product_versions=[servicecatalog.CloudFormationProductVersion(
          product_version_name="v1",
          cloud_formation_template=servicecatalog.CloudFormationTemplate.from_url("https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/ServiceCatalog/Product.yaml")
      ), servicecatalog.CloudFormationProductVersion(
          product_version_name="v2",
          cloud_formation_template=servicecatalog.CloudFormationTemplate.from_asset(path.join(__dirname, "development-environment.template.json"))
      )
      ]
  )
  ```

  You can create a Service Catalog `CloudFormationProduct` entirely defined with CDK code using a service catalog `ProductStack`.
  A separate child stack for your product is created and you can add resources like you would for any other CDK stack,
  such as an S3 Bucket, IAM roles, and EC2 instances. This stack is passed in as a product version to your
  product.  This will not create a separate CloudFormation stack during deployment.
  ```python
  import aws_cdk.aws_s3 as s3
  import aws_cdk as cdk
  class S3BucketProduct(servicecatalog.ProductStack):
      def __init__(self, scope, id):
          super().__init__(scope, id)
          s3.Bucket(self, "BucketProduct")
  product = servicecatalog.CloudFormationProduct(self, "Product",
      product_name="My Product",
      owner="Product Owner",
      product_versions=[servicecatalog.CloudFormationProductVersion(
          product_version_name="v1",
          cloud_formation_template=servicecatalog.CloudFormationTemplate.from_product_stack(S3BucketProduct(self, "S3BucketProduct"))
      )
      ]
  )
  ```

  You add products to a portfolio to organize and distribute your catalog at scale.  Adding a product to a portfolio creates an association,
  and the product will become visible within the portfolio side in both the Service Catalog console and AWS CLI.
  You can add a product to multiple portfolios depending on your organizational structure and how you would like to group access to products.
  ```python


  portfolio.add_product(product)
  ```

  TagOptions allow administrators to easily manage tags on provisioned products by providing a template for a selection of tags that end users choose from.
  TagOptions are created by specifying a tag key with a set of allowed values and can be associated with both portfolios and products.
  When launching a product, both the TagOptions associated with the product and the containing portfolio are made available.
  At the moment, TagOptions can only be deactivated in the console.
  ```python


  tag_options_for_portfolio = servicecatalog.TagOptions(self, "OrgTagOptions",
      allowed_values_for_tags={
          "Group": ["finance", "engineering", "marketing", "research"],
          "CostCenter": ["01", "02", "03"]
      }
  )
  portfolio.associate_tag_options(tag_options_for_portfolio)
  tag_options_for_product = servicecatalog.TagOptions(self, "ProductTagOptions",
      allowed_values_for_tags={
          "Environment": ["dev", "alpha", "prod"]
      }
  )
  product.associate_tag_options(tag_options_for_product)
  ```

  Constraints are governance gestures that you place on product-portfolio associations that allow you to manage minimal launch permissions, notifications, and other optional actions that end users can perform on products.
  Using the CDK, if you do not explicitly associate a product to a portfolio and add a constraint, it will automatically add an association for you.
  There are rules around how constraints are applied to portfolio-product associations.
  For example, you can only have a single "launch role" constraint applied to a portfolio-product association.
  If a misconfigured constraint is added, `synth` will fail with an error message.
  Read more at [Service Catalog Constraints](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints.html).

  Tag update constraints allow or disallow end users to update tags on resources associated with an AWS Service Catalog product upon provisioning.
  By default, if a Tag Update constraint is not configured, tag updating is not permitted.
  If tag updating is allowed, then new tags associated with the product or portfolio will be applied to provisioned resources during a provisioned product update.
  ```python


  portfolio.add_product(product)
  portfolio.constrain_tag_updates(product)
  ```
  If you want to disable this feature later on, you can update it by setting the "allow" parameter to `false`:
  ```python



  portfolio.constrain_tag_updates(product,
      allow=False
  )
  ```

  Allows users to subscribe an AWS `SNS` topic to a provisioned product's CloudFormation stack events.
  When an end user provisions a product it creates a CloudFormation stack that notifies the subscribed topic on creation, edit, and delete events.
  An individual `SNS` topic may only have a single subscription to any given portfolio-product association.
  ```python
  import aws_cdk.aws_sns as sns


  topic1 = sns.Topic(self, "Topic1")
  portfolio.notify_on_stack_events(product, topic1)
  topic2 = sns.Topic(self, "Topic2")
  portfolio.notify_on_stack_events(product, topic2,
      description="description for topic2"
  )
  ```

  CloudFormation template parameter constraints allow you to configure the provisioning parameters that are available to end users when they launch a product.
  Template constraint rules consist of one or more assertions that define the default and/or allowable values for a product’s provisioning parameters.
  You can configure multiple parameter constraints to govern the different provisioning parameters within your products.
  For example, a rule might define the `EC2` instance types that users can choose from when launching a product that includes one or more `EC2` instances.
  Parameter rules have an optional `condition` field that allow for rule application to consider conditional evaluations.
  If a `condition` is specified, all  assertions will be applied if the condition evaluates to true.
  For information on rule-specific intrinsic functions to define rule conditions and assertions,
  see [AWS Rule Functions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-rules.html).
  ```python
  import aws_cdk as cdk


  portfolio.constrain_cloud_formation_parameters(product,
      rule=servicecatalog.TemplateRule(
          rule_name="testInstanceType",
          condition=cdk.Fn.condition_equals(cdk.Fn.ref("Environment"), "test"),
          assertions=[servicecatalog.TemplateRuleAssertion(
              assert=cdk.Fn.condition_contains(["t2.micro", "t2.small"], cdk.Fn.ref("InstanceType")),
              description="For test environment, the instance type should be small"
          )]
      )
  )
  ```

  Allows you to configure a specific `IAM` role that Service Catalog assumes on behalf of the end user when launching a product.
  By setting a launch role constraint, you can maintain least permissions for an end user when launching a product.
  For example, a launch role can grant permissions for specific resource creation like an `S3` bucket that the user.
  The launch role must be assumed by the Service Catalog principal.
  You can only have one launch role set for a portfolio-product association,
  and you cannot set a launch role on a product that already has a StackSets deployment configured.
  ```python
  import aws_cdk.aws_iam as iam


  launch_role = iam.Role(self, "LaunchRole",
      assumed_by=iam.ServicePrincipal("servicecatalog.amazonaws.com")
  )
  portfolio.set_launch_role(product, launch_role)
  ```
  You can also set the launch role using just the name of a role which is locally deployed in end user accounts.
  This is useful for when roles and users are separately managed outside of the CDK.
  The given role must exist in both the account that creates the launch role constraint,
  as well as in any end user accounts that wish to provision a product with the launch role.
  You can do this by passing in the role with an explicitly set name:
  ```python
  import aws_cdk.aws_iam as iam


  launch_role = iam.Role(self, "LaunchRole",
      role_name="MyRole",
      assumed_by=iam.ServicePrincipal("servicecatalog.amazonaws.com")
  )
  portfolio.set_local_launch_role(product, launch_role)
  ```
  Or you can simply pass in a role name and CDK will create a role with that name that trusts service catalog in the account:
  ```python
  import aws_cdk.aws_iam as iam


  role_name = "MyRole"
  launch_role = portfolio.set_local_launch_role_name(product, role_name)
  ```
  See [Launch Constraint](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-launch.html) documentation
  to understand the permissions that launch roles need.

  A StackSets deployment constraint allows you to configure product deployment options using
  [AWS CloudFormation StackSets](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/using-stacksets.html).
  You can specify one or more accounts and regions into which stack instances will launch when the product is provisioned.
  There is an additional field `allowStackSetInstanceOperations` that sets ability for end users to create, edit, or delete the stacks created by the StackSet.
  By default, this field is set to `false`.
  When launching a StackSets product, end users can select from the list of accounts and regions configured in the constraint to determine where the Stack Instances will deploy and the order of deployment.
  You can only define one StackSets deployment configuration per portfolio-product association,
  and you cannot both set a launch role and StackSets deployment configuration for an assocation.
  ```python
  import aws_cdk.aws_iam as iam


  admin_role = iam.Role(self, "AdminRole",
      assumed_by=iam.AccountRootPrincipal()
  )
  portfolio.deploy_with_stack_sets(product,
      accounts=["012345678901", "012345678902", "012345678903"],
      regions=["us-west-1", "us-east-1", "us-west-2", "us-east-1"],
      admin_role=admin_role,
      execution_role_name="SCStackSetExecutionRole",  # Name of role deployed in end users accounts.
      allow_stack_set_instance_operations=True
  )
  ```


pkgId: 9b6501d86c47a7a7b3742305229ea8626becca2104849b3b392db22eddad2733
name: python-aws-cdk.aws-servicecatalogappregistry-alpha
arch: src
version: 2.162.1a0
epoch: 0
release: 1
summary: The CDK Construct Library for AWS::ServiceCatalogAppRegistry
url: https://github.com/aws/aws-cdk
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
location_href: Packages/python-aws-cdk.aws-servicecatalogappregistry-alpha-2.162.1a0-1.src.rpm
checksum_type: sha256
description:
  <!--END STABILITY BANNER-->
  [AWS Service Catalog App Registry](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/appregistry.html)
  enables organizations to create and manage repositories of applications and associated resources.

  * [Application](#application)
  * [Application-Associator](#application-associator)
  * [Attribute-Group](#attribute-group)
  * [Associations](#associations)
    * [Associating application with an attribute group](#attribute-group-association)
    * [Associating application with a stack](#resource-association)
  * [Sharing](#sharing)
    * [Sharing an application](#sharing-an-application)
    * [Sharing an attribute group](#sharing-an-attribute-group)
  The `@aws-cdk/aws-servicecatalogappregistry-alpha` package contains resources that enable users to automate governance and management of their AWS resources at scale.
  ```python
  import aws_cdk.aws_servicecatalogappregistry_alpha as appreg
  ```

  An AppRegistry application enables you to define your applications and associated resources.
  The application name must be unique at the account level and it's immutable.
  ```python
  application = appreg.Application(self, "MyFirstApplication",
      application_name="MyFirstApplicationName",
      description="description for my application"
  )
  ```
  An application that has been created outside of the stack can be imported into your CDK app.
  Applications can be imported by their ARN via the `Application.fromApplicationArn()` API:
  ```python
  imported_application = appreg.Application.from_application_arn(self, "MyImportedApplication", "arn:aws:servicecatalog:us-east-1:012345678910:/applications/0aqmvxvgmry0ecc4mjhwypun6i")
  ```

  `ApplicationAssociator` defines an AppRegistry application to contain all the stacks in deployed through your cdk package. This helps to manage all the
  cdk deployed resources.

  If you want to create an Application named `MyAssociatedApplication` in account `123456789012` and region `us-east-1`
  and want to associate all stacks in the `App` scope to `MyAssociatedApplication`, then use as shown in the example below:
  ```python
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.create_application_stack(
          application_name="MyAssociatedApplication",
          
          application_description="Associated Application description",
          stack_name="MyAssociatedApplicationStack",
          
          env=Environment(account="123456789012", region="us-east-1")
      )]
  )
  ```
  This will create a stack `MyAssociatedApplicationStack` containing an application `MyAssociatedApplication`
  with the `TagKey` as `managedBy` and `TagValue` as `CDK_Application_Associator`.
  By default, the stack will have System Managed Application Manager console URL as its output for the application created.
  If you want to remove the output, then use as shown in the example below:
  ```python
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.create_application_stack(
          application_name="MyAssociatedApplication",
          
          application_description="Associated Application description",
          stack_name="MyAssociatedApplicationStack",
          
          emit_application_manager_url_as_output=False,
          
          env=Environment(account="123456789012", region="us-east-1")
      )]
  )
  ```

  If you want to re-use an existing Application with ARN: `arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId`
  and want to associate all stacks in the `App` scope to your imported application, then use as shown in the example below:
  ```python
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.existing_application_from_arn(
          application_arn_value="arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId",
          stack_name="MyAssociatedApplicationStack"
      )]
  )
  ```

  If you want to associate an Attribute Group with application created by `ApplicationAssociator`, then use as shown in the example below:
  ```python
  import aws_cdk as cdk
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.create_application_stack(
          application_name="MyAssociatedApplication",
          
          application_description="Associated Application description",
          stack_name="MyAssociatedApplicationStack",
          
          env=cdk.Environment(account="123456789012", region="us-east-1")
      )]
  )

  associated_app.app_registry_application.add_attribute_group("MyAttributeGroup",
      attribute_group_name="MyAttributeGroupName",
      description="Test attribute group",
      attributes={}
  )
  ```

  If you are using CDK Pipelines to deploy your application, the application stacks will be inside Stages, and
  ApplicationAssociator will not be able to find them. Call `associateStage` on each Stage object before adding it to the
  Pipeline, as shown in the example below:
  ```python
  import aws_cdk as cdk
  import aws_cdk.pipelines as codepipeline
  import aws_cdk.aws_codecommit as codecommit



  class ApplicationPipelineStack(cdk.Stack):
      def __init__(self, scope, id, *, application, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
          super().__init__(scope, id, application=application, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)
          
          application.associate_stage(beta)
          pipeline.add_stage(beta)
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.create_application_stack(
          application_name="MyPipelineAssociatedApplication",
          stack_name="MyPipelineAssociatedApplicationStack",
          env=cdk.Environment(account="123456789012", region="us-east-1")
      )]
  )
  cdk_pipeline = ApplicationPipelineStack(app, "CDKApplicationPipelineStack",
      application=associated_app,
      env=cdk.Environment(account="123456789012", region="us-east-1")
  )
  ```

  By default, ApplicationAssociator will not perform cross-account stack associations with the target Application,
  to avoid deployment failures for accounts which have not been setup for cross-account associations.
  To enable cross-account stack associations, make sure all accounts are in the same organization as the
  target Application's account and that resource sharing is enabled within the organization.
  If you wish to turn on cross-account sharing and associations, set the `associateCrossAccountStacks` field to `true`,
  as shown in the example below:
  ```python
  app = App()
  associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication",
      applications=[appreg.TargetApplication.create_application_stack(
          associate_cross_account_stacks=True,
          application_name="MyAssociatedApplication",
          env=Environment(account="123456789012", region="us-east-1")
      )]
  )
  ```

  Currently, cross-region stack association is not supported.

  An AppRegistry attribute group acts as a container for user-defined attributes for an application.
  Metadata is attached in a machine-readable format to integrate with automated workflows and tools.
  The attribute group name must be unique at the account level and it's immutable.
  ```python
  attribute_group = appreg.AttributeGroup(self, "MyFirstAttributeGroup",
      attribute_group_name="MyFirstAttributeGroupName",
      description="description for my attribute group",  # the description is optional,
      attributes={
          "project": "foo",
          "team": ["member1", "member2", "member3"],
          "public": False,
          "stages": {
              "alpha": "complete",
              "beta": "incomplete",
              "release": "not started"
          }
      }
  )
  ```
  An attribute group that has been created outside of the stack can be imported into your CDK app.
  Attribute groups can be imported by their ARN via the `AttributeGroup.fromAttributeGroupArn()` API:
  ```python
  imported_attribute_group = appreg.AttributeGroup.from_attribute_group_arn(self, "MyImportedAttrGroup", "arn:aws:servicecatalog:us-east-1:012345678910:/attribute-groups/0aqmvxvgmry0ecc4mjhwypun6i")
  ```

  You can associate your appregistry application with attribute groups and resources.
  Resources are CloudFormation stacks that you can associate with an application to group relevant
  stacks together to enable metadata rich insights into your applications and resources.
  A Cloudformation stack can only be associated with one appregistry application.
  If a stack is associated with multiple applications in your app or is already associated with one,
  CDK will fail at deploy time.

  You can create and associate an attribute group to an application with the `addAttributeGroup()` API:
  ```python


  application.add_attribute_group("MyAttributeGroupId",
      attribute_group_name="MyAttributeGroupName",
      description="Test attribute group",
      attributes={}
  )
  ```

  You can associate an application with an attribute group with `associateWith`:
  ```python


  attribute_group.associate_with(application)
  ```

  You can associate a stack with an application with the `associateApplicationWithStack()` API:
  ```python

  app = App()
  my_stack = Stack(app, "MyStack")
  application.associate_application_with_stack(my_stack)
  ```

  You can share your AppRegistry applications and attribute groups with AWS Organizations, Organizational Units (OUs), AWS accounts within an organization, as well as IAM roles and users. AppRegistry requires that AWS Organizations is enabled in an account before deploying a share of an application or attribute group.

  ```python
  import aws_cdk.aws_iam as iam



  application.share_application("MyShareId",
      name="MyShare",
      accounts=["123456789012"],
      organization_arns=["arn:aws:organizations::123456789012:organization/o-my-org-id"],
      roles=[my_role],
      users=[my_user]
  )
  ```
  E.g., sharing an application with multiple accounts and allowing the accounts to associate resources to the application.
  ```python
  import aws_cdk.aws_iam as iam

  application.share_application("MyShareId",
      name="MyShare",
      accounts=["123456789012", "234567890123"],
      share_permission=appreg.SharePermission.ALLOW_ACCESS
  )
  ```

  ```python
  import aws_cdk.aws_iam as iam



  attribute_group.share_attribute_group("MyShareId",
      name="MyShare",
      accounts=["123456789012"],
      organization_arns=["arn:aws:organizations::123456789012:organization/o-my-org-id"],
      roles=[my_role],
      users=[my_user]
  )
  ```
  E.g., sharing an application with multiple accounts and allowing the accounts to associate applications to the attribute group.
  ```python
  import aws_cdk.aws_iam as iam

  attribute_group.share_attribute_group("MyShareId",
      name="MyShare",
      accounts=["123456789012", "234567890123"],
      share_permission=appreg.SharePermission.ALLOW_ACCESS
  )
  ```


