Skip to content

Commit 2c68b6f

Browse files
Add missing PrivateLink Operations (#18030)
* fix privateLink client name * Add missing PL operations * fix prettier and validation errors * wrap PrivateLinkAssociation in properties field * match pla put and get response * fix getpla example * add 201 response to PUT requests * add 201 response to PUT examples * Update specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/privateLinks.json Co-authored-by: Dapeng Zhang <ufo54153@gmail.com> Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
1 parent 8a9da83 commit 2c68b6f

File tree

7 files changed

+207
-23
lines changed

7 files changed

+207
-23
lines changed

specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/GetPrivateLinkAssociation.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
{
22
"parameters": {
3+
"plaId": "00000000-0000-0000-0000-000000000000",
34
"groupId": "my-management-group",
45
"api-version": "2020-05-01"
56
},
67
"responses": {
78
"200": {
89
"body": {
9-
"value": [
10-
{
11-
"properties": {
12-
"privateLink": "00000000-0000-0000-0000-000000000000",
13-
"publicNetworkAccess": "Enabled",
14-
"tenantID": "06b3ccb8-1384-4bcc-aec7-852f6d57161b",
15-
"scope": "/providers/Microsoft.Management/managementGroups/my-management-group"
16-
},
17-
"id": "00000000-0000-0000-0000-000000000000",
18-
"type": "Microsoft.Authorization/privateLinkAssociations",
19-
"name": "my-pla"
20-
}
21-
]
10+
"properties": {
11+
"privateLink": "00000000-0000-0000-0000-000000000000",
12+
"publicNetworkAccess": "Enabled",
13+
"tenantID": "06b3ccb8-1384-4bcc-aec7-852f6d57161b",
14+
"scope": "/providers/Microsoft.Management/managementGroups/my-management-group"
15+
},
16+
"id": "00000000-0000-0000-0000-000000000000",
17+
"type": "Microsoft.Authorization/privateLinkAssociations",
18+
"name": "my-pla"
2219
}
2320
}
2421
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"groupId": "my-management-group",
4+
"api-version": "2020-05-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"properties": {
12+
"privateLink": "00000000-0000-0000-0000-000000000000",
13+
"publicNetworkAccess": "Enabled",
14+
"tenantID": "06b3ccb8-1384-4bcc-aec7-852f6d57161b",
15+
"scope": "/providers/Microsoft.Management/managementGroups/my-management-group"
16+
},
17+
"id": "00000000-0000-0000-0000-000000000000",
18+
"type": "Microsoft.Authorization/privateLinkAssociations",
19+
"name": "my-pla"
20+
}
21+
]
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"resourceGroupName": "my-resource-group",
5+
"api-version": "2020-05-01"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"properties": {
13+
"privateEndpointConnections": []
14+
},
15+
"id": "00000000-0000-0000-0000-000000000000",
16+
"name": "my-pla",
17+
"type": "Microsoft.Authorization/privateLinkAssociations",
18+
"location": "eastus"
19+
},
20+
{
21+
"properties": {
22+
"privateEndpointConnections": []
23+
},
24+
"id": "00000000-0000-0000-0000-000000000001",
25+
"name": "my-pla2",
26+
"type": "Microsoft.Authorization/privateLinkAssociations",
27+
"location": "eastus"
28+
}
29+
]
30+
}
31+
}
32+
}
33+
}

specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/PutPrivateLinkAssociation.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"groupId": "my-management-group",
55
"api-version": "2020-05-01",
66
"parameters": {
7-
"privateLink": "00000000-0000-0000-0000-000000000000",
8-
"publicNetworkAccess": "Enabled"
7+
"properties": {
8+
"privateLink": "00000000-0000-0000-0000-000000000000",
9+
"publicNetworkAccess": "Enabled"
10+
}
911
}
1012
},
1113
"responses": {
@@ -21,6 +23,19 @@
2123
"type": "Microsoft.Authorization/privateLinkAssociations",
2224
"name": "my-pla"
2325
}
26+
},
27+
"201": {
28+
"body": {
29+
"properties": {
30+
"privateLink": "00000000-0000-0000-0000-000000000000",
31+
"publicNetworkAccess": "Enabled",
32+
"tenantID": "06b3ccb8-1384-4bcc-aec7-852f6d57161b",
33+
"scope": "/providers/Microsoft.Management/managementGroups/my-management-group"
34+
},
35+
"id": "00000000-0000-0000-0000-000000000000",
36+
"type": "Microsoft.Authorization/privateLinkAssociations",
37+
"name": "my-pla"
38+
}
2439
}
2540
}
2641
}

specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/PutResourceManagementPrivateLink.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
"type": "Microsoft.Authorization/privateLinkAssociations",
2020
"location": "eastus"
2121
}
22+
},
23+
"201": {
24+
"body": {
25+
"properties": {
26+
"privateEndpointConnections": []
27+
},
28+
"id": "00000000-0000-0000-0000-000000000000",
29+
"name": "my-pla",
30+
"type": "Microsoft.Authorization/privateLinkAssociations",
31+
"location": "eastus"
32+
}
2233
}
2334
}
2435
}

specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/privateLinks.json

