API Actions: AlterRedshiftReplication

API Actions: AlterRedshiftReplication

 

Request Syntax for AccessType=AccessKeys:

XML

POST /api/AlterRedshiftReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<AlterRedshiftReplicationRequest>
	<ReplicationId>594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763</ReplicationId>
        <ReplicationName>Friendly Replication Job Name</ReplicationName><!-- Supported in 12.143 and above. Initially defaulted to source DB name. it cannot be specified in CreateRedshiftReplication -->
	<SourceConnectionString>Data Source=your-source-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******</SourceConnectionString>
	<DestinationConnectionString>Data Source=your-destination-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******</DestinationConnectionString>
	<DataReplication>true</DataReplication>
	<SchemaReplication>false</SchemaReplication>
	<ParallelTablesLimit>20</ParallelTablesLimit>
	<ChangeTrackingBatchLimit>100000</ChangeTrackingBatchLimit>
	<CtProcessTimeoutInMinutes>60</CtProcessTimeoutInMinutes>
	<SerializedCtProcessTimeoutInMinutes>60</SerilizedCtProcessTimeoutInMinutesSerialize>
	<AutoSerializedCtProcessTimeoutInMinutes>60</AutoSerializedCtProcessTimeoutInMinutes>
	<IsContinuous>false</IsContinuous>
	<RepeatIntervalInMinutes>5</RepeatIntervalInMinutes> 
	<ScheduleIntervalTimeFrom>12:20:00 AM</ScheduleIntervalTimeFrom>
	<ScheduleIntervalTimeTo>11:59:59 PM</ScheduleIntervalTimeTo>
	<IsLogErrorsOnly>false</IsLogErrorsOnly>
        <AlertOnSuccessfulTableSchemaChanges>true</AlertOnSuccessfulTableSchemaChanges> <!-- 12.211 and above - Activate info alerts to report successfully applied table schema changes which results into Redshift tables schema changes -->
	<TablesToInclude>[dbo].[Departments],[dbo].[Managers],[dbo].[Employees]</TablesToInclude>
	<Redshift>
		<AccessType>AccessKey</AccessType>
		<AccessKey>AKIAIK5IR2D555AV4RFA</AccessKey>
		<SecretKey>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</SecretKey>
		<BucketName>cbr-test</BucketName>
		<BucketFolderName>/SCD/11232017/TestDBAll_1</BucketFolderName>
		<RegionEndpoint>us-east-1</RegionEndpoint>
		<RetentionDays>5</RetentionDays>
		<Url>your-url</Url>
		<DatabaseName>TestDBAll_3</DatabaseName>
		<DatabaseSchema>test1</DatabaseSchema>
		<Username>user-name</Username>
		<Password>********</Password>
		<ScdType>Type1</ScdType>
		<TimeoutInMins>60</TimeoutInMins>
	</Redshift>
</AlterRedshiftReplicationRequest>

JSON

POST /api/AlterRedshiftReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
{
	"replicationId": 594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763,
	"sourceConnectionString": "Data Source=your-source-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******",
	"destinationConnectionString": "Data Source=your-destination-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******",
	"dataReplication": "true",
	"schemaReplication": "false",
	"parallelTablesLimit": "20",
	"changeTrackingBatchLimit": "100000",
	"ctProcessTimeoutInMinutes": "60",
	"serializedCtProcessTimeoutInMinutes": "60",
	"autoSerializedCtProcessTimeoutInMinutes": "60",
	"isContinuous": "false",
	"repeatIntervalInMinutes": "5",
	"scheduleIntervalTimeFrom": "12:20:00 AM",
	"scheduleIntervalTimeTo": "11:59:59 PM",
	"isLogErrorsOnly": "false",
	"redshift": {
		"accessType": "AccessKey",
		"accessKey": "AKIAIK5IR2D555AV4RFA",
		"secretKey": "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",
		"bucketName": "cbr-test",
		"bucketFolderName": "/SCD/11232017/TestDBAll_1",
		"regionEndpoint": "us-east-1",
		"retentionDays": 5,
		"url": "your-url",
		"databaseSchema": "test1",
		"databaseName": "TestDBAll_3",
		"username": "your-user-name",
		"password": "******",
		"scdType": "Type1",
		"timeoutInMins": 60
	},
	"tablesToInclude": "[dbo].[Departments],[dbo].[Managers],[dbo].[Employees]"
}


