获取命名查询列表-ListNamedQueries

获取用户保存的SQL查询列表

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID,不填则为默认项目No
Limitint返回的SQL查询记录上限,默认值为20No
OffsetintSQL查询记录开始位置,默认值为0No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
RequeststringAPI请求IDNo
TotalCountint保存的SQL查询总数No
NamedQueriesarray保存的SQL查询集合No

NamedQuery

Parameter nameTypeDescriptionRequired
NamedQueryIdint已保存查询IDYes
QueryNamestring查询名称No
QueryDescriptionstring查询描述No
QueryStringstring查询SQL语句No
CreateTimeint查询创建时间No

Request Example

https://api.ucloud.cn/?Action=ListNamedQueries
&Region=cn-xxxx
&ProjectId=org-33511
&Limit=20
&Offset=0

Response Example

{
    "RetCode": 0,
    "Action": "ListNamedQueriesResponse",
    "Request": "2a7a6712-f837-4cb9-a33c-b81f37917ef3",
    "TotalCount": 1,
    "NamedQueries": [
        {
            "QueryId": 1,
            "QueryName": "named_sql",
            "QueryDescription": "yyyyyyyyyy",
            "QueryString": "SELECT * FROM xxxxxx;",
            "CreateTime": "2018-08-14T12:55:54.000+0000"
        }
    ]
}