AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.kinesis.getStream
Explore with Pulumi AI
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)
public static Output<GetStreamResult> getStream(GetStreamArgs args, InvokeOptions options)
fn::invoke:
  function: aws:kinesis/getStream:getStream
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Name of the Kinesis Stream.
- Dictionary<string, string>
- Map of tags to assigned to the stream.
- Name string
- Name of the Kinesis Stream.
- map[string]string
- Map of tags to assigned to the stream.
- name String
- Name of the Kinesis Stream.
- Map<String,String>
- Map of tags to assigned to the stream.
- name string
- Name of the Kinesis Stream.
- {[key: string]: string}
- Map of tags to assigned to the stream.
- name str
- Name of the Kinesis Stream.
- Mapping[str, str]
- Map of tags to assigned to the stream.
- name String
- Name of the Kinesis Stream.
- 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.
- KmsKey stringId 
- 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.
- 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.
- StreamMode List<GetDetails Stream Stream Mode Detail> 
- Capacity mode of the data stream. Detailed below.
- 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.
- KmsKey stringId 
- 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.
- []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.
- StreamMode []GetDetails Stream Stream Mode Detail 
- Capacity mode of the data stream. Detailed below.
- 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.
- kmsKey StringId 
- 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.
- 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.
- streamMode List<GetDetails Stream Stream Mode Detail> 
- Capacity mode of the data stream. Detailed below.
- 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.
- kmsKey stringId 
- 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.
- 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.
- streamMode GetDetails Stream Stream Mode Detail[] 
- Capacity mode of the data stream. Detailed below.
- {[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_ strid 
- 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.
- 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_ Sequence[Getdetails Stream Stream Mode Detail] 
- Capacity mode of the data stream. Detailed below.
- 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.
- kmsKey StringId 
- 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.
- 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.
- streamMode List<Property Map>Details 
- Capacity mode of the data stream. Detailed below.
- Map<String>
- Map of tags to assigned to the stream.
Supporting Types
GetStreamStreamModeDetail    
- StreamMode string
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
- StreamMode string
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
- streamMode String
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
- streamMode string
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
- stream_mode str
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
- streamMode String
- Capacity mode of the stream. Either ON_DEMANDorPROVISIONED.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.