Method: projects.locations.streams.run

Use this method to start, resume or recover a stream with a non default CDC strategy. NOTE: This feature is currently experimental.

HTTP request

POST https://datastream.googleapis.com/v1/{name}:run

Path parameters

Parameters
name

string

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 (CdcStrategy)
  }
}
Fields
cdcStrategy

object (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 start_position can be only one of the following:
  "mostRecentStartPosition": {
    object (MostRecentStartPosition)
  },
  "nextAvailableStartPosition": {
    object (NextAvailableStartPosition)
  },
  "specificStartPosition": {
    object (SpecificStartPosition)
  }
  // End of list of possible types for union field start_position.
}
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

object (MostRecentStartPosition)

Optional. Start replicating from the most recent position in the source.

nextAvailableStartPosition

object (NextAvailableStartPosition)

Optional. Resume replication from the next available position in the source.

specificStartPosition

object (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 position can be only one of the following:
  "mysqlLogPosition": {
    object (MysqlLogPosition)
  },
  "oracleScnPosition": {
    object (OracleScnPosition)
  }
  // End of list of possible types for union field position.
}
Fields

Union field position.

position can be only one of the following:

mysqlLogPosition

object (MysqlLogPosition)

MySQL specific log position to start replicating from.

oracleScnPosition

object (OracleScnPosition)

Oracle SCN to start replicating from.

MysqlLogPosition

MySQL log position

JSON representation
{
  "logFile": string,
  "logPosition": integer
}
Fields
logFile

string

Required. The binary log file name.

logPosition

integer

Optional. The position within the binary log file. Default is head of file.

OracleScnPosition

Oracle SCN position

JSON representation
{
  "scn": string
}
Fields
scn

string (int64 format)

Required. SCN number from where Logs will be read