diff --git a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCheckNameAvailability.json b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCheckNameAvailability.json index 112850de67ad..404417e9d9b4 100644 --- a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCheckNameAvailability.json +++ b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCheckNameAvailability.json @@ -3,8 +3,7 @@ "api-version": "2017-04-01", "subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40", "parameters": { - "name": "sdk-Namespace-2924", - "location": "West Europe" + "name": "sdk-Namespace-2924" } }, "responses": { diff --git a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubDebugSend.json b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubDebugSend.json new file mode 100644 index 000000000000..938171fc063c --- /dev/null +++ b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubDebugSend.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "namespaceName": "nh-sdk-ns", + "resourceGroupName": "5ktrial", + "notificationHubName": "nh-sdk-hub", + "api-version": "2017-04-01", + "subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40", + "parameters": { + "data": { + "message": "Hello" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub", + "name": "nh-sdk-hub", + "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", + "location": "South Central US", + "tags": null, + "properties": { + "success": 1, + "failure": 0, + "results": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubPatch.json b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubPatch.json new file mode 100644 index 000000000000..fddb1ce919ef --- /dev/null +++ b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubPatch.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "namespaceName": "nh-sdk-ns", + "resourceGroupName": "sdkresourceGroup", + "notificationHubName": "sdk-notificationHubs-8708", + "api-version": "2017-04-01", + "subscriptionId": "29cfa613-cbbc-4512-b1d6-1b3a92c7fa40", + "parameters": { + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub", + "name": "nh-sdk-hub", + "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", + "location": "South Central US", + "tags": null, + "properties": { + "registrationTtl": "10675199.02:48:05.4775807", + "authorizationRules": [] + } + } + } + } + } \ No newline at end of file diff --git a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json index 8a2e7b6e6be4..4b324fbb5659 100644 --- a/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json +++ b/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json @@ -820,6 +820,64 @@ } } }, + "patch": { + "tags": [ + "NotificationHubs" + ], + "x-ms-examples": { + "notificationhubPatch": { + "$ref": "./examples/NotificationHubs/NotificationHubPatch.json" + } + }, + "operationId": "NotificationHubs_Patch", + "description": "Patch a NotificationHub in a namespace.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "namespaceName", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace name." + }, + { + "name": "notificationHubName", + "in": "path", + "required": true, + "type": "string", + "description": "The notification hub name." + }, + { + "name": "parameters", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/NotificationHubPatchParameters" + }, + "description": "Parameters supplied to patch a NotificationHub Resource." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "NotificationHub is patched", + "schema": { + "$ref": "#/definitions/NotificationHubResource" + } + } + } + }, "delete": { "tags": [ "NotificationHubs" @@ -916,6 +974,66 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/debugsend": { + "post": { + "tags": [ + "NotificationHubs" + ], + "x-ms-examples": { + "debugsend": { + "$ref": "./examples/NotificationHubs/NotificationHubDebugSend.json" + } + }, + "operationId": "NotificationHubs_DebugSend", + "description": "test send a push notification", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "namespaceName", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace name." + }, + { + "name": "notificationHubName", + "in": "path", + "required": true, + "type": "string", + "description": "The notification hub name." + }, + { + "name": "parameters", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/DebugSendParameters" + }, + "description": "Debug send parameters" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "push send status", + "schema": { + "$ref": "#/definitions/DebugSendResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}": { "put": { "tags": [ @@ -1474,8 +1592,7 @@ } }, "required": [ - "name", - "location" + "name" ], "description": "Parameters supplied to the Check Name Availability for Namespace and NotificationHubs." }, @@ -2017,6 +2134,25 @@ ], "description": "Parameters supplied to the CreateOrUpdate NotificationHub operation." }, + "NotificationHubPatchParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/NotificationHubProperties", + "description": "Properties of the NotificationHub." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Parameters supplied to the patch NotificationHub operation." + }, + "DebugSendParameters": { + "description": "Debug Send payload", + "type": "object" + }, "NotificationHubResource": { "properties": { "properties": { @@ -2032,6 +2168,21 @@ ], "description": "Description of a NotificationHub Resource." }, + "DebugSendResponse": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DebugSendResult", + "description": "Properties of the NotificationHub." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Description of a NotificationHub Resource." + }, "PnsCredentialsResource": { "properties": { "properties": { @@ -2136,6 +2287,23 @@ }, "x-ms-azure-resource": true }, + "DebugSendResult": { + "properties": { + "success": { + "type": "number", + "description": "successful send" + }, + "failure": { + "type": "number", + "description": "send failure" + }, + "results": { + "type": "object", + "description": "actual failure description" + } + }, + "x-ms-azure-resource": true + }, "Sku": { "properties": { "name": { diff --git a/specification/notificationhubs/resource-manager/readme.md b/specification/notificationhubs/resource-manager/readme.md index 085cc8581171..92947d05c996 100644 --- a/specification/notificationhubs/resource-manager/readme.md +++ b/specification/notificationhubs/resource-manager/readme.md @@ -27,9 +27,14 @@ These are the global settings for the NotificationHubs API. ``` yaml openapi-type: arm tag: package-2017-04 +directive: + - where: + - $.definitions.NamespaceCreateOrUpdateParameters + suppress: + - TrackedResourcePatchOperation + - TrackedResourceGetOperation ``` - ### Tag: package-2017-04 These settings apply only when `--tag=package-2017-04` is specified on the command line.