handsome-optician-50551
03/26/2020, 1:36 PM${prefix}-api
, {`
`name: ${prefix}-api
,`
resourceGroupName: resourceGroup.name,
apiManagementName: service.name.apply(async (o) => {
if (!pulumi.runtime.isDryRun()) {
await sleep();
}
return o;
}),
`displayName: api-${prefix}
,`
protocols: ["https"],
revision: "1",
path: "weather",
import: {
contentFormat: "swagger-json",
contentValue: "<https://ddm-te-dev-2-as.azurewebsites.net/swagger/v1/swagger.json>"
}
`}, { import: /subscriptions/${subId}/resourceGroups/${prefix}-rg/providers/Microsoft.ApiManagement/service/${prefix}-ams/apis/${prefix}-api
, customTimeouts: { create: "10m", update: "10m" } });`tall-librarian-49374
03/26/2020, 5:00 PMswagger-link-json
instead of swagger-json
contentValue
handsome-optician-50551
03/27/2020, 10:02 AMlet contentValue: any = service.name.apply(async (o) => {
if (!pulumi.runtime.isDryRun()) {
<http://pulumi.log.info|pulumi.log.info>("starta &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
let response = await axios.get("<https://ddm-te-dev-2-as.azurewebsites.net/swagger/v1/swagger.json>");
let contentValue = response.data
contentValue = JSON.stringify(contentValue)
<http://pulumi.log.info|pulumi.log.info>("after get €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€")
<http://pulumi.log.info|pulumi.log.info>(contentValue)
}
return contentValue;
})
<http://pulumi.log.info|pulumi.log.info>("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
`const api = new azure.apimanagement.Api(${prefix}-api
, {`
`name: ${prefix}-api
,`
resourceGroupName: resourceGroup.name,
apiManagementName: service.name,
`displayName: api-${prefix}
,`
protocols: ["https"],
revision: "1",
path: "weather",
import: {
contentFormat: "swagger-json",
contentValue: contentValue
}
`}, { import: /subscriptions/${subId}/resourceGroups/${prefix}-rg/providers/Microsoft.ApiManagement/service/${prefix}-ams/apis/${prefix}-api
, customTimeouts: { create: "10m", update: "10m" } });`tall-librarian-49374
03/27/2020, 10:47 AM