Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.
Parameters:
-
name
(AppMonitorName)
–
The name of the app monitor that is associated with the resource-based policy that you want to view.
Raises:
Source code in docs_src/capo_rum/_services/async_rum.py
| async def get_resource_policy(
self,
name: "capo_rum.types.app_monitor_name.AppMonitorName",
*,
config_overrides: Optional[AsyncRUMClientConfig] = None,
) -> "capo_rum.types.get_resource_policy_response.GetResourcePolicyResponse":
"""<p>Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.</p>
Args:
name: <p>The name of the app monitor that is associated with the resource-based policy that you want to view.</p>
Raises:
capo_rum.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
capo_rum.errors.conflict_exception.ConflictException: <p>This operation attempted to create a resource that already exists.</p>
capo_rum.errors.internal_server_exception.InternalServerException: <p>Internal service exception.</p>
capo_rum.errors.policy_not_found_exception.PolicyNotFoundException: <p>The resource-based policy doesn't exist on this app monitor.</p>
capo_rum.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found.</p>
capo_rum.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
capo_rum.errors.validation_exception.ValidationException: <p>One of the arguments for the request is not valid.</p>
capo_rum.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_rum.types.get_resource_policy_request.GetResourcePolicyRequest]",
) -> AsyncOperationResponse[
"capo_rum.types.get_resource_policy_response.GetResourcePolicyResponse"
]:
import capo_rum._operations.rum.get_resource_policy
(
output,
http_response,
) = await capo_rum._operations.rum.get_resource_policy.async_get_resource_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetResourcePolicy")
)
input_: capo_rum.types.get_resource_policy_request.GetResourcePolicyRequest = {
"name": name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|