diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/LongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/LongTermRetentionPolicies.json index 7e1d444ee0bf..ed48a420ebfe 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/LongTermRetentionPolicies.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/LongTermRetentionPolicies.json @@ -186,41 +186,6 @@ } }, "definitions": { - "BaseLongTermRetentionPolicyProperties": { - "description": "Properties of a long term retention policy", - "type": "object", - "properties": { - "backupStorageAccessTier": { - "description": "The BackupStorageAccessTier for the LTR backups", - "enum": [ - "Hot", - "Archive" - ], - "type": "string", - "x-ms-enum": { - "name": "BackupStorageAccessTier", - "modelAsString": true - } - }, - "weeklyRetention": { - "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "monthlyRetention": { - "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "yearlyRetention": { - "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "weekOfYear": { - "format": "int32", - "description": "The week of year to take the yearly backup in an ISO 8601 format.", - "type": "integer" - } - } - }, "LongTermRetentionPolicy": { "description": "A long term retention policy.", "type": "object", @@ -231,7 +196,7 @@ ], "properties": { "properties": { - "$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", + "$ref": "#/definitions/LongTermRetentionPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } @@ -255,6 +220,41 @@ "readOnly": true } } + }, + "LongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "backupStorageAccessTier": { + "description": "The BackupStorageAccessTier for the LTR backups", + "enum": [ + "Hot", + "Archive" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageAccessTier", + "modelAsString": true + } + }, + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup in an ISO 8601 format.", + "type": "integer" + } + } } }, "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstanceLongTermRetentionPolicies.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstanceLongTermRetentionPolicies.json index 2eb5250cc713..292cab668532 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstanceLongTermRetentionPolicies.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/ManagedInstanceLongTermRetentionPolicies.json @@ -48,7 +48,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." } }, "x-ms-pageable": { @@ -107,7 +107,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later." } }, "x-ms-examples": { @@ -170,7 +170,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, "202": { "description": "Accepted" @@ -228,7 +228,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." + "description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 LongTermRetentionMissingWeekOfYear - WeekOfYear is required to be set between 1 and 52 in order to set yearly retention.\n\n * 400 LtrConfigPolicyUnsupportedIfAutoPauseEnabled - Enabling long-term backup retention for a serverless database is not supported if auto-pause is enabled.\n\n * 400 LtrConfigPolicyDuringVldbMigration - Enabling long-term backup retention for a database during migration to the Hyperscale service tier is not supported.\n\n * 400 LtrConfigPolicyDuringVldbReverseMigration - Enabling long-term backup retention for a database during a reverse migration from Hyperscale is not supported.\n\n * 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.\n\n * 400 LTRNotSupportedForPerDBCMK - Long-term Backup Retention is not supported when Database-level CMK is configured in preview.\n\n * 400 LongTermRetentionPolicyNotSupported - Long Term Retention is not supported on this database.\n\n * 400 LongTermRetentionPolicyInvalid - Long Term Retention policy is invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingServerOperation - Server '{0}' is busy with another operation. Please try your operation later.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources." }, "202": { "description": "Accepted" @@ -244,29 +244,6 @@ } }, "definitions": { - "BaseLongTermRetentionPolicyProperties": { - "description": "Properties of a long term retention policy", - "type": "object", - "properties": { - "weeklyRetention": { - "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "monthlyRetention": { - "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "yearlyRetention": { - "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", - "type": "string" - }, - "weekOfYear": { - "format": "int32", - "description": "The week of year to take the yearly backup in an ISO 8601 format.", - "type": "integer" - } - } - }, "ManagedInstanceLongTermRetentionPolicy": { "description": "A long term retention policy.", "type": "object", @@ -277,7 +254,7 @@ ], "properties": { "properties": { - "$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", + "$ref": "#/definitions/ManagedInstanceLongTermRetentionPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } @@ -301,6 +278,41 @@ "readOnly": true } } + }, + "ManagedInstanceLongTermRetentionPolicyProperties": { + "description": "Properties of a long term retention policy", + "type": "object", + "properties": { + "backupStorageAccessTier": { + "description": "The BackupStorageAccessTier for the LTR backups", + "enum": [ + "Hot", + "Archive" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupStorageAccessTier", + "modelAsString": true + } + }, + "weeklyRetention": { + "description": "The weekly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "monthlyRetention": { + "description": "The monthly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "yearlyRetention": { + "description": "The yearly retention policy for an LTR backup in an ISO 8601 format.", + "type": "string" + }, + "weekOfYear": { + "format": "int32", + "description": "The week of year to take the yearly backup in an ISO 8601 format.", + "type": "integer" + } + } } }, "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json index b92276ff920c..9dda2b60f1dd 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json @@ -23,7 +23,7 @@ }, "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/operationResults/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" + "Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/managedInstanceLongTermRetentionPolicyOperationResults/00000000-1111-2222-3333-444444444444?api-version=2022-11-01-preview" } } }