IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Create data stream API
edit
A newer version is available. Check out the latest documentation.
Create data stream API
editCreates a new data stream.
resp = client.indices.create_data_stream(
name="my-data-stream",
)
print(resp)
response = client.indices.create_data_stream( name: 'my-data-stream' ) puts response
const response = await client.indices.createDataStream({
name: "my-data-stream",
});
console.log(response);
PUT /_data_stream/my-data-stream
Request
editPUT /_data_stream/<data-stream>
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have the
create_indexormanageindex privilege for the data stream. - A matching index template with data stream enabled. See Set up a data stream.
Path parameters
edit-
<data-stream> -
(Required, string) Name of the data stream to create. Data stream names must meet the following criteria:
- Lowercase only
-
Cannot include
\,/,*,?,",<,>,|,,,#,:, or a space character -
Cannot start with
-,_,+, or.ds- -
Cannot be
.or.. - Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.