Skip to content

rotate_ingest_endpoint_credentials async

rotate_ingest_endpoint_credentials(
    id: __string,
    ingest_endpoint_id: __string,
    *,
    config_overrides: Optional[AsyncMediaPackageClientConfig] = None,
) -> RotateIngestEndpointCredentialsResponse

Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's id.

Parameters:

  • id (__string) –

    The ID of the channel the IngestEndpoint is on.

  • ingest_endpoint_id (__string) –

    The id of the IngestEndpoint whose credentials should be rotated

Raises:

Source code in docs_src/capo_mediapackage/_services/async_media_package.py
async def rotate_ingest_endpoint_credentials(
    self,
    id: "capo_mediapackage.types.__string.__string",
    ingest_endpoint_id: "capo_mediapackage.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaPackageClientConfig] = None,
) -> "capo_mediapackage.types.rotate_ingest_endpoint_credentials_response.RotateIngestEndpointCredentialsResponse":
    """Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's id.

    Args:
        id: The ID of the channel the IngestEndpoint is on.
        ingest_endpoint_id: The id of the IngestEndpoint whose credentials should be rotated

    Raises:
        capo_mediapackage.errors.forbidden_exception.ForbiddenException: The client is not authorized to access the requested resource.
        capo_mediapackage.errors.internal_server_error_exception.InternalServerErrorException: An unexpected error occurred.
        capo_mediapackage.errors.not_found_exception.NotFoundException: The requested resource does not exist.
        capo_mediapackage.errors.service_unavailable_exception.ServiceUnavailableException: An unexpected error occurred.
        capo_mediapackage.errors.too_many_requests_exception.TooManyRequestsException: The client has exceeded their resource or throttling limits.
        capo_mediapackage.errors.unprocessable_entity_exception.UnprocessableEntityException: The parameters sent in the request are not valid.
        capo_mediapackage.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediapackage.types.rotate_ingest_endpoint_credentials_request.RotateIngestEndpointCredentialsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediapackage.types.rotate_ingest_endpoint_credentials_response.RotateIngestEndpointCredentialsResponse"
    ]:
        import capo_mediapackage._operations.media_package.rotate_ingest_endpoint_credentials

        (
            output,
            http_response,
        ) = await capo_mediapackage._operations.media_package.rotate_ingest_endpoint_credentials.async_rotate_ingest_endpoint_credentials(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_mediapackage.types.rotate_ingest_endpoint_credentials_response.RotateIngestEndpointCredentialsResponse",
    ) -> dict[str, Any]:
        import capo_mediapackage.types.rotate_ingest_endpoint_credentials_response

        return capo_mediapackage.types.rotate_ingest_endpoint_credentials_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "RotateIngestEndpointCredentials", redact_output=_redact_output
        ),
    )
    input_: capo_mediapackage.types.rotate_ingest_endpoint_credentials_request.RotateIngestEndpointCredentialsRequest = {
        "id": id,
        "ingest_endpoint_id": ingest_endpoint_id,
    }

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