From ee7515c9c81cbaa9303bb82062589edb190c6ba8 Mon Sep 17 00:00:00 2001 From: "Jianing Wang (WICRESOFT NORTH AMERICA LTD)" Date: Thu, 12 Sep 2024 10:42:39 +0800 Subject: [PATCH 1/3] update --- .../templates/avm-validateModuleDeployment/action.yml | 4 +++- .github/workflows/avm.template.module.yml | 3 +++ avm/ptn/azd/apim-api/README.md | 11 ++--------- avm/ptn/azd/apim-api/main.bicep | 2 +- avm/ptn/azd/apim-api/main.json | 8 ++++---- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/actions/templates/avm-validateModuleDeployment/action.yml b/.github/actions/templates/avm-validateModuleDeployment/action.yml index 715a2f642b..44a9eb431c 100644 --- a/.github/actions/templates/avm-validateModuleDeployment/action.yml +++ b/.github/actions/templates/avm-validateModuleDeployment/action.yml @@ -62,7 +62,9 @@ runs: - name: Azure Login uses: azure/login@v2 with: - creds: ${{ env.AZURE_CREDENTIALS }} + client-id: ${{ env.AZURE_CLIENT_ID }} + tenant-id: ${{ env.AZURE_TENANT_ID }} + subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} enable-AzPSSession: true # [Set Deployment Location] task(s) diff --git a/.github/workflows/avm.template.module.yml b/.github/workflows/avm.template.module.yml index 4df961c68e..5655692284 100644 --- a/.github/workflows/avm.template.module.yml +++ b/.github/workflows/avm.template.module.yml @@ -26,6 +26,9 @@ env: ARM_TENANT_ID: "${{ secrets.ARM_TENANT_ID }}" TOKEN_NAMEPREFIX: "${{ secrets.TOKEN_NAMEPREFIX }}" CI_KEY_VAULT_NAME: "${{ vars.CI_KEY_VAULT_NAME }}" + AZURE_CLIENT_ID: "${{ secrets.AZURE_CLIENT_ID }}" + AZURE_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}" + AZURE_SUBSCRIPTION_ID: "${{ secrets.AZURE_SUBSCRIPTION_ID }}" jobs: ######################### diff --git a/avm/ptn/azd/apim-api/README.md b/avm/ptn/azd/apim-api/README.md index 681638af79..f86fc2befd 100644 --- a/avm/ptn/azd/apim-api/README.md +++ b/avm/ptn/azd/apim-api/README.md @@ -10,7 +10,6 @@ Creates and configure an API within an API Management service instance. - [Usage examples](#Usage-examples) - [Parameters](#Parameters) - [Outputs](#Outputs) -- [Cross-referenced modules](#Cross-referenced-modules) - [Data Collection](#Data-Collection) ## Resource Types @@ -104,7 +103,6 @@ module apimApi 'br/public:avm/ptn/azd/apim-api:' = {

