Skip to content

Commit

Permalink
Add profile level check endpoint name availability API (#21646)
Browse files Browse the repository at this point in the history
* Add profile level check endpoint name availability API

* Update afdx.json
  • Loading branch information
ZianWang02 authored Dec 5, 2022
1 parent 81562c6 commit 7d4ee6c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,57 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability": {
"post": {
"tags": [
"AFDProfiles"
],
"description": "Check the availability of an afdx endpoint name, and return the globally unique endpoint host name.",
"operationId": "AFDProfiles_CheckEndpointNameAvailability",
"x-ms-examples": {
"CheckEndpointNameAvailability": {
"$ref": "./examples/AFDProfiles_CheckEndpointNameAvailability.json"
}
},
"parameters": [
{
"name": "checkEndpointNameAvailabilityInput",
"in": "body",
"description": "Input to check.",
"required": true,
"schema": {
"$ref": "#/definitions/CheckEndpointNameAvailabilityInput"
}
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/profileNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CheckEndpointNameAvailabilityOutput"
}
},
"default": {
"description": "Azure Front Door error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/AfdErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages": {
"post": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"api-version": "2022-11-01-preview",
"subscriptionId": "subid",
"resourceGroupName": "myResourceGroup",
"profileName": "profile1",
"checkEndpointNameAvailabilityInput": {
"name": "sampleName",
"type": "Microsoft.Cdn/Profiles/AfdEndpoints",
"autoGeneratedDomainNameLabelScope": "TenantReuse"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": false,
"reason": "Name is already in use",
"message": "Name not available",
"availableHostname": ""
}
}
}
}

0 comments on commit 7d4ee6c

Please sign in to comment.