選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

ListStreams - Amazon Kinesis Data Streams Service
此頁面尚未翻譯為您的語言。 請求翻譯

ListStreams

Lists your Kinesis data streams.

The number of streams may be too large to return from a single call to ListStreams. You can limit the number of returned streams using the Limit parameter. If you do not specify a value for the Limit parameter, Kinesis Data Streams uses the default limit, which is currently 100.

You can detect if there are more streams available to list by using the HasMoreStreams flag from the returned output. If there are more streams available, you can request more streams by using the name of the last stream returned by the ListStreams request in the ExclusiveStartStreamName parameter in a subsequent request to ListStreams. The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all the stream names have been collected in the list.

ListStreams has a limit of five transactions per second per account.

Request Syntax

{ "ExclusiveStartStreamName": "string", "Limit": number, "NextToken": "string" }

Request Parameters

The request accepts the following data in JSON format.

ExclusiveStartStreamName

The name of the stream to start the list with.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9_.-]+

Required: No

Limit

The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 10000.

Required: No

NextToken

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1048576.

Required: No

Response Syntax

{ "HasMoreStreams": boolean, "NextToken": "string", "StreamNames": [ "string" ], "StreamSummaries": [ { "StreamARN": "string", "StreamCreationTimestamp": number, "StreamModeDetails": { "StreamMode": "string" }, "StreamName": "string", "StreamStatus": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

HasMoreStreams

If set to true, there are more streams available to list.

Type: Boolean

NextToken

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1048576.

StreamNames

The names of the streams that are associated with the AWS account making the ListStreams request.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9_.-]+

StreamSummaries

Type: Array of StreamSummary objects

Errors

For information about the errors that are common to all actions, see Common Errors.

ExpiredNextTokenException

The pagination token passed to the operation is expired.

HTTP Status Code: 400

InvalidArgumentException

A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.

HTTP Status Code: 400

LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

HTTP Status Code: 400

Examples

To list your streams

The following JSON example lists your streams, starting with the specified stream.

Sample Request

POST / HTTP/1.1 Host: kinesis.<region>.<domain> Content-Length: <PayloadSizeBytes> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Authorization: <AuthParams> Connection: Keep-Alive X-Amz-Date: <Date> X-Amz-Target: Kinesis_20131202.ListStreams

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "HasMoreStreams": false, "StreamNames": [ "exampleStreamName" ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。