ServiceSetting is an account-level setting for an Amazon Web Services service. This setting defines how a user interacts with or uses a service or a feature of a service. For example, if an Amazon Web Services service charges money to the account based on feature or service usage, then the Amazon Web Services service team might create a default setting of "false". This means the user can't use this feature unless they change the setting to "true" and intentionally opt in for a paid feature.
Services map a SettingId object to a setting value. Amazon Web Services services teams define the default value for a SettingId. You can't create a new SettingId, but you can overwrite the default value if you have the ssm:UpdateServiceSetting permission for the setting. Use the GetServiceSetting API operation to view the current value. Or, use the ResetServiceSetting to change the value back to the original value defined by the Amazon Web Services service team.
Update the service setting for the account.
Parameters:
-
setting_id
(ServiceSettingId)
–
The Amazon Resource Name (ARN) of the service setting to update. For example, arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. The setting ID can be one of the following.
-
/ssm/appmanager/appmanager-enabled
-
/ssm/automation/customer-script-log-destination
-
/ssm/automation/customer-script-log-group-name
-
/ssm/automation/enable-adaptive-concurrency
-
/ssm/documents/console/public-sharing-permission
-
/ssm/managed-instance/activation-tier
-
/ssm/managed-instance/default-ec2-instance-management-role
-
/ssm/opsinsights/opscenter
-
/ssm/parameter-store/default-parameter-tier
-
/ssm/parameter-store/high-throughput-enabled
Permissions to update the /ssm/managed-instance/default-ec2-instance-management-role setting should only be provided to administrators. Implement least privilege access when allowing individuals to configure or modify the Default Host Management Configuration.
-
setting_value
(ServiceSettingValue)
–
The new value to specify for the service setting. The following list specifies the available values for each setting.
-
For /ssm/appmanager/appmanager-enabled, enter True or False.
-
For /ssm/automation/customer-script-log-destination, enter CloudWatch.
-
For /ssm/automation/customer-script-log-group-name, enter the name of an Amazon CloudWatch Logs log group.
-
For /ssm/documents/console/public-sharing-permission, enter Enable or Disable.
-
For /ssm/managed-instance/activation-tier, enter standard or advanced.
-
For /ssm/managed-instance/default-ec2-instance-management-role, enter the name of an IAM role.
-
For /ssm/opsinsights/opscenter, enter Enabled or Disabled.
-
For /ssm/parameter-store/default-parameter-tier, enter Standard, Advanced, or Intelligent-Tiering
-
For /ssm/parameter-store/high-throughput-enabled, enter true or false.
Raises:
-
InternalServerError
–
An error occurred on the server side.
-
ServiceSettingNotFound
–
The specified service setting wasn't found. Either the service name or the setting hasn't been provisioned by the Amazon Web Services service team.
-
TooManyUpdates
–
There are concurrent updates for a resource that supports one update at a time.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
| async def update_service_setting(
self,
setting_id: "capo_ssm.types.service_setting_id.ServiceSettingId",
setting_value: "capo_ssm.types.service_setting_value.ServiceSettingValue",
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> "capo_ssm.types.update_service_setting_result.UpdateServiceSettingResult":
"""<p> <code>ServiceSetting</code> is an account-level setting for an Amazon Web Services service. This setting defines how a user interacts with or uses a service or a feature of a service. For example, if an Amazon Web Services service charges money to the account based on feature or service usage, then the Amazon Web Services service team might create a default setting of "false". This means the user can't use this feature unless they change the setting to "true" and intentionally opt in for a paid feature.</p> <p>Services map a <code>SettingId</code> object to a setting value. Amazon Web Services services teams define the default value for a <code>SettingId</code>. You can't create a new <code>SettingId</code>, but you can overwrite the default value if you have the <code>ssm:UpdateServiceSetting</code> permission for the setting. Use the <a>GetServiceSetting</a> API operation to view the current value. Or, use the <a>ResetServiceSetting</a> to change the value back to the original value defined by the Amazon Web Services service team.</p> <p>Update the service setting for the account. </p>
Args:
setting_id: <p>The Amazon Resource Name (ARN) of the service setting to update. For example, <code>arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled</code>. The setting ID can be one of the following.</p> <ul> <li> <p> <code>/ssm/appmanager/appmanager-enabled</code> </p> </li> <li> <p> <code>/ssm/automation/customer-script-log-destination</code> </p> </li> <li> <p> <code>/ssm/automation/customer-script-log-group-name</code> </p> </li> <li> <p>/ssm/automation/enable-adaptive-concurrency</p> </li> <li> <p> <code>/ssm/documents/console/public-sharing-permission</code> </p> </li> <li> <p> <code>/ssm/managed-instance/activation-tier</code> </p> </li> <li> <p> <code>/ssm/managed-instance/default-ec2-instance-management-role</code> </p> </li> <li> <p> <code>/ssm/opsinsights/opscenter</code> </p> </li> <li> <p> <code>/ssm/parameter-store/default-parameter-tier</code> </p> </li> <li> <p> <code>/ssm/parameter-store/high-throughput-enabled</code> </p> </li> </ul> <note> <p>Permissions to update the <code>/ssm/managed-instance/default-ec2-instance-management-role</code> setting should only be provided to administrators. Implement least privilege access when allowing individuals to configure or modify the Default Host Management Configuration.</p> </note>
setting_value: <p>The new value to specify for the service setting. The following list specifies the available values for each setting.</p> <ul> <li> <p>For <code>/ssm/appmanager/appmanager-enabled</code>, enter <code>True</code> or <code>False</code>.</p> </li> <li> <p>For <code>/ssm/automation/customer-script-log-destination</code>, enter <code>CloudWatch</code>.</p> </li> <li> <p>For <code>/ssm/automation/customer-script-log-group-name</code>, enter the name of an Amazon CloudWatch Logs log group.</p> </li> <li> <p>For <code>/ssm/documents/console/public-sharing-permission</code>, enter <code>Enable</code> or <code>Disable</code>.</p> </li> <li> <p>For <code>/ssm/managed-instance/activation-tier</code>, enter <code>standard</code> or <code>advanced</code>.</p> </li> <li> <p>For <code>/ssm/managed-instance/default-ec2-instance-management-role</code>, enter the name of an IAM role. </p> </li> <li> <p> For <code>/ssm/opsinsights/opscenter</code>, enter <code>Enabled</code> or <code>Disabled</code>. </p> </li> <li> <p>For <code>/ssm/parameter-store/default-parameter-tier</code>, enter <code>Standard</code>, <code>Advanced</code>, or <code>Intelligent-Tiering</code> </p> </li> <li> <p>For <code>/ssm/parameter-store/high-throughput-enabled</code>, enter <code>true</code> or <code>false</code>.</p> </li> </ul>
Raises:
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.service_setting_not_found.ServiceSettingNotFound: <p>The specified service setting wasn't found. Either the service name or the setting hasn't been provisioned by the Amazon Web Services service team.</p>
capo_ssm.errors.too_many_updates.TooManyUpdates: <p>There are concurrent updates for a resource that supports one update at a time.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ssm.types.update_service_setting_request.UpdateServiceSettingRequest]",
) -> AsyncOperationResponse[
"capo_ssm.types.update_service_setting_result.UpdateServiceSettingResult"
]:
import capo_ssm._operations.amazon_ssm.update_service_setting
(
output,
http_response,
) = await capo_ssm._operations.amazon_ssm.update_service_setting.async_update_service_setting(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateServiceSetting")
)
input_: capo_ssm.types.update_service_setting_request.UpdateServiceSettingRequest = {
"setting_id": setting_id,
"setting_value": setting_value,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|