Request Syntax for AccessType=IAMRole:

XML

POST /api/AlterRedshiftReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

<AlterRedshiftReplicationRequest>
	<ReplicationId>594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763</ReplicationId>
	<SourceConnectionString>Data Source=your-source-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******</SourceConnectionString>
	<DestinationConnectionString>Data Source=your-destination-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******</DestinationConnectionString>
	<DataReplication>true</DataReplication>
	<SchemaReplication>false</SchemaReplication>
	<ParallelTablesLimit>20</ParallelTablesLimit>
	<ChangeTrackingBatchLimit>100000</ChangeTrackingBatchLimit>
	<CtProcessTimeoutInMinutes>60</CtProcessTimeoutInMinutes>
	<SerializedCtProcessTimeoutInMinutes>60</SerilizedCtProcessTimeoutInMinutesSerialize>
	<AutoSerializedCtProcessTimeoutInMinutes>60</AutoSerializedCtProcessTimeoutInMinutes>
	<IsContinuous>false</IsContinuous>
	<RepeatIntervalInMinutes>5</RepeatIntervalInMinutes> 
	<ScheduleIntervalTimeFrom>12:20:00 AM</ScheduleIntervalTimeFrom>
	<ScheduleIntervalTimeTo>11:59:59 PM</ScheduleIntervalTimeTo>
	<IsLogErrorsOnly>false</IsLogErrorsOnly>
 	<TablesToInclude>[dbo].[Departments],[dbo].[Managers],[dbo].[Employees]</TablesToInclude>
	<Redshift>
		<AccessType>IAMRole</AccessType> 
		<AccountId>AKIAIK5IR2D555AV4RFA</AccountId>
		<RoleName>XrMEaWGywbZtPbtWm1TBmwUxkV5Ovm6tJEsuy+4X</RoleName>
		<BucketName>cbr-test</BucketName>
		<BucketFolderName>/SCD/11232017/TestDBAll_1</BucketFolderName>
		<RegionEndpoint>us-east-1</RegionEndpoint>
		<RetentionDays>5</RetentionDays>
		<Url>your-url</Url>
		<DatabaseName>TestDBAll_3</DatabaseName>
		<DatabaseSchema>test1</DatabaseSchema>
		<Username>your-user-name</Username>
		<Password>********</Password>
		<ScdType>Type1</ScdType>
		<TimeoutInMins>60</TimeoutInMins>
	</Redshift>
	<ReseedingSchedule>
		<NoPkTablesToInclude>[dbo].[NoPkTable1], [dbo].[NoPkTable2]</NoPkTablesToInclude>
		<PkTablesToInclude>[dbo].[PkTable1], [dbo].[PkTable2]</PkTablesToInclude>
		<FromTime>12:00:00 AM</FromTime>
		<ToTime>11:59:59 PM</ToTime>
		<RepeatIntervalInMinutes>120</RepeatIntervalInMinutes>
	</ReseedingSchedule>
</AlterRedshiftReplicationRequest>

JSON

POST /api/AlterRedshiftReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

