-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Service Bus: added Standard to Premium namespace migration API #2854
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
Changes from 3 commits
3695b7c
1aca350
bde5ffc
c41e136
fe023df
fbdcf5b
0228c28
fe062c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1145,6 +1145,245 @@ | |
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations": { | ||
| "get": { | ||
| "tags": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_List", | ||
| "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": { | ||
|
Contributor
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. Is this operation a LRO? IF so you need to mark it as "x-ms-long-running-operation": true. Otherwise the description is kind of confusing. If this operation initiates migration how does developer check the status of Migration? If it creates the configuration then method/operation Id is confusing.
Contributor
Author
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. yes its LRO, marked its as "x-ms-long-running-operation": true |
||
| "tags": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_CreateOrUpdate", | ||
| "description": "Creates or updates a new Migration Config", | ||
| "parameters": [ | ||
|
Contributor
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. Looks like a typo "enties"
Contributor
Author
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. resolved |
||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/configNameParameter" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/MigrationConfigProperties" | ||
| }, | ||
| "description": "Parameters required to Migration Config" | ||
| }, | ||
| { | ||
| "$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" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "tags": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_Delete", | ||
| "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" | ||
|
Contributor
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. I think you should also handle 204: not found the same way as 200
Contributor
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. Otherwise callers will get Exception in C# and Java which is undesired.
Contributor
Author
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. resolved |
||
| }, | ||
| "default": { | ||
| "description": "ServiceBus error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "get": { | ||
| "tags": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_Get", | ||
| "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": { | ||
|
Contributor
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. are Migration upgrade and/or revert operations LRO?
Contributor
Author
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. no, those are not LRO |
||
| "tags": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_DisableMigration", | ||
| "description": "This operation disables the Migration", | ||
|
Contributor
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 should be named as "migrationConfigurations_DisableMigration" or something more self explanatory. No need to move it to a separate operation group on the client SDKs;.
Contributor
Author
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. changed it to 'migrationConfigurations_CompleteMigration' and changed the description. as this operation will complete migration process |
||
| "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": [ | ||
| "migrationConfigurations" | ||
| ], | ||
| "operationId": "migrationConfigurations_Revert", | ||
| "description": "Invokes MigrationConfig Revert", | ||
| "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 +4225,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", | ||
|
Contributor
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. provisioningState is a readonly field returned from server and may have additional values in the future. Modeling it as enums will cause client side runtime exceptions if there is a different value received.
Contributor
Author
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. made it read only string |
||
| "description": "Provisioning state of Migration Configuration " | ||
| }, | ||
| "primaryNamespaceName": { | ||
| "type": "string", | ||
| "description": "Existing premium Namespace name which has no entities, will be used for migration" | ||
| }, | ||
| "postMigrationName": { | ||
| "type": "string", | ||
| "description": "Name to access connection strings of the Primary Namespace after migration" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "primaryNamespaceName", | ||
| "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 +4379,20 @@ | |
| "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", | ||
|
Member
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. Please add
Contributor
Author
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. resolved |
||
| "enum": [ | ||
| "$default" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "MigrationConfigurationName", | ||
| "modelAsString": true | ||
| } | ||
| } | ||
| } | ||
| } | ||
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.
please think about consistency in the operation naming. Here you have
migrationConfigurationswhile the other already existing operation group is namedDisasterRecoveryConfigsThere 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.
could you please help me on this?
for DisasterRecoveryConfigs operations its 'DisasterRecoveryConfigs' for Namespaces operations its 'Namespaces'.
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.
the thing is that you have already shipped
DisasterRecoveryConfigs(I mean shortened form of Configuration) that is why I advice keeping the consistency in names to shortenmigrationConfigurationstoMigrationConfigsUh oh!
There was an error while loading. Please reload this page.
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.
@hovsepm changed shortened to 'MigrationConfigs'. Also in URI, DR is 'disasterrecoveryconfigs' so have changed for migration to 'migrationconfigs'. please let me know the URI change is fine or need to revert it.