Skip to content

Commit

Permalink
make dapr component a tracked resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslany committed Feb 1, 2022
1 parent a464ca0 commit 239268e
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,58 @@
}
},
"x-ms-long-running-operation": false
},
"patch": {
"tags": [
"DaprComponents"
],
"summary": "Update Dapr Component's properties.",
"description": "Patches a Dapr Component. Only patching of tags is supported currently",
"operationId": "DaprComponents_Update",
"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/DaprComponent"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"Patch Dapr Component": {
"$ref": "./examples/DaprComponents_Patch.json"
}
}
}
}
},
Expand Down Expand Up @@ -260,7 +312,7 @@
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource"
}
],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"name": "reddog",
"api-version": "2022-01-01-preview",
"daprComponentEnvelope": {
"location": "East US",
"properties": {
"componentType": "state.azure.cosmosdb",
"version": "v1",
Expand Down Expand Up @@ -47,6 +48,7 @@
"body": {
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog",
"name": "reddog",
"location": "East US",
"type": "Microsoft.App/managedEnvironments/daprcomponents",
"properties": {
"componentType": "state.azure.cosmosdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog",
"name": "reddog",
"type": "Microsoft.App/managedEnvironments/daprcomponents",
"location": "East US",
"properties": {
"componentType": "state.azure.cosmosdb",
"version": "v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprcomponents/reddog",
"name": "reddog",
"type": "Microsoft.App/managedEnvironments/daprcomponents",
"location": "East US",
"properties": {
"componentType": "state.azure.cosmosdb",
"version": "v1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"parameters": {
"subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9",
"resourceGroupName": "examplerg",
"environmentName": "myenvironment",
"name": "reddog",
"api-version": "2022-01-01-preview",
"daprComponentEnvelope": {
"tags": {
"tag1": "value1",
"tag2": "value2"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog",
"name": "reddog",
"location": "East US",
"type": "Microsoft.App/managedEnvironments/daprcomponents",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"componentType": "state.azure.cosmosdb",
"version": "v1",
"ignoreErrors": false,
"initTimeout": "50s",
"secrets": [
{
"name": "masterkey"
}
],
"metadata": [
{
"name": "url",
"value": "<COSMOS-URL>"
},
{
"name": "database",
"value": "itemsDB"
},
{
"name": "collection",
"value": "items"
},
{
"name": "masterkey",
"secretRef": "masterkey"
}
],
"scopes": [
"container-app-1",
"container-app-2"
]
}
}
}
}
}

0 comments on commit 239268e

Please sign in to comment.