Create or Update Scope
POST {{cb_url}}/containers/v1/orgs/{{cb_org_key}}/guardrails/management/scopes
Use this request to create or update a scope.
Scopes are used to in order to define a list of resources we want to track.
RBAC Permissions Required
Permission (.notation name) | Operation(s) |
---|---|
kubernetes.security | CREATE, UPDATE |
{
"scope_id": "<uuid>",
"scope_name": "<string>",
"creator": "<email>",
"created_on": <number>,
"modified_by": "<string>",
"modified_on": <number>,
"is_protected": <boolean>,
"lifecycle_phase": "<string>",
"clusters_groups": [
"<string>"
],
"clusters": [
"<string>"
],
"namespaces": [
"<string>"
]
}
Request Body
{"scope_id"=>"12a3bc4d-ee56-7f8g-a11b-2345cd67e89e", "name"=>"Updated Demo Scope 01", "lifecycle_phase"=>"build", "clusters"=>["demo:cluster"], "clusters_groups"=>[], "namespaces"=>["*"]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-AUTH-TOKEN | string | (Required) Carbon Black Access Key | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"id":"12a3bc4d-ee56-7f8g-a11b-2345cd67e89e","scope_id":"12a3bc4d-ee56-7f8g-a11b-2345cd67e89e"}