Listing Mappings
Function
This API is used to list all mappings.
The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.
URI
GET /v3/OS-FEDERATION/mappings
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-Type |
Yes |
String |
Fill application/json;charset=utf8 in this field. |
|
X-Auth-Token |
Yes |
String |
IAM user token (no special permission requirements). |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
Object |
Resource link information. |
|
|
Array of objects |
Mapping information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
self |
String |
Resource link. |
|
previous |
String |
Previous resource link. |
|
next |
String |
Next resource link. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Mapping ID. |
|
Object |
Mapping resource link information. |
|
|
Array of objects |
Rule used to map federated users to local users. |
|
Parameter |
Type |
Description |
|---|---|---|
|
Array<Map<String,Object>> |
Federated user information on the cloud platform. user indicates the name of a federated user, and group indicates the group to which the federated user belongs. |
|
|
Array<Object> |
Federated user information in the IdP system. This field is an expression consisting of assertion attributes and operators. The value of this field is determined by the assertion. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
user: Name of a federated user on the cloud platform. "user":{"name":"{0}"}
group: User group to which the federated user belongs on the cloud platform. "group":{"name":"0cd5e9"} |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
IdP assertion. |
|
any_one_of |
Array of strings |
The rule is matched only if the specified strings appear in the attribute type. The condition result is Boolean rather than the argument that is passed as input. In a remote array, any_one_of and not_any_of are mutually exclusive and cannot be set at the same time. |
|
not_any_of |
Array of strings |
The rule is matched only if the specified strings do not appear in the attribute type. The condition result is Boolean rather than the argument that is passed as input. any_one_of and not_any_of are mutually exclusive and cannot be set at the same time. |
Example Request
GET https://iam.myhuaweicloud.com/v3/OS-FEDERATION/mappings
Example Response
Status code: 200
The request is successful.
{
"mappings": [
{
"rules": [
{
"local": [
{
"user": {
"name": "LocalUser"
}
},
{
"group": {
"name": "LocalGroup"
}
}
],
"remote": [
{
"type": "UserName"
},
{
"type": "orgPersonType",
"not_any_of": [
"Contractor",
"Guest"
]
}
]
}
],
"id": "ACME",
"links": {
"self": "https://iam.myhuaweicloud.com/v3/OS-FEDERATION/mappings/ACME"
}
}
],
"links": {
"self": "https://iam.myhuaweicloud.com/v3/OS-FEDERATION/mappings",
"previous": null,
"next": null
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The request is successful. |
|
400 |
Invalid parameters. |
|
401 |
Authentication failed. |
|
403 |
Access denied. |
|
404 |
The requested resource cannot be found. |
|
405 |
The method specified in the request is not allowed for the requested resource. |
|
413 |
The request entity is too large. |
|
500 |
Internal server error. |
|
503 |
Service unavailable. |
Error Codes
None
Last Article: Mappings
Next Article: Querying Mapping Details
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.