Skip to content

update_source_endpoint async

update_source_endpoint(
    arn: SourceEndpointArn,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    description: Optional[str] = None,
    configuration: Optional[SourceEndpointConfiguration] = None,
) -> UpdateSourceEndpointResponse

Updates the configuration of a source endpoint.

Parameters:

  • arn (SourceEndpointArn) –

    The Amazon Resource Name (ARN) of the source endpoint to update.

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

    A description to help you identify the source endpoint.

  • configuration (Optional[SourceEndpointConfiguration], default: None ) –

    The updated configuration settings for the source endpoint.

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.

  • NotFoundException –

    One or more of the resources in the request does not exist in the system.

  • ServiceUnavailableException –

    The service is currently unavailable or busy.

  • 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 update_source_endpoint(
    self,
    arn: "capo_mediaconnect.types.source_endpoint_arn.SourceEndpointArn",
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    description: Optional[str] = None,
    configuration: Optional[
        "capo_mediaconnect.types.source_endpoint_configuration.SourceEndpointConfiguration"
    ] = None,
) -> "capo_mediaconnect.types.update_source_endpoint_response.UpdateSourceEndpointResponse":
    """<p>Updates the configuration of a source endpoint.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the source endpoint to update.</p>
        description: <p>A description to help you identify the source endpoint.</p>
        configuration: <p>The updated configuration settings for the source endpoint.</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.not_found_exception.NotFoundException: <p>One or more of the resources in the request does not exist in the system. </p>
        capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </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.update_source_endpoint_request.UpdateSourceEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.update_source_endpoint_response.UpdateSourceEndpointResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.update_source_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSourceEndpoint")
    )
    input_: capo_mediaconnect.types.update_source_endpoint_request.UpdateSourceEndpointRequest = {
        "arn": arn
    }
    if description is not None:
        input_["description"] = description
    if configuration is not None:
        input_["configuration"] = configuration

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