Gets the settings for a specified Amazon Web Services account.
Parameters:
Raises:
-
AccessDeniedException
–
Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.
-
InternalServerException
–
An internal service error occurred during the processing of your request. Try again later.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_auditmanager/_services/audit_manager.py
| def get_settings(
self,
attribute: "capo_auditmanager.types.setting_attribute.SettingAttribute",
*,
config_overrides: Optional[AuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.get_settings_response.GetSettingsResponse":
"""<p> Gets the settings for a specified Amazon Web Services account. </p>
Args:
attribute: <p> The list of setting attribute enum values. </p>
Raises:
capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_auditmanager.types.get_settings_request.GetSettingsRequest]",
) -> OperationResponse[
"capo_auditmanager.types.get_settings_response.GetSettingsResponse"
]:
import capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_settings
output, http_response = (
capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_settings.get_settings(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_auditmanager.types.get_settings_response.GetSettingsResponse",
) -> dict[str, Any]:
import capo_auditmanager.types.get_settings_response
return capo_auditmanager.types.get_settings_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetSettings", redact_output=_redact_output),
)
input_: capo_auditmanager.types.get_settings_request.GetSettingsRequest = {
"attribute": attribute
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|