Flowlog

nic_flowlog

This is a simple module that supports creating or removing NIC Flowlogs. This module has a dependency on ionoscloud >= 6.0.2

Example Syntax


name: Create a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  name: 'AnsibleAutoTestCompute'
  action: ACCEPTED
  direction: INGRESS
  bucket: sdktest
  datacenter: ''
  server: ''
  nic: ''
register: flowlog_response


name: Update a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  name: 'AnsibleAutoTestCompute'
  action: ALL
  direction: INGRESS
  bucket: sdktest
  datacenter: ''
  server: ''
  nic: ''
  flowlog: ''
  state: update
register: flowlog_update_response


name: Delete a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  datacenter: ''
  server: ''
  nic: ''
  flowlog: ''
  name: 'AnsibleAutoTestCompute'
  state: absent
  wait: true
register: flowlog_delete_response

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "flowlog": {
        "href": "https://api.ionos.com/cloudapi/v6/datacenters/47724f5f-625d-46e3-8187-0fce19c74e5c/servers/4e55f7f3-78f2-46c0-9c61-8de00d7cd484/nics/c386eede-b756-441e-97a7-5de4da8518ed/flowlogs/37a775b2-4dad-418a-8cbd-0499ad34d713",
        "id": "37a775b2-4dad-418a-8cbd-0499ad34d713",
        "metadata": {
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "created_date": "2023-06-06T14:06:00+00:00",
            "etag": "043560db87ade8f005d69efbec1eedea",
            "last_modified_by": "<USER_EMAIL>",
            "last_modified_by_user_id": "<USER_ID>",
            "last_modified_date": "2023-06-06T14:06:00+00:00",
            "state": "BUSY"
        },
        "properties": {
            "action": "ACCEPTED",
            "bucket": "sdktest",
            "direction": "INGRESS",
            "name": "AnsibleAutoTestCompute"
        },
        "type": "flow-log"
    }
}

For more examples please check out the tests here.

state: present

  
name: Create a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  name: 'AnsibleAutoTestCompute'
  action: ACCEPTED
  direction: INGRESS
  bucket: sdktest
  datacenter: ''
  server: ''
  nic: ''
register: flowlog_response

Available parameters for state present:

NameRequiredDescription

name str

True

The resource name.

datacenter str

True

The ID or name of the virtual datacenter.

server str

True

The ID or name of the Server.

nic str

True

The ID or name of the NIC.

action str

True

Specifies the traffic action pattern.

direction str

True

Specifies the traffic direction pattern.

bucket str

True

The S3 bucket name of an existing IONOS Cloud S3 bucket.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: absent

  
name: Delete a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  datacenter: ''
  server: ''
  nic: ''
  flowlog: ''
  name: 'AnsibleAutoTestCompute'
  state: absent
  wait: true
register: flowlog_delete_response

Available parameters for state absent:

NameRequiredDescription

flowlog str

True

The ID or name of an existing Flowlog.

datacenter str

True

The ID or name of the virtual datacenter.

server str

True

The ID or name of the Server.

nic str

True

The ID or name of the NIC.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

state: update

  
name: Update a nic flowlog
ionoscloudsdk.ionoscloud.nic_flowlog:
  name: 'AnsibleAutoTestCompute'
  action: ALL
  direction: INGRESS
  bucket: sdktest
  datacenter: ''
  server: ''
  nic: ''
  flowlog: ''
  state: update
register: flowlog_update_response

Available parameters for state update:

NameRequiredDescription

name str

False

The resource name.

flowlog str

True

The ID or name of an existing Flowlog.

datacenter str

True

The ID or name of the virtual datacenter.

server str

True

The ID or name of the Server.

nic str

True

The ID or name of the NIC.

action str

False

Specifies the traffic action pattern.

direction str

False

Specifies the traffic direction pattern.

bucket str

False

The S3 bucket name of an existing IONOS Cloud S3 bucket.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']

Last updated