cisco.dnac.access_groups_info module -- Information module for Access Groups

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.access_groups_info.

New in cisco.dnac 6.46.0

Synopsis

  • Get all Access Groups.

  • Get Access Groups by id.

  • Get all access groups in the system.

  • Get an access group in the system.

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"`

headers

dictionary

Additional headers.

id

string

Id path parameter. Id of the access group to query.

ids

string

Ids query parameter. Get access groups by passing a comma separated list of their ids.

limit

integer

Limit query parameter. Limit on the number of access groups on a page. Default page size is 20.

names

string

Names query parameter. Get access groups by passing comma separated list of names. It performs an exact character match.

offset

integer

Offset query parameter. An integer representing the starting access group in the page returned.

sourceResourceIds

string

SourceResourceIds query parameter. Get access groups by passing the ids of the resource associated with it such as the site hierarchy id.

type

string

Type query parameter. Get access groups by passing the type of the resource such as site.

userCount

string

UserCount query parameter. If set to true, it will return number of users associated with each access group. Default is false.

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 userand_roles.UserandRoles.get_access_group, userand_roles.UserandRoles.get_access_groups,

  • Paths used are get /dna/system/api/v1/accessGroups, get /dna/system/api/v1/accessGroups/{id},

  • Supports 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 User and Roles GetAccessGroup

Complete reference of the GetAccessGroup API.

Cisco DNA Center documentation for User and Roles GetAccessGroups

Complete reference of the GetAccessGroups API.

Examples

---
- name: Get all Access Groups
  cisco.dnac.access_groups_info:
    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}}"
    headers: "{{my_headers | from_json}}"
    userCount: string
    names: string
    type: string
    sourceResourceIds: string
    ids: string
    offset: 0
    limit: 0
  register: result
- name: Get Access Groups by id
  cisco.dnac.access_groups_info:
    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}}"
    headers: "{{my_headers | from_json}}"
    id: string
  register: result

Return Values

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

Key

Description

dnac_response

dictionary

Authors

  • Rafael Campos (@racampos)