Skip to content

Commit 8335971

Browse files
authored
Updated AfdEndpoint and CheckNameAvailability API with additional pro… (#17518)
* Updated AfdEndpoint and CheckNameAvailability API with additional property AutoGeneratedDomainNameLabelScope Update afdx.json * Added AutoGeneratedDomainNameLabelScope property into CheckNameAvailabilityInput instead of checkHostNameAvailabilityInput * Update cdn.json Updated the property name and its description. * Update d property name in examples. * Fix the reference error and a typo * Fix the reference error in CDN API * test * Updated property name to camelCase style * Updated the property name to camel case style. * Added new checkNameAvailability API for afdx * Updated the parameter references in new API * Added input and output type separate from CDN one for new checkNameAvailability API * Updated the input and out reference path for new API * Added AfdResourceType for new API * Updated the definition name of input and output for new API * Updated input name in example. * Include the required property type in the example. * Rename the new API to CheckEndpointNameAvailability
1 parent 55c9ece commit 8335971

File tree

6 files changed

+149
-6
lines changed

6 files changed

+149
-6
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ ADSIs
4343
ADTO
4444
adultscore
4545
afd
46+
afdx
4647
affinitized
4748
AFRINIC
4849
agentpool

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,54 @@
3434
}
3535
},
3636
"paths": {
37+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability": {
38+
"post": {
39+
"tags": [
40+
"CheckEndpointNameAvailability"
41+
],
42+
"description": "Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint.",
43+
"operationId": "CheckEndpointNameAvailability",
44+
"x-ms-examples": {
45+
"CheckEndpointNameAvailability": {
46+
"$ref": "./examples/CheckEndpointNameAvailability.json"
47+
}
48+
},
49+
"parameters": [
50+
{
51+
"name": "checkEndpointNameAvailabilityInput",
52+
"in": "body",
53+
"description": "Input to check.",
54+
"required": true,
55+
"schema": {
56+
"$ref": "#/definitions/CheckEndpointNameAvailabilityInput"
57+
}
58+
},
59+
{
60+
"$ref": "#/parameters/subscriptionIdParameter"
61+
},
62+
{
63+
"$ref": "#/parameters/resourceGroupNameParameter"
64+
},
65+
{
66+
"$ref": "#/parameters/apiVersionParameter"
67+
}
68+
],
69+
"responses": {
70+
"200": {
71+
"description": "OK. The request has succeeded.",
72+
"schema": {
73+
"$ref": "#/definitions/CheckEndpointNameAvailabilityOutput"
74+
}
75+
},
76+
"default": {
77+
"description": "CDN error response describing why the operation failed.",
78+
"schema": {
79+
"$ref": "#/definitions/AfdErrorResponse"
80+
}
81+
}
82+
}
83+
}
84+
},
3785
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages": {
3886
"post": {
3987
"tags": [
@@ -4348,6 +4396,20 @@
43484396
}
43494397
}
43504398
},
4399+
"AutoGeneratedDomainNameLabelScope": {
4400+
"description": "Indicates the endpoint name reuse scope. The default value is TenantReuse.",
4401+
"enum": [
4402+
"TenantReuse",
4403+
"SubscriptionReuse",
4404+
"ResourceGroupReuse",
4405+
"NoReuse"
4406+
],
4407+
"type": "string",
4408+
"x-ms-enum": {
4409+
"name": "AutoGeneratedDomainNameLabelScope",
4410+
"modelAsString": true
4411+
}
4412+
},
43514413
"AFDEndpoint": {
43524414
"description": "CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net.",
43534415
"type": "object",
@@ -4378,6 +4440,10 @@
43784440
"description": "The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net",
43794441
"type": "string",
43804442
"readOnly": true
4443+
},
4444+
"autoGeneratedDomainNameLabelScope": {
4445+
"description": "Indicates the endpoint name reuse scope. The default value is TenantReuse.",
4446+
"$ref": "#/definitions/AutoGeneratedDomainNameLabelScope"
43814447
}
43824448
}
43834449
},
@@ -5289,6 +5355,54 @@
52895355
}
52905356
}
52915357
},
5358+
"CheckEndpointNameAvailabilityInput": {
5359+
"description": "Input of CheckNameAvailability API.",
5360+
"type": "object",
5361+
"required": [
5362+
"name",
5363+
"type"
5364+
],
5365+
"properties": {
5366+
"name": {
5367+
"description": "The resource name to validate.",
5368+
"type": "string"
5369+
},
5370+
"type": {
5371+
"description": "The type of the resource whose name is to be validated.",
5372+
"$ref": "./cdn.json#/definitions/ResourceType"
5373+
},
5374+
"autoGeneratedDomainNameLabelScope": {
5375+
"description": "Indicates the endpoint name reuse scope. The default value is TenantReuse.",
5376+
"$ref": "#/definitions/AutoGeneratedDomainNameLabelScope"
5377+
}
5378+
}
5379+
},
5380+
"CheckEndpointNameAvailabilityOutput": {
5381+
"description": "Output of check name availability API.",
5382+
"type": "object",
5383+
"properties": {
5384+
"nameAvailable": {
5385+
"description": "Indicates whether the name is available.",
5386+
"readOnly": true,
5387+
"type": "boolean"
5388+
},
5389+
"availableHostname": {
5390+
"description": "Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string",
5391+
"readOnly": true,
5392+
"type": "string"
5393+
},
5394+
"reason": {
5395+
"description": "The reason why the name is not available.",
5396+
"readOnly": true,
5397+
"type": "string"
5398+
},
5399+
"message": {
5400+
"description": "The detailed error message describing why the name is not available.",
5401+
"readOnly": true,
5402+
"type": "string"
5403+
}
5404+
}
5405+
},
52925406
"CheckHostNameAvailabilityInput": {
52935407
"description": "Input of CheckHostNameAvailability API.",
52945408
"type": "object",

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Create.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"tags": {},
1010
"location": "CentralUs",
1111
"properties": {
12-
"enabledState": "Enabled"
12+
"enabledState": "Enabled",
13+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
1314
}
1415
}
1516
},
@@ -25,7 +26,8 @@
2526
"hostName": "endpoint1.azureedge.net",
2627
"enabledState": "Enabled",
2728
"provisioningState": "Succeeded",
28-
"deploymentStatus": "NotStarted"
29+
"deploymentStatus": "NotStarted",
30+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
2931
}
3032
}
3133
},
@@ -40,7 +42,8 @@
4042
"hostName": "endpoint1.azureedge.net",
4143
"enabledState": "Enabled",
4244
"provisioningState": "Creating",
43-
"deploymentStatus": "NotStarted"
45+
"deploymentStatus": "NotStarted",
46+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
4447
}
4548
}
4649
},
@@ -55,7 +58,8 @@
5558
"hostName": "endpoint1.azureedge.net",
5659
"enabledState": "Enabled",
5760
"provisioningState": "Creating",
58-
"deploymentStatus": "NotStarted"
61+
"deploymentStatus": "NotStarted",
62+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
5963
}
6064
}
6165
}

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Get.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"hostName": "endpoint1.azureedge.net",
1919
"enabledState": "Enabled",
2020
"provisioningState": "Succeeded",
21-
"deploymentStatus": "Succeeded"
21+
"deploymentStatus": "Succeeded",
22+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
2223
}
2324
}
2425
}

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ListByProfile.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"hostName": "endpoint1.azureedge.net",
2020
"enabledState": "Enabled",
2121
"provisioningState": "Succeeded",
22-
"deploymentStatus": "Succeeded"
22+
"deploymentStatus": "Succeeded",
23+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
2324
}
2425
}
2526
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "myResourceGroup",
6+
"checkEndpointNameAvailabilityInput": {
7+
"name": "sampleName",
8+
"type": "Microsoft.Cdn/Profiles/AfdEndpoints",
9+
"autoGeneratedDomainNameLabelScope": "TenantReuse"
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"nameAvailable": false,
16+
"reason": "Name is already in use",
17+
"message": "Name not available",
18+
"availableHostname": ""
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)