pureport.pureport.cloud_regions_info (0.0.9) — module

Retrieve a list of cloud regions

| "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 cloud regions


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List cloud regions
  cloud_regions_info:
    api_key: XXXXXXXXXXXXX
    api_secret: XXXXXXXXXXXXXXXXX
  register: result   # Registers result.cloud_regions
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Display all cloud region hrefs using a json_query filter
  debug:
    var: item
  loop: "{{ result.cloud_regions | 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

cloud_regions:
  contains:
    display_name:
      description:
      - A display name for this cloud region.
      returned: success
      sample: US West (N. California)
      type: str
    href:
      description:
      - The cloud region href, a path to resource on the server.
      returned: success
      sample: /cloudRegions/aws-us-west-1
      type: str
    id:
      description:
      - The cloud region id.
      returned: success
      sample: aws-us-west-1
      type: str
    provider:
      description:
      - The cloud region provider.
      returned: success
      sample: AWS
      type: str
    provider_assigned_id:
      description:
      - The cloud region provider's id.
      returned: success
      sample: us-west-1
      type: str
  description: A list of CloudRegion (dict) objects.
  returned: success
  type: complex