Skip to content

Commit

Permalink
Document org policy violations REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Aug 19, 2024
1 parent f40baef commit a136466
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions content/docs/pulumi-cloud/cloud-rest-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3193,6 +3193,61 @@ Status: 200 OK
```
<!-- ###################################################################### -->

## Policy Results

### List Policy Violations

```
GET /api/orgs/{organization}/policyresults/violations
```

#### Parameters

| Parameter | Type | In | Description |
|---------------------|--------|-------|--------------------------------------------------------------------------------------------------------------|
| `organization` | string | path | organization name |

#### Example

```bash
curl \
-H "Accept: application/vnd.pulumi+8" \
-H "Content-Type: application/json" \
-H "Authorization: token $PULUMI_ACCESS_TOKEN" \
https://api.pulumi.com/api/orgs/{organization}/policyresults/violations
```

#### Default response

```
Status: 200 OK
```

```
{
"continuationToken": "",
"policyViolations": [
{
"level": "advisory",
"message": "Checks that Kubernetes Pods are not being used directly.
Kubernetes Pods should not be used directly. Instead, you may want to use a Deployment, ReplicaSet or Job.
",
"observedAt": "2024-08-19T20:28:46Z",
"policyName": "pods-are-prohibited",
"policyPack": "kubernetes",
"policyPackTag": "0.0.2",
"projectName": "pulumi-k8s-test",
"resourceName": "pod-test",
"resourceType": "kubernetes:core/v1:Pod",
"stackName": "dev",
"updateVersion": 4
}
]
}
```

<!-- ###################################################################### -->

## Environments

{{< notes >}}
Expand Down

0 comments on commit a136466

Please sign in to comment.