class_docstr: Retrieves Connection or Variables from AWS SSM Parameter Store.
  
  Configurable via ``airflow.cfg`` like so:
  
  .. code-block:: ini
  
      [secrets]
      backend = airflow.providers.amazon.aws.secrets.systems_manager.SystemsManagerParameterStoreBackend
      backend_kwargs = {"connections_prefix": "/airflow/connections", "profile_name": null}
  
  For example, if ssm path is ``/airflow/connections/smtp_default``, this would be accessible
  if you provide ``{"connections_prefix": "/airflow/connections"}`` and request conn_id ``smtp_default``.
  And if ssm path is ``/airflow/variables/hello``, this would be accessible
  if you provide ``{"variables_prefix": "/airflow/variables"}`` and variable key ``hello``.
  
  :param connections_prefix: Specifies the prefix of the secret to read to get Connections.
      If set to None (null), requests for connections will not be sent to AWS SSM Parameter Store.
  :param connections_lookup_pattern: Specifies a pattern the connection ID needs to match to be looked up in
      AWS Parameter Store. Applies only if `connections_prefix` is not None.
      If set to None (null value in the configuration), all connections will be looked up first in
      AWS Parameter Store.
  :param variables_prefix: Specifies the prefix of the secret to read to get Variables.
      If set to None (null), requests for variables will not be sent to AWS SSM Parameter Store.
  :param variables_lookup_pattern: Specifies a pattern the variable key needs to match to be looked up in
      AWS Parameter Store. Applies only if `variables_prefix` is not None.
      If set to None (null value in the configuration), all variables will be looked up first in
      AWS Parameter Store.
  :param config_prefix: Specifies the prefix of the secret to read to get Variables.
      If set to None (null), requests for configurations will not be sent to AWS SSM Parameter Store.
  :param config_lookup_pattern: Specifies a pattern the config key needs to match to be looked up in
      AWS Parameter Store. Applies only if `config_prefix` is not None.
      If set to None (null value in the configuration), all config keys will be looked up first in
      AWS Parameter Store.
  
  You can also pass additional keyword arguments listed in AWS Connection Extra config
  to this class, and they would be used for establish connection and passed on to Boto3 client.
  
  .. code-block:: ini
  
      [secrets]
      backend = airflow.providers.amazon.aws.secrets.systems_manager.SystemsManagerParameterStoreBackend
      backend_kwargs = {"connections_prefix": "airflow/connections", "region_name": "eu-west-1"}
  
  .. seealso::
      :ref:`howto/connection:aws:configuring-the-connection`
docstr: AWS Systems Manager mandate to have a leading "/". Adding it dynamically if not there to the SSM path.
  
  :param ssm_path: SSM parameter path
docstr_tok: ["AWS","Systems","Manager","mandate","to","have","a","leading","``","\/","''",".","Adding","it","dynamically","if","not","there","to","the","SSM","path",".",":","param","ssm_path",":","SSM","parameter","path"]
code: def _ensure_leading_slash(self, ssm_path: str):
      """
      AWS Systems Manager mandate to have a leading "/". Adding it dynamically if not there to the SSM path.
  
      :param ssm_path: SSM parameter path
      """
      if not ssm_path.startswith("/"):
          ssm_path = f"/{ssm_path}"
  
      return ssm_path
  
file_path: airflow/airflow/providers/amazon/aws/secrets/systems_manager.py
imports: from __future__ import annotations
  import re
  from functools import cached_property
  from airflow.providers.amazon.aws.utils import trim_none_values
  from airflow.secrets import BaseSecretsBackend
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 7 for calling the SystemsManagerParameterStoreBackend obj's underlying member method code with example usage: obj._ensure_leading_slash(ssm_path) and returns: ssm_path