Skip to content

create_media_capture_pipeline

create_media_capture_pipeline(
    source_type: MediaPipelineSourceType,
    source_arn: Arn,
    sink_type: MediaPipelineSinkType,
    sink_arn: Arn,
    *,
    config_overrides: Optional[ChimeSDKMediaPipelinesClientConfig] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    chime_sdk_meeting_configuration: Optional[ChimeSdkMeetingConfiguration] = None,
    sse_aws_key_management_params: Optional[SseAwsKeyManagementParams] = None,
    sink_iam_role_arn: Optional[Arn] = None,
    tags: Optional[TagList] = None,
) -> CreateMediaCapturePipelineResponse

Creates a media pipeline.

Parameters:

  • source_type (MediaPipelineSourceType) –

    Source type from which the media artifacts are captured. A Chime SDK Meeting is the only supported source.

  • source_arn (Arn) –

    ARN of the source from which the media artifacts are captured.

  • sink_type (MediaPipelineSinkType) –

    Destination type to which the media artifacts are saved. You must use an S3 bucket.

  • sink_arn (Arn) –

    The ARN of the sink type.

  • client_request_token (Optional[ClientRequestToken], default: None ) –

    The unique identifier for the client request. The token makes the API request idempotent. Use a unique token for each media pipeline request.

  • chime_sdk_meeting_configuration (Optional[ChimeSdkMeetingConfiguration], default: None ) –

    The configuration for a specified media pipeline. SourceType must be ChimeSdkMeeting.

  • sse_aws_key_management_params (Optional[SseAwsKeyManagementParams], default: None ) –

    An object that contains server side encryption parameters to be used by media capture pipeline. The parameters can also be used by media concatenation pipeline taking media capture pipeline as a media source.

  • sink_iam_role_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of the sink role to be used with AwsKmsKeyId in SseAwsKeyManagementParams. Can only interact with S3Bucket sink type. The role must belong to the caller’s account and be able to act on behalf of the caller during the API call. All minimum policy permissions requirements for the caller to perform sink-related actions are the same for SinkIamRoleArn.

    Additionally, the role must have permission to kms:GenerateDataKey using KMS key supplied as AwsKmsKeyId in SseAwsKeyManagementParams. If media concatenation will be required later, the role must also have permission to kms:Decrypt for the same KMS key.

  • tags (Optional[TagList], default: None ) –

    The tag key-value pairs.

Raises:

Source code in docs_src/capo_chime_sdk_media_pipelines/_services/chime_sdk_media_pipelines.py
def create_media_capture_pipeline(
    self,
    source_type: "capo_chime_sdk_media_pipelines.types.media_pipeline_source_type.MediaPipelineSourceType",
    source_arn: "capo_chime_sdk_media_pipelines.types.arn.Arn",
    sink_type: "capo_chime_sdk_media_pipelines.types.media_pipeline_sink_type.MediaPipelineSinkType",
    sink_arn: "capo_chime_sdk_media_pipelines.types.arn.Arn",
    *,
    config_overrides: Optional[ChimeSDKMediaPipelinesClientConfig] = None,
    client_request_token: Optional[
        "capo_chime_sdk_media_pipelines.types.client_request_token.ClientRequestToken"
    ] = None,
    chime_sdk_meeting_configuration: Optional[
        "capo_chime_sdk_media_pipelines.types.chime_sdk_meeting_configuration.ChimeSdkMeetingConfiguration"
    ] = None,
    sse_aws_key_management_params: Optional[
        "capo_chime_sdk_media_pipelines.types.sse_aws_key_management_params.SseAwsKeyManagementParams"
    ] = None,
    sink_iam_role_arn: Optional[
        "capo_chime_sdk_media_pipelines.types.arn.Arn"
    ] = None,
    tags: Optional["capo_chime_sdk_media_pipelines.types.tag_list.TagList"] = None,
) -> "capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_response.CreateMediaCapturePipelineResponse":
    """<p>Creates a media pipeline.</p>

    Args:
        source_type: <p>Source type from which the media artifacts are captured. A Chime SDK Meeting is the only supported source.</p>
        source_arn: <p>ARN of the source from which the media artifacts are captured.</p>
        sink_type: <p>Destination type to which the media artifacts are saved. You must use an S3 bucket.</p>
        sink_arn: <p>The ARN of the sink type.</p>
        client_request_token: <p>The unique identifier for the client request. The token makes the API request idempotent. Use a unique token for each media pipeline request.</p>
        chime_sdk_meeting_configuration: <p>The configuration for a specified media pipeline. <code>SourceType</code> must be <code>ChimeSdkMeeting</code>.</p>
        sse_aws_key_management_params: <p>An object that contains server side encryption parameters to be used by media capture pipeline. The parameters can also be used by media concatenation pipeline taking media capture pipeline as a media source.</p>
        sink_iam_role_arn: <p>The Amazon Resource Name (ARN) of the sink role to be used with <code>AwsKmsKeyId</code> in <code>SseAwsKeyManagementParams</code>. Can only interact with <code>S3Bucket</code> sink type. The role must belong to the caller’s account and be able to act on behalf of the caller during the API call. All minimum policy permissions requirements for the caller to perform sink-related actions are the same for <code>SinkIamRoleArn</code>.</p> <p>Additionally, the role must have permission to <code>kms:GenerateDataKey</code> using KMS key supplied as <code>AwsKmsKeyId</code> in <code>SseAwsKeyManagementParams</code>. If media concatenation will be required later, the role must also have permission to <code>kms:Decrypt</code> for the same KMS key.</p>
        tags: <p>The tag key-value pairs.</p>

    Raises:
        capo_chime_sdk_media_pipelines.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_media_pipelines.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_media_pipelines.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>The request exceeds the resource limit.</p>
        capo_chime_sdk_media_pipelines.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_media_pipelines.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_media_pipelines.errors.throttled_client_exception.ThrottledClientException: <p>The client exceeded its request rate limit.</p>
        capo_chime_sdk_media_pipelines.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client is not currently authorized to make the request.</p>
        capo_chime_sdk_media_pipelines.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_request.CreateMediaCapturePipelineRequest]",
    ) -> OperationResponse[
        "capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_response.CreateMediaCapturePipelineResponse"
    ]:
        import capo_chime_sdk_media_pipelines._operations.chime_sdk_media_pipelines_service.create_media_capture_pipeline

        output, http_response = (
            capo_chime_sdk_media_pipelines._operations.chime_sdk_media_pipelines_service.create_media_capture_pipeline.create_media_capture_pipeline(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_request.CreateMediaCapturePipelineRequest",
    ) -> dict[str, Any]:
        import capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_request

        return capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_response.CreateMediaCapturePipelineResponse",
    ) -> dict[str, Any]:
        import capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_response

        return capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateMediaCapturePipeline",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chime_sdk_media_pipelines.types.create_media_capture_pipeline_request.CreateMediaCapturePipelineRequest = {
        "source_type": source_type,
        "source_arn": source_arn,
        "sink_type": sink_type,
        "sink_arn": sink_arn,
    }
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if chime_sdk_meeting_configuration is not None:
        input_["chime_sdk_meeting_configuration"] = chime_sdk_meeting_configuration
    if sse_aws_key_management_params is not None:
        input_["sse_aws_key_management_params"] = sse_aws_key_management_params
    if sink_iam_role_arn is not None:
        input_["sink_iam_role_arn"] = sink_iam_role_arn
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output