Method create
Creates an SQL Server cluster in the specified folder.
HTTP request
POST https://mdb.api.cloud.yandex.net/mdb/sqlserver/v1alpha/clusters
Body parameters
{
"folderId": "string",
"name": "string",
"description": "string",
"labels": "object",
"environment": "string",
"configSpec": {
"version": "string",
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
},
"backupWindowStart": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"sqlserverConfig_2016Sp2": {
"maxDegreeOfParallelism": "integer",
"costThresholdForParallelism": "integer",
"sqlcollation": "string",
"auditLevel": "integer",
"filestreamAccessLevel": "integer",
"fillFactorPercent": "integer",
"inDoubtXactResolution": "integer",
"optimizeForAdHocWorkloads": true,
"crossDbOwnershipChaining": true
}
},
"databaseSpecs": [
{
"name": "string"
}
],
"userSpecs": [
{
"name": "string",
"password": "string",
"permissions": [
{
"databaseName": "string",
"roles": [
"string"
]
}
]
}
],
"hostSpecs": [
{
"zoneId": "string",
"subnetId": "string",
"assignPublicIp": true
}
],
"networkId": "string"
}
Field | Description |
---|---|
folderId | string Required. ID of the folder to create the SQL Server cluster in. To get the folder ID, use a list request. The maximum string length in characters is 50. |
name | string Required. Name of the SQL Server cluster. The name must be unique within the folder. The maximum string length in characters is 63. Value must match the regular expression |
description | string Description of the SQL Server cluster. The maximum string length in characters is 256. |
labels | object Custom labels for the SQL Server cluster as No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
environment | string Deployment environment of the SQL Server cluster.
|
configSpec | object SQL Server and hosts configuration for the cluster. |
configSpec. version |
string Version of SQL Server used in the cluster. Possible values:
|
configSpec. resources |
object Resources allocated to SQL Server hosts. |
configSpec. resources. resourcePresetId |
string ID of the preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation. |
configSpec. resources. diskSize |
string (int64) Volume of the storage available to a host. |
configSpec. resources. diskTypeId |
string Type of the storage environment for the host. Possible values:
|
configSpec. backupWindowStart |
object Start time for the daily backup in UTC timezone Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. |
configSpec. backupWindowStart. hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
configSpec. backupWindowStart. minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
configSpec. backupWindowStart. seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. |
configSpec. backupWindowStart. nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
configSpec. sqlserverConfig_2016Sp2 |
object Configuration for an SQL Server 2016 SP2 cluster. SQL Server 2016 SP2 supported configuration options are listed here. Detailed description for each set of options is available in SQL Server documentation. Any options that are not listed here are not supported. |
configSpec. sqlserverConfig_2016Sp2. maxDegreeOfParallelism |
integer (int64) Limits the number of processors to use in parallel plan execution per task. See in-depth description in SQL Server documentation. Acceptable values are 1 to 99, inclusive. |
configSpec. sqlserverConfig_2016Sp2. costThresholdForParallelism |
integer (int64) Specifies the threshold at which SQL Server creates and runs parallel plans for queries. SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option. See in-depth description in SQL Server documentation. Acceptable values are 5 to 32767, inclusive. |
configSpec. sqlserverConfig_2016Sp2. sqlcollation |
string Collation used for databases across the instance. Determines if instance is case sensitive, accent sensitive etc. See in-depth description in SQL Server documentation. |
configSpec. sqlserverConfig_2016Sp2. auditLevel |
integer (int64) Describes how to configure login auditing to monitor SQL Server Database Engine login activity. Possible values:
See in-depth description in SQL Server documentation. Acceptable values are 0 to 3, inclusive. |
configSpec. sqlserverConfig_2016Sp2. filestreamAccessLevel |
integer (int64) Determines the
See in-depth description in SQL Server documentation. Acceptable values are 0 to 2, inclusive. |
configSpec. sqlserverConfig_2016Sp2. fillFactorPercent |
integer (int64) Manages the fill factor server configuration option. When an index is created or rebuilt the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth. Values 0 and 100 mean full page usage (no space reserved). See in-depth description in SQL Server documentation. Acceptable values are 0 to 100, inclusive. |
configSpec. sqlserverConfig_2016Sp2. inDoubtXactResolution |
integer (int64) Determines the default outcome of distributed transactions that the Microsoft Distributed Transaction Coordinator (MS DTC) is unable to resolve (in-doubt distributed transactions). Possible values:
See in-depth description in SQL Server documentation. Acceptable values are 0 to 2, inclusive. |
configSpec. sqlserverConfig_2016Sp2. optimizeForAdHocWorkloads |
boolean (boolean) Determines whether plans should be cached only after second execution. Allows to avoid SQL cache bloat because of single-use plans. See in-depth description in SQL Server documentation. |
configSpec. sqlserverConfig_2016Sp2. crossDbOwnershipChaining |
boolean (boolean) Enables cross-database ownership chaining. Example: having explicit access to stored procedure in one database that refers to an object in another database that you don't have explicit access, you'll be able to execute the procedure without permission related error. See in-depth description in SQL Server documentation. |
databaseSpecs[] | object One or more configurations of databases to be created in the SQL Server cluster. |
databaseSpecs[]. name |
string Required. Name of the database. The maximum string length in characters is 63. Value must match the regular expression |
userSpecs[] | object One or more configurations of database users to be created in the SQL Server cluster. |
userSpecs[]. name |
string Required. Name of the SQL Server user. The maximum string length in characters is 32. Value must match the regular expression |
userSpecs[]. password |
string Required. Password of the SQL Server user. The string length in characters must be 8-128. |
userSpecs[]. permissions[] |
object Set of permissions to grant to the user. |
userSpecs[]. permissions[]. databaseName |
string Name of the database the permission grants access to. |
userSpecs[]. permissions[]. roles[] |
string
|
hostSpecs[] | object One or more configurations of hosts to be created in the SQL Server cluster. |
hostSpecs[]. zoneId |
string ID of the availability zone where the host resides. To get the list of available zones, use the list request. The maximum string length in characters is 50. |
hostSpecs[]. subnetId |
string ID of the subnet that the host should belong to. This subnet should be a part of the network that the cluster belongs to. The ID of the network is set in the field Cluster.networkId. The maximum string length in characters is 50. |
hostSpecs[]. assignPublicIp |
boolean (boolean) Whether the host should get a public IP address on creation. After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign a public IP to a host without one, recreate the host with Possible values:
|
networkId | string ID of the network to create the SQL Server cluster in. The maximum string length in characters is 50. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response The error result of the operation in case of failure or cancellation. |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |