spot.cloud_modules.event_subscription (1.3.3) — module

Create event subscription for resource

| "added in version" 1.0.0 of spot.cloud_modules"

Authors: Spot by NetApp (@jeffnoehren)

Install collection

Install with ansible-galaxy collection install spot.cloud_modules:==1.3.3


Add to requirements.yml

  collections:
    - name: spot.cloud_modules
      version: 1.3.3

Description

Can create event subscription for resource You will have to have a credentials file in this location - <home>/.spotinst/credentials The credentials file must contain a row that looks like this token = <YOUR TOKEN> Full documentation available at U(https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible-)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#In this basic example, we create an event subscription

- hosts: localhost
  tasks:
    - name: create event subscription
      event_subscription:
        account_id:
        token:
        state: present
        id: sis-e62dfd0f
        resource_id: sig-992a78db
        protocol: web
        endpoint: https://webhook.com
        event_type: GROUP_UPDATED
        event_format: { "subject" : "%s", "message" : "%s" }
      register: result
    - debug: var=result

Inputs

    
id:
    description:
    - Parameters used for Updating or Deleting subscription.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - create update or delete
    type: str

token:
    description:
    - Optional parameter that allows to set an token inside the module configuration.
      By default this is retrieved from the credentials path
    type: str

endpoint:
    description:
    - Endpoint for Subscription to hit
    type: str

protocol:
    description:
    - (String) Type of desired protocol

account_id:
    description:
    - Optional parameter that allows to set an account-id inside the module configuration.
      By default this is retrieved from the credentials path
    type: str

event_type:
    description:
    - Type of desired event
    type: str

resource_id:
    description:
    - Resource that the subscription will be on
    type: str

event_format:
    description:
    - Event body to be sent to endpoint
    type: str

credentials_path:
    default: ~/.spotinst/credentials
    description:
    - Optional parameter that allows to set a non-default credentials path.
    type: str

Outputs

result:
  description: Created Subscription successfully
  returned: success
  sample: sis-e62dfd0f
  type: str