Modifies an account setting for your account. You can use this operation to opt in or opt out of features provided through account settings when permitted. Account settings give you control over features that might have backwards-incompatible changes. When Amazon EC2 Auto Scaling introduces such changes, account settings allow you to test and adopt new features. Some account settings are enforced after a specified date. This means that after the enforcement date, you can no longer modify the setting.
Parameters:
Raises:
Source code in docs_src/capo_auto_scaling/_services/auto_scaling.py
| def put_account_setting(
self,
*,
config_overrides: Optional[AutoScalingClientConfig] = None,
name: Optional[
"capo_auto_scaling.types.ascii_string_max_len255.AsciiStringMaxLen255"
] = None,
value: Optional[
"capo_auto_scaling.types.ascii_string_max_len255.AsciiStringMaxLen255"
] = None,
) -> "capo_auto_scaling.types.put_account_setting_answer.PutAccountSettingAnswer":
"""<p> Modifies an account setting for your account. You can use this operation to opt in or opt out of features provided through account settings when permitted. Account settings give you control over features that might have backwards-incompatible changes. When Amazon EC2 Auto Scaling introduces such changes, account settings allow you to test and adopt new features. Some account settings are enforced after a specified date. This means that after the enforcement date, you can no longer modify the setting. </p>
Args:
name: <p> The name of the account setting to modify. Each account setting has a unique name that identifies the specific feature it controls. </p>
value: <p> The value for the account setting. </p>
Raises:
capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_auto_scaling.types.put_account_setting_type.PutAccountSettingType]",
) -> OperationResponse[
"capo_auto_scaling.types.put_account_setting_answer.PutAccountSettingAnswer"
]:
import capo_auto_scaling._operations.auto_scaling_2011_01_01.put_account_setting
output, http_response = (
capo_auto_scaling._operations.auto_scaling_2011_01_01.put_account_setting.put_account_setting(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAccountSetting")
)
input_: capo_auto_scaling.types.put_account_setting_type.PutAccountSettingType = {}
if name is not None:
input_["name"] = name
if value is not None:
input_["value"] = value
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|