Skip to content

get_service_setting

get_service_setting(
    setting_id: ServiceSettingId, *, config_overrides: Optional[SSMClientConfig] = None
) -> GetServiceSettingResult

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 UpdateServiceSetting API operation to change the default setting. Or use the ResetServiceSetting to change the value back to the original value defined by the Amazon Web Services service team.

Query the current service setting for the Amazon Web Services account.

Parameters:

  • setting_id (ServiceSettingId) –

    The ID of the service setting to get. 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

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.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def get_service_setting(
    self,
    setting_id: "capo_ssm.types.service_setting_id.ServiceSettingId",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
) -> "capo_ssm.types.get_service_setting_result.GetServiceSettingResult":
    """<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 <code>false</code>. This means the user can't use this feature unless they change the setting to <code>true</code> 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>UpdateServiceSetting</a> API operation to change the default setting. 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>Query the current service setting for the Amazon Web Services account. </p>

    Args:
        setting_id: <p>The ID of the service setting to get. 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>

    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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.get_service_setting_request.GetServiceSettingRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.get_service_setting_result.GetServiceSettingResult"
    ]:
        import capo_ssm._operations.amazon_ssm.get_service_setting

        output, http_response = (
            capo_ssm._operations.amazon_ssm.get_service_setting.get_service_setting(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetServiceSetting")
    )
    input_: capo_ssm.types.get_service_setting_request.GetServiceSettingRequest = {
        "setting_id": setting_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output