startParticipantReplication method
Starts replicating a publishing participant from a source stage to a destination stage.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter destinationStageArn :
ARN of the stage to which the participant will be replicated.
Parameter participantId :
Participant ID of the publisher that will be replicated. This is assigned
by IVS and returned by CreateParticipantToken or the
jti (JWT ID) used to create
a self signed token.
Parameter sourceStageArn :
ARN of the stage where the participant is publishing.
Parameter attributes :
Application-provided attributes to set on the replicated participant in
the destination stage. Map keys and values can contain UTF-8 encoded text.
The maximum length of this field is 1 KB total. This field is exposed
to all stage participants and should not be used for personally
identifying, confidential, or sensitive information.
These attributes are merged with any attributes set for this participant when creating the token. If there is overlap in keys, the values in these attributes are replaced.
Parameter reconnectWindowSeconds :
If the participant disconnects and then reconnects within the specified
interval, replication will continue to be ACTIVE. Default: 0.
Implementation
Future<StartParticipantReplicationResponse> startParticipantReplication({
required String destinationStageArn,
required String participantId,
required String sourceStageArn,
Map<String, String>? attributes,
int? reconnectWindowSeconds,
}) async {
_s.validateNumRange(
'reconnectWindowSeconds',
reconnectWindowSeconds,
0,
300,
);
final $payload = <String, dynamic>{
'destinationStageArn': destinationStageArn,
'participantId': participantId,
'sourceStageArn': sourceStageArn,
if (attributes != null) 'attributes': attributes,
if (reconnectWindowSeconds != null)
'reconnectWindowSeconds': reconnectWindowSeconds,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'POST',
requestUri: '/StartParticipantReplication',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return StartParticipantReplicationResponse(
accessControlAllowOrigin: _s.extractHeaderStringValue(
response.headers, 'Access-Control-Allow-Origin'),
accessControlExposeHeaders: _s.extractHeaderStringValue(
response.headers, 'Access-Control-Expose-Headers'),
cacheControl:
_s.extractHeaderStringValue(response.headers, 'Cache-Control'),
contentSecurityPolicy: _s.extractHeaderStringValue(
response.headers, 'Content-Security-Policy'),
strictTransportSecurity: _s.extractHeaderStringValue(
response.headers, 'Strict-Transport-Security'),
xContentTypeOptions: _s.extractHeaderStringValue(
response.headers, 'X-Content-Type-Options'),
xFrameOptions:
_s.extractHeaderStringValue(response.headers, 'X-Frame-Options'),
);
}