pureport.pureport.pureport_account_facts (0.0.9) — module

Retrieve a list of accounts for the given api credentials

| "added in version" 2.8 of pureport.pureport"

Authors: Matt Traynham (@mtraynham)

preview | supported by Pureport

Install collection

Install with ansible-galaxy collection install pureport.pureport:==0.0.9


Add to requirements.yml

  collections:
    - name: pureport.pureport
      version: 0.0.9

Description

Retrieve a list of accounts for the given api credentials


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List accounts for an API key pair
  accounts_info:
    api_key: XXXXXXXXXXXXX
    api_secret: XXXXXXXXXXXXXXXXX
  register: result   # Registers result.accounts
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Display all account hrefs using a json_query filter
  debug:
    var: item
  loop: "{{ result.accounts | json_query('[*].href') }}"

Inputs

    
api_key:
    description:
    - The pre-configured API Key for a Pureport Account.
    - Users should provide either the 'api_key' and 'api_secret' or the obtained 'api_access_token'.
    required: false
    type: str

api_secret:
    description:
    - The pre-configured API Secret for a Pureport Account.
    - Users should provide either the 'api_key' and 'api_secret' or the obtained 'api_access_token'.
    required: false
    type: str

api_base_url:
    description:
    - The host url for the Pureport API.
    required: false
    type: str

api_access_token:
    description:
    - The access token to use with Pureport API.  This can be obtained from
    - the `pureport_access_token_fact` module.
    - Users should provide either the 'api_key' and 'api_secret' or the obtained 'api_access_token'.
    type: str

Outputs

accounts:
  contains:
    description:
      description:
      - The account description.
      returned: success
      sample: My account description
      type: str
    href:
      description:
      - The account href, a path to resource on the server.
      returned: success
      sample: /accounts/ac-1kAtS97scnsIkdB291YCbg
      type: str
    id:
      description:
      - The account id
      returned: success
      sample: ac-1kAtS97scnsIkdB291YCbg
      type: str
    name:
      description:
      - The account name.
      returned: success
      sample: My Account Name
      type: str
    parent:
      contains:
        href:
          description:
          - The parent account href.
          returned: success
          sample: /accounts/ac-K0TL4YjBctBOHyVKj9hHaQ
          type: str
        id:
          description:
          - The parent account id.
          returned: success
          sample: ac-K0TL4YjBctBOHyVKj9hHaQ
          type: str
        title:
          description:
          - The parent account name.
          returned: success
          sample: My Parent Account Name
          type: str
      description:
      - The parent Account Link object.
      returned: success
      type: complex
  description: A list of Account (dict) objects.
  returned: success
  type: complex