Lines changed: 111 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"in": "body",
5757
"required": true,
5858
"schema": {
59-
"$ref": "#/definitions/PrivateLinkAssociationProperties"
59+
"$ref": "#/definitions/PrivateLinkAssociationObject"
6060
},
6161
"description": "Parameters supplied to create the private link association."
6262
}
@@ -68,6 +68,12 @@
6868
"$ref": "#/definitions/PrivateLinkAssociation"
6969
}
7070
},
71+
"201": {
72+
"description": "Created - Returns information about the new private link association.",
73+
"schema": {
74+
"$ref": "#/definitions/PrivateLinkAssociation"
75+
}
76+
},
7177
"default": {
7278
"description": "Error response describing why the operation failed.",
7379
"schema": {
@@ -81,6 +87,43 @@
8187
}
8288
}
8389
},
90+
"get": {
91+
"tags": [
92+
"PrivateLinkAssociation"
93+
],
94+
"operationId": "PrivateLinkAssociation_Get",
95+
"description": "Get a single private link association",
96+
"parameters": [
97+
{
98+
"$ref": "#/parameters/ApiVersionParameter"
99+
},
100+
{
101+
"$ref": "#/parameters/GroupIdParameter"
102+
},
103+
{
104+
"$ref": "#/parameters/PrivateLinkAssociationIdParameter"
105+
}
106+
],
107+
"responses": {
108+
"200": {
109+
"description": "Ok. The request has succeeded",
110+
"schema": {
111+
"$ref": "#/definitions/PrivateLinkAssociation"
112+
}
113+
},
114+
"default": {
115+
"description": "Error response describing why the operation failed.",
116+
"schema": {
117+
"$ref": "#/definitions/CloudError"
118+
}
119+
}
120+
},
121+
"x-ms-examples": {
122+
"Get a single private link association.": {
123+
"$ref": "./examples/GetPrivateLinkAssociation.json"
124+
}
125+
}
126+
},
84127
"delete": {
85128
"tags": [
86129
"PrivateLinkAssociation"
@@ -124,7 +167,7 @@
124167
"tags": [
125168
"PrivateLinkAssociation"
126169
],
127-
"operationId": "PrivateLinkAssociation_Get",
170+
"operationId": "PrivateLinkAssociation_List",
128171
"description": "Get a private link association for a management group scope",
129172
"parameters": [
130173
{
@@ -150,7 +193,7 @@
150193
},
151194
"x-ms-examples": {
152195
"Get a private link association for a MG scope.": {
153-
"$ref": "./examples/GetPrivateLinkAssociation.json"
196+
"$ref": "./examples/ListPrivateLinkAssociation.json"
154197
}
155198
}
156199
}
@@ -171,7 +214,7 @@
171214
"in": "path",
172215
"required": true,
173216
"type": "string",
174-
"description": "The name of the resource group the template will be deployed to. The name is case insensitive.",
217+
"description": "The name of the resource group. The name is case insensitive.",
175218
"minLength": 1,
176219
"maxLength": 90
177220
},
@@ -193,7 +236,13 @@
193236
],
194237
"responses": {
195238
"200": {
196-
"description": "OK. The request has succeeded.",
239+
"description": "OK. Returns information about the Resource Management Private Link.",
240+
"schema": {
241+
"$ref": "#/definitions/ResourceManagementPrivateLink"
242+
}
243+
},
244+
"201": {
245+
"description": "Created. Returns information about the Resource Management Private Link.",
197246
"schema": {
198247
"$ref": "#/definitions/ResourceManagementPrivateLink"
199248
}
@@ -226,7 +275,7 @@
226275
"in": "path",
227276
"required": true,
228277
"type": "string",
229-
"description": "The name of the resource group the template will be deployed to. The name is case insensitive.",
278+
"description": "The name of the resource group. The name is case insensitive.",
230279
"minLength": 1,
231280
"maxLength": 90
232281
},
@@ -272,7 +321,7 @@
272321
"in": "path",
273322
"required": true,
274323
"type": "string",
275-
"description": "The name of the resource group the template will be deployed to. The name is case insensitive.",
324+
"description": "The name of the resource group. The name is case insensitive.",
276325
"minLength": 1,
277326
"maxLength": 90
278327
},
@@ -335,13 +384,67 @@
335384
},
336385
"x-ms-examples": {
337386
"Delete a Resource Management Private Link.": {
338-
"$ref": "./examples/ListResourceManagementPrivateLink.json"
387+
"$ref": "./examples/ListSubscriptionResourceManagementPrivateLink.json"
388+
}
389+
}
390+
}
391+
},
392+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/resourceManagementPrivateLinks": {
393+
"get": {
394+
"tags": [
395+
"ResourceManagementPrivateLink"
396+
],
397+
"operationId": "ResourceManagementPrivateLink_ListByResourceGroup",
398+
"description": "Get all the resource management private links in a resource group.",
399+
"parameters": [
400+
{
401+
"$ref": "#/parameters/SubscriptionIdParameter"
402+
},
403+
{
404+
"name": "resourceGroupName",
405+
"in": "path",
406+
"required": true,
407+
"type": "string",
408+
"description": "The name of the resource group. The name is case insensitive.",
409+
"minLength": 1,
410+
"maxLength": 90
411+
},
412+
{
413+
"$ref": "#/parameters/ApiVersionParameter"
414+
}
415+
],
416+
"responses": {
417+
"200": {
418+
"description": "Ok - Returns an array of private links.",
419+
"schema": {
420+
"$ref": "#/definitions/ResourceManagementPrivateLinkListResult"
421+
}
422+
},
423+
"default": {
424+
"description": "Error response describing why the operation failed.",
425+
"schema": {
426+
"$ref": "#/definitions/CloudError"
427+
}
428+
}
429+
},
430+
"x-ms-examples": {
431+
"Delete a Resource Management Private Link.": {
432+
"$ref": "./examples/ListResourceGroupResourceManagementPrivateLink.json"
339433
}
340434
}
341435
}
342436
}
343437
},
344438
"definitions": {
439+
"PrivateLinkAssociationObject": {
440+
"type": "object",
441+
"properties": {
442+
"properties": {
443+
"$ref": "#/definitions/PrivateLinkAssociationProperties",
444+
"description": "The properties of the PrivateLinkAssociation."
445+
}
446+
}
447+
},
345448
"PrivateLinkAssociationProperties": {
346449
"type": "object",
347450
"properties": {

0 commit comments

Comments
 (0)