cisco.dnac.applications_v2 module -- Resource module for Applications V2

Note

This module is part of the cisco.dnac collection (version 6.46.0).

To install it, use: ansible-galaxy collection install cisco.dnac. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.dnac.applications_v2.

New in cisco.dnac 6.14.0

Synopsis

  • Manage operations create, update and delete of the resource Applications V2.

  • Create new custom application/s.

  • Delete existing custom application by id.

  • Edit the attributes of an existing application.

Note

This module has a corresponding action plugin.

Requirements

The below requirements are needed on the host that executes this module.

  • dnacentersdk >= 2.11.0

  • python >= 3.12

Parameters

Parameter

Comments

dnac_debug

boolean

Flag for Cisco DNA Center SDK to enable debugging.

Choices:

dnac_host

string / required

The Cisco DNA Center hostname.

dnac_password

string

The Cisco DNA Center password to authenticate.

dnac_port

integer

The Cisco DNA Center port.

Default: :ansible-option-default:`443`

dnac_username

aliases: user

string

The Cisco DNA Center username to authenticate.

Default: :ansible-option-default:`"admin"`

dnac_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

dnac_version

string

Informs the SDK which version of Cisco DNA Center to use.

Default: :ansible-option-default:`"3.1.6.0"`

id

string

Id path parameter. Id of custom application to delete.

payload

list / elements=dictionary

Applications V2's payload.

indicativeNetworkIdentity

list / elements=dictionary

Applications V2's indicativeNetworkIdentity.

ipv4Subnet

list / elements=string

Ipv4 subnet.

ipv6Subnet

list / elements=string

Ipv6 subnet.

lowerPort

float

The minimum port when used as a port range. For single port number, ports attribute should be used.

ports

string

Ports.

protocol

string

Protocol.

upperPort

float

The maximum port when used as a port range. For single port number, ports attribute should be used.

name

string

Application name.

networkApplications

list / elements=dictionary

Applications V2's networkApplications.

applicationType

string

Application type.

appProtocol

string

App protocol, in case of _servername should not be set, in case of _url should be set to TCP.

categoryId

string

Category id.

dscp

string

Dscp, valid only in case of _server-ip custom application type.

engineId

integer

Engine id, should be set to 6.

helpString

string

Help string.

ignoreConflict

boolean

rank

integer

Rank, should be set to 1.

serverName

string

Server name, should be set only in case of _servername.

trafficClass

string

Traffic class.

type

string

Custom application type.

url

string

Url, should be set only in case of _url.

networkIdentity

list / elements=dictionary

Applications V2's networkIdentity.

ipv4Subnet

list / elements=string

Ipv4 subnet.

lowerPort

float

Lower port.

ports

string

Ports.

protocol

string

Protocol.

upperPort

float

Upper port.

parentScalableGroup

dictionary

Applications V2's parentScalableGroup.

idRef

string

Id reference to parent application set.

scalableGroupType

string

Scalable group type, valid value APPLICATION.

type

string

Type, valid value scalablegroup.

validate_response_schema

boolean

Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

Notes

Note

  • SDK Method used are application_policy.ApplicationPolicy.create_applications_v2, application_policy.ApplicationPolicy.delete_application_v2, application_policy.ApplicationPolicy.edit_applications_v2,

  • Paths used are post /dna/intent/api/v2/applications, delete /dna/intent/api/v2/applications/{id}, put /dna/intent/api/v2/applications,

  • Does not support check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK

  • The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection

See Also

See also

Cisco DNA Center documentation for Application Policy CreateApplicationsV2

Complete reference of the CreateApplicationsV2 API.

Cisco DNA Center documentation for Application Policy DeleteApplicationV2

Complete reference of the DeleteApplicationV2 API.

Cisco DNA Center documentation for Application Policy EditApplicationsV2

Complete reference of the EditApplicationsV2 API.

Examples

---
- name: Create
  cisco.dnac.applications_v2:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    state: present
    payload:
      - indicativeNetworkIdentity:
          - ipv4Subnet:
              - string
            ipv6Subnet:
              - string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        name: string
        networkApplications:
          - appProtocol: string
            applicationType: string
            categoryId: string
            dscp: string
            engineId: 0
            helpString: string
            ignoreConflict: true
            rank: 0
            serverName: string
            trafficClass: string
            type: string
            url: string
        networkIdentity:
          - ipv4Subnet:
              - string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        parentScalableGroup:
          idRef: string
        scalableGroupType: string
        type: string
- name: Update all
  cisco.dnac.applications_v2:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    state: present
    payload:
      - displayName: string
        id: string
        indicativeNetworkIdentity:
          - displayName: string
            id: string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        instanceId: 0
        instanceVersion: 0
        name: string
        namespace: string
        networkApplications:
          - appProtocol: string
            applicationSubType: string
            applicationType: string
            categoryId: string
            displayName: string
            dscp: string
            engineId: string
            helpString: string
            id: string
            ignoreConflict: true
            longDescription: string
            name: string
            popularity: 0
            rank: 0
            selectorId: string
            serverName: string
            trafficClass: string
            url: string
        networkIdentity:
          - displayName: string
            id: string
            ipv4Subnet:
              - string
            ipv6Subnet:
              - string
            lowerPort: 0
            ports: string
            protocol: string
            upperPort: 0
        parentScalableGroup:
          idRef: string
        qualifier: string
        scalableGroupExternalHandle: string
        scalableGroupType: string
        type: string
- name: Delete by id
  cisco.dnac.applications_v2:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    state: absent
    id: string

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

dnac_response

dictionary

A dictionary or list with the response returned by the Cisco DNAC Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`{"response": {"taskId": "string", "url": "string"}, "version": "string"}`

Authors

  • Rafael Campos (@racampos)