Skip to content

Commit 6a93934

Browse files
authored
feat(apim): Introduce gateway resource (#27757)
* WIP * Update sample * WIP * Add GatewayNameParameter * Clean up * Update sample * Add another sample * Add sample for delete gateway * Remove endpoints * Fix typo * Add list sample * Clean up Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Add disclaimer Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Make it pretty 💄 Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Refer to new file Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Add missing ApiManagementGatewayListResult Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Update sample reference Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Remove ApiManagementGatewayIdentity + List by operation Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Add more sample Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Latest version of common types Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Remove 200 for delete Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Formatting and re-order Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Align with spec Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Align sample with spec Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Error response from common types Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> * Rename SKU name * Have seperate SKU for patch to not make it mandatory * Remove empty required * Improve note * Rename schema * Remove unused type * sku.capacity should not be required --------- Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
1 parent 7da91b7 commit 6a93934

9 files changed

Lines changed: 1080 additions & 0 deletions

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json

Lines changed: 633 additions & 0 deletions
Large diffs are not rendered by default.

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,17 @@
357357
"description": "Email identifier.",
358358
"x-ms-parameter-location": "method"
359359
},
360+
"GatewayNameParameter": {
361+
"name": "gatewayName",
362+
"in": "path",
363+
"required": true,
364+
"type": "string",
365+
"description": "The name of the API Management gateway.",
366+
"minLength": 1,
367+
"maxLength": 50,
368+
"pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
369+
"x-ms-parameter-location": "method"
370+
},
360371
"GroupIdParameter": {
361372
"name": "groupId",
362373
"in": "path",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"parameters": {
3+
"gatewayName": "apimGateway1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2023-09-01-preview",
6+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
7+
"parameters": {
8+
"properties": {
9+
"backend": {
10+
"subnet": {
11+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
12+
}
13+
}
14+
},
15+
"sku": {
16+
"name": "Standard",
17+
"capacity": 1
18+
},
19+
"location": "South Central US",
20+
"tags": {
21+
"Name": "Contoso",
22+
"Test": "User"
23+
}
24+
}
25+
},
26+
"responses": {
27+
"201": {
28+
"headers": {
29+
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse",
30+
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse"
31+
},
32+
"body": {
33+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1",
34+
"name": "apimGateway1",
35+
"type": "Microsoft.ApiManagement/gateway",
36+
"tags": {
37+
"api-version": "2023-09-01-preview"
38+
},
39+
"location": "East US",
40+
"etag": "AAAAAAAmRAM=",
41+
"properties": {
42+
"provisioningState": "Created",
43+
"targetProvisioningState": "Activating",
44+
"createdAtUtc": "2022-07-11T18:41:01.2506031Z",
45+
"backend": {
46+
"subnet": {
47+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
48+
}
49+
}
50+
},
51+
"sku": {
52+
"name": "Standard",
53+
"capacity": 1
54+
},
55+
"systemData": {
56+
"createdBy": "user@contoso.com",
57+
"createdByType": "User",
58+
"createdAt": "2022-07-11T18:41:00.9390609Z",
59+
"lastModifiedBy": "user@contoso.com",
60+
"lastModifiedByType": "User",
61+
"lastModifiedAt": "2022-07-11T18:41:00.9390609Z"
62+
}
63+
}
64+
},
65+
"200": {
66+
"body": {
67+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1",
68+
"name": "apimGateway1",
69+
"type": "Microsoft.ApiManagement/gateways",
70+
"tags": {
71+
"api-version": "2023-09-01-preview"
72+
},
73+
"location": "East US",
74+
"etag": "AAAAAAAmREI=",
75+
"properties": {
76+
"provisioningState": "Succeeded",
77+
"targetProvisioningState": "",
78+
"createdAtUtc": "2022-07-11T18:41:01.2506031Z",
79+
"frontend": {
80+
"defaultHostname": "apimGateway1.eastus.gateway.azure-api.net"
81+
},
82+
"backend": {
83+
"subnet": {
84+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
85+
}
86+
},
87+
"configurationApi": {
88+
"hostname": "apimGateway1.eastus.configuration.gateway.azure-api.net"
89+
}
90+
},
91+
"sku": {
92+
"name": "Standard",
93+
"capacity": 1
94+
},
95+
"systemData": {
96+
"createdBy": "user@contoso.com",
97+
"createdByType": "User",
98+
"createdAt": "2022-07-11T18:41:00.9390609Z",
99+
"lastModifiedBy": "user@contoso.com",
100+
"lastModifiedByType": "User",
101+
"lastModifiedAt": "2022-07-11T18:41:00.9390609Z"
102+
}
103+
}
104+
}
105+
}
106+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"parameters": {
3+
"gatewayName": "example-gateway",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2023-09-01-preview",
6+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
7+
},
8+
"responses": {
9+
"202": {
10+
"headers": {
11+
"location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2023-09-01-preview"
12+
},
13+
"body": {
14+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway",
15+
"name": "example-gateway",
16+
"type": "Microsoft.ApiManagement/gateway",
17+
"tags": {},
18+
"location": "West US",
19+
"etag": "AAAAAAFfhHY=",
20+
"properties": {
21+
"provisioningState": "Succeeded",
22+
"targetProvisioningState": "Deleting",
23+
"createdAtUtc": "2016-12-20T19:41:21.5823069Z",
24+
"frontend": {
25+
"defaultHostname": "example-gateway.westus.gateway.azure-api.net"
26+
},
27+
"backend": {
28+
"subnet": {
29+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
30+
}
31+
},
32+
"configurationApi": {
33+
"hostname": "example-gateway.westus.configuration.gateway.azure-api.net"
34+
}
35+
},
36+
"sku": {
37+
"name": "Standard",
38+
"capacity": 1
39+
}
40+
}
41+
},
42+
"204": {}
43+
}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"parameters": {
3+
"gatewayName": "apimService1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2023-09-01-preview",
6+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway",
12+
"name": "example-gateway",
13+
"type": "Microsoft.ApiManagement/gateway",
14+
"tags": {
15+
"owner": "v-aswmoh",
16+
"ReleaseName": "Z3"
17+
},
18+
"location": "East US",
19+
"etag": "AAAAAAAWN/4=",
20+
"properties": {
21+
"provisioningState": "Succeeded",
22+
"targetProvisioningState": "",
23+
"createdAtUtc": "2021-06-16T09:40:00.9453556Z",
24+
"frontend": {
25+
"defaultHostname": "example-gateway.eastus.gateway.azure-api.net"
26+
},
27+
"backend": {
28+
"subnet": {
29+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
30+
}
31+
},
32+
"configurationApi": {
33+
"hostname": "example-gateway.eastus.configuration.gateway.azure-api.net"
34+
}
35+
},
36+
"sku": {
37+
"name": "Standard",
38+
"capacity": 1
39+
},
40+
"systemData": {
41+
"createdBy": "string",
42+
"createdByType": "User",
43+
"createdAt": "2021-06-16T09:40:00.7106733Z",
44+
"lastModifiedBy": "foo@contoso.com",
45+
"lastModifiedByType": "User",
46+
"lastModifiedAt": "2021-06-20T06:33:09.6159006Z"
47+
}
48+
}
49+
}
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-09-01-preview",
4+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-1",
12+
"name": "standard-gw-1",
13+
"type": "Microsoft.ApiManagement/gateways",
14+
"tags": {
15+
"owner": "v-aswmoh",
16+
"ReleaseName": "Z3"
17+
},
18+
"location": "West US",
19+
"etag": "AAAAAAAWN/4=",
20+
"properties": {
21+
"provisioningState": "Succeeded",
22+
"targetProvisioningState": "",
23+
"createdAtUtc": "2021-06-16T09:40:00.9453556Z",
24+
"frontend": {
25+
"defaultHostname": "standard-gw-1.westus.gateway.azure-api.net"
26+
},
27+
"backend": {
28+
"subnet": {
29+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
30+
}
31+
},
32+
"configurationApi": {
33+
"hostname": "standard-gw-1.westus.configuration.gateway.azure-api.net"
34+
}
35+
},
36+
"sku": {
37+
"name": "Standard",
38+
"capacity": 1
39+
},
40+
"systemData": {
41+
"createdBy": "bar@contoso.com",
42+
"createdByType": "User",
43+
"createdAt": "2021-06-16T09:40:00.7106733Z",
44+
"lastModifiedBy": "foo@contoso.com",
45+
"lastModifiedByType": "User",
46+
"lastModifiedAt": "2021-06-20T06:33:09.6159006Z"
47+
}
48+
},
49+
{
50+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.ApiManagement/gateways/standard-gw-2",
51+
"name": "standard-gw-2",
52+
"type": "Microsoft.ApiManagement/gateways",
53+
"tags": {
54+
"Owner": "vitaliik"
55+
},
56+
"location": "East US",
57+
"etag": "AAAAAAAWKwo=",
58+
"properties": {
59+
"provisioningState": "Succeeded",
60+
"targetProvisioningState": "",
61+
"createdAtUtc": "2021-06-16T09:40:00.9453556Z",
62+
"frontend": {
63+
"defaultHostname": "standard-gw-2.eastus.gateway.azure-api.net"
64+
},
65+
"backend": {
66+
"subnet": {
67+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn2/subnets/sn2"
68+
}
69+
},
70+
"configurationApi": {
71+
"hostname": "standard-gw-2.eastus.configuration.gateway.azure-api.net"
72+
}
73+
},
74+
"sku": {
75+
"name": "Standard",
76+
"capacity": 1
77+
}
78+
}
79+
]
80+
}
81+
}
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"parameters": {
3+
"resourceGroupName": "rg1",
4+
"api-version": "2023-09-01-preview",
5+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-1",
13+
"name": "standard-gw-1",
14+
"type": "Microsoft.ApiManagement/gateways",
15+
"tags": {
16+
"owner": "v-aswmoh",
17+
"ReleaseName": "Z3"
18+
},
19+
"location": "West US",
20+
"etag": "AAAAAAAWN/4=",
21+
"properties": {
22+
"provisioningState": "Succeeded",
23+
"targetProvisioningState": "",
24+
"createdAtUtc": "2021-06-16T09:40:00.9453556Z",
25+
"frontend": {
26+
"defaultHostname": "standard-gw-1.westus.gateway.azure-api.net"
27+
},
28+
"backend": {
29+
"subnet": {
30+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"
31+
}
32+
},
33+
"configurationApi": {
34+
"hostname": "standard-gw-1.westus.configuration.gateway.azure-api.net"
35+
}
36+
},
37+
"sku": {
38+
"name": "Standard",
39+
"capacity": 1
40+
},
41+
"systemData": {
42+
"createdBy": "bar@contoso.com",
43+
"createdByType": "User",
44+
"createdAt": "2021-06-16T09:40:00.7106733Z",
45+
"lastModifiedBy": "foo@contoso.com",
46+
"lastModifiedByType": "User",
47+
"lastModifiedAt": "2021-06-20T06:33:09.6159006Z"
48+
}
49+
},
50+
{
51+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-2",
52+
"name": "standard-gw-2",
53+
"type": "Microsoft.ApiManagement/gateways",
54+
"tags": {
55+
"Owner": "vitaliik"
56+
},
57+
"location": "East US",
58+
"etag": "AAAAAAAWKwo=",
59+
"properties": {
60+
"provisioningState": "Succeeded",
61+
"targetProvisioningState": "",
62+
"createdAtUtc": "2021-06-16T09:40:00.9453556Z",
63+
"frontend": {
64+
"defaultHostname": "standard-gw-2.eastus.gateway.azure-api.net"
65+
},
66+
"backend": {
67+
"subnet": {
68+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn2/subnets/sn2"
69+
}
70+
},
71+
"configurationApi": {
72+
"hostname": "standard-gw-2.eastus.configuration.gateway.azure-api.net"
73+
}
74+
},
75+
"sku": {
76+
"name": "Standard",
77+
"capacity": 1
78+
}
79+
}
80+
]
81+
}
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)