cisco.ise.network_access_conditions 模块 – 网络访问条件的资源模块

注意

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

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

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

要在 playbook 中使用它,请指定:cisco.ise.network_access_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>指示记录本身是条件(数据)还是逻辑(或,和)聚合</li> <li>数据类型枚举(引用,单个)表示“conditonId”或“ConditionAttrs”字段应包含条件数据,但不能同时包含两者</li> <li>逻辑聚合(和,或)枚举表示其他条件存在于 children 字段下</li></ul>。

isNegate

布尔值

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

选择

  • false

  • true

字典

网络访问条件的链接。

字符串

网络访问条件的 href。

字符串

网络访问条件的 rel。

字符串

网络访问条件的类型。

conditionType

字符串

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

datesRange

字典

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

endDate

字符串

网络访问条件的 endDate。

startDate

字符串

网络访问条件的 startDate。

datesRangeException

字典

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

endDate

字符串

网络访问条件的 endDate。

startDate

字符串

网络访问条件的 startDate。

description

字符串

条件描述。

dictionaryName

字符串

字典名称。

dictionaryValue

字符串

字典值。

hoursRange

字典

<p>定义 TimeAndDate 条件在哪个小时范围内匹配,或者如果用于 exceptionHours 属性则不匹配<br> 时间格式 - hh mm (h = 小时,mm = 分钟) <br> 默认值 - 全天 </p>。

endTime

字符串

网络访问条件的 endTime。

startTime

字符串

网络访问条件的 startTime。

hoursRangeException

字典

<p>定义 TimeAndDate 条件在哪个小时范围内匹配,或者如果用于 exceptionHours 属性则不匹配<br> 时间格式 - hh mm (h = 小时,mm = 分钟) <br> 默认值 - 全天 </p>。

endTime

字符串

网络访问条件的 endTime。

startTime

字符串

网络访问条件的 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 方法为 network_access_conditions.NetworkAccessConditions.create_network_access_condition、network_access_conditions.NetworkAccessConditions.delete_network_access_condition_by_id、network_access_conditions.NetworkAccessConditions.delete_network_access_condition_by_name、network_access_conditions.NetworkAccessConditions.update_network_access_condition_by_id、network_access_conditions.NetworkAccessConditions.update_network_access_condition_by_name。

  • 使用的路径为 post /network-access/condition、delete /network-access/condition/condition-by-name/{name}、delete /network-access/condition/{id}、put /network-access/condition/condition-by-name/{name}、put /network-access/condition/{id}。

  • 不支持 check_mode

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

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

另请参阅

另请参阅

Cisco ISE 网络访问 - 条件文档

网络访问 - 条件 API 的完整参考。

示例

- name: Create
  cisco.ise.network_access_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 name
  cisco.ise.network_access_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 name
  cisco.ise.network_access_conditions:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: absent
    name: string

- name: Update by id
  cisco.ise.network_access_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.network_access_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 返回的响应。

返回:始终

示例: {"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"]}

ise_update_response

字典

在 cisco.ise 1.1.0 中添加。

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

返回:始终

示例: {"response": {"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"]}, "version": "string"}

作者

  • Rafael Campos (@racampos)