azure-quickstart-templates
azure-quickstart-templates copied to clipboard
[API Center] azure-api-center-create
PR Checklist
Check these items before submitting a PR...
- [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 - 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.]
@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.]
@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 - 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 - 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 - 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.]
@mumian - Fixed formatting. Thanks again for reviewing!
@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.]
@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 - 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.]
@dlepow - line 21 - The property "sku" does not exist in the resource or type definition.
@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.]
@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.