Skip to content

Commit 2d092b7

Browse files
OAS Update
1 parent a3a1dd8 commit 2d092b7

File tree

1 file changed

+264
-0
lines changed

1 file changed

+264
-0
lines changed

services/sqlserverflex/v3alpha1/sqlserverflex.json

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,41 @@
12281228
],
12291229
"type": "string"
12301230
},
1231+
"external.s3": {
1232+
"description": "The external S3 information",
1233+
"properties": {
1234+
"s3_access_key": {
1235+
"description": "The s3 access key id",
1236+
"example": "AKIAIOSFODNN7EXAMPLE",
1237+
"type": "string"
1238+
},
1239+
"s3_access_secret": {
1240+
"description": "The s3 access secret",
1241+
"example": "Aa1Bb~2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_Jj0Kk1Ll2",
1242+
"type": "string"
1243+
},
1244+
"s3_bucket": {
1245+
"description": "The s3 bucket address",
1246+
"example": "http://mein-beispiel-bucket.s3.eu-central-1.amazonaws.com/",
1247+
"type": "string"
1248+
},
1249+
"s3_files": {
1250+
"description": "The backup files from which the database should be restored",
1251+
"items": {
1252+
"$ref": "#/components/schemas/s3file.info"
1253+
},
1254+
"minItems": 1,
1255+
"type": "array"
1256+
}
1257+
},
1258+
"required": [
1259+
"s3_bucket",
1260+
"s3_access_key",
1261+
"s3_access_secret",
1262+
"s3_files"
1263+
],
1264+
"type": "object"
1265+
},
12311266
"flavor.cpu": {
12321267
"description": "The cpu count of the instance.",
12331268
"example": 4,
@@ -1529,6 +1564,98 @@
15291564
"format": "int32",
15301565
"type": "integer"
15311566
},
1567+
"restoreDatabaseFromBackupPayload": {
1568+
"description": "Request to restore a database.",
1569+
"properties": {
1570+
"database_name": {
1571+
"description": "The name of the database on the instance to be restore.",
1572+
"example": "customer_production_db",
1573+
"type": "string"
1574+
},
1575+
"source": {
1576+
"description": "The source of the restore.",
1577+
"discriminator": {
1578+
"mapping": {
1579+
"BACKUP": "#/components/schemas/source.backup",
1580+
"EXTERNAL_S3": "#/components/schemas/source.externalS3"
1581+
},
1582+
"propertyName": "type"
1583+
},
1584+
"oneOf": [
1585+
{
1586+
"$ref": "#/components/schemas/source.backup"
1587+
},
1588+
{
1589+
"$ref": "#/components/schemas/source.externalS3"
1590+
}
1591+
]
1592+
}
1593+
},
1594+
"required": [
1595+
"database_name",
1596+
"source"
1597+
],
1598+
"type": "object"
1599+
},
1600+
"s3file.info": {
1601+
"properties": {
1602+
"file_number": {
1603+
"description": "The sequence number of the file",
1604+
"example": 1,
1605+
"format": "int32",
1606+
"type": "integer"
1607+
},
1608+
"file_path": {
1609+
"description": "The path to the file on the S3 bucket",
1610+
"example": "http://mein-beispiel-bucket.s3.eu-central-1.amazonaws.com/lummerland/peter_pab.bak",
1611+
"type": "string"
1612+
}
1613+
},
1614+
"type": "object"
1615+
},
1616+
"source.backup": {
1617+
"description": "Restore from an existing managed backup.",
1618+
"properties": {
1619+
"type": {
1620+
"enum": [
1621+
"BACKUP"
1622+
],
1623+
"type": "string"
1624+
}
1625+
},
1626+
"required": [
1627+
"type"
1628+
],
1629+
"type": "object"
1630+
},
1631+
"source.externalS3": {
1632+
"description": "Restore from an external S3 backup file.",
1633+
"properties": {
1634+
"database_owner": {
1635+
"$ref": "#/components/schemas/database.owner"
1636+
},
1637+
"logging_guid": {
1638+
"description": "Logging guid to have a complete activity log over all sub stored procedures.",
1639+
"example": "1",
1640+
"type": "string"
1641+
},
1642+
"s3_details": {
1643+
"$ref": "#/components/schemas/external.s3"
1644+
},
1645+
"type": {
1646+
"enum": [
1647+
"EXTERNAL_S3"
1648+
],
1649+
"type": "string"
1650+
}
1651+
},
1652+
"required": [
1653+
"type",
1654+
"s3_details",
1655+
"database_owner"
1656+
],
1657+
"type": "object"
1658+
},
15321659
"status": {
15331660
"enum": [
15341661
"READY",
@@ -3709,6 +3836,143 @@
37093836
}
37103837
}
37113838
},
3839+
"/v3alpha1/projects/{projectId}/regions/{region}/instances/{instanceId}/restores": {
3840+
"post": {
3841+
"description": "Triggers a new restore operation for the specified instance.\nThe request body defines the source \n(e.g., internal backup, external S3) and the target database.\n",
3842+
"operationId": "restoreDatabaseFromBackup",
3843+
"parameters": [
3844+
{
3845+
"$ref": "#/components/parameters/project"
3846+
},
3847+
{
3848+
"$ref": "#/components/parameters/region"
3849+
},
3850+
{
3851+
"$ref": "#/components/parameters/instance"
3852+
}
3853+
],
3854+
"requestBody": {
3855+
"content": {
3856+
"application/json": {
3857+
"examples": {
3858+
"RestoreFromBackup": {
3859+
"description": "An example of restoring from an existing managed backup.",
3860+
"summary": "Restore from a Managed Backup",
3861+
"value": {
3862+
"database_name": "customer_production_db",
3863+
"source": {
3864+
"type": "BACKUP"
3865+
}
3866+
}
3867+
},
3868+
"RestoreFromS3": {
3869+
"description": "An example of restoring from an external S3 file.",
3870+
"summary": "Restore from an External S3 Bucket",
3871+
"value": {
3872+
"database_name": "customer_production_db_from_s3",
3873+
"source": {
3874+
"database_owner": "MyUser",
3875+
"logging_guid": "1",
3876+
"s3_details": {
3877+
"s3_access_key": "AKIAIOSFODNN7EXAMPLE",
3878+
"s3_access_secret": "Aa1Bb~2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_Jj0Kk1Ll2",
3879+
"s3_bucket": "http://mein-beispiel-bucket.s3.eu-central-1.amazonaws.com/",
3880+
"s3_files": [
3881+
{
3882+
"file_number": 1,
3883+
"file_path": "http://mein-beispiel-bucket.s3.eu-central-1.amazonaws.com/lummerland/peter_pab.bak"
3884+
}
3885+
]
3886+
},
3887+
"type": "EXTERNAL_S3"
3888+
}
3889+
}
3890+
}
3891+
},
3892+
"schema": {
3893+
"$ref": "#/components/schemas/restoreDatabaseFromBackupPayload"
3894+
}
3895+
}
3896+
},
3897+
"description": "The restore operation payload.",
3898+
"required": true
3899+
},
3900+
"responses": {
3901+
"202": {
3902+
"description": "Import was accepted and is now processed "
3903+
},
3904+
"400": {
3905+
"content": {
3906+
"application/json": {
3907+
"schema": {
3908+
"$ref": "#/components/schemas/Error"
3909+
}
3910+
}
3911+
},
3912+
"description": "Bad Request"
3913+
},
3914+
"401": {
3915+
"content": {
3916+
"application/json": {
3917+
"schema": {
3918+
"$ref": "#/components/schemas/Error"
3919+
}
3920+
}
3921+
},
3922+
"description": "User is not allowed to perform this operation or credentials are not correct"
3923+
},
3924+
"403": {
3925+
"content": {
3926+
"application/json": {
3927+
"schema": {
3928+
"$ref": "#/components/schemas/Error"
3929+
}
3930+
}
3931+
},
3932+
"description": "Forbidden: No access for the requested resource."
3933+
},
3934+
"404": {
3935+
"content": {
3936+
"application/json": {
3937+
"schema": {
3938+
"$ref": "#/components/schemas/Error"
3939+
}
3940+
}
3941+
},
3942+
"description": "Not found: The requested resource was not found."
3943+
},
3944+
"500": {
3945+
"content": {
3946+
"application/json": {
3947+
"schema": {
3948+
"$ref": "#/components/schemas/Error"
3949+
}
3950+
}
3951+
},
3952+
"description": "Internal Server Error: An internal occurred while processing the request. Please contact the support or try again later."
3953+
},
3954+
"501": {
3955+
"content": {
3956+
"application/json": {
3957+
"schema": {
3958+
"$ref": "#/components/schemas/Error"
3959+
}
3960+
}
3961+
},
3962+
"description": "Endpoint not implemented yet"
3963+
}
3964+
},
3965+
"summary": "Create a Restore Operation",
3966+
"x-stackit-authorization": {
3967+
"actions": [
3968+
"sqlserver-flex.restore.trigger"
3969+
],
3970+
"resource-id": "projectId",
3971+
"resource-id-type": "dynamic",
3972+
"resource-type": "project"
3973+
}
3974+
}
3975+
},
37123976
"/v3alpha1/projects/{projectId}/regions/{region}/instances/{instanceId}/roles": {
37133977
"get": {
37143978
"description": "List available roles for an instance that can be assigned to a user",

0 commit comments

Comments
 (0)