Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.69k stars 5.12k forks source link

The WeekOfYear property of MS Sql Database isn't set correctly after provisioned successfully #18259

Open neil-yechenwei opened 2 years ago

neil-yechenwei commented 2 years ago

After tested, seems the WeekOfYear property of MS Sql Database doesn't take effect after provisioned successfully. The API should set it correctly or throw corresponding error. Could you help take a look? Thanks in advance.

Http request:

PUT https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default

{
    "properties": {
        "weeklyRetention": "P12W",
        "weekOfYear": 1
    }
}

API response:

GET https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default?api-version=2020-11-01-preview

{
  "properties": {
    "weeklyRetention": "P12W",
    "monthlyRetention": "PT0S",
    "yearlyRetention": "PT0S",
    "weekOfYear": 0
  },
  "id": "/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default",
  "name": "default",
  "type": "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies"
}
ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.

Issue Details
After tested, seems the `WeekOfYear` property of [MS Sql Database](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/LongTermRetentionPolicies.json#L79) doesn't take effect after provisioned successfully. The API should set it correctly or throw corresponding error. Could you help take a look? Thanks in advance. Http request: ``` PUT https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default { "properties": { "weeklyRetention": "P12W", "weekOfYear": 1 } } ``` API response: ``` GET https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default?api-version=2020-11-01-preview { "properties": { "weeklyRetention": "P12W", "monthlyRetention": "PT0S", "yearlyRetention": "PT0S", "weekOfYear": 0 }, "id": "/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-mssql-test03/providers/Microsoft.Sql/servers/acctest-sqlserver-test03/databases/acctest-db-test03/backupLongTermRetentionPolicies/default", "name": "default", "type": "Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies" } ```
Author: neil-yechenwei
Assignees: -
Labels: `SQL`, `Service Attention`, `needs-triage`
Milestone: -