Skip to content

register_source_endpoint async

register_source_endpoint(
    configuration: SourceEndpointConfiguration,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    region_name: Optional[str] = None,
    description: Optional[str] = None,
    tags: Optional[__mapOfString] = None,
    client_token: Optional[ClientToken] = None,
) -> RegisterSourceEndpointResponse

Registers a new source endpoint in MediaConnect.

Parameters:

  • region_name (Optional[str], default: None ) –

    The name of the Amazon Web Services Region in which to register the source endpoint. Defaults to the current region if not specified.

  • description (Optional[str], default: None ) –

    A description to help you identify the source endpoint.

  • configuration (SourceEndpointConfiguration) –

    The configuration settings for the source endpoint.

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

    The tags to apply to the source endpoint. Each tag is a key-value pair.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If this token matches a previous request, the service ignores the request, but does not return an error.

Raises:

  • BadRequestException –

    This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message.

  • ConflictException –

    The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

  • ForbiddenException –

    You do not have sufficient access to perform this action.

  • InternalServerErrorException –

    The server encountered an internal error and is unable to complete the request.

  • ServiceUnavailableException –

    The service is currently unavailable or busy.

  • SourceEndpointServiceQuotaExceededException –

    The request would cause you to exceed a service quota for source endpoints. Delete unused source endpoints or request a quota increase, then try your request again.

  • TooManyRequestsException –

    The request was denied due to request throttling.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mediaconnect/_services/async_media_connect.py
async def register_source_endpoint(
    self,
    configuration: "capo_mediaconnect.types.source_endpoint_configuration.SourceEndpointConfiguration",
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    region_name: Optional[str] = None,
    description: Optional[str] = None,
    tags: Optional["capo_mediaconnect.types.__map_of_string.__mapOfString"] = None,
    client_token: Optional[
        "capo_mediaconnect.types.client_token.ClientToken"
    ] = None,
) -> "capo_mediaconnect.types.register_source_endpoint_response.RegisterSourceEndpointResponse":
    """<p>Registers a new source endpoint in MediaConnect.</p>

    Args:
        region_name: <p>The name of the Amazon Web Services Region in which to register the source endpoint. Defaults to the current region if not specified.</p>
        description: <p>A description to help you identify the source endpoint.</p>
        configuration: <p>The configuration settings for the source endpoint.</p>
        tags: <p>The tags to apply to the source endpoint. Each tag is a key-value pair.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If this token matches a previous request, the service ignores the request, but does not return an error.</p>

    Raises:
        capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
        capo_mediaconnect.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
        capo_mediaconnect.errors.forbidden_exception.ForbiddenException: <p>You do not have sufficient access to perform this action. </p>
        capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
        capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </p>
        capo_mediaconnect.errors.source_endpoint_service_quota_exceeded_exception.SourceEndpointServiceQuotaExceededException: <p>The request would cause you to exceed a service quota for source endpoints. Delete unused source endpoints or request a quota increase, then try your request again.</p>
        capo_mediaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling. </p>
        capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediaconnect.types.register_source_endpoint_request.RegisterSourceEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.register_source_endpoint_response.RegisterSourceEndpointResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.register_source_endpoint

        (
            output,
            http_response,
        ) = await capo_mediaconnect._operations.media_connect.register_source_endpoint.async_register_source_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterSourceEndpoint")
    )
    input_: capo_mediaconnect.types.register_source_endpoint_request.RegisterSourceEndpointRequest = {
        "configuration": configuration
    }
    if region_name is not None:
        input_["region_name"] = region_name
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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