cisco.ise.device_administration_time_date_conditions 模块 – 设备管理时间日期条件资源模块

注意

此模块是 cisco.ise 集合(版本 2.9.6)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install cisco.ise。您需要其他要求才能使用此模块,请参阅 要求 了解详细信息。

要在 playbook 中使用它,请指定:cisco.ise.device_administration_time_date_conditions

cisco.ise 1.0.0 中的新功能

概要

  • 管理资源设备管理时间日期条件的创建、更新和删除操作。

  • 设备管理 - 创建时间/日期条件。

  • 设备管理 - 删除时间/日期条件。

  • 设备管理 - 更新网络条件。

注意

此模块具有相应的 操作插件

要求

执行此模块的主机上需要满足以下要求。

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

attributeId

字符串

字典属性 ID(可选),用于其他验证。

attributeName

字符串

字典属性名称。

attributeValue

字符串

<ul><li>条件的属性值</li> <li>值类型在字典对象中指定</li> <li>如果字典对象中指定允许多个值</li></ul>。

children

列表 / 元素=字典

如果类型为 andBlock 或 orBlock,则其他条件将在此逻辑(OR/AND)条件下聚合。

conditionType

字符串

<ul><li>指示记录是条件本身 (data) 还是逻辑 (or,and) 聚合</li> <li>数据类型枚举 (reference,single) 指示“conditonId”或“ConditionAttrs”字段应包含条件数据,但不能同时包含两者</li> <li>逻辑聚合 (and,or) 枚举指示 children 字段下存在其他条件</li></ul>。

isNegate

布尔值

指示此条件是否处于否定模式。

选择

  • false

  • true

字典

设备管理时间日期条件的链接。

字符串

设备管理时间日期条件的 href。

字符串

设备管理时间日期条件的 rel。

字符串

设备管理时间日期条件的类型。

conditionType

字符串

<ul><li>指示记录是条件本身 (data) 还是逻辑 (or,and) 聚合</li> <li>数据类型枚举 (reference,single) 指示“conditonId”或“ConditionAttrs”字段应包含条件数据,但不能同时包含两者</li> <li>逻辑聚合 (and,or) 枚举指示 children 字段下存在其他条件</li></ul>。

datesRange

字典

<p>定义时间日期条件将匹配或不匹配的日期,如果在 exceptionDates 属性中使用<br>选项包括 - 日期范围,对于特定日期,开始/结束日期应使用同一日期 <br>默认 - 无特定日期<br>为了将日期重置为无特定日期,日期格式为 - yyyy-mm-dd(MM = 月,dd = 日,yyyy = 年)</p>。

endDate

字符串

设备管理时间日期条件的结束日期。

startDate

字符串

设备管理时间日期条件的开始日期。

datesRangeException

字典

<p>定义时间日期条件将匹配或不匹配的日期,如果在 exceptionDates 属性中使用<br>选项包括 - 日期范围,对于特定日期,开始/结束日期应使用同一日期 <br>默认 - 无特定日期<br>为了将日期重置为无特定日期,日期格式为 - yyyy-mm-dd(MM = 月,dd = 日,yyyy = 年)</p>。

endDate

字符串

设备管理时间日期条件的结束日期。

startDate

字符串

设备管理时间日期条件的开始日期。

description

字符串

条件描述。

dictionaryName

字符串

字典名称。

dictionaryValue

字符串

字典值。

hoursRange

字典

<p>定义时间日期条件将匹配或不匹配的小时数,如果在 exceptionHours 属性中使用<br>时间格式 - hh mm(h = 小时,mm = 分钟)<br>默认 - 全天</p>。

endTime

字符串

设备管理时间日期条件的结束时间。

startTime

字符串

设备管理时间日期条件的开始时间。

hoursRangeException

字典

<p>定义时间日期条件将匹配或不匹配的小时数,如果在 exceptionHours 属性中使用<br>时间格式 - hh mm(h = 小时,mm = 分钟)<br>默认 - 全天</p>。

endTime

字符串

设备管理时间日期条件的结束时间。

startTime

字符串

设备管理时间日期条件的开始时间。

id

字符串

设备管理时间日期条件的 ID。

ise_debug

布尔值

Identity Services Engine SDK 的标志,用于启用调试。

选择

  • false ← (默认)

  • true

ise_hostname

字符串 / 必需

Identity Services Engine 主机名。

ise_password

字符串 / 必需

用于身份验证的 Identity Services Engine 密码。

ise_single_request_timeout

整数

在 cisco.ise 3.0.0 中添加

RESTful HTTP 请求的超时(以秒为单位)。

默认值: 60

ise_username

字符串 / 必需

用于身份验证的 Identity Services Engine 用户名。

ise_uses_api_gateway

布尔值

在 cisco.ise 1.1.0 中添加

