Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
814 lines (814 sloc) 40.6 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"organizationName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the organization behind API Management"
}
},
"adminEmail": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "The email of the admin"
}
},
"tenantName": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name of the Azure AD tenant"
}
},
"appId": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Azure AD Application ID that gates the token-based product"
}
}
},
"variables": {
"VNet": {
"Name": "api-man-vnet",
"Address Space": "10.0.0.0/22",
"Subnets": {
"api-man": {
"Subnet Name": "api-man",
"Subnet Address Space": "10.0.0.0/24",
"Is Subnet Delegated": false
},
"service": {
"Subnet Name": "service",
"Subnet Address Space": "10.0.1.0/24",
"Is Subnet Delegated": true,
"Interface Config Name": "private-service-interface",
"Interface IP Config": "private-service-ip-config"
}
}
},
"Delegation Configuration": [
{
"name": "DelegationService",
"properties": {
"serviceName": "Microsoft.ContainerInstance/containerGroups"
}
}
],
"Empty Delegation Configuration": [],
"Logic App Key Type": {
"keyType": "Primary"
},
"API Management Sku": "Premium",
"Public Service": "public-service",
"Public Consumer Subscription": "public-consumer-subscription",
"Public Consumer Token": "public-consumer-token",
"Public Service Url": "public-service-url",
"Public Service Query String": "public-service-query-string",
"Private Service Url": "private-service-url",
"Tenant Name": "tenant-name",
"App Id": "app-id",
"products": {
"token": {
"name": "token-based",
"description": "API requires an AAD token",
"terms": "Use at your own risks",
"displayName": "Token based",
"subscriptionRequired": false,
"groups": [
"administrators",
"developers",
"guests"
]
},
"subscription": {
"name": "subscription-based",
"description": "API requires a subscription key",
"terms": "Use at your own risks",
"displayName": "Subscription based",
"subscriptionRequired": true,
"groups": [
"administrators",
"developers",
"guests"
]
}
},
"apis": {
"one": {
"name": "one-api",
"displayName": "one-api",
"products": [
"[variables('products')['subscription']['name']]",
"[variables('products')['token']['name']]"
],
"operations": {
"public": {
"name": "public",
"urlTemplate": "/public"
},
"private-raw": {
"name": "private-raw",
"urlTemplate": "/private-raw"
},
"private-select": {
"name": "private-select",
"urlTemplate": "/private-select"
}
}
}
},
"Subcription Subscription": "subsub",
"Subcription Token": "subToken"
},
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2019-04-01",
"name": "[variables('VNet')['Name']]",
"location": "[resourceGroup().location]",
"dependsOn": [],
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('VNet')['Address Space']]"
]
},
"subnets": [
{
"name": "[variables('VNet')['Subnets']['api-man']['Subnet Name']]",
"properties": {
"addressPrefix": "[variables('VNet')['Subnets']['api-man']['Subnet Address Space']]",
"delegations": "[if(variables('VNet')['Subnets']['api-man']['Is Subnet Delegated'], variables('Delegation Configuration'), variables('Empty Delegation Configuration'))]"
}
},
{
"name": "[variables('VNet')['Subnets']['service']['Subnet Name']]",
"properties": {
"addressPrefix": "[variables('VNet')['Subnets']['service']['Subnet Address Space']]",
"delegations": "[if(variables('VNet')['Subnets']['service']['Is Subnet Delegated'], variables('Delegation Configuration'), variables('Empty Delegation Configuration'))]"
}
}
]
},
"resources": []
},
{
"type": "Microsoft.Network/networkProfiles",
"apiVersion": "2019-04-01",
"name": "[concat(variables('VNet')['Subnets']['service']['Subnet Name'], '-profile')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', variables('VNet')['Name'])]"
],
"properties": {
"containerNetworkInterfaceConfigurations": [
{
"name": "[variables('VNet')['Subnets']['service']['Interface Config Name']]",
"properties": {
"ipConfigurations": [
{
"name": "[variables('VNet')['Subnets']['service']['Interface IP Config']]",
"properties": {
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('VNet')['Name'], variables('VNet')['Subnets']['service']['Subnet Name'])]"
}
}
}
]
}
}
]
},
"resources": []
},
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"name": "private-service-group",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkProfiles', concat(variables('VNet')['Subnets']['service']['Subnet Name'], '-profile'))]"
],
"properties": {
"containers": [
{
"name": "web-container",
"properties": {
"image": "vplauzon/get-started:part2-no-redis",
"ports": [
{
"port": "80",
"protocol": "Tcp"
}
],
"resources": {
"requests": {
"cpu": "1",
"memoryInGB": "1"
}
}
}
}
],
"osType": "Linux",
"networkProfile": {
"Id": "[resourceId('Microsoft.Network/networkProfiles', concat(variables('VNet')['Subnets']['service']['Subnet Name'], '-profile'))]"
},
"restartPolicy": "Always"
}
},
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[variables('Public Service')]",
"location": "[resourceGroup().location]",
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {
"properties": {
"intro": {
"type": "string"
},
"number": {
"type": "integer"
}
},
"type": "object"
}
}
}
},
"actions": {
"Response": {
"runAfter": {},
"type": "Response",
"kind": "Http",
"inputs": {
"body": "@{triggerBody()?['intro']}: @{add(5, triggerBody()?['number'])}",
"statusCode": 200
}
}
},
"outputs": {}
},
"parameters": {},
"accessControl": {
"triggers": {
"allowedCallerIpAddresses": [
{
"addressRange": "[concat(reference(resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))).publicIPAddresses[0], '/32')]"
}
]
}
}
}
},
{
"type": "Microsoft.ApiManagement/service",
"apiVersion": "2019-01-01",
"name": "[parameters('organizationName')]",
"location": "[resourceGroup().location]",
"tags": {},
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', variables('VNet')['Name'])]"
],
"properties": {
"notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com",
"hostnameConfigurations": [],
"virtualNetworkConfiguration": {
"subnetResourceId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('VNet')['Name'], variables('VNet')['Subnets']['api-man']['Subnet Name'])]"
},
"additionalLocations": [],
"customProperties": {},
"certificates": [],
"enableClientCertificate": true,
"virtualNetworkType": "External",
"publisherEmail": "[parameters('adminEmail')]",
"publisherName": "api-admin"
},
"sku": {
"name": "[variables('API Management Sku')]"
},
"identity": {
"type": "SystemAssigned"
},
"resources": [
{
"type": "properties",
"apiVersion": "2019-01-01",
"name": "[variables('Tenant Name')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]"
],
"properties": {
"displayName": "[variables('Tenant Name')]",
"value": "[parameters('tenantName')]",
"tags": [],
"secret": false
}
},
{
"type": "properties",
"apiVersion": "2019-01-01",
"name": "[variables('App Id')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]"
],
"properties": {
"displayName": "[variables('App Id')]",
"value": "[parameters('appId')]",
"tags": [],
"secret": true
}
},
{
"type": "properties",
"apiVersion": "2019-01-01",
"name": "[variables('Public Service Url')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]",
"[resourceId('Microsoft.Logic/workflows', variables('Public Service'))]"
],
"properties": {
"displayName": "[variables('Public Service Url')]",
"value": "[split(listCallbackURL(concat(resourceId('Microsoft.Logic/workflows', variables('Public Service')), '/triggers/manual'), '2016-10-01', variables('Logic App Key Type')).value, '?')[0]]",
"tags": [],
"secret": false
}
},
{
"type": "properties",
"apiVersion": "2019-01-01",
"name": "[variables('Public Service Query String')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]",
"[resourceId('Microsoft.Logic/workflows', variables('Public Service'))]"
],
"properties": {
"displayName": "[variables('Public Service Query String')]",
"value": "[concat('?', split(listCallbackURL(concat(resourceId('Microsoft.Logic/workflows', variables('Public Service')), '/triggers/manual'), '2016-10-01', variables('Logic App Key Type')).value, '?')[1])]",
"tags": [],
"secret": true
}
},
{
"type": "properties",
"apiVersion": "2019-01-01",
"name": "[variables('Private Service Url')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]",
"[resourceId('Microsoft.ContainerInstance/containerGroups', 'private-service-group')]"
],
"properties": {
"displayName": "[variables('Private Service Url')]",
"value": "[concat('http://', reference(resourceId('Microsoft.ContainerInstance/containerGroups', 'private-service-group')).ipAddress.ip)]",
"tags": [],
"secret": false
}
},
{
"type": "apis",
"apiVersion": "2019-01-01",
"name": "[variables('apis')['one']['name']]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]"
],
"properties": {
"displayName": "[variables('apis')['one']['displayName']]",
"apiRevision": "1",
"path": "[variables('apis')['one']['name']]",
"protocols": [
"https"
],
"isCurrent": true
}
}
]
},
{
"type": "Microsoft.ApiManagement/service/products",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('products')['token']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]"
],
"properties": {
"description": "[variables('products')['token']['description']]",
"terms": "[variables('products')['token']['terms']]",
"subscriptionRequired": "[variables('products')['token']['subscriptionRequired']]",
"subscriptionsLimit": null,
"state": "published",
"displayName": "[variables('products')['token']['displayName']]"
},
"resources": [
{
"type": "policies",
"apiVersion": "2019-01-01",
"name": "policy",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['token']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('App Id'))]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('Tenant Name'))]"
],
"properties": {
"value": "<policies>\r\n <inbound>\r\n <base />\r\n <validate-jwt header-name=\"Authorization\" failed-validation-httpcode=\"401\" failed-validation-error-message=\"Unauthorized. Access token is missing or invalid.\" output-token-variable-name=\"jwt\">\r\n <openid-config url=\"https://login.microsoftonline.com/{{tenant-name}}.onmicrosoft.com/.well-known/openid-configuration\" />\r\n <audiences>\r\n <audience>{{app-id}}</audience>\r\n </audiences>\r\n </validate-jwt>\r\n <set-header name=\"Authorization\" exists-action=\"delete\" />\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound>\r\n <base />\r\n </outbound>\r\n <on-error>\r\n <base />\r\n </on-error>\r\n</policies>",
"format": "xml"
}
}
]
},
{
"type": "Microsoft.ApiManagement/service/products",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('products')['subscription']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))]"
],
"properties": {
"description": "[variables('products')['subscription']['description']]",
"terms": "[variables('products')['subscription']['terms']]",
"subscriptionRequired": "[variables('products')['subscription']['subscriptionRequired']]",
"subscriptionsLimit": null,
"state": "published",
"displayName": "[variables('products')['subscription']['displayName']]"
},
"resources": []
},
{
"type": "Microsoft.ApiManagement/service/products/groups",
"apiVersion": "2019-01-01",
"copy": {
"name": "token-groups",
"count": "[length(variables('products')['token']['groups'])]"
},
"name": "[concat(parameters('organizationName'), '/', variables('products')['token']['name'], '/', variables('products')['token']['groups'][copyIndex()])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['token']['name'])]"
],
"properties": {}
},
{
"type": "Microsoft.ApiManagement/service/products/groups",
"apiVersion": "2019-01-01",
"copy": {
"name": "token-groups",
"count": "[length(variables('products')['subscription']['groups'])]"
},
"name": "[concat(parameters('organizationName'), '/', variables('products')['subscription']['name'], '/', variables('products')['subscription']['groups'][copyIndex()])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['subscription']['name'])]"
],
"properties": {}
},
{
"type": "Microsoft.ApiManagement/service/products/apis",
"apiVersion": "2019-01-01",
"copy": {
"name": "one-product-api",
"count": "[length(variables('apis')['one']['products'])]"
},
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['products'][copyIndex()], '/', variables('apis')['one']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['subscription']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['token']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/apis', parameters('organizationName'), variables('apis')['one']['name'])]"
],
"properties": {}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['public']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis', parameters('organizationName'), variables('apis')['one']['name'])]"
],
"properties": {
"displayName": "[variables('apis')['one']['operations']['public']['name']]",
"method": "GET",
"urlTemplate": "[variables('apis')['one']['operations']['public']['urlTemplate']]",
"templateParameters": [],
"request": {
"queryParameters": [
{
"name": "intro",
"description": "Introduction in the response",
"type": "string",
"defaultValue": "Default introduction",
"required": true
},
{
"name": "number",
"description": "Number to compute with",
"type": "int",
"defaultValue": "42",
"required": true
}
],
"headers": [],
"representations": []
},
"responses": [
{
"statusCode": 200,
"representations": [
{
"contentType": "text/plain",
"sample": "Plain old text"
}
],
"headers": []
}
]
}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations/policies",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['public']['name'], '/policy')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis/operations', parameters('organizationName'), variables('apis')['one']['name'], variables('apis')['one']['operations']['public']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('Public Service Url'))]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('Public Service Query String'))]"
],
"properties": {
"value": "<policies>\r\n <inbound>\r\n <base />\r\n <set-backend-service base-url=\"{{public-service-url}}\" />\r\n <set-body>\r\n @{\r\n var body=new\r\n {\r\n intro=context.Request.OriginalUrl.Query[\"intro\"].First(),\r\n number=int.Parse(context.Request.Url.Query[\"number\"].First())\r\n };\r\n \r\n return JObject.FromObject(body).ToString();\r\n }\r\n </set-body>\r\n <rewrite-uri template=\"{{public-service-query-string}}\" copy-unmatched-params=\"false\" />\r\n <set-method>POST</set-method>\r\n <set-header name=\"Content-Type\" exists-action=\"override\">\r\n <value>application/json</value>\r\n </set-header>\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound>\r\n <base />\r\n </outbound>\r\n <on-error>\r\n <base />\r\n </on-error>\r\n</policies>",
"format": "xml"
}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['private-raw']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis', parameters('organizationName'), variables('apis')['one']['name'])]"
],
"properties": {
"displayName": "[variables('apis')['one']['operations']['private-raw']['name']]",
"method": "GET",
"urlTemplate": "[variables('apis')['one']['operations']['private-raw']['urlTemplate']]",
"templateParameters": [],
"request": {
"queryParameters": [],
"headers": [],
"representations": []
},
"responses": [
{
"statusCode": 200,
"representations": [
{
"contentType": "text/plain",
"sample": "Plain old text"
}
],
"headers": []
}
]
}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations/policies",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['private-raw']['name'], '/policy')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis/operations', parameters('organizationName'), variables('apis')['one']['name'], variables('apis')['one']['operations']['private-raw']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('Private Service Url'))]"
],
"properties": {
"value": "<policies>\r\n <inbound>\r\n <base />\r\n <set-backend-service base-url=\"{{private-service-url}}\" />\r\n <rewrite-uri template=\"/\" copy-unmatched-params=\"false\" />\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound/>\r\n <on-error>\r\n <base />\r\n </on-error>\r\n</policies>",
"format": "xml"
}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['private-select']['name'])]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis', parameters('organizationName'), variables('apis')['one']['name'])]"
],
"properties": {
"displayName": "[variables('apis')['one']['operations']['private-select']['name']]",
"method": "GET",
"urlTemplate": "[variables('apis')['one']['operations']['private-select']['urlTemplate']]",
"templateParameters": [],
"request": {
"queryParameters": [],
"headers": [],
"representations": []
},
"responses": [
{
"statusCode": 200,
"representations": [
{
"contentType": "text/plain",
"sample": "Plain old text"
}
],
"headers": []
}
]
}
},
{
"type": "Microsoft.ApiManagement/service/apis/operations/policies",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('apis')['one']['name'], '/', variables('apis')['one']['operations']['private-select']['name'], '/policy')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/apis/operations', parameters('organizationName'), variables('apis')['one']['name'], variables('apis')['one']['operations']['private-select']['name'])]",
"[resourceId('Microsoft.ApiManagement/service/properties', parameters('organizationName'), variables('Private Service Url'))]"
],
"properties": {
"value": "<policies>\r\n <inbound>\r\n <base />\r\n <set-backend-service base-url=\"{{private-service-url}}\" />\r\n <rewrite-uri template=\"/\" copy-unmatched-params=\"false\" />\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound>\r\n <base />\r\n <set-body>@{\r\n var raw=context.Response.Body.As&lt;string&gt;(true);\r\n var startIndex = raw.IndexOf(\"&lt;/b&gt;\") + 4;\r\n var endIndex = raw.IndexOf(\"&lt;br/&gt;\");\r\n var host = raw.Substring(startIndex, endIndex - startIndex).Trim();\r\n var response = new { hostName = host };\r\n \r\n return JObject.FromObject(response).ToString();\r\n }</set-body>\r\n </outbound>\r\n <on-error>\r\n <base />\r\n </on-error>\r\n</policies>",
"format": "xml"
}
},
{
"type": "Microsoft.ApiManagement/service/subscriptions",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('Subcription Subscription'))]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['subscription']['name'])]"
],
"properties": {
"scope": "[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['subscription']['name'])]",
"allowTracing": true,
"displayName": "[variables('Subcription Subscription')]"
}
},
{
"type": "Microsoft.ApiManagement/service/subscriptions",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('organizationName'), '/', variables('Subcription Token'))]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['token']['name'])]"
],
"properties": {
"scope": "[resourceId('Microsoft.ApiManagement/service/products', parameters('organizationName'), variables('products')['token']['name'])]",
"allowTracing": true,
"displayName": "[variables('Subcription Token')]"
}
},
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[variables('Public Consumer Subscription')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/subscriptions', parameters('organizationName'), variables('Subcription Subscription'))]"
],
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {}
}
}
},
"actions": {
"http-to-api-man": {
"inputs": {
"headers": {
"Ocp-Apim-Subscription-Key": "[reference(resourceId('Microsoft.ApiManagement/service/subscriptions', parameters('organizationName'), variables('Subcription Subscription'))).primaryKey]",
"Ocp-Apim-Trace": "true"
},
"method": "GET",
"uri": "[concat('https://', parameters('organizationName'), '.azure-api.net/', variables('apis')['one']['name'], variables('apis')['one']['operations']['public']['urlTemplate'], '?intro=Hi%20From%20Logic%20App-Without%20JWT&number=747')]"
},
"runAfter": {},
"type": "Http"
},
"failed": {
"inputs": {
"body": "@body('http-to-api-man')",
"statusCode": 500
},
"kind": "Http",
"runAfter": {
"http-to-api-man": [
"Failed"
]
},
"type": "Response"
},
"success": {
"inputs": {
"body": "@body('http-to-api-man')",
"statusCode": 200
},
"kind": "Http",
"runAfter": {
"http-to-api-man": [
"Succeeded"
]
},
"type": "Response"
}
},
"outputs": {}
},
"parameters": {},
"accessControl": {}
}
},
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[variables('Public Consumer Token')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service/subscriptions', parameters('organizationName'), variables('Subcription Token'))]"
],
"identity": {
"type": "SystemAssigned"
},
"properties": {
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {}
}
}
},
"actions": {
"http-to-api-man": {
"inputs": {
"authentication": {
"audience": "[parameters('appId')]",
"type": "ManagedServiceIdentity"
},
"headers": {
"Ocp-Apim-Subscription-Key": "[reference(resourceId('Microsoft.ApiManagement/service/subscriptions', parameters('organizationName'), variables('Subcription Token'))).primaryKey]",
"Ocp-Apim-Trace": "true"
},
"method": "GET",
"uri": "[concat('https://', parameters('organizationName'), '.azure-api.net/', variables('apis')['one']['name'], variables('apis')['one']['operations']['public']['urlTemplate'], '?intro=Hi%20From%20Logic%20App-Without%20JWT&number=747')]"
},
"runAfter": {},
"type": "Http"
},
"failed": {
"inputs": {
"body": "@body('http-to-api-man')",
"statusCode": 500
},
"kind": "Http",
"runAfter": {
"http-to-api-man": [
"Failed"
]
},
"type": "Response"
},
"success": {
"inputs": {
"body": "@body('http-to-api-man')",
"statusCode": 200
},
"kind": "Http",
"runAfter": {
"http-to-api-man": [
"Succeeded"
]
},
"type": "Response"
}
},
"outputs": {}
},
"parameters": {},
"accessControl": {}
}
}
],
"outputs": {
"public": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ApiManagement/service', parameters('organizationName'))).publicIPAddresses[0]]"
}
}
}
You can’t perform that action at this time.