Skip to content
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

Update backup/restore API for managed identities #14973

Merged
merged 3 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,30 @@
"description": "Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.",
"x-ms-examples": {
"ApiManagementRestoreService": {
"$ref": "./examples/ApiManagementRestoreService.json"
"$ref": "./examples/ApiManagementRestoreWithAccessKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApiManagementServiceBackupRestoreParameters"
},
"description": "Parameters supplied to the Restore API Management service from backup operation."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
"description": "Parameters supplied to the ApiManagementService_Restore operation."
}
],
"responses": {
Expand Down Expand Up @@ -186,16 +186,22 @@
"description": "Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.",
"x-ms-examples": {
"ApiManagementCreateBackup": {
"$ref": "./examples/ApiManagementCreateBackup.json"
"$ref": "./examples/ApiManagementBackupWithAccessKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
Expand All @@ -204,12 +210,6 @@
"$ref": "#/definitions/ApiManagementServiceBackupRestoreParameters"
},
"description": "Parameters supplied to the ApiManagementService_Backup operation."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1092,24 +1092,55 @@
"properties": {
"storageAccount": {
"type": "string",
"description": "Azure Cloud Storage account (used to place/retrieve the backup) name."
},
"accessKey": {
"type": "string",
"description": "Azure Cloud Storage account (used to place/retrieve the backup) access key."
"description": "The name of the Azure storage account (used to place/retrieve the backup)."
},
"containerName": {
"type": "string",
"description": "Azure Cloud Storage blob container name used to place/retrieve the backup."
"description": "The name of the blob container (used to place/retrieve the backup)."
},
"backupName": {
"type": "string",
"description": "The name of the backup file to create."
"description": "The name of the backup file to create/retrieve."
},
"accessType": {
"type": "string",
"description": "The type of access to be used for the storage account.",
"default": "AccessKey",
"enum": [
"AccessKey",
"SystemAssignedManagedIdentity",
"UserAssignedManagedIdentity"
],
"x-ms-enum": {
"name": "AccessType",
"modelAsString": true,
"values": [
{
"value": "AccessKey",
"description": "Use access key."
},
{
"value": "SystemAssignedManagedIdentity",
"description": "Use system assigned managed identity."
},
{
"value": "UserAssignedManagedIdentity",
"description": "Use user assigned managed identity."
}
]
}
},
"accessKey": {
"type": "string",
"description": "Storage account access key. Required only if `accessType` is set to `AccessKey`."
},
"clientId": {
"type": "string",
"description": "The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`."
}
},
"required": [
"storageAccount",
"accessKey",
"containerName",
"backupName"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"subscriptionId": "subid",
"parameters": {
"storageAccount": "teststorageaccount",
"accessKey": "**************************************************",
"containerName": "backupContainer",
"backupName": "apimService1backup_2017_03_19"
"backupName": "apimService1backup_2017_03_19",
"accessType": "AccessKey",
"accessKey": "**************************************************"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"subscriptionId": "subid",
"parameters": {
"storageAccount": "teststorageaccount",
"accessKey": "**************************************************",
"containerName": "backupContainer",
"backupName": "apimService1backup_2017_03_19"
"backupName": "apimService1backup_2017_03_19",
"accessType": "AccessKey",
"accessKey": "**************************************************"
}
},
"responses": {
Expand Down