Show / Hide Table of Contents

Class FirehoseDeliveryStream

Provides a Kinesis Firehose Delivery Stream resource. Amazon Kinesis Firehose is a fully managed, elastic service to easily deliver real-time data streams to destinations such as Amazon S3 and Amazon Redshift.

For more details, see the Amazon Kinesis Firehose Documentation.

Example Usage

Extended S3 Destination

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
    {
        Acl = "private",
    });
    var firehoseRole = new Aws.Iam.Role("firehoseRole", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": ""sts:AssumeRole"",
  ""Principal"": {
    ""Service"": ""firehose.amazonaws.com""
  },
  ""Effect"": ""Allow"",
  ""Sid"": """"
}
]
}

",
    });
    var lambdaIam = new Aws.Iam.Role("lambdaIam", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": ""sts:AssumeRole"",
  ""Principal"": {
    ""Service"": ""lambda.amazonaws.com""
  },
  ""Effect"": ""Allow"",
  ""Sid"": """"
}
]
}

",
    });
    var lambdaProcessor = new Aws.Lambda.Function("lambdaProcessor", new Aws.Lambda.FunctionArgs
    {
        Code = new FileArchive("lambda.zip"),
        Handler = "exports.handler",
        Role = lambdaIam.Arn,
        Runtime = "nodejs8.10",
    });
    var extendedS3Stream = new Aws.Kinesis.FirehoseDeliveryStream("extendedS3Stream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
    {
        Destination = "extended_s3",
        ExtendedS3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamExtendedS3ConfigurationArgs
        {
            BucketArn = bucket.Arn,
            ProcessingConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamExtendedS3ConfigurationProcessingConfigurationArgs
            {
                Enabled = "true",
                Processors = 
                {
                    new Aws.Kinesis.Inputs.FirehoseDeliveryStreamExtendedS3ConfigurationProcessingConfigurationProcessorArgs
                    {
                        Parameters = 
                        {
                            new Aws.Kinesis.Inputs.FirehoseDeliveryStreamExtendedS3ConfigurationProcessingConfigurationProcessorParameterArgs
                            {
                                ParameterName = "LambdaArn",
                                ParameterValue = lambdaProcessor.Arn.Apply(arn => $"{arn}:$$LATEST"),
                            },
                        },
                        Type = "Lambda",
                    },
                },
            },
            RoleArn = firehoseRole.Arn,
        },
    });
}

}

