1. Packages
  2. AWS
  3. API Docs
  4. kinesis
  5. getStream
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.kinesis.getStream

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to get information about a Kinesis Stream for use in other resources.

    For more details, see the Amazon Kinesis Documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const stream = aws.kinesis.getStream({
        name: "stream-name",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    stream = aws.kinesis.get_stream(name="stream-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kinesis.LookupStream(ctx, &kinesis.LookupStreamArgs{
    			Name: "stream-name",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var stream = Aws.Kinesis.GetStream.Invoke(new()
        {
            Name = "stream-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kinesis.KinesisFunctions;
    import com.pulumi.aws.kinesis.inputs.GetStreamArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var stream = KinesisFunctions.getStream(GetStreamArgs.builder()
                .name("stream-name")
                .build());
    
        }
    }
    
    variables:
      stream:
        fn::invoke:
          Function: aws:kinesis:getStream
          Arguments:
            name: stream-name
    

    Using getStream

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getStream(args: GetStreamArgs, opts?: InvokeOptions): Promise<GetStreamResult>
    function getStreamOutput(args: GetStreamOutputArgs, opts?: InvokeOptions): Output<GetStreamResult>
    def get_stream(name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetStreamResult
    def get_stream_output(name: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetStreamResult]
    func LookupStream(ctx *Context, args *LookupStreamArgs, opts ...InvokeOption) (*LookupStreamResult, error)
    func LookupStreamOutput(ctx *Context, args *LookupStreamOutputArgs, opts ...InvokeOption) LookupStreamResultOutput

    > Note: This function is named LookupStream in the Go SDK.

    public static class GetStream 
    {
        public static Task<GetStreamResult> InvokeAsync(GetStreamArgs args, InvokeOptions? opts = null)
        public static Output<GetStreamResult> Invoke(GetStreamInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStreamResult> getStream(GetStreamArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:kinesis/getStream:getStream
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the Kinesis Stream.
    Tags Dictionary<string, string>
    Map of tags to assigned to the stream.
    Name string
    Name of the Kinesis Stream.
    Tags map[string]string
    Map of tags to assigned to the stream.
    name String
    Name of the Kinesis Stream.
    tags Map<String,String>
    Map of tags to assigned to the stream.
    name string
    Name of the Kinesis Stream.
    tags {[key: string]: string}
    Map of tags to assigned to the stream.
    name str
    Name of the Kinesis Stream.
    tags Mapping[str, str]
    Map of tags to assigned to the stream.
    name String
    Name of the Kinesis Stream.
    tags Map<String>
    Map of tags to assigned to the stream.

    getStream Result

    The following output properties are available:

    Arn string
    ARN of the Kinesis Stream (same as id).
    ClosedShards List<string>
    List of shard ids in the CLOSED state. See Shard State for more.
    CreationTimestamp int
    Approximate UNIX timestamp that the stream was created.
    EncryptionType string
    Encryption type used.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    GUID for the customer-managed AWS KMS key to use for encryption.
    Name string
    Name of the Kinesis Stream.
    OpenShards List<string>
    List of shard ids in the OPEN state. See Shard State for more.
    RetentionPeriod int
    Length of time (in hours) data records are accessible after they are added to the stream.
    ShardLevelMetrics List<string>
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    Status string
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    StreamModeDetails List<GetStreamStreamModeDetail>
    Capacity mode of the data stream. Detailed below.
    Tags Dictionary<string, string>
    Map of tags to assigned to the stream.
    Arn string
    ARN of the Kinesis Stream (same as id).
    ClosedShards []string
    List of shard ids in the CLOSED state. See Shard State for more.
    CreationTimestamp int
    Approximate UNIX timestamp that the stream was created.
    EncryptionType string
    Encryption type used.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    GUID for the customer-managed AWS KMS key to use for encryption.
    Name string
    Name of the Kinesis Stream.
    OpenShards []string
    List of shard ids in the OPEN state. See Shard State for more.
    RetentionPeriod int
    Length of time (in hours) data records are accessible after they are added to the stream.
    ShardLevelMetrics []string
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    Status string
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    StreamModeDetails []GetStreamStreamModeDetail
    Capacity mode of the data stream. Detailed below.
    Tags map[string]string
    Map of tags to assigned to the stream.
    arn String
    ARN of the Kinesis Stream (same as id).
    closedShards List<String>
    List of shard ids in the CLOSED state. See Shard State for more.
    creationTimestamp Integer
    Approximate UNIX timestamp that the stream was created.
    encryptionType String
    Encryption type used.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    GUID for the customer-managed AWS KMS key to use for encryption.
    name String
    Name of the Kinesis Stream.
    openShards List<String>
    List of shard ids in the OPEN state. See Shard State for more.
    retentionPeriod Integer
    Length of time (in hours) data records are accessible after they are added to the stream.
    shardLevelMetrics List<String>
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    status String
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    streamModeDetails List<GetStreamStreamModeDetail>
    Capacity mode of the data stream. Detailed below.
    tags Map<String,String>
    Map of tags to assigned to the stream.
    arn string
    ARN of the Kinesis Stream (same as id).
    closedShards string[]
    List of shard ids in the CLOSED state. See Shard State for more.
    creationTimestamp number
    Approximate UNIX timestamp that the stream was created.
    encryptionType string
    Encryption type used.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyId string
    GUID for the customer-managed AWS KMS key to use for encryption.
    name string
    Name of the Kinesis Stream.
    openShards string[]
    List of shard ids in the OPEN state. See Shard State for more.
    retentionPeriod number
    Length of time (in hours) data records are accessible after they are added to the stream.
    shardLevelMetrics string[]
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    status string
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    streamModeDetails GetStreamStreamModeDetail[]
    Capacity mode of the data stream. Detailed below.
    tags {[key: string]: string}
    Map of tags to assigned to the stream.
    arn str
    ARN of the Kinesis Stream (same as id).
    closed_shards Sequence[str]
    List of shard ids in the CLOSED state. See Shard State for more.
    creation_timestamp int
    Approximate UNIX timestamp that the stream was created.
    encryption_type str
    Encryption type used.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_id str
    GUID for the customer-managed AWS KMS key to use for encryption.
    name str
    Name of the Kinesis Stream.
    open_shards Sequence[str]
    List of shard ids in the OPEN state. See Shard State for more.
    retention_period int
    Length of time (in hours) data records are accessible after they are added to the stream.
    shard_level_metrics Sequence[str]
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    status str
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    stream_mode_details Sequence[GetStreamStreamModeDetail]
    Capacity mode of the data stream. Detailed below.
    tags Mapping[str, str]
    Map of tags to assigned to the stream.
    arn String
    ARN of the Kinesis Stream (same as id).
    closedShards List<String>
    List of shard ids in the CLOSED state. See Shard State for more.
    creationTimestamp Number
    Approximate UNIX timestamp that the stream was created.
    encryptionType String
    Encryption type used.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    GUID for the customer-managed AWS KMS key to use for encryption.
    name String
    Name of the Kinesis Stream.
    openShards List<String>
    List of shard ids in the OPEN state. See Shard State for more.
    retentionPeriod Number
    Length of time (in hours) data records are accessible after they are added to the stream.
    shardLevelMetrics List<String>
    List of shard-level CloudWatch metrics which are enabled for the stream. See Monitoring with CloudWatch for more.
    status String
    Current status of the stream. The stream status is one of CREATING, DELETING, ACTIVE, or UPDATING.
    streamModeDetails List<Property Map>
    Capacity mode of the data stream. Detailed below.
    tags Map<String>
    Map of tags to assigned to the stream.

    Supporting Types

    GetStreamStreamModeDetail

    StreamMode string
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.
    StreamMode string
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.
    streamMode String
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.
    streamMode string
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.
    stream_mode str
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.
    streamMode String
    Capacity mode of the stream. Either ON_DEMAND or PROVISIONED.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi