serverscom.sc_api.sc_l2_segment_info (0.1.0) — module

Information about L2 segment.

| "added in version" 1.0.0 of serverscom.sc_api"

Authors: George Shuklin (@amarao)

preview | supported by community

Install collection

Install with ansible-galaxy collection install serverscom.sc_api:==0.1.0


Add to requirements.yml

  collections:
    - name: serverscom.sc_api
      version: 0.1.0

Description

Returns information about exiting L2 segment or fail.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather information about existing L2 segments
  serverscom.sc_api.sc_l2_segment_info:
    token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MzgxMjEsInR5cGUiOiJVc2VyIiwiYWNjZXNzX2dyYW50X2lkIjoyNjgwNywiZXhwIjoyMjI2OTk3NjMwfQ.rO4nGXNgXggjNmMJBLXovOh1coNrDWl4dGrGFupYXJE'
    id: 'WZdPwbKg'
  register: sc_l2_seg
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Print all locations
  debug: var=sc_l2_seg.l2_segment

Inputs

    
id:
    description:
    - ID of the L2 segement
    - Either I(name) or I(id) is required
    type: str

name:
    description:
    - Name of the L2 segment
    - Either I(name) or I(id) is required
    type: str

token:
    description:
    - Token to use.
    - You can create token for you account in https://portal.servers.com in Profile ->
      Public API section.
    required: true
    type: str

endpoint:
    default: https://api.servers.com/v1
    description:
    - Endpoint to use to connect to API.
    - Do not change until specifically asked to do otherwise.
    type: str

Outputs

api_url:
  description: URL for the failed request
  returned: on failure
  type: str
l2_segment:
  contains:
    created_at:
      description:
      - Creation date and time
      type: str
    id:
      description:
      - ID of the L2 segement
      type: str
    location_group_code:
      description:
      - Textual name of the location group
      type: str
    location_group_id:
      description:
      - Id of the location group where L2 segment was created
      type: int
    name:
      description:
      - Name of the L2 segement
      type: str
    status:
      description:
      - Status of the segment. C(active) means segment is ready to be used.
      type: str
    type:
      description:
      - Type of the segement. Either C(public) or C(private)
      type: str
    updated_at:
      description:
      - Last update date and time
      type: str
  description:
  - Information about L2 segments
  returned: on success
  type: complex
status_code:
  description: Status code for the request
  returned: always
  type: int