cisco.dnac.tag (2.0.7) — module

Manage Tag objects of Tag

| "added in version" 1.0.0 of cisco.dnac"

Authors: Rafael Campos (@racampos)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install cisco.dnac:==2.0.7


Add to requirements.yml

  collections:
    - name: cisco.dnac
      version: 2.0.7

Description

Returns the Tags for given filter criteria.

Creates Tag with specified Tag attributes.

Updates a Tag specified by id.

Deletes a Tag specified by id.

Returns Tag specified by Id.

Returns Tag count.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_tag
  cisco.dnac.tag:
    state: query  # required
    additional_info_attributes: SomeValue  # string
    additional_info_name_space: SomeValue  # string
    field: SomeValue  # string
    level: SomeValue  # string
    limit: SomeValue  # string
    name: SomeValue  # string
    offset: SomeValue  # string
    order: SomeValue  # string
    size: SomeValue  # string
    sort_by: SomeValue  # string
    system_tag: SomeValue  # string
  register: nm_get_tag
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create_tag
  cisco.dnac.tag:
    state: present  # required
    description: SomeValue  # string
    dynamicRules:
    - memberType: SomeValue  # string
      rules:
        values:
        - SomeValue  # string
        items: None
        operation: SomeValue  # string
        name: SomeValue  # string
        value: SomeValue  # string
    id: SomeValue  # string
    instanceTenantId: SomeValue  # string
    name: SomeValue  # string
    systemTag: True  # boolean
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: update_tag
  cisco.dnac.tag:
    state: present  # required
    description: SomeValue  # string
    dynamicRules:
    - memberType: SomeValue  # string
      rules:
        values:
        - SomeValue  # string
        items: None
        operation: SomeValue  # string
        name: SomeValue  # string
        value: SomeValue  # string
    id: SomeValue  # string
    instanceTenantId: SomeValue  # string
    name: SomeValue  # string
    systemTag: True  # boolean
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete_tag
  cisco.dnac.tag:
    state: absent  # required
    id: SomeValue  # string, required
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_tag_by_id
  cisco.dnac.tag:
    state: query  # required
    id: SomeValue  # string, required
  register: nm_get_tag_by_id
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get_tag_count
  cisco.dnac.tag:
    state: query  # required
    count: True  # boolean, required
    attribute_name: SomeValue  # string
    level: SomeValue  # string
    name: SomeValue  # string
    name_space: SomeValue  # string
    size: SomeValue  # string
    system_tag: SomeValue  # string
  register: nm_get_tag_count

Inputs

    
id:
    description:
    - TagDTO's id.
    - Tag ID.
    - Required for states query and absent.
    type: str

name:
    description:
    - Tag name is mandatory when filter operation is used.
    - TagDTO's name.
    - Name query parameter.
    type: str

size:
    description:
    - Size in kilobytes(KB).
    type: str

count:
    description:
    - If true gets the number of objects.
    - Required for state query.
    type: bool

field:
    description:
    - Available field names are 'name,id,parentId,type,additionalInfo.nameSpace,additionalInfo.attributes'.
    type: str

level:
    description:
    - Level query parameter.
    type: str

limit:
    description:
    - Limit query parameter.
    type: str

order:
    description:
    - Available values are asc and des.
    type: str

offset:
    description:
    - Offset query parameter.
    type: str

sort_by:
    description:
    - Only supported attribute is name. SortyBy is mandatory when order is used.
    type: str

systemTag:
    description:
    - TagDTO's systemTag.
    type: bool

name_space:
    description:
    - NameSpace query parameter.
    type: str

system_tag:
    description:
    - SystemTag query parameter.
    type: str

description:
    description:
    - TagDTO's description.
    type: str

dynamicRules:
    description:
    - TagDTO's dynamicRules (list of objects).
    elements: dict
    suboptions:
      memberType:
        description:
        - It is the Tag's memberType.
        type: str
      rules:
        description:
        - It is the Tag's rules.
        suboptions:
          items:
            description:
            - It is the Tag's items.
            type: list
          name:
            description:
            - It is the Tag's name.
            type: str
          operation:
            description:
            - It is the Tag's operation.
            type: str
          value:
            description:
            - It is the Tag's value.
            type: str
          values:
            description:
            - It is the Tag's values.
            type: list
        type: dict
    type: list

attribute_name:
    description:
    - AttributeName query parameter.
    type: str

instanceTenantId:
    description:
    - TagDTO's instanceTenantId.
    type: str

additional_info_attributes:
    description:
    - AdditionalInfo.attributes query parameter.
    type: str

additional_info_name_space:
    description:
    - AdditionalInfo.nameSpace query parameter.
    type: str

Outputs

dnac_response:
  description: A dictionary with the response returned by the DNA Center Python SDK
  returned: always
  sample:
    response: 29
    version: '1.0'
  type: dict
missing_params:
  description: Provided arguments do not comply with the schema of the DNA Center
    Python SDK function
  returned: when the function request schema is not satisfied
  sample: null
  type: list
sdk_function:
  description: The DNA Center SDK function used to execute the task
  returned: always
  sample: tag.create_tag
  type: str

See also