{
	"replicationId": 594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763,
	"sourceConnectionString": "Data Source=your-source-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******",
	"destinationConnectionString": "Data Source=your-destination-db-server;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=user-name;Password=*******",
	"dataReplication": "true",
	"schemaReplication": "false",
	"parallelTablesLimit": "20",
	"changeTrackingBatchLimit": "100000",
	"ctProcessTimeoutInMinutes": "60",
	"serializedCtProcessTimeoutInMinutes": "60",
	"autoSerializedCtProcessTimeoutInMinutes": "60",
	"isContinuous": "false",
	"repeatIntervalInMinutes": "5",
	"scheduleIntervalTimeFrom": "12:20:00 AM",
	"scheduleIntervalTimeTo": "11:59:59 PM",
	"isLogErrorsOnly": "false",
	"redshift": {
		"accessType": "IAMRole",
		"accountId": "AKIAIK5IR2D555AV4RFA",
		"roleName": "XrMEaWGywbZtPbtWm1TBmwUxkV5Ovm6tJEsuy+4X",
		"bucketName": "cbr-test",
		"bucketFolderName": "/SCD/11232017/TestDBAll_1",
		"regionEndpoint": "us-east-1",
		"retentionDays": 5,
		"url": "your-url",
		"databaseSchema": "test1",
		"databaseName": "TestDBAll_3",
		"username": "your-user-name",
		"password": "******",
		"scdType": "Type1",
		"timeoutInMins": 60
	},
	"tablesToInclude": "[dbo].[Departments],[dbo].[Managers],[dbo].[Employees]",
	"reseedingSchedule": {
		"noPkTablesToInclude": "[dbo].[NoPkTable1], [dbo].[NoPkTable2]",
		"pkTablesToInclude": "[dbo].[PkTable1], [dbo].[PkTable2]",
		"fromTime": "12:00:00 AM",
		"toTime": "11:59:59 PM",
		"repeatIntervalInMinutes": "120"
	}
}

Request Parameters

