{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "sdu_create_database_command",
    "description": "SDU create database command",
    "additionalProperties": false,
    "required": [
        "tenant_id",
        "environment_id",
        "request_id",
        "service_definition_id",
        "service_id",
        "params"
    ],
    "properties": {
        "tenant_id": {
            "type": "string",
            "minLength": 32,
            "maxLength": 36,
            "format": "uuid",
            "description": "A UUID."
        },
        "environment_id": {
            "type": "string",
            "minLength": 32,
            "maxLength": 36,
            "format": "uuid",
            "description": "A UUID."
        },
        "request_id": {
            "type": "string",
            "minLength": 32,
            "maxLength": 36,
            "format": "uuid",
            "description": "A UUID."
        },
        "service_definition_id": {
            "type": "string",
            "minLength": 32,
            "maxLength": 36,
            "format": "uuid",
            "description": "A UUID."
        },
        "service_id": {
            "type": "string",
            "description": "Name of the service, requested the database creation"
        },
        "params": {
            "type": "object",
            "title": "sdu_create_database_command_params",
            "description": "SDU create database command params",
            "additionalProperties": false,
            "required": [
                "provider",
                "db_type",
                "database_name",
                "db_owner_role",
                "db_login_role",
                "db_gql_role"
            ],
            "properties": {
                "provider": {
                    "type": "string",
                    "title": "StorageProvidersEnum",
                    "enum": [
                        "AZURE"
                    ],
                    "description": "Storage provider (azure, aws, etc)"
                },
                "db_type": {
                    "type": "string",
                    "title": "DatabaseType",
                    "enum": [
                        "POSTGRES"
                    ],
                    "description": "Database server type (postgres, mssql, etc)"
                },
                "database_name": {
                    "type": "string",
                    "description": "Unique database name"
                },
                "db_owner_role": {
                    "type": "string",
                    "description": "Unique database owner role name"
                },
                "db_login_role": {
                    "type": "string",
                    "description": "Unique database login role name"
                },
                "db_gql_role": {
                    "type": "string",
                    "description": "Unique database gql role name"
                }
            }
        }
    }
}
