cisco.dnac.device_credential – Manage DeviceCredential objects of NetworkSettings

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

New in version 1.0.0: of cisco.dnac

Synopsis

  • API to get device credential details.

  • API to create device credentials.

  • API to update device credentials.

  • Delete device credential.

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
id
string
Global credential id.
Required for state delete.
settings
dictionary / required
Settings, property of the request body.
cliCredential
raw
It is the device credential's cliCredential.
Type list for state create.
Type dict for state update.
httpsRead
raw
It is the device credential's httpsRead.
Type list for state create.
Type dict for state update.
httpsWrite
raw
It is the device credential's httpsWrite.
Type list for state create.
Type dict for state update.
snmpV2cRead
raw
It is the device credential's snmpV2cRead.
Type list for state create.
Type dict for state update.
snmpV2cWrite
raw
It is the device credential's snmpV2cWrite.
Type list for state create.
Type dict for state update.
snmpV3
raw
It is the device credential's snmpV3.
Type list for state create.
Type dict for state update.
site_id
string
Site id to retrieve the credential details associated with the site.

See Also

See also

cisco.dnac.plugins.module_utils.definitions.device_credential

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

DeviceCredential reference

Complete reference of the DeviceCredential object model.

DeviceCredential reference

SDK reference.

Examples

- name: get_device_credential_details
  cisco.dnac.device_credential:
    state: query  # required
    site_id: SomeValue  # string
  register: nm_get_device_credential_details

- name: create_device_credentials
  cisco.dnac.device_credential:
    state: create  # required
    settings:  # required
      cliCredential:
      - description: SomeValue  # string, required
        username: SomeValue  # string, required
        password: SomeValue  # string, required
        enablePassword: SomeValue  # string
      snmpV2cRead:
      - readCommunity: SomeValue  # string, required
        description: SomeValue  # string
      snmpV2cWrite:
      - writeCommunity: SomeValue  # string, required
        description: SomeValue  # string
      snmpV3:
      - description: SomeValue  # string, required
        username: SomeValue  # string, required
        privacyType: SomeValue  # string, required
        privacyPassword: SomeValue  # string, required
        authType: SomeValue  # string, required
        snmpMode: SomeValue  # string, required
        authPassword: SomeValue  # string
      httpsRead:
      - username: SomeValue  # string, required
        password: SomeValue  # string, required
        name: SomeValue  # string
        port: 1  #  number
      httpsWrite:
      - username: SomeValue  # string, required
        password: SomeValue  # string, required
        name: SomeValue  # string
        port: 1  #  number

- name: update_device_credentials
  cisco.dnac.device_credential:
    state: update  # required
    settings:  # required
      cliCredential:
        description: SomeValue  # string
        username: SomeValue  # string
        password: SomeValue  # string
        enablePassword: SomeValue  # string
        id: SomeValue  # string
      snmpV2cRead:
        description: SomeValue  # string
        readCommunity: SomeValue  # string
        id: SomeValue  # string
      snmpV2cWrite:
        description: SomeValue  # string
        writeCommunity: SomeValue  # string
        id: SomeValue  # string
      snmpV3:
        authPassword: SomeValue  # string
        authType: SomeValue  # string
        snmpMode: SomeValue  # string
        privacyPassword: SomeValue  # string
        privacyType: SomeValue  # string
        username: SomeValue  # string
        description: SomeValue  # string
        id: SomeValue  # string
      httpsRead:
        name: SomeValue  # string
        username: SomeValue  # string
        password: SomeValue  # string
        port: SomeValue  # string
        id: SomeValue  # string
      httpsWrite:
        name: SomeValue  # string
        username: SomeValue  # string
        password: SomeValue  # string
        port: SomeValue  # string
        id: SomeValue  # string

- name: delete_device_credential
  cisco.dnac.device_credential:
    state: delete  # required
    id: SomeValue  # string, required

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:
network_settings.create_device_credentials


Authors

  • Rafael Campos (@racampos)