Returns the channel's IAM policy. IAM policies are used to control access to your channel.
Parameters:
-
channel_name
(__string)
–
The name of the channel associated with this Channel Policy.
Raises:
Source code in docs_src/capo_mediatailor/_services/media_tailor.py
| def get_channel_policy(
self,
channel_name: "capo_mediatailor.types.__string.__string",
*,
config_overrides: Optional[MediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.get_channel_policy_response.GetChannelPolicyResponse":
"""<p>Returns the channel's IAM policy. IAM policies are used to control access to your channel.</p>
Args:
channel_name: <p>The name of the channel associated with this Channel Policy.</p>
Raises:
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediatailor.types.get_channel_policy_request.GetChannelPolicyRequest]",
) -> OperationResponse[
"capo_mediatailor.types.get_channel_policy_response.GetChannelPolicyResponse"
]:
import capo_mediatailor._operations.media_tailor.get_channel_policy
output, http_response = (
capo_mediatailor._operations.media_tailor.get_channel_policy.get_channel_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetChannelPolicy")
)
input_: capo_mediatailor.types.get_channel_policy_request.GetChannelPolicyRequest = {
"channel_name": channel_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|