docstr: Save credentials for the provided service
  
  Args:
      service (str): The name of the service the output belongs too
      config (StreamAlert.config): The configuration of StreamAlert
      properties (OrderedDict): Contains various OutputProperty items
  Returns:
      bool: False if errors occurred, True otherwise
docstr_tok: ["Save","credentials","for","the","provided","service","Args",":","service","(","str",")",":","The","name","of","the","service","the","output","belongs","too","config","(","StreamAlert.config",")",":","The","configuration","of","StreamAlert","properties","(","OrderedDict",")",":","Contains","various","OutputProperty","items","Returns",":","bool",":","False","if","errors","occurred",",","True","otherwise"]
code: def save_credentials(service, config, properties):
      """Save credentials for the provided service
  
      Args:
          service (str): The name of the service the output belongs too
          config (StreamAlert.config): The configuration of StreamAlert
          properties (OrderedDict): Contains various OutputProperty items
      Returns:
          bool: False if errors occurred, True otherwise
      """
      account_config = config["global"]["account"]
      region = account_config["region"]
      prefix = account_config["prefix"]
      kms_key_alias = account_config.get(
          "kms_key_alias", "{}_streamalert_secrets".format(prefix)
      )
      # Verify that the word alias is not in the config.
      # It is interpolated when the API call is made.
      if "alias/" in kms_key_alias:
          kms_key_alias = kms_key_alias.split("/")[1]
  
      provider = OutputCredentialsProvider(
          service, config=config, region=region, prefix=prefix
      )
      result = provider.save_credentials(
          properties["descriptor"].value, kms_key_alias, properties
      )
      if not result:
          LOGGER.error(
              "An error occurred while saving '%s' "
              "output configuration for service '%s'",
              properties["descriptor"].value,
              service,
          )
      return result
  
imports: import json
  from streamalert.shared.logger import get_logger
  from streamalert.alert_processor.outputs.output_base import StreamAlertOutput, OutputCredentialsProvider
  from streamalert_cli.helpers import user_input, response_is_valid
  from streamalert_cli.outputs.helpers import output_exists
  from streamalert_cli.utils import CLICommand, generate_subparser
label_desc: Use image node_id 1 for calling the OutputSharedMethods obj's underlying member method code with example usage: obj.save_credentials(service, config, properties) and returns: result