From 2d134ef4e8e925b5e85e0551a5dd27eb5baf817c Mon Sep 17 00:00:00 2001 From: Tal Rostoker Date: Wed, 8 Aug 2018 12:24:00 +0300 Subject: [PATCH 1/5] add checknameavailability --- .../examples/checkNameAvailability.json | 19 ++++ .../stable/2017-10-01/powerbidedicated.json | 87 ++++++++++++++++++- 2 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json new file mode 100644 index 000000000000..d7861d6c2526 --- /dev/null +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60", + "location": "West US", + "serverParameters": { + "name": "azsdktest", + "type": "Microsoft.PowerBIDedicated/capacities" + }, + "api-version": "2017-10-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "nameAvailable": true + } + } + } +} \ No newline at end of file diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json index 22d8c4e78376..48ef63450180 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json @@ -37,7 +37,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{dedicatedCapacityName}": { "get": { - "description": "Gets details about the specified dedicated capacity.", + "description": "Gets details about the specified dedicated capacity.", "x-ms-examples": { "Get details of a capacity": { "$ref": "./examples/getCapacity.json" } }, @@ -73,7 +73,7 @@ }, "put": { "description": "Provisions the specified Dedicated capacity based on the configuration specified in the request.", - "x-ms-examples": { + "x-ms-examples": { "Create capacity": { "$ref": "./examples/createCapacity.json" } }, "tags": [ "Capacities" ], @@ -121,7 +121,7 @@ }, "delete": { "description": "Deletes the specified Dedicated capacity.", - "x-ms-examples": { + "x-ms-examples": { "Get details of a capacity": { "$ref": "./examples/deleteCapacity.json" } }, "tags": [ "Capacities" ], @@ -436,6 +436,51 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability": { + "post": { + "x-ms-examples": { + "Get details of a server": { "$ref": "./examples/checkNameAvailability.json" } + }, + "tags": [ + "Capacities" + ], + "operationId": "Capacities_CheckNameAvailability", + "description": "Check the name availability in the target location.", + "parameters": [ + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The region name which the operation will lookup into." + }, + { + "name": "capacityParameters", + "in": "body", + "required": true, + "schema": + { + "$ref": "#/definitions/CheckCapacityNameAvailabilityParameters" + }, + "description": "The name of the capacity." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CheckCapacityNameAvailabilityResult" + } + } + } + } }, "definitions": { "OperationListResult": { @@ -753,6 +798,42 @@ "maxLength": 90, "x-ms-parameter-location": "method", "description": "The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90." + }, + "CheckCapacityNameAvailabilityParameters": { + "description": "Details of capacity name request body.", + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-z][a-z0-9]*$", + "minLength": 3, + "maxLength": 63, + "description": "Name for checking availability." + }, + "type": { + "type": "string", + "default": "Microsoft.PowerBIDedicated/capacities", + "description": "The resource type of powerbi dedicated." + } + } + }, + "CheckCapacityNameAvailabilityResult": { + "description": "The checking result of capacity name availibility.", + "type": "object", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Indicator of availablity of the capacity name." + }, + "reason": { + "type": "string", + "description": "The reason of unavailability." + }, + "message": { + "type": "string", + "description": "The detailed message of the request unavailability." + } + } } } } From 57ff4e97ff5eea69f6c4e049ad88dfd1ba8062cb Mon Sep 17 00:00:00 2001 From: Tal Rostoker Date: Wed, 8 Aug 2018 22:43:09 +0300 Subject: [PATCH 2/5] move checkname parameter to definition section --- .../stable/2017-10-01/powerbidedicated.json | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json index 48ef63450180..68cc58192772 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json @@ -758,7 +758,7 @@ } } }, - "ErrorResponse": { + "ErrorResponse": { "description": "Describes the format of Error response.", "type": "object", "properties": { @@ -771,33 +771,6 @@ "type": "string" } } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The client API version." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method", - "description": "The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90." }, "CheckCapacityNameAvailabilityParameters": { "description": "Details of capacity name request body.", @@ -835,5 +808,32 @@ } } } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The client API version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method", + "description": "The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. This name must be at least 1 character in length, and no more than 90." + } } } From ba98b1262b156cb13781c7a16967eab618d869e4 Mon Sep 17 00:00:00 2001 From: Tal Rostoker Date: Thu, 9 Aug 2018 10:10:23 +0300 Subject: [PATCH 3/5] fix brackets --- .../stable/2017-10-01/powerbidedicated.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json index 68cc58192772..d420b5557d8a 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json @@ -435,12 +435,11 @@ "nextLinkName": "nextLink" } } - } - }, + }, "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability": { - "post": { - "x-ms-examples": { - "Get details of a server": { "$ref": "./examples/checkNameAvailability.json" } + "post": { + "x-ms-examples": { + "Check name availability of a capacity": { "$ref": "./examples/checkNameAvailability.json" } }, "tags": [ "Capacities" @@ -481,7 +480,8 @@ } } } - }, + } + }, "definitions": { "OperationListResult": { "description": "Result listing capacities. It contains a list of operations and a URL link to get the next set of results.", From d93886a2a92fa48175800883633c4dc455fc55e6 Mon Sep 17 00:00:00 2001 From: Tal Rostoker Date: Fri, 10 Aug 2018 22:01:01 +0300 Subject: [PATCH 4/5] fix parameter name in checknameavailability exanple --- .../stable/2017-10-01/examples/checkNameAvailability.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json index d7861d6c2526..091912186b27 100644 --- a/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json +++ b/specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/checkNameAvailability.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60", "location": "West US", - "serverParameters": { + "capacityParameters": { "name": "azsdktest", "type": "Microsoft.PowerBIDedicated/capacities" }, From edc925b01b6649ae1a8ab3936614044209c5f000 Mon Sep 17 00:00:00 2001 From: Tal Rostoker Date: Sun, 19 Aug 2018 10:49:30 +0300 Subject: [PATCH 5/5] update code owners for PowerBIDedicated --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 83fb557ed364..84bbc8e87614 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -49,6 +49,7 @@ /specification/operationsmanagement/ @dashimi16 /specification/policyinsights/ @bulentelmaci /specification/postgresql/ @qingqingyuan +/specification/powerbidedicated/ @tarostok /specification/provisioningservices/ @kvish /specification/recoveryservices/ @dragonfly91 @sonathan /specification/recoveryservicesbackup/ @dheerendrarathor