- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- CdcStrategy
- MostRecentStartPosition
- NextAvailableStartPosition
- SpecificStartPosition
- MysqlLogPosition
- OracleScnPosition
- Examples
Use this method to start, resume or recover a stream with a non default CDC strategy.
HTTP request
POST https://datastream.googleapis.com/v1/{name}:run
Path parameters
Parameters | |
---|---|
name |
Required. Name of the stream resource to start, in the format: projects/{projectId}/locations/{location}/streams/{stream_name} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"cdcStrategy": {
object ( |
Fields | |
---|---|
cdc |
Optional. The CDC strategy of the stream. If not set, the system's default value will be used. |
force |
Optional. Update the stream without validating it. |
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
CdcStrategy
The strategy that the stream uses for CDC replication.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field start_position . The position to start reading from when starting, resuming, or recovering the stream. If not set, the system's default value will be used. start_position can be only one of the following: |
|
most |
Optional. Start replicating from the most recent position in the source. |
next |
Optional. Resume replication from the next available position in the source. |
specific |
Optional. Start replicating from a specific position in the source. |
MostRecentStartPosition
This type has no fields.
CDC strategy to start replicating from the most recent position in the source.
NextAvailableStartPosition
This type has no fields.
CDC strategy to resume replication from the next available position in the source.
SpecificStartPosition
CDC strategy to start replicating from a specific position in the source.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
mysql |
MySQL specific log position to start replicating from. |
oracle |
Oracle SCN to start replicating from. |
MysqlLogPosition
MySQL log position
JSON representation |
---|
{ "logFile": string, "logPosition": integer } |
Fields | |
---|---|
log |
Required. The binary log file name. |
log |
Optional. The position within the binary log file. Default is head of file. |
OracleScnPosition
Oracle SCN position
JSON representation |
---|
{ "scn": string } |
Fields | |
---|---|
scn |
Required. SCN number from where Logs will be read |