Parameter Description Required
ReplicationId The ReplicationID returned in the CreateReplication response. Yes
Type: String
Default: None
SourceConnectionString Pass this tag only if altering source connection string; i.e. changing login and/or password. No
Type: String
Default: None
DestinationConnectionString Pass this tag only if altering destination/replica connection string; i.e. changing login and/or password. No
Type: String
Default: None
DataReplication Pass this tag only if turning off/on the replication.
Important: If need to stop/start all replications, use StopReplicationService/StartReplication instead.
No
Type: String
Default: None
Valid value: true/ false
SchemaReplication Pass this tag only if turning off/on schema replication. No
Type: String
Default: None
Valid value: true/ false
ParallelTablesLimit Pass this tag only if altering parallel tables limit (max number of tables replicated concurrently; lower number decreases workload on source & destination servers but might increase latency. No
Type: Integer
Default: None
ChangeTrackingBatchLimit Pass this tag only if altering change tracking batch limit (number of records per table extracted at once; default=500,000; this parameter controls workload on source server in case of high volume of changes (i.e. 1mil per min bulkload). Yes
Type: Integer
Default: 500000
CtProcessTimeoutInMinutes Change Tracking (Ct) Time out (in minutes). If a Ct process runs longer than the specified time (default=30 minutes), it will be canceled. If Ct is canceled due to exceeded timeout, next Ct processes will run with doubled previous timeout. If canceled again, timeout will be doubled again. if timeout is exceed 3rd time, then Ct process with be launched without a timeout. Upon successful Ct run, timeout will be adjusted back to the originally specified. Yes
Type: Integer
Default: 30
SerializedCtProcessTimeoutInMinutes If Serialization (Serialized Replication Execution; parallel replications limit=1; see AlterConfiguration API method's tags SerializeReplications & ParallelDatabaseReplicationsLimit) is activated in UI or via the AlterConfiguration API method (see tag ParallelDatabaseReplicationsLimit), launch next transfer in queue, if this transfer is running for longer than the specified time. Default is 30 minutes. Yes
Type: Integer
Default: 30
AutoSerializedCtProcessTimeoutInMinutes If Serialization (Serialize Schedule Execution) is system activated (due to server restart in order to avoid server overloading in case of large number of concurrent DB replications), next change tracking replication in the queue will be launched in parallel, if the current process is running for longer than the specified timeout. Default is 30 minutes. Yes
Type: Integer
Default: 30
IsContinuous CreateReplication sets this value to true by default in order for each DB replication to run continuously with lowest possible latency. If by any reason the replication needs to run in specified intervals (such as to reduce load on primary server), alter this value to false, and specify the interval in RepeatIntervalInMinutes. Yes
Type: String
Default: None
Valid value: true/ false
RepeatIntervalInMinutes Applicable only if IsContinuous=false. Specifies the replication process runs interval if the default continuous replication setup need to be changed (i.e. to reduce load on primary). Yes
Type: Integer
Default: None
ScheduleIntervalTimeFrom If the replication process does not have to run 24h, the default schedule start time can be altered. Yes
Type: String
Default: None
ScheduleIntervalTimeTo If the replication process does not have to run 24h, the default schedule end time can be altered. Yes
Type: String
Default: None
IsLogErrorsOnly By default the continuous replication setup is created to not log runtime log details (only errors/warnings are logged). IsLogErrorsOnly=false will enable detailed runtime logging which can help with identifying performance/latency issues. Yes
Type: String
Default: None
Valid value: true/ false
TablesToInclude Pass 'All' to include all tables <TablesToInclude>All</TablesToInclude>. Yes
Type: String
Default: None
Redshift
AccessType The type of access can be either AccessKey or IAMRole. Yes
Type: String
Default: None
Valid value: AccessKey/ IAMRole
AccessKey When the AccessType is set to AccessKey this field must contain the AWS AccessKey that the CloudBasic process will use to write to the specified S3 bucket. Yes
Type: String
Default: None
SecretKey When the AccessType is set to AccessKey this field must contain the AWS SecretKey that the CloudBasic process will use to write to the specified S3 bucket. Yes
Type: String
Default: None
AccountId When the AccessType is set to IAMRole this field must contain the AWS AccountID that the CloudBasic process will use to write to the specified S3 bucket. Yes
Type: String
Default: None
RoleName When the AccessType is set to IAMRole this field must contain the AWS RoleName that the CloudBasic process will use to write to the specified S3 bucket. Yes
Type: String
Default: None
BucketName The AWS S3 bucket name that the CloudBasic process will write to. Yes
Type: String
Default: None
BucketFolderName The folder in the AWS S3 bucket where the CloudBasic process will write. Yes
Type: String
Default: None
RegionEndpoint The name of the AWS Region where the S3 bucket is located. Yes
Type: String
Default: None
RetentionDays Number of the change tracking files will be kept for before the CloudBasic process deletes them. Yes
Type: Integer
Default: None
Url The AWS Redshift cluster end point. Yes
Type: String
Default: None
DatabaseSchema The Schema name of the Redshift database where data should be loaded. Yes
Type: String
Default: None
DatabaseName The Redshift database name where data should be loaded. Yes
Type: String
Default: None
Username The username that the CloudBasic service will use when connecting to the AWS Redshift service. Yes
Type: String
Default: None
Password The password that the CloudBasic service will use when connecting to the AWS Redshift service. Yes
Type: String
Default: None
ScdType The Slowly Changing Dimension Type that this replication is implementing. Yes
Type: String
Default: None
Valid value: Type1/ Type2
TimeoutInMins The timeout length in minutes when communication with Redshift. Yes
Type: Integer
Default: 60
ReseedingSchedule Tables with No Primary Keys Reseeding Schedule List.
Note:
Tables with No Primary Keys (PKs) will be seeded during replication but will not be tracked for changes. If adding PKs is not an option, you can include those tables in the reseeding schedule job for reseeding. See http://GetStarted.cloudbasic.net for more information.
NoPkTablesToInclude Any table without a Primary Key (No PK), regardless of whether it is excluded in <tablestoinclude> list or not, can be included here. Yes
Type: String
Default: None
PkTablesToInclude Only tables with Primary Keys (Pk) NOT included in the <tablestoinclude> list can be included here. Yes
Type: String
Default: None
FromTime Starting time of the period when the reseeding process is allowed to run. Yes
Type: String
Default: None
ToTime Ending time of the period when the reseeding process is allowed to run. Yes
Type: String
Default: None
RepeatIntervalInMinutes Specifies the frequency of execution of the reseeding process in minutes. Yes
Type: Integer
Default: None

Note:
The tag AddUpdateTimestamp is not applicable to an AlterRedshiftReplication request. A system update timestamps field can be added to Redshift tables only during the initial CreateRedshiftReplication request.

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

 

Response Syntax:

HTTP/1.1 200
status: 200
 

 

Response Parameters

None

Error Response Syntax:

XML

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
	<RequestId>request-id</RequestId> 
	<Errors> 
		<Error> {Redshift\BucketName}: Invalid value for BucketName </Error> 
	</Errors> 
</ErrorResponse>

JSON

HTTP/1.1 400
status: 400

{
   "errors": [
       "{Redshift\BucketName}: Invalid value for BucketName"
	],
	"requestId": 20
}