Help Center> Object Storage Service> API Reference> APIs> Data+> Querying Authorized Roles

Querying Authorized Roles

Functions

Queries the roles required by OBS to automatically create workflows for users and the permissions required for running FunctionGraph. This function is idempotent.

Request Syntax

GET /v2/workflow-authorization HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: authorization
Content-Type: application/json
Content-Length: length
Date: date

Request parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code 
Date: date 
Content-Length: length 
X-Request-ID: obs request id

json body

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

Table 1 Response elements

Parameter

Type

Description

agencies

Array of AgencyDetail

Agency permission information.

Table 2 AgencyDetail parameters

Parameter

Mandatory

Type

Description

create_time

Yes

String

Time when a dataset is created

last_modify_time

No

String

Last modification time

agency_id

Yes

String

Account ID of the delegating party.

agency_name

Yes

String

Agency name

agency_duration

Yes

String

Validity period of an agency. If the value is FOREVER or null, the agency is permanently valid. If the value is ONEDAY, the agency is valid for one day.

trust_domain_name

Yes

String

Account name of the delegated party.

role_id

Yes

String

Role ID.

role_dependent_by_function

Yes

String

Function on which a role depends.

role_remark_name

Yes

String

Remarks of a role.

role_remark_type

Yes

String

Remark types:

  • AX: Display at the domain layer.
  • XA: Display at the project layer.
  • AA: Display at both the domain and project layers.
  • XX: Do not display at either domain or project layer.
  • The display mode of a custom policy can only be AX or XA. The custom policy cannot be displayed at both the domain and project layers (AA) or not displayed at either the domain or project layer (XX).

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

Sample Request

GET /v2/workflow-authorization HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com 
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Content-Type: application/json
Content-Length: 0
Date: Thu, 27 Aug 2020 12:38:10 GMT

Sample Response

HTTP/1.1 200 OK 
Date: Thu, 27 Aug 2020 12:38:10 GMT 
Content-Length: 100 
X-Request-ID: 6a63a18b8bab40ffb71ebd9cb80d0085
{
    "agencies": [{
        "created_time": "<timestamp>",
        "last_modify_time": "<timestamp>",
        "agency_id": "0760a9e2a60026664f1fc0031f9f205e",
        "agency_name": "IAMAgency",
        "agency_duration": "FOREVER",
        "trust_domain_name": "op_svc_obs",
        "role_id": "40dd08a0e4dd4d5eb24e21fd1de87c1a",
        "role_dependent_by_function": "oef-funcube-mpc-thumbnail_1bf94210fe86a9b0f95f057f",
        "role_remark_name": "mpc",
        "role_remark_type": "AX"
    }]
}