Starts the process of revoking the viewer session associated with a specified channel ARN and viewer ID. Optionally, you can provide a version to revoke viewer sessions less than and including that version. For instructions on associating a viewer ID with a viewer session, see Setting Up Private Channels.
Parameters:
-
channel_arn
(ChannelArn)
–
The ARN of the channel associated with the viewer session to revoke.
-
viewer_id
(ViewerId)
–
The ID of the viewer associated with the viewer session to revoke. Do not use this field for personally identifying, confidential, or sensitive information.
-
viewer_session_versions_less_than_or_equal_to
(Optional[ViewerSessionVersion], default:
None
)
–
An optional filter on which versions of the viewer session to revoke. All versions less than or equal to the specified version will be revoked. Default: 0.
Raises:
Source code in docs_src/capo_ivs/_services/ivs.py
| def start_viewer_session_revocation(
self,
channel_arn: "capo_ivs.types.channel_arn.ChannelArn",
viewer_id: "capo_ivs.types.viewer_id.ViewerId",
*,
config_overrides: Optional[ivsClientConfig] = None,
viewer_session_versions_less_than_or_equal_to: Optional[
"capo_ivs.types.viewer_session_version.ViewerSessionVersion"
] = None,
) -> "capo_ivs.types.start_viewer_session_revocation_response.StartViewerSessionRevocationResponse":
"""<p>Starts the process of revoking the viewer session associated with a specified channel ARN and viewer ID. Optionally, you can provide a version to revoke viewer sessions less than and including that version. For instructions on associating a viewer ID with a viewer session, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/private-channels.html">Setting Up Private Channels</a>.</p>
Args:
channel_arn: <p>The ARN of the channel associated with the viewer session to revoke.</p>
viewer_id: <p>The ID of the viewer associated with the viewer session to revoke. Do not use this field for personally identifying, confidential, or sensitive information.</p>
viewer_session_versions_less_than_or_equal_to: <p>An optional filter on which versions of the viewer session to revoke. All versions less than or equal to the specified version will be revoked. Default: 0.</p>
Raises:
capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_ivs.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_ivs.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
capo_ivs.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_ivs.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_ivs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_ivs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ivs.types.start_viewer_session_revocation_request.StartViewerSessionRevocationRequest]",
) -> OperationResponse[
"capo_ivs.types.start_viewer_session_revocation_response.StartViewerSessionRevocationResponse"
]:
import capo_ivs._operations.amazon_interactive_video_service.start_viewer_session_revocation
output, http_response = (
capo_ivs._operations.amazon_interactive_video_service.start_viewer_session_revocation.start_viewer_session_revocation(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartViewerSessionRevocation")
)
input_: capo_ivs.types.start_viewer_session_revocation_request.StartViewerSessionRevocationRequest = {
"channel_arn": channel_arn,
"viewer_id": viewer_id,
}
if viewer_session_versions_less_than_or_equal_to is not None:
input_["viewer_session_versions_less_than_or_equal_to"] = (
viewer_session_versions_less_than_or_equal_to
)
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|