- ## Parameters **Required parameters** @@ -117,7 +115,7 @@ module apimApi 'br/public:avm/ptn/azd/apim-api:' = { | [`apiName`](#parameter-apiname) | string | Resource name to uniquely identify this API within the API Management service instance. | | [`apiPath`](#parameter-apipath) | string | Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. | | [`name`](#parameter-name) | string | Name of the API Management service instance. | -| [`webFrontendUrl`](#parameter-webfrontendurl) | string | Absolute URL of the web frontend. | +| [`webFrontendUrl`](#parameter-webfrontendurl) | string | Absolute URL of web frontend. | **Optional parameters** @@ -171,7 +169,7 @@ Name of the API Management service instance. ### Parameter: `webFrontendUrl` -Absolute URL of the web frontend. +Absolute URL of web frontend. - Required: Yes - Type: string @@ -200,7 +198,6 @@ Location for all Resources. - Type: string - Default: `[resourceGroup().location]` - ## Outputs | Output | Type | Description | @@ -208,10 +205,6 @@ Location for all Resources. | `resourceGroupName` | string | The name of the resource group. | | `serviceApiUri` | string | The complete URL for accessing the API. | -## Cross-referenced modules - -_None_ - ## Data Collection The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at . You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. diff --git a/avm/ptn/azd/apim-api/main.bicep b/avm/ptn/azd/apim-api/main.bicep index 22c2fd5435..becb6b512e 100644 --- a/avm/ptn/azd/apim-api/main.bicep +++ b/avm/ptn/azd/apim-api/main.bicep @@ -24,7 +24,7 @@ param apiDescription string @minLength(1) param apiPath string -@description('Required. Absolute URL of the web frontend.') +@description('Required. Absolute URL of web frontend.') param webFrontendUrl string @description('Optional. Location for all Resources.') diff --git a/avm/ptn/azd/apim-api/main.json b/avm/ptn/azd/apim-api/main.json index dacd440b8a..b08e13d955 100644 --- a/avm/ptn/azd/apim-api/main.json +++ b/avm/ptn/azd/apim-api/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.29.47.4906", - "templateHash": "7935494033060946539" + "templateHash": "1542387667896789833" }, "name": "avm/ptn/azd/apim-api", "description": "Creates and configure an API within an API Management service instance.\n\n**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case.", @@ -50,7 +50,7 @@ "webFrontendUrl": { "type": "string", "metadata": { - "description": "Required. Absolute URL of the web frontend." + "description": "Required. Absolute URL of web frontend." } }, "location": { @@ -82,8 +82,8 @@ } }, "variables": { - "$fxv#0": "\n\n \n \n \n \n \n {origin}\n \n \n PUT\n GET\n POST\n DELETE\n PATCH\n \n \n

