Retrieves a framework resource by type and key fields.
Parameters:
Raises:
Examples:
Get a framework
Retrieves a custom PCI-DSS framework by name and version so an auditor can review its details.
>>> client.get_framework(framework='payments-pci-dss', environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', framework_version='1.0')
Source code in docs_src/capo_assurance/_services/assurance.py
| def get_framework(
self,
framework: "capo_assurance.types.framework_name.FrameworkName",
environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
framework_version: "capo_assurance.types.framework_version.FrameworkVersion",
*,
config_overrides: Optional[AssuranceClientConfig] = None,
) -> "capo_assurance.types.get_framework_output.GetFrameworkOutput":
"""<p>Retrieves a framework resource by type and key fields.</p>
Args:
framework: <p>The framework name.</p>
environment_arn: <p>The ARN of this governance environment.</p>
framework_version: <p>The framework version.</p>
Raises:
capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get a framework
Retrieves a custom PCI-DSS framework by name and version so an auditor can review its details.
>>> client.get_framework(framework='payments-pci-dss', environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', framework_version='1.0')
"""
def _handler(
req: "OperationRequest[capo_assurance.types.get_framework_input.GetFrameworkInput]",
) -> OperationResponse[
"capo_assurance.types.get_framework_output.GetFrameworkOutput"
]:
import capo_assurance._operations.assurance.get_framework
output, http_response = (
capo_assurance._operations.assurance.get_framework.get_framework(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetFramework")
)
input_: capo_assurance.types.get_framework_input.GetFrameworkInput = {
"framework": framework,
"environment_arn": environment_arn,
"framework_version": framework_version,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|