Skip to content

Commit e51f64f

Browse files
ayanMSFTraych1
authored andcommitted
Cosmos DB Private Link Resources Swagger (Azure#7249)
* PrivateLinkResources swagger spec * Added missing files * Moved PrivateLinkResources to preview * Removed generated
1 parent d1ae45e commit e51f64f

File tree

5 files changed

+261
-0
lines changed

5 files changed

+261
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "rg1",
5+
"accountName": "ddb1",
6+
"api-version": "2015-04-08",
7+
"groupName": "sql"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql",
13+
"name": "sql",
14+
"type": "Microsoft.DocumentDB/databaseAccounts/privateLinkResources",
15+
"properties": {
16+
"groupId": "sql",
17+
"requiredMembers": [
18+
"ddb1",
19+
"ddb1-westus"
20+
]
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "rg1",
5+
"accountName": "ddb1",
6+
"api-version": "2015-04-08"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"id": "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateLinkResources/sql",
14+
"name": "sql",
15+
"type": "Microsoft.DocumentDB/databaseAccounts/privateLinkResources",
16+
"properties": {
17+
"groupId": "sql",
18+
"requiredMembers": [
19+
"ddb1",
20+
"ddb1-westus"
21+
]
22+
}
23+
}
24+
]
25+
}
26+
}
27+
}
28+
}
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Cosmos DB",
5+
"description": "Azure Cosmos DB Database Service Resource Provider REST API",
6+
"version": "2019-08-01-preview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow",
31+
"scopes": {
32+
"user_impersonation": "Impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources": {
38+
"get": {
39+
"tags": [
40+
"PrivateLinkResources"
41+
],
42+
"description": "Gets the private link resources that need to be created for a Cosmos DB account.",
43+
"operationId": "PrivateLinkResources_ListByDatabaseAccount",
44+
"x-ms-pageable": {
45+
"nextLinkName": null
46+
},
47+
"parameters": [
48+
{
49+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/subscriptionIdParameter"
50+
},
51+
{
52+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/resourceGroupNameParameter"
53+
},
54+
{
55+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/apiVersionParameter"
56+
},
57+
{
58+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/accountNameParameter"
59+
}
60+
],
61+
"responses": {
62+
"200": {
63+
"description": "Successfully retrieved private link resources.",
64+
"schema": {
65+
"$ref": "#/definitions/PrivateLinkResourceListResult"
66+
}
67+
}
68+
},
69+
"x-ms-examples": {
70+
"Gets private endpoint connection.": {
71+
"$ref": "./examples/CosmosDBPrivateLinkResourceListGet.json"
72+
}
73+
}
74+
}
75+
},
76+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}": {
77+
"get": {
78+
"tags": [
79+
"PrivateLinkResources"
80+
],
81+
"description": "Gets the private link resources that need to be created for a Cosmos DB account.",
82+
"operationId": "PrivateLinkResources_Get",
83+
"parameters": [
84+
{
85+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/subscriptionIdParameter"
86+
},
87+
{
88+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/resourceGroupNameParameter"
89+
},
90+
{
91+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/apiVersionParameter"
92+
},
93+
{
94+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/parameters/accountNameParameter"
95+
},
96+
{
97+
"$ref": "#/parameters/GroupNameParameter"
98+
}
99+
],
100+
"responses": {
101+
"200": {
102+
"description": "Successfully retrieved a specified private link resource.",
103+
"schema": {
104+
"$ref": "#/definitions/PrivateLinkResource"
105+
}
106+
}
107+
},
108+
"x-ms-examples": {
109+
"Gets private endpoint connection.": {
110+
"$ref": "./examples/CosmosDBPrivateLinkResourceGet.json"
111+
}
112+
}
113+
}
114+
}
115+
},
116+
"definitions": {
117+
"PrivateLinkResourceListResult": {
118+
"description": "A list of private link resources",
119+
"type": "object",
120+
"properties": {
121+
"value": {
122+
"type": "array",
123+
"description": "Array of private link resources",
124+
"items": {
125+
"$ref": "#/definitions/PrivateLinkResource"
126+
}
127+
}
128+
}
129+
},
130+
"PrivateLinkResource": {
131+
"description": "A private link resource",
132+
"type": "object",
133+
"properties": {
134+
"properties": {
135+
"$ref": "#/definitions/PrivateLinkResourceProperties",
136+
"description": "Resource properties.",
137+
"x-ms-client-flatten": true
138+
}
139+
},
140+
"allOf": [
141+
{
142+
"$ref": "../../stable/2019-08-01/cosmos-db.json#/definitions/ARMProxyResource"
143+
}
144+
]
145+
},
146+
"PrivateLinkResourceProperties": {
147+
"description": "Properties of a private link resource.",
148+
"type": "object",
149+
"properties": {
150+
"groupId": {
151+
"description": "The private link resource group id.",
152+
"type": "string",
153+
"readOnly": true
154+
},
155+
"requiredMembers": {
156+
"description": "The private link resource required member names.",
157+
"type": "array",
158+
"items": {
159+
"type": "string"
160+
},
161+
"readOnly": true
162+
}
163+
}
164+
}
165+
},
166+
"parameters": {
167+
"GroupNameParameter": {
168+
"name": "groupName",
169+
"in": "path",
170+
"description": "The name of the private link resource.",
171+
"required": true,
172+
"x-ms-parameter-location": "method",
173+
"type": "string"
174+
}
175+
}
176+
}

specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4476,6 +4476,28 @@
44764476
},
44774477
"x-ms-azure-resource": true
44784478
},
4479+
"ARMProxyResource": {
4480+
"type": "object",
4481+
"description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
4482+
"properties": {
4483+
"id": {
4484+
"readOnly": true,
4485+
"type": "string",
4486+
"description": "The unique resource identifier of the database account."
4487+
},
4488+
"name": {
4489+
"readOnly": true,
4490+
"type": "string",
4491+
"description": "The name of the database account."
4492+
},
4493+
"type": {
4494+
"readOnly": true,
4495+
"type": "string",
4496+
"description": "The type of Azure resource."
4497+
}
4498+
},
4499+
"x-ms-azure-resource": true
4500+
},
44794501
"DatabaseAccountGetResults": {
44804502
"description": "An Azure Cosmos DB database account.",
44814503
"type": "object",

specification/cosmos-db/resource-manager/readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ input-file:
4545
- Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json
4646
```
4747

48+
### Tag: package-2019-08-preview
49+
50+
These settings apply only when `--tag=package-2019-08-preview` is specified on the command line.
51+
52+
``` yaml $(tag) == 'package-2019-08-preview'
53+
input-file:
54+
- Microsoft.DocumentDB/stable/2019-08-01/cosmos-db.json
55+
- Microsoft.DocumentDB/preview/2019-08-01-preview/privateLinkResources.json
56+
```
57+
4858
### Tag: package-2015-04
4959

5060
These settings apply only when `--tag=package-2015-04` is specified on the command line.

0 commit comments

Comments
 (0)