code: def get_accounts(self, provider='aws'):
          
          url = '{gate}/credentials'.format(gate=API_URL)
          response = requests.get(url, verify=GATE_CA_BUNDLE, cert=GATE_CLIENT_CERT)
          assert response.ok, 'Failed to get accounts: {0}'.format(response.text)
  
          all_accounts = response.json()
          self.log.debug('Accounts in Spinnaker:\n%s', all_accounts)
  
          filtered_accounts = []
          for account in all_accounts:
              if account['type'] == provider:
                  filtered_accounts.append(account)
  
          if not filtered_accounts:
              raise ForemastError('No Accounts matching {0}.'.format(provider))
  
          return filtered_accounts
docs: Get Accounts added to Spinnaker.
  
          Args:
              provider (str): What provider to find accounts for.
  
          Returns:
              list: list of dicts of Spinnaker credentials matching _provider_.
  
          Raises:
              AssertionError: Failure getting accounts from Spinnaker.