Skip to content

Commit

Permalink
Migrate TaskRun to ProxyResource. (#9953)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanwu authored Jul 28, 2020
1 parent e8679c7 commit c31ecb3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "taskRunName",
"in": "path",
"description": "The run request name.",
"required": true,
"type": "string"
"$ref": "#/parameters/TaskRunNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -768,11 +764,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "taskRunName",
"in": "path",
"description": "The name of task run.",
"required": true,
"type": "string"
"$ref": "#/parameters/TaskRunNameParameter"
},
{
"name": "taskRun",
Expand Down Expand Up @@ -831,11 +823,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "taskRunName",
"in": "path",
"description": "The task run name.",
"required": true,
"type": "string"
"$ref": "#/parameters/TaskRunNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -882,11 +870,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "taskRunName",
"in": "path",
"description": "The task run name.",
"required": true,
"type": "string"
"$ref": "#/parameters/TaskRunNameParameter"
},
{
"name": "updateParameters",
Expand Down Expand Up @@ -947,11 +931,7 @@
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "taskRunName",
"in": "path",
"description": "The run request name.",
"required": true,
"type": "string"
"$ref": "#/parameters/TaskRunNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1916,7 +1896,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "#/definitions/ProxyResource"
}
],
"properties": {
Expand All @@ -1928,6 +1908,10 @@
"$ref": "#/definitions/TaskRunProperties",
"description": "The properties associated with the task run, i.e., request and result of the run",
"x-ms-client-flatten": true
},
"location": {
"description": "The location of the resource",
"type": "string"
}
}
},
Expand Down Expand Up @@ -2028,6 +2012,10 @@
"description": "The properties for updating a task run.",
"x-ms-client-flatten": true
},
"location": {
"description": "The location of the resource",
"type": "string"
},
"tags": {
"description": "The ARM resource tags.",
"type": "object",
Expand Down Expand Up @@ -3602,6 +3590,17 @@
"minLength": 3,
"pattern": "^[a-zA-Z0-9-]*$",
"x-ms-parameter-location": "method"
},
"TaskRunNameParameter": {
"name": "taskRunName",
"in": "path",
"description": "The name of the task run.",
"required": true,
"type": "string",
"maxLength": 50,
"minLength": 5,
"pattern": "^[a-zA-Z0-9-]*$",
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"api-version": "2019-06-01-preview",
"taskRunName": "myRun",
"taskRun": {
"location": "westus",
"tags": {
"key": "value"
},
"properties": {
"forceUpdateTag": "test",
"runRequest": {
Expand Down Expand Up @@ -67,11 +63,7 @@
}
},
"id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "myrun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "myrun"
}
},
"201": {
Expand Down Expand Up @@ -114,11 +106,7 @@
}
},
"id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "myrun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "myrun"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
}
},
"id": "/subscriptions/3647315e-0c5b-4ce4-8739-b071e144b2c9/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "myRun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "myRun"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
}
},
"id": "/subscriptions/3647315e-0c5b-4ce4-8739-b071e144b2c9/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "myRun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "myRun"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@
}
},
"id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "mytestrun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "mytestrun"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@
}
},
"id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "mytestrun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "mytestrun"
}
},
"201": {
Expand Down Expand Up @@ -111,11 +107,7 @@
}
},
"id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/taskRuns/myRun",
"name": "mytestrun",
"tags": {
"key": "value"
},
"location": "WESTUS"
"name": "mytestrun"
}
}
}
Expand Down

0 comments on commit c31ecb3

Please sign in to comment.