azure-quickstart-templates icon indicating copy to clipboard operation
azure-quickstart-templates copied to clipboard

[API Center] azure-api-center-create

Open dlepow opened this issue 10 months ago • 13 comments

PR Checklist

Check these items before submitting a PR...

Contribution Guide

Best Practice Guide

  • [X ] - Please check this box once you've submitted the PR if you've read through the Contribution Guide and best practices checklist.

Changelog

  • v1 of basic template to deploy an instance of API Center service and add a sample API resource. I plan to use this as the basis of an ARM/bicep quickstart

dlepow avatar Apr 17 '24 23:04 dlepow

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar Apr 17 '24 23:04 azure-quickstarts

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar Apr 18 '24 20:04 azure-quickstarts

@mumian - FYI, this is a basic quickstart template for the API Center service, which will GA in early May. I plan to create ARM/bicep quickstarts around this. If you have suggestions for improving it, please let me know. Thanks!

dlepow avatar Apr 18 '24 22:04 dlepow

@dlepow - As you may already know, Bicep sits over ARM templates. All Bicep files undergo compilation into ARM templates before deployment. Creating Bicep files is considerably easier compared to crafting ARM templates. VSCode offers additional validation and intelligent features that simplify the creation of Bicep files. In the quickstart repository, you only need to provide a Bicep file, as the repository automatically generates an ARM template based on it. I've included the Bicep file for the template. To utilize the Bicep file, you'll need to rename the parameters in the parameter file and add some extra settings in the readme file. Please feel free to schedule a 30-minute session with me next week. I can guide you through the process of creating a Bicep file or converting an ARM template to a Bicep file.

@description('Specifies the location for resources.') param location string = 'eastus'

param apiCenterName string = 'apicenter${uniqueString(resourceGroup().id)}' param apiName string = 'first-api'

@allowed([ 'rest' 'soap' 'graphql' 'grpc' 'webhook' 'websocket' ]) param apiType string = 'rest'

resource apiCenterService 'Microsoft.ApiCenter/services@2024-03-01' = { name: apiCenterName location: location properties: {} }

resource apiCenterWorkspace 'Microsoft.ApiCenter/services/workspaces@2024-03-01' = { parent: apiCenterService name: 'default' properties: { title: 'Default workspace' description: 'Default workspace' } }

resource api_center_name_default_api_name 'Microsoft.ApiCenter/services/workspaces/apis@2024-03-01' = { parent: apiCenterWorkspace name: apiName properties: { title: apiName kind: apiType externalDocumentation: [] contacts: [] customProperties: {} } }

mumian avatar Apr 19 '24 13:04 mumian

@mumian - thanks for the help here. I got the order wrong, clearly :). Before troubling you further, et me try updating first with a bicep file and resubmit. :)

dlepow avatar Apr 19 '24 21:04 dlepow

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar Apr 22 '24 18:04 azure-quickstarts

@mumian - Fixed formatting. Thanks again for reviewing!

dlepow avatar Apr 22 '24 19:04 dlepow

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar Apr 22 '24 19:04 azure-quickstarts

@mumian - Could you please merge this at your convenience, assuming no more changes needed? I'm creating quickstarts that depend on the templates. Many thanks!

Actually, please hold off til I retest. I've found some issues with the resource deployment.

dlepow avatar Apr 25 '24 01:04 dlepow

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar Apr 25 '24 23:04 azure-quickstarts

@dlepow - line 21 - The property "sku" does not exist in the resource or type definition.

mumian avatar Apr 26 '24 13:04 mumian

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

azure-quickstarts avatar May 01 '24 14:05 azure-quickstarts

@dlepow - line 21 - The property "sku" does not exist in the resource or type definition.

@mumian - Thanks, removed. The property will be added in a forthcoming API version. Happy to incorporate any further suggestions, otherwise I think this is ready to merge.

dlepow avatar May 01 '24 15:05 dlepow