Gets a resource-based policy of an entity that is identified by its resource ARN.
Parameters:
-
resource_arn
(ResourceARN)
–
The Amazon Resource Name (ARN) of the entity resource that is associated with the resource policy.
Raises:
Source code in docs_src/capo_marketplace_catalog/_services/marketplace_catalog.py
| def get_resource_policy(
self,
resource_arn: "capo_marketplace_catalog.types.resource_arn.ResourceARN",
*,
config_overrides: Optional[MarketplaceCatalogClientConfig] = None,
) -> "capo_marketplace_catalog.types.get_resource_policy_response.GetResourcePolicyResponse":
"""<p>Gets a resource-based policy of an entity that is identified by its resource ARN.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the entity resource that is associated with the resource policy.</p>
Raises:
capo_marketplace_catalog.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p> <p>HTTP status code: 403</p>
capo_marketplace_catalog.errors.internal_service_exception.InternalServiceException: <p>There was an internal service exception.</p> <p>HTTP status code: 500</p>
capo_marketplace_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource wasn't found.</p> <p>HTTP status code: 404</p>
capo_marketplace_catalog.errors.throttling_exception.ThrottlingException: <p>Too many requests.</p> <p>HTTP status code: 429</p>
capo_marketplace_catalog.errors.validation_exception.ValidationException: <p>An error occurred during validation.</p> <p>HTTP status code: 422</p>
capo_marketplace_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_marketplace_catalog.types.get_resource_policy_request.GetResourcePolicyRequest]",
) -> OperationResponse[
"capo_marketplace_catalog.types.get_resource_policy_response.GetResourcePolicyResponse"
]:
import capo_marketplace_catalog._operations.awsmp_seymour.get_resource_policy
output, http_response = (
capo_marketplace_catalog._operations.awsmp_seymour.get_resource_policy.get_resource_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetResourcePolicy")
)
input_: capo_marketplace_catalog.types.get_resource_policy_request.GetResourcePolicyRequest = {
"resource_arn": resource_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|