-
Notifications
You must be signed in to change notification settings - Fork 5.9k
EventHub: updated for GEO DR #1709
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 6 commits
75dfbf9
9d0cde4
22bc6a7
d1f92d7
f50fc80
9caa0be
1c1ac61
3ac37b5
d42d401
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 |
|---|---|---|
|
|
@@ -664,6 +664,245 @@ | |
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfig": { | ||
| "get": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_List", | ||
| "description": "Gets all Alias(Disaster Recovery configurations)", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successfully retrieved the list of Alias(Disaster Recovery configurations) for eventhub namespace", | ||
| "schema": { | ||
| "$ref": "#/definitions/ArmDisasterRecoveryListResult" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfig/{alias}": { | ||
| "put": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_CreateOrUpdate", | ||
| "description": "Creates or updates a new Alias(Disaster Recovery configuration)", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/aliasNameParameter" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/ArmDisasterRecovery" | ||
| }, | ||
| "description": "Parameters required to create an Alias(Disaster Recovery configuration)" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Alias(Disaster Recovery configuration) successfully created", | ||
| "schema": { | ||
| "$ref": "#/definitions/ArmDisasterRecovery" | ||
| } | ||
| }, | ||
| "201": { | ||
| "description": "Alias(Disaster Recovery configuration) creation request received" | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_Delete", | ||
| "description": "Deletes an Alias(Disaster Recovery configuration)", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/aliasNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "201": { | ||
|
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. 202 response for async delete.
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
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. Reverted as delete is not async |
||
| "description": "Delete Alias(Disaster Recovery configuration) request accepted" | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "get": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_Get", | ||
| "description": "Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/aliasNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Successfully retrieved the Alias(Disaster Recovery configurations)", | ||
| "schema": { | ||
| "$ref": "#/definitions/ArmDisasterRecovery" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfig/{alias}/breakpairing": { | ||
|
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. camelcase, breakPairing
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 |
||
| "post": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_BreakPairing", | ||
| "description": "This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/aliasNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Break-Pairing operation is successful." | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfig/{alias}/failover": { | ||
| "post": { | ||
| "tags": [ | ||
| "DisasterRecoveryConfig" | ||
| ], | ||
| "operationId": "DisasterRecoveryConfig_FailOver", | ||
| "description": "envokes GEO DR failover and reconfigure the alias to point to the secondary namespace", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/resourceGroupNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/namespaceNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/aliasNameParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/SubscriptionIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Failover operation is successful." | ||
| }, | ||
| "default": { | ||
| "description": "Eventhub error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs": { | ||
| "get": { | ||
| "tags": [ | ||
|
|
@@ -1550,6 +1789,16 @@ | |
| "type": "string", | ||
| "description": "Secondary connection string of the created namespace AuthorizationRule." | ||
| }, | ||
| "aliasPrimaryConnectionString": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Primary connection string of the alias if GEO DR is enabled" | ||
| }, | ||
| "aliasSecondaryConnectionString": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Secondary connection string of the alias if GEO DR is enabled" | ||
| }, | ||
| "primaryKey": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
|
|
@@ -1904,6 +2153,68 @@ | |
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "ArmDisasterRecovery": { | ||
| "properties": { | ||
| "properties": { | ||
| "x-ms-client-flatten": true, | ||
| "properties": { | ||
| "provisioningState": { | ||
|
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. enum. What about a Failed provisioning State value? You mention that possible values as accepted or succeeded. In case the operation fails, failed should be returned. And do you support cancel? In that case, you will have a canceled provisioning state as well.
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, we don't support cancel. |
||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Provisioning state of the Alias(Disaster Recovery configurations) - possible values 'Accepted' or 'Succeeded'" | ||
| }, | ||
| "partnerNamespace": { | ||
| "type": "string", | ||
| "description": "Primary/Secondary eventhub namespace name, which is part of GEO DR pairning" | ||
| }, | ||
| "role": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'", | ||
| "enum": [ | ||
| "Primary", | ||
| "PrimaryNotReplicating", | ||
| "Secondary" | ||
| ], | ||
| "x-ms-enum": { | ||
| "name": "RoleDisasterRecovery", | ||
| "modelAsString": false | ||
| } | ||
| }, | ||
| "lastSynced": { | ||
| "readOnly": true, | ||
| "format": "date-time", | ||
| "type": "string", | ||
| "description": "Timestamp of when Data/Metdata was last synced with Primary and Secondary namespce" | ||
| } | ||
| }, | ||
| "description": "Properties required to the Create Or Update Alias(Disaster Recovery configurations)" | ||
| } | ||
| }, | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/Resource" | ||
| } | ||
| ], | ||
| "description": "Single item in List or Get Alias(Disaster Recovery configuration) operation" | ||
| }, | ||
| "ArmDisasterRecoveryListResult": { | ||
| "properties": { | ||
| "value": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/ArmDisasterRecovery" | ||
| }, | ||
| "description": "List of Alias(Disaster Recovery configurations)" | ||
| }, | ||
| "nextLink": { | ||
| "type": "string", | ||
| "readOnly": true, | ||
| "description": "Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)" | ||
| } | ||
| }, | ||
| "description": "The result of the List Alias(Disaster Recovery configuration) operation." | ||
| } | ||
| }, | ||
| "parameters": { | ||
|
|
@@ -1959,12 +2270,23 @@ | |
| "x-ms-parameter-location": "method", | ||
| "description": "The Event Hub name" | ||
| }, | ||
| "aliasNameParameter": { | ||
| "name": "alias", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 50, | ||
| "x-ms-parameter-location": "method", | ||
| "description": "The Disaster Recovery configuration name" | ||
| }, | ||
| "consumerGroupNameParameter": { | ||
| "name": "consumerGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "maxLength": 50, | ||
| "x-ms-parameter-location": "method", | ||
| "description": "The consumer group name" | ||
| } | ||
|
|
||
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.
pluralize resource type name. disasterRecoveryConfigs
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.
Resolved