While you can run the Edit a stream operation to update a stream configuration with a complete stream object with all fields mandatory, the Patch a stream operation allows you to conveniently edit selected components of the stream. You can update only the objects with stream details specific for these components, such as destinations or data set fields.
Stream patching supports only the REPLACE
operation from the JSON Patch format. Use the JSON syntax throughout the process, with the path
value being a root member from your configuration object (for example, /destination
, but not /destination/displayName
).
[
{
"op": "replace",
"path": "/destination",
"value":
{
"displayName": "Datadog",
"url": "https://http-intake.logs.datadoghq.com/v1/input/",
"tags": "user:admin",
"source": "java",
"service": "datastream-config-api",
"authToken": "151bc1929d209d2ad1c508f43cc861d1",
"compressLogs": false,
"destinationType": "DATADOG"
}
}
]
This is an example of patching the destination
object of the stream, where the path
value points to the /destination
member from the original configuration object. Provide a complete object of its type as value
, as omitted members will automatically set to default values (for example, null
for tags
, ak
for uploadFilePrefix
, and ds
for uploadFileSuffix
for destinations that support filename prefixes and suffixes). The REPLACE
operation changes the entire object to the value you provide in the request. Ensure the request object contains both the members you want to keep and update in the stream configuration. See Create a stream or Edit a stream for the complete list of members required in the object.
Optionally, set notificationEmail
to null
to stop receiving e-mail notifications about the stream. When you switch from an HTTPS-based destination to an object-based destination, set the deliveryConfig
object to configure custom file prefix and suffix instead of the default values (ak
and ds
). After switching the stream from an object-based destination to an HTTPS-based destination, the file prefix and suffix is automatically set to null
.
Unsupported members
The values for
streamId
,groupId
,productId
,streamVersion
,createdBy
, andstreamForm
members cannot be changed while patching a stream.
Activation status
You can use the activate
member to activate the stream on the production network upon making the request, or save the configuration to activate later.
When patching an inactive stream, set the activate
member to true
to activate the stream upon the request. The stream will change its status to ACTIVATING
, and become ACTIVATED
after about 90 minutes. Set the value to false
to save the stream version as inactive, and activate it later.
Patching an active stream requires setting the activate
member to true
. Any other value will result in an API error. After the request, the stream will change its status to ACTIVATING
and become active on the production network after about 90 minutes. See Deactivate a stream if you want to deactivate your stream before patching.
If you omit the activate
member in the request for an inactive stream, the new stream version will retain the status of the version you're patching. See Version management for details.