- 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 | |
---|---|
cdcStrategy |
Optional. The CDC strategy of the stream. If not set, the system's default value will be used. |
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: |
|
mostRecentStartPosition |
Optional. Start replicating from the most recent position in the source. |
nextAvailableStartPosition |
Optional. Resume replication from the next available position in the source. |
specificStartPosition |
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
|
|
mysqlLogPosition |
MySQL specific log position to start replicating from. |
oracleScnPosition |
Oracle SCN to start replicating from. |
MysqlLogPosition
MySQL log position
JSON representation |
---|
{ "logFile": string, "logPosition": integer } |
Fields | |
---|---|
logFile |
Required. The binary log file name. |
logPosition |
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 |