{
"code": "string",
"statements": [
{
"actions": [
"string"
],
"condition": [
{
"operator": "string",
"param": "string",
"value": "string"
}
],
"effect": "string",
"resource": "string",
"resourceType": "string"
}
],
"description": "string",
"namespace": "string"
}
curl --location --request POST 'https://core.authing.cn/api/v2/policies/create' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 61cc2c7bb686e2767125230d' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "string",
"statements": [
{
"actions": [
"string"
],
"condition": [
{
"operator": "string",
"param": "string",
"value": "string"
}
],
"effect": "string",
"resource": "string",
"resourceType": "string"
}
],
"description": "string",
"namespace": "string"
}'
{
"code": 200,
"message": "创建成功",
"data": {
"userPoolId": "59f86b4832eb28071bdd9214",
"isDefault": false,
"isAuto": false,
"hidden": false,
"code": "test",
"namespaceId": 2,
"createdAt": "2022-01-11T11:26:12.310Z",
"updatedAt": "2022-01-11T11:26:12.310Z",
"id": "61dd6954e0f8f6e147fc9637",
"description": null,
"statements": [
{
"resource": "*:*",
"actions": [
"*"
],
"effect": "ALLOW",
"condition": [
{
"operator": "DateEquals",
"param": "CurrentTime",
"value": "2022-01-18T09:11:21.511Z"
}
],
"resourceType": "DATA"
}
],
"assignmentsCount": 0,
"namespace": "default"
}
}