Policy
A Policy is a resource managing page access permissions. This resource can be used in all domains if it is defined in the `repository` microservice.
Package : spaceone.api.repository.v1
Policy
Policy Methods:
Method | Request | Response |
---|---|---|
create
POST /repository/v1/policies
Creates a new Policy. The parameter
policy_id
, an identifier of Policy resources, can only include lowercase alphabets, numbers, and hyphens(-). The parameterpermissions
is a list type data describing page access permissions.
Type | Message |
---|---|
Request | |
Response |
update
PUT /repository/v1/policy/{policy}
Updates a specific Policy. You can make changes in Policy settings, including
name
,labels
,tags
, andpermissions
. The parameterpolicy_id
cannot be updated.
Type | Message |
---|---|
Request | |
Response |
delete
DELETE /repository/v1/policy/{policy}
Deletes a specific Policy. You must specify the
policy_id
of the Policy to delete, as thepolicy_id
is an identifier of Policy resources.
Type | Message |
---|---|
Request | |
Response |
get
GET /repository/v1/policies/{policy}
Gets a specific Policy. You must specify the
policy_id
of the Policy to get, as thepolicy_id
is an identifier of Policy resources. You can use the parameterrepository_id
to limit the scope of the method to a specific Repository.
Type | Message |
---|---|
Request | |
Response |
list
GET /repository/v1/policies
POST /repository/v1/policies/search
Gets a list of all Policies in a specific Repository. The parameter
repository_id
is used as an identifier of a Repository to get its list of Policies. You can use a query to get a filtered list of Policies.
Type | Message |
---|---|
Request | |
Response |
stat
POST /repository/v1/policies/stat
Type | Message |
---|---|
Request | |
Response |
Message
CreatePolicyRequest
Field | Type | Required | Description |
---|---|---|---|
name | string | ✔ | |
permissions | list of string | ✔ | |
policy_id | string | ✔ | |
labels | ✘ | ||
tags | ✘ | ||
project_id | string | ✘ | |
domain_id | string | ✔ |
GetRepositoryPolicyRequest
Field | Type | Required | Description |
---|---|---|---|
policy_id | string | ✔ | |
domain_id | string | ✔ | |
repository_id | string | ✘ | |
only | list of string | ✘ |
PoliciesInfo
Field | Type | Description |
---|---|---|
results | list of PolicyInfo | |
total_count |
PolicyInfo
Field | Type | Description |
---|---|---|
policy_id | string | |
name | string | |
state |
| |
permissions | list of string | list of permissions |
labels | list of labels | |
tags | ||
repository_info | ||
project_id | string | |
domain_id | string | |
created_at | string | |
updated_at | string |
PolicyQuery
Field | Type | Required | Description |
---|---|---|---|
query | ✘ | ||
policy_id | string | ✘ | |
name | string | ✘ | |
project_id | string | ✘ | |
repository_id | string | ✔ | |
domain_id | string | ✔ | |
state |
| ✘ |
PolicyRequest
Field | Type | Required | Description |
---|---|---|---|
policy_id | string | ✔ | |
domain_id | string | ✔ |
PolicyStatQuery
Field | Type | Required | Description |
---|---|---|---|
query | ✔ | ||
repository_id | string | ✔ | |
domain_id | string | ✔ |
UpdatePolicyRequest
Field | Type | Required | Description |
---|---|---|---|
policy_id | string | ✔ | |
name | string | ✘ | |
permissions | list of string | ✘ | |
labels | ✘ | ||
tags | ✘ | ||
domain_id | string | ✔ |
Last updated