-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] Add Archive option to LTR Policy for SQL DB #22697
Merged
raych1
merged 4 commits into
Azure:release-sql-Microsoft.Sql-2022-11-01-preview
from
CelinaJiangJXY:dev/cejiang/LTRPolicyArchivalChange
Mar 10, 2023
+25
−9
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"operationId": "LongTermRetentionPolicies_ListByDatabase", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ServerNameParameter" | ||
|
@@ -34,10 +34,10 @@ | |
"$ref": "#/parameters/DatabaseNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
|
@@ -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 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 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": { | ||
|
@@ -70,7 +70,7 @@ | |
"operationId": "LongTermRetentionPolicies_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ServerNameParameter" | ||
|
@@ -93,10 +93,10 @@ | |
} | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
|
@@ -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 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 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": { | ||
|
@@ -120,11 +120,11 @@ | |
"tags": [ | ||
"LongTermRetentionPolicies" | ||
], | ||
"description": "Sets a database's long term retention policy.", | ||
"description": "Set or update a database's long term retention policy.", | ||
"operationId": "LongTermRetentionPolicies_CreateOrUpdate", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ServerNameParameter" | ||
|
@@ -156,21 +156,21 @@ | |
} | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully set the policy.", | ||
"description": "Successfully updated the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/LongTermRetentionPolicy" | ||
} | ||
}, | ||
"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 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 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 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" | ||
|
@@ -186,10 +186,57 @@ | |
} | ||
}, | ||
"definitions": { | ||
"BaseLongTermRetentionPolicyProperties": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaking change for the property is expected? It has triggered the breaking change pipeline failed. |
||
"LongTermRetentionPolicy": { | ||
"description": "A long term retention policy.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/LongTermRetentionPolicyProperties", | ||
"description": "Resource properties.", | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
}, | ||
"LongTermRetentionPolicyListResult": { | ||
"description": "A list of long term retention policies.", | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Array of results.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/LongTermRetentionPolicy" | ||
}, | ||
"readOnly": true | ||
}, | ||
"nextLink": { | ||
"description": "Link to retrieve next page of results.", | ||
"type": "string", | ||
"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" | ||
|
@@ -209,43 +256,63 @@ | |
} | ||
} | ||
}, | ||
"LongTermRetentionPolicy": { | ||
"description": "A long term retention policy.", | ||
"ProxyResource": { | ||
"description": "ARM proxy resource.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource" | ||
"$ref": "#/definitions/Resource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/BaseLongTermRetentionPolicyProperties", | ||
"description": "Resource properties.", | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
"properties": {} | ||
}, | ||
"LongTermRetentionPolicyListResult": { | ||
"description": "A list of long term retention policies.", | ||
"Resource": { | ||
"description": "ARM resource.", | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"description": "Array of results.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/LongTermRetentionPolicy" | ||
}, | ||
"id": { | ||
"description": "Resource ID.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"nextLink": { | ||
"description": "Link to retrieve next page of results.", | ||
"name": { | ||
"description": "Resource name.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"type": { | ||
"description": "Resource type.", | ||
"type": "string", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"x-ms-azure-resource": true | ||
} | ||
}, | ||
"parameters": { | ||
"ApiVersionParameter": { | ||
"name": "api-version", | ||
"in": "query", | ||
"description": "The API version to use for the request.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "client" | ||
}, | ||
"BlobAuditingPolicyNameParameter": { | ||
"name": "blobAuditingPolicyName", | ||
"in": "path", | ||
"description": "The name of the blob auditing policy.", | ||
"required": true, | ||
"type": "string", | ||
"enum": [ | ||
"default" | ||
], | ||
"x-ms-parameter-location": "method", | ||
"x-ms-enum": { | ||
"name": "blobAuditingPolicyName", | ||
"modelAsString": false | ||
} | ||
}, | ||
"DatabaseNameParameter": { | ||
"name": "databaseName", | ||
"in": "path", | ||
|
@@ -254,13 +321,85 @@ | |
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ManagedInstanceNameParameter": { | ||
"name": "managedInstanceName", | ||
"in": "path", | ||
"description": "The name of the managed instance.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceGroupParameter": { | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ServerNameParameter": { | ||
"name": "serverName", | ||
"in": "path", | ||
"description": "The name of the server.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SqlDatabaseNameParameter": { | ||
"name": "sqlDatabaseName", | ||
"in": "path", | ||
"description": "The name of the sql database.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SqlPoolNameParameter": { | ||
"name": "sqlPoolName", | ||
"in": "path", | ||
"description": "The name of the sql pool.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SqlVirtualMachineContainerNameParameter": { | ||
"name": "sqlVirtualMachineContainerName", | ||
"in": "path", | ||
"description": "The name of the SqlVirtualMachineContainer.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SqlVirtualMachineInstanceNameParameter": { | ||
"name": "sqlVirtualMachineInstanceName", | ||
"in": "path", | ||
"description": "The name of the SqlVirtualMachineInstance.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"SubscriptionIdParameter": { | ||
"name": "subscriptionId", | ||
"in": "path", | ||
"description": "The subscription ID that identifies an Azure subscription.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "client" | ||
}, | ||
"VirtualClusterNameParameter": { | ||
"name": "virtualClusterName", | ||
"in": "path", | ||
"description": "The name of the virtual cluster.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"WorkspaceNameParameter": { | ||
"name": "workspaceName", | ||
"in": "path", | ||
"description": "The name of the workspace.", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
} | ||
}, | ||
"securityDefinitions": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we use the specific resource Group/subscription/API version def?