Sets 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.
Specify properties as key-value pairs in Namespace/PropertyName format. All properties in a single request must belong to the same namespace. Use GetAccountProperties to view the current properties.
Parameters:
-
properties
(accountPropertiesMapType)
–
A map of property key-value pairs to set. All keys must belong to the same namespace.
Each key uses the format Namespace/PropertyName. The key must contain exactly one / separating the namespace from the property name, and cannot start or end with /.
The service validates each value based on the property key's expected type. For example, boolean properties expect true or false.
Raises:
-
ConcurrentModificationException
–
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
-
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 put_account_properties(
self,
properties: "capo_iam.types.account_properties_map_type.accountPropertiesMapType",
*,
config_overrides: Optional[IAMClientConfig] = None,
) -> "capo_iam.types.put_account_properties_response.PutAccountPropertiesResponse":
"""<p>Sets 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>Specify properties as key-value pairs in <code>Namespace/PropertyName</code> format. All properties in a single request must belong to the same namespace. Use <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountProperties.html">GetAccountProperties</a> to view the current properties.</p>
Args:
properties: <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p> <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p> <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
Raises:
capo_iam.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
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.put_account_properties_request.PutAccountPropertiesRequest]",
) -> OperationResponse[
"capo_iam.types.put_account_properties_response.PutAccountPropertiesResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.put_account_properties
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.put_account_properties.put_account_properties(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAccountProperties")
)
input_: capo_iam.types.put_account_properties_request.PutAccountPropertiesRequest = {
"properties": properties
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|