Modify role permissions and find matching existing roles.
message RoleMaintenanceRequest {
string grantee_type = 1;
string grantee_id = 2;
repeated GranteeModification modifications = 3;
}
message GranteeModification {
GetRoleMatchingRequest.ResourcePermissions from_resource_permissions = 1;
GetRoleMatchingRequest.ResourcePermissions to_resource_permissions = 2;
}
message RoleMaintenanceResponse {
repeated string grantee_ids = 1;
}{
"grantee_type": "SnowflakeRole",
"grantee_id": "example-snowflake.com/role/DATA_INGEST_ROLE",
"modifications": [
{
"from_resource_permissions": {
"node_type": "SnowflakeDatabase",
"node_id": "example-snowflake.com/database/ANALYTICS_DB",
"raw_permissions": ["USAGE"]
}
},
{
"from_resource_permissions": {
"node_type": "SnowflakeSchema",
"node_id": "example-snowflake.com/database/ANALYTICS_DB/schema/RAW_DATA",
"raw_permissions": ["CREATE FUNCTION", "CREATE PIPE", "CREATE STREAM", "CREATE TABLE", "CREATE TASK", "USAGE"]
}
},
{
"to_resource_permissions": {
"node_type": "SnowflakeDatabase",
"node_id": "example-snowflake.com/database/CLOUD_DB",
"raw_permissions": ["USAGE"]
}
}
]
}{
"grantee_ids": [
"example-snowflake.com/role/CLOUD_LOGS_READONLY_ROLE"
]
}{
"grantee_type": "SnowflakeRole",
"grantee_id": "example-snowflake.com/role/ANALYST_BASIC_ROLE",
"modifications": [
{
"to_resource_permissions": {
"node_type": "SnowflakeSchema",
"node_id": "example-snowflake.com/database/ANALYTICS/schema/FINANCE",
"raw_permissions": ["USAGE", "SELECT"]
}
}
]
}{
"grantee_ids": [
"example-snowflake.com/role/FINANCE_VIEWER_ROLE"
]
}{
"grantee_type": "SnowflakeRole",
"grantee_id": "snowhouse.snowflakecomputing.com/role/DATA_SCIENTIST",
"modifications": [
{
"from_resource_permissions": {
"node_type": "SnowflakeSchema",
"node_id": "snowhouse.snowflakecomputing.com/database/SENSITIVE_DATA/schema/PII",
"raw_permissions": ["SELECT", "INSERT"]
}
}
]
}{
"grantee_ids": [
"snowhouse.snowflakecomputing.com/role/ANALYST_BASIC"
]
}Veza API key for authentication. Generate keys in Administration > API Keys.
OK
Default error response
{
"grantee_ids": [
"text"
]
}POST /api/private/assessments/role_recommendations_role_maintenance HTTP/1.1
Host: your-tenant.vezacloud.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 247
{
"grantee_type": "text",
"grantee_id": "text",
"modifications": [
{
"from_resource_permissions": {
"raw_permissions": [
"text"
],
"node_type": "text",
"node_id": "text"
},
"to_resource_permissions": {
"raw_permissions": [
"text"
],
"node_type": "text",
"node_id": "text"
}
}
]
}