Querying Action Template Details
Functions
Queries action templates by name.
Request Syntax
GET /v2/actiontemplates/{template_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com
Authorization: authorization
Content-Type: application/json
Content-Length: length
Date: date
Request parameters
|
Parameter |
Mandatory |
Type |
Description |
Constraints |
|---|---|---|---|---|
|
template_name |
Yes |
String |
Action template name. The default enumerated value is: Table 8. |
The name should start with a letter or digit, and contain a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
Request Headers
This request uses common headers. For details, see Table 3.
Request Elements
This request involves no elements.
Response Syntax
HTTP/1.1 status_code Date: date Content-Length: length X-Request-ID: obs request id json body
Response Headers
The response to the request uses common headers. For details, see Table 1.
Response Elements
|
Parameter |
Type |
Description |
|---|---|---|
|
provided_actions |
Array of ProvidedAction |
List of available actions. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Action template name. |
|
category |
Yes |
String |
Category. |
|
create_time |
Yes |
String |
Time when a dataset is created |
|
last_modify_time |
No |
String |
Last modification time |
|
function_template |
Yes |
String |
Function URN. |
|
inputs |
No |
Array of Input |
List of parameter definitions that can be modified. |
|
dynamic_source_definition |
Yes |
Map |
Modifiable parameter references. |
|
need_policy |
Yes |
Required permission. |
|
|
provider |
Yes |
String |
Provider |
|
description |
No |
String |
Indicates the parameter group description. |
|
Parameter |
Type |
Description |
|---|---|---|
|
version |
String |
Permission version number.
|
|
statement |
Array of Statement |
Authorization statement, which describes the specific content of a permission. |
|
Parameter |
Type |
Description |
|---|---|---|
|
action |
Array String |
Action Permissions for performing operations on resources. A maximum of 100 permissions are allowed.
|
|
resource |
Array String |
Resources The array contains a maximum of 10 values, and each value can not exceed 128 characters. The rules are as follows:
|
Error Responses
No special error responses are returned. For details about error responses, see Table 2.
Sample Request
GET /v2/actiontemplates/{template_name} HTTP/1.1
Host: obs.cn-north-4.myhuaweicloud.com
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Content-Type: application/json
Content-Length: 0
Date: Thu, 27 Aug 2020 12:38:10 GMT
Sample Response
HTTP/1.1 200 OK
Date: Thu, 27 Aug 2020 12:38:10 GMT
Content-Length: 0
Content-Type: application/json
X-Request-ID: 6a63a18b8bab40ffb71ebd9cb80d0085
{
"provided_actions": {
"created_time": "<timestamp>",
"last_modify_time": "<timestamp>",
"name": "<template_name>",
"category": "<category>",
"provider_domainid": "<domainid>",
"provider_userid": "<userid>",
"provider_name": "<name>",
"function_template": "urn:fss:cn-north-5:3f1e6caf808246c68457e660e4bfeb2f:function:default:test",
"inputs": [{
"parameter_name": "param1",
"default": "TCP",
"type": "string",
"label": "action1",
"constraints": {
"valid_values": ["TCP", "UDP"]
},
"invisible": true,
"description": "description param1"
}],
"dynamic_source_definition": {
"param1": {
"get_input": "$.inputs.param1"
},
"param2": {
"get_input": "$.inputs.param2"
}
},
"need_policy": {
"version": "1.1",
"statement": [{
"action": [
"FunctionGraph:function:invokeAsync",
"FunctionGraph:function:invoke",
"FunctionGraph:function:updateCode",
"FunctionGraph:function:updateConfig",
"FunctionGraph:function:create",
"FunctionGraph:function:getConfig",
"FunctionGraph:function:getCode"
],
"resource": ["FunctionGraph:*:*:function:*"]
}, {
"action": ["MPC:*:*:mpc:*"]
}]
},
"description": ""
}
}
Last Article: Querying Authorized Roles
Next Article: Querying the Action List
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.