GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
  • Single Page Web Application

  • Mobile and Client Applications

  • Standard Web Application

    • Java

    • Node.js

    • Python

      • 安装使用
      • 用户认证模块
      • 管理模块

        • 用户管理

        • 分组管理

          • 获取分组详情
          • 获取分组列表
          • 创建分组
          • 批量创建分组
          • 修改分组
          • 批量删除分组
          • 添加分组成员
          • 批量移除分组成员
          • 获取分组成员列表
          • 获取分组被授权的资源列表
        • 角色管理

        • 组织机构管理

        • 访问控制管理

        • 外部身份源管理

        • 自定义字段管理

  • Framework Integration

  • Others

  1. Development Integration
  2. /
  3. Standard Web Application
  4. /
  5. Python
  6. /
  7. 管理模块

  8. /
  9. 分组管理

  10. /
  11. 获取分组被授权的资源列表

¶ 获取分组被授权的资源列表

Update time: 2025-07-23 07:34:21
Edit

通过分组 code,获取分组被授权的资源列表,可以通过资源类型、权限分组 code 筛选。

¶ 请求参数

名称类型必填默认值描述示例值
codestring是-分组 code。developer
namespacestring否-所属权限分组的 code。default
resourceTypestring否-资源类型。 枚举值:DATA,API,MENU,BUTTON

¶ 示例代码

from authing import ManagementClient

management_client = ManagementClient(
    access_key_id="GEN_AUTH_USERPOOL_ID",
    access_key_secret="GEN_AUTH_USERPOOL_SECRET",
)

data = management_client.get_group_authorized_resources(

      code: "developer",

      namespace: "default",

      resource_type: "undefined",

)

¶ 请求响应

类型: AuthorizedResourceListRespDto

名称类型描述
statusCodenumber业务状态码,可以通过此状态码判断操作是否成功,200 表示成功。
messagestring描述信息
apiCodenumber细分错误码,可通过此错误码得到具体的错误类型。
dataarray响应数据

示例结果:

{
  "statusCode": 200,
  "message": "操作成功",
  "apiCode": 20001,
  "data": {
    "resourceCode": "ecs:1",
    "description": "服务器",
    "condition": {
      "param": "AppId",
      "operator": "StringEquals",
      "value": "1"
    },
    "resourceType": "API",
    "apiIdentifier": "/api/v1/example",
    "actions": "[\"ecs:Start\",\"ecs:Stop\"]",
    "effect": "ALLOW"
  }
}

¶ 数据结构

¶ AuthorizedResourceDto

名称类型必填描述
resourceCodestring是资源描述符。 示例值: ecs:1
descriptionstring否资源描述信息。 示例值: 服务器
conditionarray否策略 Condition。嵌套类型:PolicyCondition。
resourceTypestring是资源类型。 枚举值:DATA,API,MENU,BUTTON
apiIdentifierstring是API URL。 示例值: /api/v1/example
actionsarray是授权的操作列表。 示例值: ["ecs:Start","ecs:Stop"]
effectstring是允许还是拒绝。 枚举值:ALLOW,DENY

¶ PolicyCondition

名称类型必填描述
paramstring是Condition Param。 枚举值:UserPoolId,AppId,RequestFrom,UserId,UserArn,CurrentTime,EpochTime,SourceIp,User,MultiFactorAuthPresent,MultiFactorAuthAge,UserAgent,Referer,Device,OS,Country,Province,City,DeviceChanged,DeviceUntrusted,ProxyUntrusted,LoggedInApps,Namespace
operatorstring是Condition Operator。 枚举值:Bool,DateEquals,DateNotEquals,DateLessThan,DateLessThanEquals,DateGreaterThan,DateGreaterThanEquals,IpAddress,NotIpAddress,NumericEquals,NumericNotEquals,NumericLessThan,NumericLessThanEquals,NumericGreaterThan,NumericGreaterThanEquals,StringEquals,StringNotEquals,StringEqualsIgnoreCase,StringNotEqualsIgnoreCase,StringLike,StringNotLike,ListContains
valuestring是Condition Value。 示例值: 1
Previous article: 获取分组成员列表 Next article: 获取角色详情
  • 请求参数
  • 示例代码
  • 请求响应
  • 数据结构

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.