Skip to content

Commit

Permalink
feat(apim): Provide capability to disable legacy configuration API (#…
Browse files Browse the repository at this point in the history
…23786)

* feat(apim): Provide capability to disable legacy configuration API

Signed-off-by: Tom Kerkhove <[email protected]>

* Update sample

Signed-off-by: Tom Kerkhove <[email protected]>

* Fix type definition

Signed-off-by: Tom Kerkhove <[email protected]>

* Switch to enum

Signed-off-by: Tom Kerkhove <[email protected]>

* Update samples

Signed-off-by: Tom Kerkhove <[email protected]>

---------

Signed-off-by: Tom Kerkhove <[email protected]>
  • Loading branch information
tomkerkhove authored May 10, 2023
1 parent 001f896 commit 9c911b6
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
},
"ApiManagementCreateServiceWithNatGatewayEnabled": {
"$ref": "./examples/ApiManagementCreateServiceWithNatGatewayEnabled.json"
},
"ApiManagementCreateServiceWithoutLegacyConfigurationApi": {
"$ref": "./examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json"
}
},
"parameters": [
Expand Down Expand Up @@ -1115,6 +1118,35 @@
],
"description": "Custom hostname configuration."
},
"ConfigurationApi": {
"type": "object",
"properties": {
"legacyApi": {
"type": "string",
"default": "Enabled",
"description": "Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is 'Enabled'",
"enum": [
"Enabled",
"Disabled"
],
"x-ms-enum": {
"name": "LegacyApiState",
"modelAsString": true,
"values": [
{
"value": "Enabled",
"description": "Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to it."
},
{
"value": "Disabled",
"description": "Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect to it."
}
]
}
}
},
"description": "Information regarding the Configuration API of the API Management service."
},
"VirtualNetworkConfiguration": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1466,6 +1498,10 @@
"modelAsString": true
}
},
"configurationApi": {
"$ref": "#/definitions/ConfigurationApi",
"description": "Configuration API configuration of the API Management service."
},
"virtualNetworkConfiguration": {
"$ref": "#/definitions/VirtualNetworkConfiguration",
"description": "Virtual network configuration of the API Management service."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2023-03-01-preview",
"subscriptionId": "subid",
"parameters": {
"properties": {
"publisherEmail": "[email protected]",
"publisherName": "autorestsdk",
"configurationApi": {
"legacyApi": "Disabled"
}
},
"sku": {
"name": "Basic",
"capacity": 1
},
"location": "Central US",
"tags": {
"tag1": "value1",
"tag2": "value2",
"tag3": "value3"
}
}
},
"responses": {
"201": {
"headers": {
"Location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-03-01-preview&asyncResponse",
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-03-01-preview&asyncResponse"
},
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
"tag1": "value1",
"tag2": "value2",
"tag3": "value3"
},
"location": "Central US",
"etag": "AAAAAAAp3TM=",
"properties": {
"publisherEmail": "[email protected]",
"publisherName": "autorestsdk",
"notificationSenderEmail": "[email protected]",
"provisioningState": "Created",
"targetProvisioningState": "Activating",
"createdAtUtc": "2019-12-18T06:33:28.0906918Z",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "apimService1.azure-api.net",
"negotiateClientCertificate": false,
"defaultSslBinding": true
}
],
"virtualNetworkType": "None",
"certificates": [],
"disableGateway": false,
"configurationApi": {
"legacyApi": "Disabled"
},
"platformVersion": "stv2",
"apiVersionConstraint": {}
},
"sku": {
"name": "Basic",
"capacity": 1
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-02T02:03:01.1974346Z"
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
"tag1": "value1",
"tag2": "value2",
"tag3": "value3"
},
"location": "Central US",
"etag": "AAAAAAAp3UM=",
"properties": {
"publisherEmail": "[email protected]",
"publisherName": "autorestsdk",
"notificationSenderEmail": "[email protected]",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2019-12-18T06:33:28.0906918Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"gatewayRegionalUrl": "https://apimService1-centralus-01.regional.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"developerPortalUrl": "https://apimService1.developer.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "apimService1.azure-api.net",
"negotiateClientCertificate": false,
"defaultSslBinding": true,
"certificateSource": "BuiltIn"
}
],
"publicIPAddresses": [
"40.113.223.117"
],
"customProperties": {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False"
},
"virtualNetworkType": "None",
"certificates": [],
"disableGateway": false,
"configurationApi": {
"legacyApi": "Disabled"
},
"platformVersion": "stv2",
"apiVersionConstraint": {}
},
"sku": {
"name": "Basic",
"capacity": 1
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2020-02-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2020-02-02T02:03:01.1974346Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
"apiVersionConstraint": {
"minApiVersion": "2019-12-01"
},
"configurationApi": {
"legacyApi": "Enabled"
},
"publicNetworkAccess": "Enabled"
},
"sku": {
Expand Down Expand Up @@ -243,6 +246,9 @@
"apiVersionConstraint": {
"minApiVersion": "2019-12-01"
},
"configurationApi": {
"legacyApi": "Enabled"
},
"publicNetworkAccess": "Enabled"
},
"sku": {
Expand Down Expand Up @@ -341,6 +347,9 @@
"apiVersionConstraint": {
"minApiVersion": "2019-12-01"
},
"configurationApi": {
"legacyApi": "Enabled"
},
"publicNetworkAccess": "Enabled"
},
"sku": {
Expand Down

0 comments on commit 9c911b6

Please sign in to comment.