cisco.ise.network_access_authorization_rules 模块 – 用于网络访问授权规则的资源模块
注意
此模块是 cisco.ise 集合(版本 2.9.6)的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install cisco.ise。您需要其他要求才能使用此模块,请参阅 要求 了解详细信息。
要在 Playbook 中使用它,请指定:cisco.ise.network_access_authorization_rules。
cisco.ise 1.0.0 中的新增功能
概要
- 管理资源网络访问授权规则的创建、更新和删除操作。 
- 网络访问 - 创建授权规则。 
- 网络访问 - 删除授权规则。 
- 网络访问 - 更新授权规则。 
注意
此模块具有相应的 操作插件。
要求
在执行此模块的主机上需要以下要求。
- ciscoisesdk >= 2.2.3 
- python >= 3.5 
参数
| 参数 | 注释 | 
|---|---|
| Id 路径参数。规则 ID。 | |
| Identity Services Engine SDK 启用调试的标志。 选项 
 | |
| Identity Services Engine 主机名。 | |
| 用于身份验证的 Identity Services Engine 密码。 | |
| RESTful HTTP 请求的超时时间(以秒为单位)。 默认值:  | |
| 用于身份验证的 Identity Services Engine 用户名。 | |
| 告知 SDK 是否将 CSRF 令牌发送到 ISE 的 ERS API 的标志。 如果为 True,则 SDK 假定您的 ISE CSRF 检查已启用。 如果为 True,则假定您需要 SDK 为您自动管理 CSRF 令牌。 选项 
 | |
| 启用或禁用 SSL 证书验证的标志。 选项 
 | |
| 告知 SDK 要使用的 Identity Services Engine 版本。 默认值:  | |
| Identity Services Engine SDK 启用自动速率限制处理的标志。 选项 
 | |
| 网络访问授权规则的链接。 | |
| 网络访问授权规则的 href。 | |
| 网络访问授权规则的 rel。 | |
| 网络访问授权规则的类型。 | |
| PolicyId 路径参数。策略 ID。 | |
| 授权配置文件。 | |
| 规则身份验证/授权中的通用属性。 | |
| 网络访问授权规则的条件。 | |
| 字典属性 ID(可选),用于其他验证。 | |
| 字典属性名称。 | |
| <ul><li>条件的属性值</li> <li>值类型在字典对象中指定</li> <li>如果允许多个值,则在字典对象中指定</li></ul>。 | |
| 如果类型为 andBlock 或 orBlock,则其他条件将在此逻辑(OR/AND)条件下聚合。 | |
| <ul><li>指示记录是条件本身(数据)还是逻辑(或、与)聚合</li> <li>数据类型枚举(引用、单个)指示 “conditionId” 或 “ConditionAttrs” 字段应包含条件数据,但不能同时包含两者</li> <li>逻辑聚合(与、或)枚举指示子字段下存在其他条件</li></ul>。 | |
| 指示此条件是否处于否定模式。 选项 
 | |
| 网络访问授权规则的链接。 | |
| 网络访问授权规则的 href。 | |
| 网络访问授权规则的 rel。 | |
| 网络访问授权规则的类型。 | |
| <ul><li>指示记录是条件本身(数据)还是逻辑(或、与)聚合</li> <li>数据类型枚举(引用、单个)指示 “conditionId” 或 “ConditionAttrs” 字段应包含条件数据,但不能同时包含两者</li> <li>逻辑聚合(与、或)枚举指示子字段下存在其他条件</li></ul>。 | |
| <p>定义 TimeAndDate 条件将在哪些日期匹配,如果在 exceptionDates 属性中使用,则不会匹配<br> 选项包括:日期范围,对于特定日期,起始/结束日期应使用相同的日期 <br> 默认值:无特定日期<br> 为了将日期重置为无特定日期,日期格式 - yyyy-mm-dd (MM = 月,dd = 日,yyyy = 年)</p>。 | |
| 网络访问授权规则的 endDate。 | |
| 网络访问授权规则的 startDate。 | |
| <p>定义 TimeAndDate 条件将在哪些日期匹配,如果在 exceptionDates 属性中使用,则不会匹配<br> 选项包括:日期范围,对于特定日期,起始/结束日期应使用相同的日期 <br> 默认值:无特定日期<br> 为了将日期重置为无特定日期,日期格式 - yyyy-mm-dd (MM = 月,dd = 日,yyyy = 年)</p>。 | |
| 网络访问授权规则的 endDate。 | |
| 网络访问授权规则的 startDate。 | |
| 条件描述。 | |
| 字典名称。 | |
| 字典值。 | |
| <p>定义 TimeAndDate 条件将在哪些小时匹配,如果在 exceptionHours 属性中使用,则不会匹配<br> 时间格式 - hh mm (h = 小时, mm = 分钟) <br> 默认值 - 全天 </p>。 | |
| 网络访问授权规则的结束时间。 | |
| 网络访问授权规则的开始时间。 | |
| <p>定义 TimeAndDate 条件将在哪些小时匹配,如果在 exceptionHours 属性中使用,则不会匹配<br> 时间格式 - hh mm (h = 小时, mm = 分钟) <br> 默认值 - 全天 </p>。 | |
| 网络访问授权规则的结束时间。 | |
| 网络访问授权规则的开始时间。 | |
| 网络访问授权规则的 ID。 | |
| 指示此条件是否处于否定模式。 选项 
 | |
