pureport.pureport.connections_info (0.0.9) — module

Retrieve a list of connections for a account or network

| "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 connections for a account or network


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List connections for an account
  connections_info:
    api_key: XXXXXXXXXXXXX
    api_secret: XXXXXXXXXXXXXXXXX
    account_href: /accounts/ac-XXXXXXXXXXXXXXXXXXXXXX
  register: result   # Registers result.connections
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List connections for a network
  connections_info:
    api_key: XXXXXXXXXXXXX
    api_secret: XXXXXXXXXXXXXXXXX
    network_href: /networks/network-XXXXXXXXXXXXXXXXXXXXXX
  register: result   # Registers result.connections
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Display all connection hrefs using a json_query filter
  debug:
    var: item
  loop: "{{ result.connections | 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

account_href:
    description:
    - The Pureport Account object.
    - This should be the full 'href' path to the Account ReST object (e.g /accounts/abc).
    - One of 'account_href' or 'network_href' should be supplied for this command, but
      not both.
    required: false
    type: str

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

network_href:
    description:
    - The Pureport Network object.
    - This should be the full 'href' path to the Network ReST object (e.g /networks/abc).
    - One of 'account_href' or 'network_href' should be supplied for this command, but
      not both.
    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

connections:
  description: a list of Connection (dict) objects
  type: list[Connection]