Changes the Channel's first IngestEndpoint's username and password. WARNING - This API is deprecated. Please use RotateIngestEndpointCredentials instead
Parameters:
-
id
(__string)
–
The ID of the channel to update.
Raises:
Source code in docs_src/capo_mediapackage/_services/async_media_package.py
| async def rotate_channel_credentials(
self,
id: "capo_mediapackage.types.__string.__string",
*,
config_overrides: Optional[AsyncMediaPackageClientConfig] = None,
) -> "capo_mediapackage.types.rotate_channel_credentials_response.RotateChannelCredentialsResponse":
"""Changes the Channel's first IngestEndpoint's username and password. WARNING - This API is deprecated. Please use RotateIngestEndpointCredentials instead
Args:
id: The ID of the channel to update.
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_channel_credentials_request.RotateChannelCredentialsRequest]",
) -> AsyncOperationResponse[
"capo_mediapackage.types.rotate_channel_credentials_response.RotateChannelCredentialsResponse"
]:
import capo_mediapackage._operations.media_package.rotate_channel_credentials
(
output,
http_response,
) = await capo_mediapackage._operations.media_package.rotate_channel_credentials.async_rotate_channel_credentials(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_mediapackage.types.rotate_channel_credentials_response.RotateChannelCredentialsResponse",
) -> dict[str, Any]:
import capo_mediapackage.types.rotate_channel_credentials_response
return capo_mediapackage.types.rotate_channel_credentials_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("RotateChannelCredentials", redact_output=_redact_output),
)
input_: capo_mediapackage.types.rotate_channel_credentials_request.RotateChannelCredentialsRequest = {
"id": id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|