Skip to content

Commit

Permalink
add checknameavailability (Azure#3608)
Browse files Browse the repository at this point in the history
* add checknameavailability

* move checkname parameter to definition section

* fix brackets

* fix parameter name in checknameavailability exanple

* update code owners for PowerBIDedicated
  • Loading branch information
tarostok authored and sergey-shandar committed Aug 20, 2018
1 parent 2d5f7b4 commit d229139
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 5 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60",
"location": "West US",
"capacityParameters": {
"name": "azsdktest",
"type": "Microsoft.PowerBIDedicated/capacities"
},
"api-version": "2017-10-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"nameAvailable": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
},
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -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" ],
Expand Down Expand Up @@ -435,8 +435,53 @@
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/locations/{location}/checkNameAvailability": {
"post": {
"x-ms-examples": {
"Check name availability of a capacity": { "$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": {
"description": "Result listing capacities. It contains a list of operations and a URL link to get the next set of results.",
Expand Down Expand Up @@ -713,7 +758,7 @@
}
}
},
"ErrorResponse": {
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
Expand All @@ -726,6 +771,42 @@
"type": "string"
}
}
},
"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."
}
}
}
},
"parameters": {
Expand Down

0 comments on commit d229139

Please sign in to comment.