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/media_package.py
| def rotate_channel_credentials(
self,
id: "capo_mediapackage.types.__string.__string",
*,
config_overrides: Optional[MediaPackageClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_mediapackage.types.rotate_channel_credentials_request.RotateChannelCredentialsRequest]",
) -> OperationResponse[
"capo_mediapackage.types.rotate_channel_credentials_response.RotateChannelCredentialsResponse"
]:
import capo_mediapackage._operations.media_package.rotate_channel_credentials
output, http_response = (
capo_mediapackage._operations.media_package.rotate_channel_credentials.rotate_channel_credentials(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|