Policy Pack Types
Types for creating, updating, and representing policy packs.
PolicyPackAttachment
Schema for attaching a policy pack to an entity.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
version | int | ✓ | - |
Example
from credoai import PolicyPackAttachment
obj = PolicyPackAttachment(
key="example",
version=123,
)
PolicyPackAttachmentResponse
Schema for a policy pack attachment response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
use_case_id | Any | - | |
entity_id | Any | - | |
key | str | ✓ | - |
version | int | ✓ | - |
due_date | Any | - | |
timezone | Any | - | |
inserted_at | Any | - | |
updated_at | Any | - |
Example
from credoai import PolicyPackAttachmentResponse
obj = PolicyPackAttachmentResponse(
id="example",
key="example",
version=123,
)
PolicyPackAttachmentUpdate
Schema for updating a policy pack attachment.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
version | Any | - | |
due_date | Any | - | |
timezone | Any | - |
Example
from credoai import PolicyPackAttachmentUpdate
obj = PolicyPackAttachmentUpdate(
)
PolicyPackBaseResponse
Schema for a policy pack base response (without version content).
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
key | Any | - | |
archived | Any | - | |
inserted_at | Any | - | |
updated_at | Any | - |
Example
from credoai import PolicyPackBaseResponse
obj = PolicyPackBaseResponse(
id="example",
)
PolicyPackCreate
Schema for creating a policy pack base.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
info | Any | - |
Example
from credoai import PolicyPackCreate
obj = PolicyPackCreate(
key="example",
)
PolicyPackDuplicate
Schema for duplicating a policy pack.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
name | Any | - |
Example
from credoai import PolicyPackDuplicate
obj = PolicyPackDuplicate(
key="example",
)
PolicyPackInfo
Nested info object for policy pack details.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | str | ✓ | - |
description | Any | - | |
company | Any | - | |
logo_url | Any | - | |
provider | Any | - | |
domains | List[str] | - | |
industries | List[str] | - | |
regions | List[str] | - | |
tags | List[str] | - | |
vendor_component | Any | - | |
contact | Any | - |
Example
from credoai import PolicyPackInfo
obj = PolicyPackInfo(
name="example",
)
PolicyPackResponse
Schema for a policy pack response.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | str | ✓ | - |
key | str | ✓ | - |
version | int | ✓ | - |
spec | Any | - | |
kind | Any | - | |
info | Any | - | |
controls | List[Dict[str, Any]] | - | |
report_template | Any | - | |
metadata | Any | - |
Example
from credoai import PolicyPackResponse
obj = PolicyPackResponse(
id="example",
key="example",
version=123,
)
PolicyPackUpdate
Schema for updating a policy pack base.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
info | Any | - | |
archived | Any | - |
Example
from credoai import PolicyPackUpdate
obj = PolicyPackUpdate(
)
PolicyPackAttachmentResponseWrapper
Response wrapper for PolicyPackAttachmentResponse with metadata and validation. Extends ClientResponse to provide type-safe access to PolicyPackAttachmentResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('PolicyPackAttachmentResponse') | ✓ | Validated response data |
Example
from credoai import PolicyPackAttachmentResponseWrapper
obj = PolicyPackAttachmentResponseWrapper(
status_code=123,
data=None,
)
PolicyPackBaseResponseWrapper
Response wrapper for PolicyPackBaseResponse with metadata and validation. Extends ClientResponse to provide type-safe access to PolicyPackBaseResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('PolicyPackBaseResponse') | ✓ | Validated response data |
Example
from credoai import PolicyPackBaseResponseWrapper
obj = PolicyPackBaseResponseWrapper(
status_code=123,
data=None,
)
PolicyPackCreateRequest
Request wrapper for PolicyPackCreate with validation and JSON:API support. Combines the PolicyPackCreate data model with client request functionality, providing automatic validation and JSON:API format conversion for API requests.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | str | ✓ | - |
info | ForwardRef('Optional[Any]') | - |
Example
from credoai import PolicyPackCreateRequest
obj = PolicyPackCreateRequest(
key="example",
)
PolicyPackResponseWrapper
Response wrapper for PolicyPackResponse with metadata and validation. Extends ClientResponse to provide type-safe access to PolicyPackResponse data along with HTTP response metadata.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
status_code | int | ✓ | HTTP response status code |
headers | ForwardRef('Dict[str, str]') | HTTP response headers | |
request_id | ForwardRef('Optional[str]') | Unique request identifier for tracing | |
data | ForwardRef('PolicyPackResponse') | ✓ | Validated response data |
Example
from credoai import PolicyPackResponseWrapper
obj = PolicyPackResponseWrapper(
status_code=123,
data=None,
)