Skip to content
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

add checknameavailability #3608

Merged
merged 5 commits into from
Aug 20, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the spec, the "capacityParameters" parameter is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, thanks, fixed the typo

"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