| 网络访问授权规则的链接。 | |
| 网络访问授权规则的 href。 | |
| 网络访问授权规则的 rel。 | |
| 网络访问授权规则的类型。 | |
| 条件名称。 | |
| 相等运算符。 | |
| <p>定义此条件将匹配哪些天<br> 天数格式 - WeekDay 枚举数组<br> 默认值 - 所有星期几的列表</p>。 | |
| <p>定义此条件将不匹配哪些天<br> 天数格式 - WeekDay 枚举数组<br> 默认值 - 未启用</p>。 | |
| 指示此规则是否为默认规则。 选项 
 | |
| 规则被匹配的次数。 | |
| 规则的标识符。 | |
| 规则名称,有效字符为字母数字、下划线、连字符、空格、句点、括号。 | |
| 与其他规则相关的排名(优先级)。排名越低,优先级越高。 | |
| 规则所处的状态。禁用的规则无法匹配。 | |
| 授权策略中使用的安全组。 | 
注释
注意
- 使用的 SDK 方法是 network_access_authorization_rules.NetworkAccessAuthorizationRules.create_network_access_authorization_rule, network_access_authorization_rules.NetworkAccessAuthorizationRules.delete_network_access_authorization_rule_by_id, network_access_authorization_rules.NetworkAccessAuthorizationRules.update_network_access_authorization_rule_by_id, 
- 使用的路径是 post /network-access/policy-set/{policyId}/authorization, delete /network-access/policy-set/{policyId}/authorization/{id}, put /network-access/policy-set/{policyId}/authorization/{id}, 
- 不支持 - check_mode
- 该插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco ISE SDK 中的嵌入式连接管理器 
- 以 ise_ 开头的参数由 Cisco ISE Python SDK 用于建立连接 
另请参阅
另请参阅
- Cisco ISE 网络访问 - 授权规则文档
- 网络访问 - 授权规则 API 的完整参考。 
示例
- name: Create
  cisco.ise.network_access_authorization_rules:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    link:
      href: string
      rel: string
      type: string
    policyId: string
    profile:
    - string
    rule:
      condition:
        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
      default: true
      hitCounts: 0
      id: string
      name: string
      rank: 0
      state: string
    securityGroup: string
- name: Update by id
  cisco.ise.network_access_authorization_rules:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    id: string
    link:
      href: string
      rel: string
      type: string
    policyId: string
    profile:
    - string
    rule:
      condition:
        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
      default: true
      hitCounts: 0
      id: string
      name: string
      rank: 0
      state: string
    securityGroup: string
- name: Delete by id
  cisco.ise.network_access_authorization_rules:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: absent
    id: string
    policyId: string
返回值
常见返回值记录在此处,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| 由 Cisco ISE Python SDK 返回的响应的字典或列表 返回: 始终 示例:  | |
| 由 Cisco ISE Python SDK 返回的响应的字典或列表 返回: 始终 示例:  | 
作者
- Rafael Campos (@racampos) 
