aws-solutions-constructs.aws-iot-kinesisstreams


Nameaws-solutions-constructs.aws-iot-kinesisstreams JSON
Version 2.74.0 PyPI version JSON
download
home_pagehttps://github.com/awslabs/aws-solutions-constructs.git
SummaryCDK Constructs for AWS IoT to AWS Kinesis Data Stream.
upload_time2024-10-22 18:09:36
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python~=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aws-iot-kinesisstreams module

<!--BEGIN STABILITY BANNER-->---


![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

> All classes are under active development and subject to non-backward compatible changes or removal in any
> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.

---
<!--END STABILITY BANNER-->

| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|:-------------|:-------------|

<div style="height:8px"></div>

| **Language**     | **Package**        |
|:-------------|-----------------|
|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_kinesisstreams`|
|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-kinesisstreams`|
|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotkinesisstreams`|

## Overview

This AWS Solutions Construct implements an AWS IoT MQTT topic rule to send data to an Amazon Kinesis Data Stream.

Here is a minimal deployable pattern definition:

Typescript

```python
import { Construct } from 'constructs';
import { Stack, StackProps } from 'aws-cdk-lib';
import { IotToKinesisStreamsProps, IotToKinesisStreams } from '@aws-solutions-constructs/aws-iot-kinesisstreams';

const constructProps: IotToKinesisStreamsProps = {
  iotTopicRuleProps: {
    topicRulePayload: {
      ruleDisabled: false,
      description: "Sends data to kinesis data stream",
      sql: "SELECT * FROM 'solutions/construct'",
      actions: []
    }
  }
};

new IotToKinesisStreams(this, 'test-iot-kinesisstreams', constructProps);
```

Python

```python
from aws_solutions_constructs.aws_iot_kinesisstreams import IotToKinesisStreamsProps, IotToKinesisStreams
from aws_cdk import (
    aws_iot as iot,
    Stack
)
from constructs import Construct

IotToKinesisStreams(self, 'test-iot-kinesisstreams',
                    iot_topic_rule_props=iot.CfnTopicRuleProps(
                        topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
                            rule_disabled=False,
                            description="Sends data to kinesis data stream",
                            sql="SELECT * FROM 'solutions/construct'",
                            actions=[]
                        )
                    ))
```

Java

```java
import software.constructs.Construct;
import java.util.List;

import software.amazon.awscdk.Stack;
import software.amazon.awscdk.StackProps;
import software.amazon.awscdk.services.iot.*;
import software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;
import software.amazon.awsconstructs.services.iotkinesisstreams.*;

new IotToKinesisStreams(this, "test-iot-kinesisstreams", new IotToKinesisStreamsProps.Builder()
        .iotTopicRuleProps(new CfnTopicRuleProps.Builder()
                .topicRulePayload(new TopicRulePayloadProperty.Builder()
                        .ruleDisabled(false)
                        .description("Sends data to kinesis data stream")
                        .sql("SELECT * FROM 'solutions/construct'")
                        .actions(List.of())
                        .build())
                .build())
        .build());
```

## Pattern Construct Props

| **Name**     | **Type**        | **Description** |
|:-------------|:----------------|-----------------|
|iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided CfnTopicRuleProps to override the defaults|
|existingStreamObj?|[`kinesis.Stream`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.Stream.html)|Existing instance of Kinesis Stream, providing both this and `kinesisStreamProps` will cause an error.|
|kinesisStreamProps?|[`kinesis.StreamProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.StreamProps.html)|Optional user-provided props to override the default props for the Kinesis data stream, providing both this and `existingStreamObj` will cause an error|
|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set to `true`|

## Pattern Properties

| **Name**     | **Type**        | **Description** |
|:-------------|:----------------|-----------------|
|iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|
|iotActionsRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for IoT Rule|
|kinesisStream|[`kinesis.Stream`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.Stream.html)|Returns an instance of the Kinesis stream created by the construct.|
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns an array of recommended CloudWatch Alarms created by the construct for Kinesis Data stream|

## Default settings

Out of the box implementation of the Construct without any override will set the following defaults:

### Amazon IoT Rule

* Configure least privilege access IAM role for Amazon IoT Rule

### Amazon Kinesis Data Stream

* Configure recommended CloudWatch Alarms for Amazon Kinesis Data Stream
* Configure least privilege access IAM role for Amazon Kinesis Data Stream

## Architecture

![Architecture Diagram](architecture.png)

---


© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/awslabs/aws-solutions-constructs.git",
    "name": "aws-solutions-constructs.aws-iot-kinesisstreams",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/71/95/492ee45aed3f869921f446f9b09d689362d26c2d6389892cd044448b1b99/aws_solutions_constructs_aws_iot_kinesisstreams-2.74.0.tar.gz",
    "platform": null,
    "description": "# aws-iot-kinesisstreams module\n\n<!--BEGIN STABILITY BANNER-->---\n\n\n![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n\n<div style=\"height:8px\"></div>\n\n| **Language**     | **Package**        |\n|:-------------|-----------------|\n|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_kinesisstreams`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-kinesisstreams`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotkinesisstreams`|\n\n## Overview\n\nThis AWS Solutions Construct implements an AWS IoT MQTT topic rule to send data to an Amazon Kinesis Data Stream.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n\n```python\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { IotToKinesisStreamsProps, IotToKinesisStreams } from '@aws-solutions-constructs/aws-iot-kinesisstreams';\n\nconst constructProps: IotToKinesisStreamsProps = {\n  iotTopicRuleProps: {\n    topicRulePayload: {\n      ruleDisabled: false,\n      description: \"Sends data to kinesis data stream\",\n      sql: \"SELECT * FROM 'solutions/construct'\",\n      actions: []\n    }\n  }\n};\n\nnew IotToKinesisStreams(this, 'test-iot-kinesisstreams', constructProps);\n```\n\nPython\n\n```python\nfrom aws_solutions_constructs.aws_iot_kinesisstreams import IotToKinesisStreamsProps, IotToKinesisStreams\nfrom aws_cdk import (\n    aws_iot as iot,\n    Stack\n)\nfrom constructs import Construct\n\nIotToKinesisStreams(self, 'test-iot-kinesisstreams',\n                    iot_topic_rule_props=iot.CfnTopicRuleProps(\n                        topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(\n                            rule_disabled=False,\n                            description=\"Sends data to kinesis data stream\",\n                            sql=\"SELECT * FROM 'solutions/construct'\",\n                            actions=[]\n                        )\n                    ))\n```\n\nJava\n\n```java\nimport software.constructs.Construct;\nimport java.util.List;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.services.iot.*;\nimport software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;\nimport software.amazon.awsconstructs.services.iotkinesisstreams.*;\n\nnew IotToKinesisStreams(this, \"test-iot-kinesisstreams\", new IotToKinesisStreamsProps.Builder()\n        .iotTopicRuleProps(new CfnTopicRuleProps.Builder()\n                .topicRulePayload(new TopicRulePayloadProperty.Builder()\n                        .ruleDisabled(false)\n                        .description(\"Sends data to kinesis data stream\")\n                        .sql(\"SELECT * FROM 'solutions/construct'\")\n                        .actions(List.of())\n                        .build())\n                .build())\n        .build());\n```\n\n## Pattern Construct Props\n\n| **Name**     | **Type**        | **Description** |\n|:-------------|:----------------|-----------------|\n|iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided CfnTopicRuleProps to override the defaults|\n|existingStreamObj?|[`kinesis.Stream`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.Stream.html)|Existing instance of Kinesis Stream, providing both this and `kinesisStreamProps` will cause an error.|\n|kinesisStreamProps?|[`kinesis.StreamProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.StreamProps.html)|Optional user-provided props to override the default props for the Kinesis data stream, providing both this and `existingStreamObj` will cause an error|\n|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set to `true`|\n\n## Pattern Properties\n\n| **Name**     | **Type**        | **Description** |\n|:-------------|:----------------|-----------------|\n|iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|\n|iotActionsRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for IoT Rule|\n|kinesisStream|[`kinesis.Stream`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kinesis.Stream.html)|Returns an instance of the Kinesis stream created by the construct.|\n|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns an array of recommended CloudWatch Alarms created by the construct for Kinesis Data stream|\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon IoT Rule\n\n* Configure least privilege access IAM role for Amazon IoT Rule\n\n### Amazon Kinesis Data Stream\n\n* Configure recommended CloudWatch Alarms for Amazon Kinesis Data Stream\n* Configure least privilege access IAM role for Amazon Kinesis Data Stream\n\n## Architecture\n\n![Architecture Diagram](architecture.png)\n\n---\n\n\n\u00a9 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "CDK Constructs for AWS IoT to AWS Kinesis Data Stream.",
    "version": "2.74.0",
    "project_urls": {
        "Homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
        "Source": "https://github.com/awslabs/aws-solutions-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54d26d747fce15277e7189a0e42248c76f512c1990c829b50d06433e65867cb4",
                "md5": "9b81a4408ac2c2f2e01dd0de6225084e",
                "sha256": "58eac3b1017753c905afe0167ae9ee0be3ee834ee6a26ee1e9107e2967faff7d"
            },
            "downloads": -1,
            "filename": "aws_solutions_constructs.aws_iot_kinesisstreams-2.74.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b81a4408ac2c2f2e01dd0de6225084e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 69719,
            "upload_time": "2024-10-22T18:07:59",
            "upload_time_iso_8601": "2024-10-22T18:07:59.734680Z",
            "url": "https://files.pythonhosted.org/packages/54/d2/6d747fce15277e7189a0e42248c76f512c1990c829b50d06433e65867cb4/aws_solutions_constructs.aws_iot_kinesisstreams-2.74.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7195492ee45aed3f869921f446f9b09d689362d26c2d6389892cd044448b1b99",
                "md5": "2a48d4e97eb4164c5e206c69595849c2",
                "sha256": "9afab8b76bb2a2b9fb2ff67a2fab9555b58b4b95b1bc9c915875fa6ce1a741e6"
            },
            "downloads": -1,
            "filename": "aws_solutions_constructs_aws_iot_kinesisstreams-2.74.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2a48d4e97eb4164c5e206c69595849c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 70953,
            "upload_time": "2024-10-22T18:09:36",
            "upload_time_iso_8601": "2024-10-22T18:09:36.610144Z",
            "url": "https://files.pythonhosted.org/packages/71/95/492ee45aed3f869921f446f9b09d689362d26c2d6389892cd044448b1b99/aws_solutions_constructs_aws_iot_kinesisstreams-2.74.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-22 18:09:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "awslabs",
    "github_project": "aws-solutions-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aws-solutions-constructs.aws-iot-kinesisstreams"
}
        
Elapsed time: 0.77566s