{
    "description": "Validation Schema for DynamoDb UpdateTable requests",
    "properties": {
        "AttributeDefinitions": {
            "items": {
                "properties": {
                    "AttributeName": {
                        "maxLength": 255,
                        "minLength": 1,
                        "type": "string"
                    },
                    "AttributeType": {
                        "enum": [
                            "S",
                            "N",
                            "B"
                        ],
                        "type": "string"
                    }
                },
                "required": [
                    "AttributeName",
                    "AttributeType"
                ],
                "type": "object"
            },
            "minItems": 1,
            "type": "array"
        },
        "GlobalSecondaryIndexUpdates": {
            "items": {
                "properties": {
                    "Create": {
                        "properties": {
                            "IndexName": {
                                "maxLength": 255,
                                "minLength": 3,
                                "pattern": "[a-zA-Z0-9_.-]+",
                                "type": "string"
                            },
                            "KeySchema": {
                                "items": {
                                    "properties": {
                                        "AttributeName": {
                                            "maxLength": 255,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "KeyType": {
                                            "enum": [
                                                "HASH",
                                                "RANGE"
                                            ],
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "AttributeName",
                                        "KeyType"
                                    ],
                                    "type": "object"
                                },
                                "maxItems": 2,
                                "minItems": 1,
                                "type": "array"
                            },
                            "Projection": {
                                "properties": {
                                    "NonKeyAttributes": {
                                        "items": {
                                            "maxLength": 255,
                                            "minLength": 1,
                                            "type": "string"
                                        },
                                        "maxItems": 20,
                                        "minItems": 1,
                                        "type": "array"
                                    },
                                    "ProjectionType": {
                                        "enum": [
                                            "ALL",
                                            "KEYS_ONLY",
                                            "INCLUDE"
                                        ],
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            },
                            "ProvisionedThroughput": {
                                "properties": {
                                    "ReadCapacityUnits": {
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "WriteCapacityUnits": {
                                        "minimum": 1,
                                        "type": "number"
                                    }
                                },
                                "required": [
                                    "ReadCapacityUnits",
                                    "WriteCapacityUnits"
                                ],
                                "type": "object"
                            }
                        },
                        "required": [
                            "IndexName",
                            "KeySchema",
                            "Projection",
                            "ProvisionedThroughput"
                        ],
                        "type": "object"
                    },
                    "Delete": {
                        "properties": {
                            "IndexName": {
                                "maxLength": 255,
                                "minLength": 3,
                                "pattern": "[a-zA-Z0-9_.-]+",
                                "type": "string"
                            }
                        },
                        "required": [
                            "IndexName"
                        ],
                        "type": "object"
                    },
                    "Update": {
                        "properties": {
                            "IndexName": {
                                "maxLength": 255,
                                "minLength": 3,
                                "pattern": "[a-zA-Z0-9_.-]+",
                                "type": "string"
                            },
                            "ProvisionedThroughput": {
                                "properties": {
                                    "ReadCapacityUnits": {
                                        "minimum": 1,
                                        "type": "number"
                                    },
                                    "WriteCapacityUnits": {
                                        "minimum": 1,
                                        "type": "number"
                                    }
                                },
                                "required": [
                                    "ReadCapacityUnits",
                                    "WriteCapacityUnits"
                                ],
                                "type": "object"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "type": "array"
        },
        "ProvisionedThroughput": {
            "properties": {
                "ReadCapacityUnits": {
                    "minimum": 1,
                    "type": "number"
                },
                "WriteCapacityUnits": {
                    "minimum": 1,
                    "type": "number"
                }
            },
            "required": [
                "ReadCapacityUnits",
                "WriteCapacityUnits"
            ],
            "type": "object"
        },
        "StreamSpecification": {
            "properties": {
                "StreamEnabled": {
                    "type": "boolean"
                },
                "StreamViewType": {
                    "enum": [
                        "NEW_IMAGE",
                        "OLD_IMAGE",
                        "NEW_AND_OLD_IMAGES",
                        "KEYS_ONLY"
                    ],
                    "type": "string"
                }
            },
            "type": "object"
        },
        "TableName": {
            "maxLength": 255,
            "minLength": 3,
            "pattern": "[a-zA-Z0-9_.-]+",
            "type": "string"
        }
    },
    "required": [
        "TableName"
    ],
    "title": "DynamoDb UpdateTable Schema",
    "type": "object"
}