Retrieves the account-level properties for the caller's Amazon Web Services account. Account properties are configuration settings that control account-wide IAM features such as Role Manager.
The service returns properties as key-value pairs in Namespace/PropertyName format. Each namespace groups related configuration settings. Use PutAccountProperties to modify these properties.
Raises:
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/iam.py
| def get_account_properties(
self, *, config_overrides: Optional[IAMClientConfig] = None
) -> "capo_iam.types.get_account_properties_response.GetAccountPropertiesResponse":
"""<p>Retrieves the account-level properties for the caller's Amazon Web Services account. Account properties are configuration settings that control account-wide IAM features such as Role Manager.</p> <p>The service returns properties as key-value pairs in <code>Namespace/PropertyName</code> format. Each namespace groups related configuration settings. Use <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutAccountProperties.html">PutAccountProperties</a> to modify these properties.</p>
Raises:
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iam.types.get_account_properties_request.GetAccountPropertiesRequest]",
) -> OperationResponse[
"capo_iam.types.get_account_properties_response.GetAccountPropertiesResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.get_account_properties
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.get_account_properties.get_account_properties(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAccountProperties")
)
input_: capo_iam.types.get_account_properties_request.GetAccountPropertiesRequest = {}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|