From 3d8c703b8171eb9b26187f1bee60c618db1bb59a Mon Sep 17 00:00:00 2001 From: Mike Vu Date: Tue, 5 Apr 2022 18:28:22 -0700 Subject: [PATCH] Add List Secrets for Dapr Components (#18436) --- .../stable/2022-03-01/DaprComponents.json | 72 +++++++++++++++++++ .../examples/DaprComponents_ListSecrets.json | 24 +++++++ 2 files changed, 96 insertions(+) create mode 100644 specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/DaprComponents.json b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/DaprComponents.json index a2971b2befcb..e66984b2a170 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/DaprComponents.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/DaprComponents.json @@ -231,6 +231,59 @@ }, "x-ms-long-running-operation": false } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}/listSecrets": { + "post": { + "tags": [ + "DaprComponents" + ], + "summary": "List secrets for a dapr component", + "operationId": "DaprComponents_ListSecrets", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "environmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + }, + { + "name": "name", + "in": "path", + "description": "Name of the Dapr Component.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DaprSecretsCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List Container Apps Secrets": { + "$ref": "./examples/DaprComponents_ListSecrets.json" + } + } + } } }, "definitions": { @@ -333,6 +386,25 @@ "type": "string" } } + }, + "DaprSecretsCollection": { + "description": "Dapr component Secrets Collection ARM resource.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of secrets used by a Dapr component", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/Secret" + }, + "x-ms-identifiers": [ + "name" + ] + } + } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json new file mode 100644 index 000000000000..3d035869e98a --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", + "resourceGroupName": "examplerg", + "environmentName": "myenvironment", + "name": "reddog", + "api-version": "2022-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "secret1" + }, + { + "name": "secret2" + } + ] + } + } + } +}