Skip to content

start_participant_replication async

start_participant_replication(
    source_stage_arn: StageArn,
    destination_stage_arn: StageArn,
    participant_id: ParticipantId,
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
    reconnect_window_seconds: Optional[ReconnectWindowSeconds] = None,
    attributes: Optional[ParticipantAttributes] = None,
) -> StartParticipantReplicationResponse

Starts replicating a publishing participant from a source stage to a destination stage.

Parameters:

  • source_stage_arn (StageArn) –

    ARN of the stage where the participant is publishing.

  • destination_stage_arn (StageArn) –

    ARN of the stage to which the participant will be replicated.

  • participant_id (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.

  • reconnect_window_seconds (Optional[ReconnectWindowSeconds], default: None ) –

    If the participant disconnects and then reconnects within the specified interval, replication will continue to be ACTIVE. Default: 0.

  • attributes (Optional[ParticipantAttributes], default: None ) –

    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.

Raises:

Source code in docs_src/capo_ivs_realtime/_services/async_ivs_real_time.py
async def start_participant_replication(
    self,
    source_stage_arn: "capo_ivs_realtime.types.stage_arn.StageArn",
    destination_stage_arn: "capo_ivs_realtime.types.stage_arn.StageArn",
    participant_id: "capo_ivs_realtime.types.participant_id.ParticipantId",
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
    reconnect_window_seconds: Optional[
        "capo_ivs_realtime.types.reconnect_window_seconds.ReconnectWindowSeconds"
    ] = None,
    attributes: Optional[
        "capo_ivs_realtime.types.participant_attributes.ParticipantAttributes"
    ] = None,
) -> "capo_ivs_realtime.types.start_participant_replication_response.StartParticipantReplicationResponse":
    """<p>Starts replicating a publishing participant from a source stage to a destination stage.</p>

    Args:
        source_stage_arn: <p>ARN of the stage where the participant is publishing.</p>
        destination_stage_arn: <p>ARN of the stage to which the participant will be replicated.</p>
        participant_id: <p>Participant ID of the publisher that will be replicated. This is assigned by IVS and returned by <a>CreateParticipantToken</a> or the <code>jti</code> (JWT ID) used to <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started-distribute-tokens.html#getting-started-distribute-tokens-self-signed">create a self signed token</a>. </p>
        reconnect_window_seconds: <p>If the participant disconnects and then reconnects within the specified interval, replication will continue to be <code>ACTIVE</code>. Default: 0.</p>
        attributes: <p>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. <i>This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.</i> </p> <p>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.</p>

    Raises:
        capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs_realtime.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_ivs_realtime.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_ivs_realtime.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
        capo_ivs_realtime.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_ivs_realtime.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs_realtime.types.start_participant_replication_request.StartParticipantReplicationRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs_realtime.types.start_participant_replication_response.StartParticipantReplicationResponse"
    ]:
        import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.start_participant_replication

        (
            output,
            http_response,
        ) = await capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.start_participant_replication.async_start_participant_replication(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartParticipantReplication")
    )
    input_: capo_ivs_realtime.types.start_participant_replication_request.StartParticipantReplicationRequest = {
        "source_stage_arn": source_stage_arn,
        "destination_stage_arn": destination_stage_arn,
        "participant_id": participant_id,
    }
    if reconnect_window_seconds is not None:
        input_["reconnect_window_seconds"] = reconnect_window_seconds
    if attributes is not None:
        input_["attributes"] = attributes

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output