diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json new file mode 100644 index 000000000000..1e039b1dca68 --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-41", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "configName": "$default", + "subscriptionId": "SubscriptionId" + }, + "responses": { + "200": { } + } +} diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json new file mode 100644 index 000000000000..18144422565d --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-41", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "subscriptionId": "SubscriptionId", + "configName": "$default", + "parameters": { + "properties": { + "targetNamespace": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028", + "postMigrationName": "sdk-PostMigration-5919" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default", + "name": "sdk-Namespace-41", + "type": "Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs", + "properties": { + "provisioningState": "Accepted", + "targetNamespace": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028", + "postMigrationName": "sdk-PostMigration-5919" + } + } + }, + "201": { } + } +} diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json new file mode 100644 index 000000000000..a393c7d0bf68 --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-41", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "configName": "$default", + "subscriptionId": "SubscriptionId" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationGet.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationGet.json new file mode 100644 index 000000000000..e73f9a31c2af --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-41", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "configName": "$default", + "subscriptionId": "SubscriptionId" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-41/migrationConfigs/$default", + "name": "sdk-Namespace-41", + "type": "Microsoft.ServiceBus/Namespaces/disasterrecoveryconfigs", + "properties": { + "provisioningState": "Succeeded", + "targetNamespace": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028", + "postMigrationName": "sdk-PostMigration-5919" + } + } + } + } +} diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationList.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationList.json new file mode 100644 index 000000000000..272e5577b5ce --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-9259", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "configName": "$default", + "subscriptionId": "SubscriptionId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9259/migrationConfigs/sdk-Namespace-9259", + "name": "sdk-Namespace-9259", + "type": "Microsoft.ServiceBus/Namespaces/migrationconfigurations", + "properties": { + "provisioningState": "Succeeded", + "targetNamespace": "/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-7454", + "postMigrationName": "sdk-PostMigration-9423" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json new file mode 100644 index 000000000000..51c5263efe18 --- /dev/null +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "namespaceName": "sdk-Namespace-41", + "resourceGroupName": "ResourceGroup", + "api-version": "2017-04-01", + "configName": "$default", + "subscriptionId": "SubscriptionId" + }, + "responses": { + "200": { } + } +} \ No newline at end of file diff --git a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json index d7e3df5e1347..af4225cfe6cb 100644 --- a/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json +++ b/specification/servicebus/resource-manager/Microsoft.ServiceBus/stable/2017-04-01/servicebus.json @@ -1145,6 +1145,267 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations": { + "get": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_List", + "x-ms-examples": { + "MigrationConfigurationsList": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationList.json" } + }, + "description": "Gets all migrationConfigurations", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of migrationConfigurations for servicebus namespace", + "schema": { + "$ref": "#/definitions/MigrationConfigListResult" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}": { + "put": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_CreateAndStartMigration", + "x-ms-examples": { + "MigrationConfigurationsStartMigration": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json" } + }, + "description": "Creates Migration configuration and starts migration of enties from Standard to Premium namespace", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/configNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationConfigProperties" + }, + "description": "Parameters required to create Migration Configuration" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Migration Config successfully created", + "schema": { + "$ref": "#/definitions/MigrationConfigProperties" + } + }, + "201": { + "description": "Migration Config creation request received" + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_Delete", + "x-ms-examples": { + "MigrationConfigurationsDelete": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationDelete.json" } + }, + "description": "Deletes a MigrationConfiguration", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/configNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Delete Migration Config request accepted" + }, + "204": { + "description": "Not Found" + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_Get", + "x-ms-examples": { + "MigrationConfigurationsGet": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationGet.json" } + }, + "description": "Retrieves Migration Config", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/configNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved Migration Config)", + "schema": { + "$ref": "#/definitions/MigrationConfigProperties" + } + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/upgrade": { + "post": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_CompleteMigration", + "x-ms-examples": { + "MigrationConfigurationsCompleteMigration": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json" } + }, + "description": "This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any enties created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress.", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/configNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "upgrade operation of Migration Config is successful." + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/revert": { + "post": { + "tags": [ + "MigrationConfigs" + ], + "operationId": "MigrationConfigs_Revert", + "x-ms-examples": { + "MigrationConfigurationsRevert": { "$ref": "./examples/Migrationconfigurations/SBMigrationconfigurationRevert.json" } + }, + "description": "This operation reverts Migration", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/namespaceNameParameter" + }, + { + "$ref": "#/parameters/configNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "MigrationConfig Revert operation is successful." + }, + "default": { + "description": "ServiceBus error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues": { "get": { "tags": [ @@ -3986,6 +4247,56 @@ } }, "description": "The result of the List Alias(Disaster Recovery configuration) operation." + }, + "MigrationConfigProperties": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "properties": { + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "Provisioning state of Migration Configuration " + }, + "targetNamespace": { + "type": "string", + "description": "Existing premium Namespace ARM Id name which has no entities, will be used for migration" + }, + "postMigrationName": { + "type": "string", + "description": "Name to access Standard Namespace after migration" + } + }, + "required": [ + "targetNamespace", + "postMigrationName" + ], + "description": "Properties required to the Create Migration Configuration" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Single item in List or Get Migration Config operation" + }, + "MigrationConfigListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationConfigProperties" + }, + "description": "List of Migration Configs" + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "Link to the next set of results. Not empty if Value contains incomplete list of migrationConfigurations" + } + }, + "description": "The result of the List migrationConfigurations operation." } }, "parameters": { @@ -4090,6 +4401,21 @@ "maxLength": 50, "x-ms-parameter-location": "method", "description": "The Disaster Recovery configuration name" + }, + "configNameParameter": { + "name": "configName", + "in": "path", + "description": "The configuration name. Should always be \"$default\".", + "required": true, + "type": "string", + "enum": [ + "$default" + ], + "x-ms-enum": { + "name": "MigrationConfigurationName", + "modelAsString": true + }, + "x-ms-parameter-location": "method" } } } \ No newline at end of file