cisco.dnac.tag_member – Manage TagMember objects of Tag

Note

This plugin is part of the cisco.dnac collection (version 2.0.7).

To install it use: ansible-galaxy collection install cisco.dnac.

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

New in version 1.0.0: of cisco.dnac

Synopsis

  • Returns tag members specified by id.

  • Adds members to the tag specified by id.

  • Removes Tag member from the tag specified by id.

  • Returns the number of members in a given tag.

  • Updates tag membership. As part of the request payload through this API, only the specified members are added / retained to the given input tags. Possible values of memberType attribute in the request payload can be queried by using the /tag/member/type API.

  • Returns list of supported resource types.

Note

This module has a corresponding action plugin.

Requirements

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

  • dnacentersdk

Parameters

Parameter Choices/Defaults Comments
count
boolean
    Choices:
  • no
  • yes
If true gets the number of objects.
Required for state query.
id
string / required
Tag ID.
level
string
Level query parameter.
limit
string
Used to Number of maximum members to return in the result.
member_association_type
string
Indicates how the member is associated with the tag. Possible values and description. 1) DYNAMIC The member is associated to the tag through rules. 2) STATIC – The member is associated to the tag manually. 3) MIXED – The member is associated manually and also satisfies the rule defined for the tag.
MemberAssociationType query parameter.
member_id
string
TagMember id to be removed from tag.
Required for state delete.
member_type
string / required
Entity type of the member. Possible values can be retrieved by using /tag/member/type API.
MemberType query parameter.
memberToTags
dictionary
TagMemberDTO's memberToTags.
key
list / elements=string
It is the tag member's key.
memberType
string
TagMemberDTO's memberType.
offset
string
Used for pagination. It indicates the starting row number out of available member records.

See Also

See also

cisco.dnac.plugins.module_utils.definitions.tag_member

The official documentation on the cisco.dnac.plugins.module_utils.definitions.tag_member module.

TagMember reference

Complete reference of the TagMember object model.

TagMember reference

SDK reference.

Examples

- name: get_tag_members_by_id
  cisco.dnac.tag_member:
    state: query  # required
    id: SomeValue  # string, required
    member_type: SomeValue  # string, required
    level: SomeValue  # string
    limit: SomeValue  # string
    member_association_type: SomeValue  # string
    offset: SomeValue  # string
  register: nm_get_tag_members_by_id

- name: add_members_to_the_tag
  cisco.dnac.tag_member:
    state: create  # required
    id: SomeValue  # string, required

- name: remove_tag_member
  cisco.dnac.tag_member:
    state: delete  # required
    id: SomeValue  # string, required
    member_id: SomeValue  # string, required

- name: get_tag_member_count
  cisco.dnac.tag_member:
    state: query  # required
    id: SomeValue  # string, required
    member_type: SomeValue  # string, required
    count: True  # boolean, required
    level: SomeValue  # string
    member_association_type: SomeValue  # string
  register: nm_get_tag_member_count

- name: updates_tag_membership
  cisco.dnac.tag_member:
    state: update  # required
    memberToTags:
      key:
      - SomeValue  # string
    memberType: SomeValue  # string

- name: get_tag_resource_types
  cisco.dnac.tag_member:
    state: query  # required
  register: nm_get_tag_resource_types

Return Values

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

Key Returned Description
dnac_response
dictionary
always
A dictionary with the response returned by the DNA Center Python SDK

Sample:
{'response': 29, 'version': '1.0'}
missing_params
list / elements=string
when the function request schema is not satisfied
Provided arguments do not comply with the schema of the DNA Center Python SDK function

sdk_function
string
always
The DNA Center SDK function used to execute the task

Sample:
tag.add_members_to_the_tag


Authors

  • Rafael Campos (@racampos)