S3 Destination

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
    {
        Acl = "private",
    });
    var firehoseRole = new Aws.Iam.Role("firehoseRole", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": ""sts:AssumeRole"",
  ""Principal"": {
    ""Service"": ""firehose.amazonaws.com""
  },
  ""Effect"": ""Allow"",
  ""Sid"": """"
}
]
}

",
    });
    var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
    {
        Destination = "s3",
        S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
        {
            BucketArn = bucket.Arn,
            RoleArn = firehoseRole.Arn,
        },
    });
}

}

Redshift Destination

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var testCluster = new Aws.RedShift.Cluster("testCluster", new Aws.RedShift.ClusterArgs
    {
        ClusterIdentifier = "tf-redshift-cluster-%d",
        ClusterType = "single-node",
        DatabaseName = "test",
        MasterPassword = "T3stPass",
        MasterUsername = "testuser",
        NodeType = "dc1.large",
    });
    var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
    {
        Destination = "redshift",
        RedshiftConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationArgs
        {
            ClusterJdbcurl = Output.Tuple(testCluster.Endpoint, testCluster.DatabaseName).Apply(values =>
            {
                var endpoint = values.Item1;
                var databaseName = values.Item2;
                return $"jdbc:redshift://{endpoint}/{databaseName}";
            }),
            CopyOptions = "delimiter '|'",
            DataTableColumns = "test-col",
            DataTableName = "test-table",
            Password = "T3stPass",
            RoleArn = aws_iam_role.Firehose_role.Arn,
            S3BackupConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationS3BackupConfigurationArgs
            {
                BucketArn = aws_s3_bucket.Bucket.Arn,
                BufferInterval = 300,
                BufferSize = 15,
                CompressionFormat = "GZIP",
                RoleArn = aws_iam_role.Firehose_role.Arn,
            },
            S3BackupMode = "Enabled",
            Username = "testuser",
        },
        S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
        {
            BucketArn = aws_s3_bucket.Bucket.Arn,
            BufferInterval = 400,
            BufferSize = 10,
            CompressionFormat = "GZIP",
            RoleArn = aws_iam_role.Firehose_role.Arn,
        },
    });
}

}

Elasticsearch Destination

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var testCluster = new Aws.ElasticSearch.Domain("testCluster", new Aws.ElasticSearch.DomainArgs
    {
    });
    var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
    {
        Destination = "elasticsearch",
        ElasticsearchConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationArgs
        {
            DomainArn = testCluster.Arn,
            IndexName = "test",
            ProcessingConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationArgs
            {
                Enabled = "true",
                Processors = 
                {
                    new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationProcessorArgs
                    {
                        Parameters = 
                        {
                            new Aws.Kinesis.Inputs.FirehoseDeliveryStreamElasticsearchConfigurationProcessingConfigurationProcessorParameterArgs
                            {
                                ParameterName = "LambdaArn",
                                ParameterValue = $"{aws_lambda_function.Lambda_processor.Arn}:$$LATEST",
                            },
                        },
                        Type = "Lambda",
                    },
                },
            },
            RoleArn = aws_iam_role.Firehose_role.Arn,
            TypeName = "test",
        },
        S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
        {
            BucketArn = aws_s3_bucket.Bucket.Arn,
            BufferInterval = 400,
            BufferSize = 10,
            CompressionFormat = "GZIP",
            RoleArn = aws_iam_role.Firehose_role.Arn,
        },
    });
}

}

Splunk Destination

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
    {
        Destination = "splunk",
        S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
        {
            BucketArn = aws_s3_bucket.Bucket.Arn,
            BufferInterval = 400,
            BufferSize = 10,
            CompressionFormat = "GZIP",
            RoleArn = aws_iam_role.Firehose.Arn,
        },
        SplunkConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamSplunkConfigurationArgs
        {
            HecAcknowledgmentTimeout = 600,
            HecEndpoint = "https://http-inputs-mydomain.splunkcloud.com:443",
            HecEndpointType = "Event",
            HecToken = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A",
            S3BackupMode = "FailedEventsOnly",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
FirehoseDeliveryStream
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Kinesis
Assembly: Pulumi.Aws.dll
Syntax
public class FirehoseDeliveryStream : CustomResource

Constructors

View Source

FirehoseDeliveryStream(String, FirehoseDeliveryStreamArgs, CustomResourceOptions)

Create a FirehoseDeliveryStream resource with the given unique name, arguments, and options.

Declaration
public FirehoseDeliveryStream(string name, FirehoseDeliveryStreamArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

FirehoseDeliveryStreamArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) specifying the Stream

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

Destination

This is the destination to where the data is delivered. The only options are s3 (Deprecated, use extended_s3 instead), extended_s3, redshift, elasticsearch, and splunk.

Declaration
public Output<string> Destination { get; }
Property Value
Type Description
Output<System.String>
View Source

DestinationId

Declaration
public Output<string> DestinationId { get; }
Property Value
Type Description
Output<System.String>
View Source

ElasticsearchConfiguration

Configuration options if elasticsearch is the destination. More details are given below.

Declaration
public Output<FirehoseDeliveryStreamElasticsearchConfiguration> ElasticsearchConfiguration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamElasticsearchConfiguration>
View Source

ExtendedS3Configuration

Enhanced configuration options for the s3 destination. More details are given below.

Declaration
public Output<FirehoseDeliveryStreamExtendedS3Configuration> ExtendedS3Configuration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamExtendedS3Configuration>
View Source

KinesisSourceConfiguration

Allows the ability to specify the kinesis stream that is used as the source of the firehose delivery stream.

Declaration
public Output<FirehoseDeliveryStreamKinesisSourceConfiguration> KinesisSourceConfiguration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamKinesisSourceConfiguration>
View Source

Name

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

RedshiftConfiguration

Configuration options if redshift is the destination. Using redshift_configuration requires the user to also specify a s3_configuration block. More details are given below.

Declaration
public Output<FirehoseDeliveryStreamRedshiftConfiguration> RedshiftConfiguration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamRedshiftConfiguration>
View Source

S3Configuration

Required for non-S3 destinations. For S3 destination, use extended_s3_configuration instead. Configuration options for the s3 destination (or the intermediate bucket if the destination is redshift). More details are given below.

Declaration
public Output<FirehoseDeliveryStreamS3Configuration> S3Configuration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamS3Configuration>
View Source

ServerSideEncryption

Encrypt at rest options. Server-side encryption should not be enabled when a kinesis stream is configured as the source of the firehose delivery stream.

Declaration
public Output<FirehoseDeliveryStreamServerSideEncryption> ServerSideEncryption { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamServerSideEncryption>
View Source

SplunkConfiguration

Declaration
public Output<FirehoseDeliveryStreamSplunkConfiguration> SplunkConfiguration { get; }
Property Value
Type Description
Output<FirehoseDeliveryStreamSplunkConfiguration>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VersionId

Specifies the table version for the output data schema. Defaults to LATEST.

Declaration
public Output<string> VersionId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, FirehoseDeliveryStreamState, CustomResourceOptions)

Get an existing FirehoseDeliveryStream resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static FirehoseDeliveryStream Get(string name, Input<string> id, FirehoseDeliveryStreamState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

FirehoseDeliveryStreamState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
FirehoseDeliveryStream
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.