feat: synchronize governance templates in bulk
This commit is contained in:
@@ -590,3 +590,31 @@ class GovernanceTemplateUpdateRequest(BaseModel):
|
||||
is_active: bool = True
|
||||
assignments: list[GovernanceAssignment] = Field(default_factory=list)
|
||||
change_request_id: str | None = None
|
||||
|
||||
|
||||
class GovernanceSynchronizationRequest(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
template_ids: list[str] = Field(min_length=1, max_length=100)
|
||||
dry_run: bool = False
|
||||
|
||||
|
||||
class GovernanceSynchronizationOutcome(BaseModel):
|
||||
assignment_id: str
|
||||
template_id: str
|
||||
tenant_id: str
|
||||
kind: Literal["group", "role"]
|
||||
operation: Literal["upsert", "remove"]
|
||||
status: Literal["created", "updated", "unchanged", "removed", "absent", "blocked", "failed"]
|
||||
resource_id: str | None = None
|
||||
blocker_codes: list[str] = Field(default_factory=list)
|
||||
message: str | None = None
|
||||
provenance: dict[str, str] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class GovernanceSynchronizationResponse(BaseModel):
|
||||
version: Literal["1"] = "1"
|
||||
operation_id: str
|
||||
dry_run: bool
|
||||
outcomes: list[GovernanceSynchronizationOutcome]
|
||||
counts: dict[str, int] = Field(default_factory=dict)
|
||||
|
||||
Reference in New Issue
Block a user