async def get_policy_version(
self,
policy_version_arn: "capo_mpa.types.qualified_policy_arn.QualifiedPolicyArn",
*,
config_overrides: Optional[AsyncMPAClientConfig] = None,
) -> "capo_mpa.types.get_policy_version_response.GetPolicyVersionResponse":
"""<p>Returns details for the version of a policy. Policies define the permissions for team resources.</p>
Args:
policy_version_arn: <p>Amazon Resource Name (ARN) for the policy.</p>
Raises:
capo_mpa.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. Check your permissions, and try again.</p>
capo_mpa.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error. Try your request again. If the problem persists, contact Amazon Web Services Support.</p>
capo_mpa.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist. Check the resource ID, and try again.</p>
capo_mpa.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_mpa.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_mpa.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mpa.types.get_policy_version_request.GetPolicyVersionRequest]",
) -> AsyncOperationResponse[
"capo_mpa.types.get_policy_version_response.GetPolicyVersionResponse"
]:
import capo_mpa._operations.aws_fluffy_core_service.get_policy_version
(
output,
http_response,
) = await capo_mpa._operations.aws_fluffy_core_service.get_policy_version.async_get_policy_version(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_mpa.types.get_policy_version_response.GetPolicyVersionResponse",
) -> dict[str, Any]:
import capo_mpa.types.get_policy_version_response
return capo_mpa.types.get_policy_version_response.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetPolicyVersion", redact_output=_redact_output),
)
input_: capo_mpa.types.get_policy_version_request.GetPolicyVersionRequest = {
"policy_version_arn": policy_version_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output