通知 SDK 是否使用 Identity Services Engine 的 API 网关发送请求的标志。

如果为 true,则使用 ISE 的 API 网关并将请求发送到 https://{{ise_hostname}}。

如果为 false,则将请求发送到 https://{{ise_hostname}}:{{port}},其中端口值取决于使用的服务(ERS、Mnt、UI、PxGrid)。

选择

  • false

  • true ← (默认)

ise_uses_csrf_token

布尔值

在 cisco.ise 3.0.0 中添加

通知 SDK 我们是否将 CSRF 令牌发送到 ISE 的 ERS API 的标志。

如果为 True,则 SDK 假设您的 ISE CSRF 检查已启用。

如果为 True,则假设您需要 SDK 为您自动管理 CSRF 令牌。

选择

  • false ← (默认)

  • true

ise_verify

布尔值

启用或禁用 SSL 证书验证的标志。

选择

  • false

  • true ← (默认)

ise_version

字符串

通知 SDK 要使用的 Identity Services Engine 版本。

默认值: "3.1_Patch_1"

ise_wait_on_rate_limit

布尔值

Identity Services Engine SDK 的标志,用于启用自动速率限制处理。

选择

  • false

  • true ← (默认)

isNegate

布尔值

指示此条件是否处于否定模式。

选择

  • false

  • true

字典

设备管理时间日期条件的链接。

字符串

设备管理时间日期条件的 href。

字符串

设备管理时间日期条件的 rel。

字符串

设备管理时间日期条件的类型。

name

字符串

条件名称。

operator

字符串

相等运算符。

weekDays

列表 / 元素=字符串

<p>定义将匹配此条件的日期<br>日期格式 - WeekDay 枚举数组<br>默认 - 所有工作日的列表</p>。

weekDaysException

列表 / 元素=字符串

<p>定义将不匹配此条件的日期<br>日期格式 - WeekDay 枚举数组<br>默认 - 未启用</p>。

注释

注意

  • 使用的 SDK 方法是 device_administration_time_date_conditions.DeviceAdministrationTimeDateConditions.create_device_admin_time_condition、device_administration_time_date_conditions.DeviceAdministrationTimeDateConditions.delete_device_admin_time_condition_by_id、device_administration_time_date_conditions.DeviceAdministrationTimeDateConditions.update_device_admin_time_condition_by_id。

  • 使用的路径是 post /device-admin/time-condition、delete /device-admin/time-condition/{id}、put /device-admin/time-condition/{id}。

  • 不支持 check_mode

  • 该插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco ISE SDK 中的嵌入式连接管理器。

  • 以 ise_ 开头的参数由 Cisco ISE Python SDK 用于建立连接。

另请参阅

另请参阅

Cisco ISE 设备管理 - 时间/日期条件 文档

设备管理 - 时间/日期条件 API 的完整参考。

示例

- name: Create
  cisco.ise.device_administration_time_date_conditions:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    attributeId: string
    attributeName: string
    attributeValue: string
    children:
    - conditionType: string
      isNegate: true
      link:
        href: string
        rel: string
        type: string
    conditionType: string
    datesRange:
      endDate: string
      startDate: string
    datesRangeException:
      endDate: string
      startDate: string
    description: string
    dictionaryName: string
    dictionaryValue: string
    hoursRange:
      endTime: string
      startTime: string
    hoursRangeException:
      endTime: string
      startTime: string
    id: string
    isNegate: true
    link:
      href: string
      rel: string
      type: string
    name: string
    operator: string
    weekDays:
    - string
    weekDaysException:
    - string

- name: Update by id
  cisco.ise.device_administration_time_date_conditions:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    attributeId: string
    attributeName: string
    attributeValue: string
    children:
    - conditionType: string
      isNegate: true
      link:
        href: string
        rel: string
        type: string
    conditionType: string
    datesRange:
      endDate: string
      startDate: string
    datesRangeException:
      endDate: string
      startDate: string
    description: string
    dictionaryName: string
    dictionaryValue: string
    hoursRange:
      endTime: string
      startTime: string
    hoursRangeException:
      endTime: string
      startTime: string
    id: string
    isNegate: true
    link:
      href: string
      rel: string
      type: string
    name: string
    operator: string
    weekDays:
    - string
    weekDaysException:
    - string

- name: Delete by id
  cisco.ise.device_administration_time_date_conditions:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: absent
    id: string

返回值

常用返回值记录在此处,以下是此模块特有的字段

描述

ise_response

字典

包含 Cisco ISE Python SDK 返回的响应的字典或列表

返回: 总是

示例: {}

ise_update_response

字典

在 cisco.ise 1.1.0 中添加

包含 Cisco ISE Python SDK 返回的响应的字典或列表

返回: 总是

示例: {"response": {}, "version": "string"}

作者

  • Rafael Campos (@racampos)