*
\n \n \n
*
\n
\n \n \n \n \n \n \n \n Call to the @(context.Api.Name)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n = 200 && context.Response.StatusCode < 300)\">\n \n \n \n \n \n \n \n = 400 && context.Response.StatusCode < 600)\">\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Failed to process the @(context.Api.Name)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n An unexpected error has occurred.\n \n \n", - "$fxv#1": "openapi: 3.0.0\ninfo:\n description: Simple Todo API\n version: 3.0.0\n title: Simple Todo API\n contact:\n email: azdevteam@microsoft.com\n\ncomponents:\n schemas:\n TodoItem:\n type: object\n required:\n - listId\n - name\n - description\n description: A task that needs to be completed\n properties:\n id:\n type: string\n listId:\n type: string\n name:\n type: string\n description:\n type: string\n state:\n $ref: \"#/components/schemas/TodoState\"\n dueDate:\n type: string\n format: date-time\n completedDate:\n type: string\n format: date-time\n TodoList:\n type: object\n required:\n - name\n properties:\n id:\n type: string\n name:\n type: string\n description:\n type: string\n description: \" A list of related Todo items\"\n TodoState:\n type: string\n enum:\n - todo\n - inprogress\n - done\n parameters:\n listId:\n in: path\n required: true\n name: listId\n description: The Todo list unique identifier\n schema:\n type: string\n itemId:\n in: path\n required: true\n name: itemId\n description: The Todo item unique identifier\n schema:\n type: string\n state:\n in: path\n required: true\n name: state\n description: The Todo item state\n schema:\n $ref: \"#/components/schemas/TodoState\"\n top:\n in: query\n required: false\n name: top\n description: The max number of items to returns in a result\n schema:\n type: number\n default: 20\n skip:\n in: query\n required: false\n name: skip\n description: The number of items to skip within the results\n schema:\n type: number\n default: 0\n\n requestBodies:\n TodoList:\n description: The Todo List\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoList\"\n TodoItem:\n description: The Todo Item\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoItem\"\n\n responses:\n TodoList:\n description: A Todo list result\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoList\"\n TodoListArray:\n description: An array of Todo lists\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"#/components/schemas/TodoList\"\n TodoItem:\n description: A Todo item result\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoItem\"\n TodoItemArray:\n description: An array of Todo items\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"#/components/schemas/TodoItem\"\n\npaths:\n /lists:\n get:\n operationId: GetLists\n summary: Gets an array of Todo lists\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoListArray\"\n post:\n operationId: CreateList\n summary: Creates a new Todo list\n tags:\n - Lists\n requestBody:\n $ref: \"#/components/requestBodies/TodoList\"\n responses:\n 201:\n $ref: \"#/components/responses/TodoList\"\n 400:\n description: Invalid request schema\n /lists/{listId}:\n get:\n operationId: GetListById\n summary: Gets a Todo list by unique identifier\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoList\"\n 404:\n description: Todo list not found\n put:\n operationId: UpdateListById\n summary: Updates a Todo list by unique identifier\n tags:\n - Lists\n requestBody:\n $ref: \"#/components/requestBodies/TodoList\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoList\"\n 404:\n description: Todo list not found\n 400:\n description: Todo list is invalid\n delete:\n operationId: DeleteListById\n summary: Deletes a Todo list by unique identifier\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 204:\n description: Todo list deleted successfully\n 404:\n description: Todo list not found\n /lists/{listId}/items:\n post:\n operationId: CreateItem\n summary: Creates a new Todo item within a list\n tags:\n - Items\n requestBody:\n $ref: \"#/components/requestBodies/TodoItem\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 201:\n $ref: \"#/components/responses/TodoItem\"\n 404:\n description: Todo list not found\n get:\n operationId: GetItemsByListId\n summary: Gets Todo items within the specified list\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItemArray\"\n 404:\n description: Todo list not found\n /lists/{listId}/items/{itemId}:\n get:\n operationId: GetItemById\n summary: Gets a Todo item by unique identifier\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItem\"\n 404:\n description: Todo list or item not found\n put:\n operationId: UpdateItemById\n summary: Updates a Todo item by unique identifier\n tags:\n - Items\n requestBody:\n $ref: \"#/components/requestBodies/TodoItem\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItem\"\n 400:\n description: Todo item is invalid\n 404:\n description: Todo list or item not found\n delete:\n operationId: DeleteItemById\n summary: Deletes a Todo item by unique identifier\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 204:\n description: Todo item deleted successfully\n 404:\n description: Todo list or item not found\n /lists/{listId}/items/state/{state}:\n get:\n operationId: GetItemsByListIdAndState\n summary: Gets a list of Todo items of a specific state\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/state\"\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItemArray\"\n 404:\n description: Todo list or item not found\n put:\n operationId: UpdateItemsStateByListId\n summary: Changes the state of the specified list items\n tags:\n - Items\n requestBody:\n description: unique identifiers of the Todo items to update\n content:\n application/json:\n schema:\n type: array\n items:\n description: The Todo item unique identifier\n type: string\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/state\"\n responses:\n 204:\n description: Todo items updated\n 400:\n description: Update request is invalid", + "$fxv#0": "\r\n\r\n \r\n \r\n \r\n \r\n \r\n {origin}\r\n \r\n \r\n PUT\r\n GET\r\n POST\r\n DELETE\r\n PATCH\r\n \r\n \r\n
*
\r\n
\r\n \r\n
*
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Call to the @(context.Api.Name)\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n = 200 && context.Response.StatusCode < 300)\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n = 400 && context.Response.StatusCode < 600)\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Failed to process the @(context.Api.Name)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n An unexpected error has occurred.\r\n \r\n \r\n
", + "$fxv#1": "openapi: 3.0.0\r\ninfo:\r\n description: Simple Todo API\r\n version: 3.0.0\r\n title: Simple Todo API\r\n contact:\r\n email: azdevteam@microsoft.com\r\n\r\ncomponents:\r\n schemas:\r\n TodoItem:\r\n type: object\r\n required:\r\n - listId\r\n - name\r\n - description\r\n description: A task that needs to be completed\r\n properties:\r\n id:\r\n type: string\r\n listId:\r\n type: string\r\n name:\r\n type: string\r\n description:\r\n type: string\r\n state:\r\n $ref: \"#/components/schemas/TodoState\"\r\n dueDate:\r\n type: string\r\n format: date-time\r\n completedDate:\r\n type: string\r\n format: date-time\r\n TodoList:\r\n type: object\r\n required:\r\n - name\r\n properties:\r\n id:\r\n type: string\r\n name:\r\n type: string\r\n description:\r\n type: string\r\n description: \" A list of related Todo items\"\r\n TodoState:\r\n type: string\r\n enum:\r\n - todo\r\n - inprogress\r\n - done\r\n parameters:\r\n listId:\r\n in: path\r\n required: true\r\n name: listId\r\n description: The Todo list unique identifier\r\n schema:\r\n type: string\r\n itemId:\r\n in: path\r\n required: true\r\n name: itemId\r\n description: The Todo item unique identifier\r\n schema:\r\n type: string\r\n state:\r\n in: path\r\n required: true\r\n name: state\r\n description: The Todo item state\r\n schema:\r\n $ref: \"#/components/schemas/TodoState\"\r\n top:\r\n in: query\r\n required: false\r\n name: top\r\n description: The max number of items to returns in a result\r\n schema:\r\n type: number\r\n default: 20\r\n skip:\r\n in: query\r\n required: false\r\n name: skip\r\n description: The number of items to skip within the results\r\n schema:\r\n type: number\r\n default: 0\r\n\r\n requestBodies:\r\n TodoList:\r\n description: The Todo List\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoItem:\r\n description: The Todo Item\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n\r\n responses:\r\n TodoList:\r\n description: A Todo list result\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoListArray:\r\n description: An array of Todo lists\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoItem:\r\n description: A Todo item result\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n TodoItemArray:\r\n description: An array of Todo items\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n\r\npaths:\r\n /lists:\r\n get:\r\n operationId: GetLists\r\n summary: Gets an array of Todo lists\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoListArray\"\r\n post:\r\n operationId: CreateList\r\n summary: Creates a new Todo list\r\n tags:\r\n - Lists\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoList\"\r\n responses:\r\n 201:\r\n $ref: \"#/components/responses/TodoList\"\r\n 400:\r\n description: Invalid request schema\r\n /lists/{listId}:\r\n get:\r\n operationId: GetListById\r\n summary: Gets a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoList\"\r\n 404:\r\n description: Todo list not found\r\n put:\r\n operationId: UpdateListById\r\n summary: Updates a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoList\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoList\"\r\n 404:\r\n description: Todo list not found\r\n 400:\r\n description: Todo list is invalid\r\n delete:\r\n operationId: DeleteListById\r\n summary: Deletes a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 204:\r\n description: Todo list deleted successfully\r\n 404:\r\n description: Todo list not found\r\n /lists/{listId}/items:\r\n post:\r\n operationId: CreateItem\r\n summary: Creates a new Todo item within a list\r\n tags:\r\n - Items\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoItem\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 201:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 404:\r\n description: Todo list not found\r\n get:\r\n operationId: GetItemsByListId\r\n summary: Gets Todo items within the specified list\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItemArray\"\r\n 404:\r\n description: Todo list not found\r\n /lists/{listId}/items/{itemId}:\r\n get:\r\n operationId: GetItemById\r\n summary: Gets a Todo item by unique identifier\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 404:\r\n description: Todo list or item not found\r\n put:\r\n operationId: UpdateItemById\r\n summary: Updates a Todo item by unique identifier\r\n tags:\r\n - Items\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoItem\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 400:\r\n description: Todo item is invalid\r\n 404:\r\n description: Todo list or item not found\r\n delete:\r\n operationId: DeleteItemById\r\n summary: Deletes a Todo item by unique identifier\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 204:\r\n description: Todo item deleted successfully\r\n 404:\r\n description: Todo list or item not found\r\n /lists/{listId}/items/state/{state}:\r\n get:\r\n operationId: GetItemsByListIdAndState\r\n summary: Gets a list of Todo items of a specific state\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/state\"\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItemArray\"\r\n 404:\r\n description: Todo list or item not found\r\n put:\r\n operationId: UpdateItemsStateByListId\r\n summary: Changes the state of the specified list items\r\n tags:\r\n - Items\r\n requestBody:\r\n description: unique identifiers of the Todo items to update\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n description: The Todo item unique identifier\r\n type: string\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/state\"\r\n responses:\r\n 204:\r\n description: Todo items updated\r\n 400:\r\n description: Update request is invalid", "apiPolicyContent": "[replace(variables('$fxv#0'), '{origin}', parameters('webFrontendUrl'))]", "appNameForBicep": "[if(not(empty(parameters('apiAppName'))), parameters('apiAppName'), 'placeholderName')]" }, From b7df89b667ef363286769d2bfab07e73f9a4bf2a Mon Sep 17 00:00:00 2001 From: "Jianing Wang (WICRESOFT NORTH AMERICA LTD)" Date: Thu, 12 Sep 2024 10:46:02 +0800 Subject: [PATCH 2/3] update --- avm/ptn/azd/apim-api/main.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avm/ptn/azd/apim-api/main.json b/avm/ptn/azd/apim-api/main.json index b08e13d955..912dbe4412 100644 --- a/avm/ptn/azd/apim-api/main.json +++ b/avm/ptn/azd/apim-api/main.json @@ -82,8 +82,8 @@ } }, "variables": { - "$fxv#0": "\r\n\r\n \r\n \r\n \r\n \r\n \r\n {origin}\r\n \r\n \r\n PUT\r\n GET\r\n POST\r\n DELETE\r\n PATCH\r\n \r\n \r\n
*
\r\n
\r\n \r\n
*
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Call to the @(context.Api.Name)\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n = 200 && context.Response.StatusCode < 300)\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n = 400 && context.Response.StatusCode < 600)\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Failed to process the @(context.Api.Name)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n An unexpected error has occurred.\r\n \r\n \r\n
", - "$fxv#1": "openapi: 3.0.0\r\ninfo:\r\n description: Simple Todo API\r\n version: 3.0.0\r\n title: Simple Todo API\r\n contact:\r\n email: azdevteam@microsoft.com\r\n\r\ncomponents:\r\n schemas:\r\n TodoItem:\r\n type: object\r\n required:\r\n - listId\r\n - name\r\n - description\r\n description: A task that needs to be completed\r\n properties:\r\n id:\r\n type: string\r\n listId:\r\n type: string\r\n name:\r\n type: string\r\n description:\r\n type: string\r\n state:\r\n $ref: \"#/components/schemas/TodoState\"\r\n dueDate:\r\n type: string\r\n format: date-time\r\n completedDate:\r\n type: string\r\n format: date-time\r\n TodoList:\r\n type: object\r\n required:\r\n - name\r\n properties:\r\n id:\r\n type: string\r\n name:\r\n type: string\r\n description:\r\n type: string\r\n description: \" A list of related Todo items\"\r\n TodoState:\r\n type: string\r\n enum:\r\n - todo\r\n - inprogress\r\n - done\r\n parameters:\r\n listId:\r\n in: path\r\n required: true\r\n name: listId\r\n description: The Todo list unique identifier\r\n schema:\r\n type: string\r\n itemId:\r\n in: path\r\n required: true\r\n name: itemId\r\n description: The Todo item unique identifier\r\n schema:\r\n type: string\r\n state:\r\n in: path\r\n required: true\r\n name: state\r\n description: The Todo item state\r\n schema:\r\n $ref: \"#/components/schemas/TodoState\"\r\n top:\r\n in: query\r\n required: false\r\n name: top\r\n description: The max number of items to returns in a result\r\n schema:\r\n type: number\r\n default: 20\r\n skip:\r\n in: query\r\n required: false\r\n name: skip\r\n description: The number of items to skip within the results\r\n schema:\r\n type: number\r\n default: 0\r\n\r\n requestBodies:\r\n TodoList:\r\n description: The Todo List\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoItem:\r\n description: The Todo Item\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n\r\n responses:\r\n TodoList:\r\n description: A Todo list result\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoListArray:\r\n description: An array of Todo lists\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n $ref: \"#/components/schemas/TodoList\"\r\n TodoItem:\r\n description: A Todo item result\r\n content:\r\n application/json:\r\n schema:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n TodoItemArray:\r\n description: An array of Todo items\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n $ref: \"#/components/schemas/TodoItem\"\r\n\r\npaths:\r\n /lists:\r\n get:\r\n operationId: GetLists\r\n summary: Gets an array of Todo lists\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoListArray\"\r\n post:\r\n operationId: CreateList\r\n summary: Creates a new Todo list\r\n tags:\r\n - Lists\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoList\"\r\n responses:\r\n 201:\r\n $ref: \"#/components/responses/TodoList\"\r\n 400:\r\n description: Invalid request schema\r\n /lists/{listId}:\r\n get:\r\n operationId: GetListById\r\n summary: Gets a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoList\"\r\n 404:\r\n description: Todo list not found\r\n put:\r\n operationId: UpdateListById\r\n summary: Updates a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoList\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoList\"\r\n 404:\r\n description: Todo list not found\r\n 400:\r\n description: Todo list is invalid\r\n delete:\r\n operationId: DeleteListById\r\n summary: Deletes a Todo list by unique identifier\r\n tags:\r\n - Lists\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 204:\r\n description: Todo list deleted successfully\r\n 404:\r\n description: Todo list not found\r\n /lists/{listId}/items:\r\n post:\r\n operationId: CreateItem\r\n summary: Creates a new Todo item within a list\r\n tags:\r\n - Items\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoItem\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n responses:\r\n 201:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 404:\r\n description: Todo list not found\r\n get:\r\n operationId: GetItemsByListId\r\n summary: Gets Todo items within the specified list\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItemArray\"\r\n 404:\r\n description: Todo list not found\r\n /lists/{listId}/items/{itemId}:\r\n get:\r\n operationId: GetItemById\r\n summary: Gets a Todo item by unique identifier\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 404:\r\n description: Todo list or item not found\r\n put:\r\n operationId: UpdateItemById\r\n summary: Updates a Todo item by unique identifier\r\n tags:\r\n - Items\r\n requestBody:\r\n $ref: \"#/components/requestBodies/TodoItem\"\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItem\"\r\n 400:\r\n description: Todo item is invalid\r\n 404:\r\n description: Todo list or item not found\r\n delete:\r\n operationId: DeleteItemById\r\n summary: Deletes a Todo item by unique identifier\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/itemId\"\r\n responses:\r\n 204:\r\n description: Todo item deleted successfully\r\n 404:\r\n description: Todo list or item not found\r\n /lists/{listId}/items/state/{state}:\r\n get:\r\n operationId: GetItemsByListIdAndState\r\n summary: Gets a list of Todo items of a specific state\r\n tags:\r\n - Items\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/state\"\r\n - $ref: \"#/components/parameters/top\"\r\n - $ref: \"#/components/parameters/skip\"\r\n responses:\r\n 200:\r\n $ref: \"#/components/responses/TodoItemArray\"\r\n 404:\r\n description: Todo list or item not found\r\n put:\r\n operationId: UpdateItemsStateByListId\r\n summary: Changes the state of the specified list items\r\n tags:\r\n - Items\r\n requestBody:\r\n description: unique identifiers of the Todo items to update\r\n content:\r\n application/json:\r\n schema:\r\n type: array\r\n items:\r\n description: The Todo item unique identifier\r\n type: string\r\n parameters:\r\n - $ref: \"#/components/parameters/listId\"\r\n - $ref: \"#/components/parameters/state\"\r\n responses:\r\n 204:\r\n description: Todo items updated\r\n 400:\r\n description: Update request is invalid", + "$fxv#0": "\n\n \n \n \n \n \n {origin}\n \n \n PUT\n GET\n POST\n DELETE\n PATCH\n \n \n
*
\n
\n \n
*
\n
\n
\n \n \n \n \n \n \n Call to the @(context.Api.Name)\n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n = 200 && context.Response.StatusCode < 300)\">\n \n \n \n \n \n \n \n = 400 && context.Response.StatusCode < 600)\">\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Failed to process the @(context.Api.Name)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n An unexpected error has occurred.\n \n \n
", + "$fxv#1": "openapi: 3.0.0\ninfo:\n description: Simple Todo API\n version: 3.0.0\n title: Simple Todo API\n contact:\n email: azdevteam@microsoft.com\n\ncomponents:\n schemas:\n TodoItem:\n type: object\n required:\n - listId\n - name\n - description\n description: A task that needs to be completed\n properties:\n id:\n type: string\n listId:\n type: string\n name:\n type: string\n description:\n type: string\n state:\n $ref: \"#/components/schemas/TodoState\"\n dueDate:\n type: string\n format: date-time\n completedDate:\n type: string\n format: date-time\n TodoList:\n type: object\n required:\n - name\n properties:\n id:\n type: string\n name:\n type: string\n description:\n type: string\n description: \" A list of related Todo items\"\n TodoState:\n type: string\n enum:\n - todo\n - inprogress\n - done\n parameters:\n listId:\n in: path\n required: true\n name: listId\n description: The Todo list unique identifier\n schema:\n type: string\n itemId:\n in: path\n required: true\n name: itemId\n description: The Todo item unique identifier\n schema:\n type: string\n state:\n in: path\n required: true\n name: state\n description: The Todo item state\n schema:\n $ref: \"#/components/schemas/TodoState\"\n top:\n in: query\n required: false\n name: top\n description: The max number of items to returns in a result\n schema:\n type: number\n default: 20\n skip:\n in: query\n required: false\n name: skip\n description: The number of items to skip within the results\n schema:\n type: number\n default: 0\n\n requestBodies:\n TodoList:\n description: The Todo List\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoList\"\n TodoItem:\n description: The Todo Item\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoItem\"\n\n responses:\n TodoList:\n description: A Todo list result\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoList\"\n TodoListArray:\n description: An array of Todo lists\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"#/components/schemas/TodoList\"\n TodoItem:\n description: A Todo item result\n content:\n application/json:\n schema:\n $ref: \"#/components/schemas/TodoItem\"\n TodoItemArray:\n description: An array of Todo items\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"#/components/schemas/TodoItem\"\n\npaths:\n /lists:\n get:\n operationId: GetLists\n summary: Gets an array of Todo lists\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoListArray\"\n post:\n operationId: CreateList\n summary: Creates a new Todo list\n tags:\n - Lists\n requestBody:\n $ref: \"#/components/requestBodies/TodoList\"\n responses:\n 201:\n $ref: \"#/components/responses/TodoList\"\n 400:\n description: Invalid request schema\n /lists/{listId}:\n get:\n operationId: GetListById\n summary: Gets a Todo list by unique identifier\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoList\"\n 404:\n description: Todo list not found\n put:\n operationId: UpdateListById\n summary: Updates a Todo list by unique identifier\n tags:\n - Lists\n requestBody:\n $ref: \"#/components/requestBodies/TodoList\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoList\"\n 404:\n description: Todo list not found\n 400:\n description: Todo list is invalid\n delete:\n operationId: DeleteListById\n summary: Deletes a Todo list by unique identifier\n tags:\n - Lists\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 204:\n description: Todo list deleted successfully\n 404:\n description: Todo list not found\n /lists/{listId}/items:\n post:\n operationId: CreateItem\n summary: Creates a new Todo item within a list\n tags:\n - Items\n requestBody:\n $ref: \"#/components/requestBodies/TodoItem\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n responses:\n 201:\n $ref: \"#/components/responses/TodoItem\"\n 404:\n description: Todo list not found\n get:\n operationId: GetItemsByListId\n summary: Gets Todo items within the specified list\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItemArray\"\n 404:\n description: Todo list not found\n /lists/{listId}/items/{itemId}:\n get:\n operationId: GetItemById\n summary: Gets a Todo item by unique identifier\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItem\"\n 404:\n description: Todo list or item not found\n put:\n operationId: UpdateItemById\n summary: Updates a Todo item by unique identifier\n tags:\n - Items\n requestBody:\n $ref: \"#/components/requestBodies/TodoItem\"\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItem\"\n 400:\n description: Todo item is invalid\n 404:\n description: Todo list or item not found\n delete:\n operationId: DeleteItemById\n summary: Deletes a Todo item by unique identifier\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/itemId\"\n responses:\n 204:\n description: Todo item deleted successfully\n 404:\n description: Todo list or item not found\n /lists/{listId}/items/state/{state}:\n get:\n operationId: GetItemsByListIdAndState\n summary: Gets a list of Todo items of a specific state\n tags:\n - Items\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/state\"\n - $ref: \"#/components/parameters/top\"\n - $ref: \"#/components/parameters/skip\"\n responses:\n 200:\n $ref: \"#/components/responses/TodoItemArray\"\n 404:\n description: Todo list or item not found\n put:\n operationId: UpdateItemsStateByListId\n summary: Changes the state of the specified list items\n tags:\n - Items\n requestBody:\n description: unique identifiers of the Todo items to update\n content:\n application/json:\n schema:\n type: array\n items:\n description: The Todo item unique identifier\n type: string\n parameters:\n - $ref: \"#/components/parameters/listId\"\n - $ref: \"#/components/parameters/state\"\n responses:\n 204:\n description: Todo items updated\n 400:\n description: Update request is invalid", "apiPolicyContent": "[replace(variables('$fxv#0'), '{origin}', parameters('webFrontendUrl'))]", "appNameForBicep": "[if(not(empty(parameters('apiAppName'))), parameters('apiAppName'), 'placeholderName')]" }, From d9383a99f9ddfbacdd9504475e2a24617876ae2e Mon Sep 17 00:00:00 2001 From: "Jianing Wang (WICRESOFT NORTH AMERICA LTD)" Date: Thu, 12 Sep 2024 14:03:11 +0800 Subject: [PATCH 3/3] remove --- .../actions/templates/avm-validateModuleDeployment/action.yml | 4 +--- .github/workflows/avm.template.module.yml | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/actions/templates/avm-validateModuleDeployment/action.yml b/.github/actions/templates/avm-validateModuleDeployment/action.yml index 44a9eb431c..715a2f642b 100644 --- a/.github/actions/templates/avm-validateModuleDeployment/action.yml +++ b/.github/actions/templates/avm-validateModuleDeployment/action.yml @@ -62,9 +62,7 @@ runs: - name: Azure Login uses: azure/login@v2 with: - client-id: ${{ env.AZURE_CLIENT_ID }} - tenant-id: ${{ env.AZURE_TENANT_ID }} - subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} + creds: ${{ env.AZURE_CREDENTIALS }} enable-AzPSSession: true # [Set Deployment Location] task(s) diff --git a/.github/workflows/avm.template.module.yml b/.github/workflows/avm.template.module.yml index 5655692284..4df961c68e 100644 --- a/.github/workflows/avm.template.module.yml +++ b/.github/workflows/avm.template.module.yml @@ -26,9 +26,6 @@ env: ARM_TENANT_ID: "${{ secrets.ARM_TENANT_ID }}" TOKEN_NAMEPREFIX: "${{ secrets.TOKEN_NAMEPREFIX }}" CI_KEY_VAULT_NAME: "${{ vars.CI_KEY_VAULT_NAME }}" - AZURE_CLIENT_ID: "${{ secrets.AZURE_CLIENT_ID }}" - AZURE_TENANT_ID: "${{ secrets.AZURE_TENANT_ID }}" - AZURE_SUBSCRIPTION_ID: "${{ secrets.AZURE_SUBSCRIPTION_ID }}" jobs: #########################