parameters: (self, url_path, retry_func, token=None)
docstring: Make a get request to the Instance Metadata Service.
  
          :type url_path: str
          :param url_path: The path component of the URL to make a get request.
              This arg is appended to the base_url that was provided in the
              initializer.
  
          :type retry_func: callable
          :param retry_func: A function that takes the response as an argument
               and determines if it needs to retry. By default empty and non
               200 OK responses are retried.
  
          :type token: str
          :param token: Metadata token to send along with GET requests to IMDS.
docstring_summary: Make a get request to the Instance Metadata Service.
docstring_tokens: Make a get request to the Instance Metadata Service .
function: def _get_request(self, url_path, retry_func, token=None):
          """Make a get request to the Instance Metadata Service.
  
          :type url_path: str
          :param url_path: The path component of the URL to make a get request.
              This arg is appended to the base_url that was provided in the
              initializer.
  
          :type retry_func: callable
          :param retry_func: A function that takes the response as an argument
               and determines if it needs to retry. By default empty and non
               200 OK responses are retried.
  
          :type token: str
          :param token: Metadata token to send along with GET requests to IMDS.
          """
          self._assert_enabled()
          if retry_func is None:
              retry_func = self._default_retry
          url = self._base_url + url_path
          headers = {}
          if token is not None:
              headers['x-aws-ec2-metadata-token'] = token
          self._add_user_agent(headers)
          for i in range(self._num_attempts):
              try:
                  request = botocore.awsrequest.AWSRequest(
                      method='GET', url=url, headers=headers)
                  response = self._session.send(request.prepare())
                  if not retry_func(response):
                      return response
              except RETRYABLE_HTTP_ERRORS as e:
                  logger.debug(
                      "Caught retryable HTTP exception while making metadata "
                      "service request to %s: %s", url, e, exc_info=True)
          raise self._RETRIES_EXCEEDED_ERROR_CLS()
function_tokens: def _get_request ( self , url_path , retry_func , token = None ) : self . _assert_enabled ( ) if retry_func is None : retry_func = self . _default_retry url = self . _base_url + url_path headers = { } if token is not None : headers [ 'x-aws-ec2-metadata-token' ] = token self . _add_user_agent ( headers ) for i in range ( self . _num_attempts ) : try : request = botocore . awsrequest . AWSRequest ( method = 'GET' , url = url , headers = headers ) response = self . _session . send ( request . prepare ( ) ) if not retry_func ( response ) : return response except RETRYABLE_HTTP_ERRORS as e : logger . debug ( "Caught retryable HTTP exception while making metadata " "service request to %s: %s" , url , e , exc_info = True ) raise self . _RETRIES_EXCEEDED_ERROR_CLS ( )