小编给大家分享一下怎么使用DescribeCommands查询已经创建的云助手命令,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

DescribeCommands
请求参数

返回参数

数据集类型 CommandSetType

命令类型 CommandType

示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeCommands &RegionId=cn-hangzhou &<公共请求参数>
正常返回示例
XML 格式
<DescribeCommandsResponse>
<TotalCount>5</TotalCount>
<Commands>
<Command>
<Name>Test</Name>
<WorkingDir></WorkingDir>
<CommandContent>ZWNobyAxMjM=</CommandContent>
<Timeout>3600</Timeout>
<Type>RunShellScript</Type>
<CommandId>c-7d2a745b412b4601b2d47f6a768d3a14</CommandId>
<Description>test</Description>
</Command>
<Command>
<Name>Test1</Name>
<WorkingDir></WorkingDir>
<CommandContent>Y2QgL3Jvb3Q=</CommandContent>
<Timeout>3600</Timeout>
<Type>RunShellScript</Type>
<CommandId>c-7d2a745b412b4601b2d47f6a768d3a15</CommandId>
<Description>test1</Description>
</Command>
<Command>
<Name>Test2</Name>
<WorkingDir></WorkingDir>
<CommandContent>eXVtIHVwZGF0ZQ==</CommandContent>
<Timeout>3600</Timeout>
<Type>RunShellScript</Type>
<CommandId>c-7d2a745b412b4601b2d47f6a768d3a16</CommandId>
<Description>test2</Description>
</Command>
<Command>
<Name>Test3</Name>
<WorkingDir></WorkingDir>
<CommandContent>c2VydmljZSBuZ2lueCByZWxvYWQ=</CommandContent>
<Timeout>3600</Timeout>
<Type>RunShellScript</Type>
<CommandId>c-7d2a745b412b4601b2d47f6a768d3a17</CommandId>
<Description>test3</Description>
</Command>
<Command>
<Name>Test4</Name>
<WorkingDir></WorkingDir>
<CommandContent>bHM=</CommandContent>
<Timeout>120</Timeout>
<Type>RunShellScript</Type>
<CommandId>c-7d2a745b412b4601b2d47f6a768d3a18</CommandId>
<Description>test4</Description>
</Command>
<PageNumber>1</PageNumber>
<RequestId>E69EF3CC-94CD-42E7-8926-F133B86387C0</RequestId>
<PageSize>10</PageSize>
</DescribeCommandsResponse>JSON 格式
{
"TotalCount": 5,
"Commands": {
"Command": [
{
"Name": "Test",
"WorkingDir": "",
"CommandContent": "ZWNobyAxMjM=",
"Timeout": 3600,
"Type": "RunShellScript",
"CommandId": "c-7d2a745b412b4601b2d47f6a768d3a14",
"Description": "test"
},
{
"Name": "Test1",
"WorkingDir": "",
"CommandContent": "Y2QgL3Jvb3Q=",
"Timeout": 3600,
"Type": "RunShellScript",
"CommandId": "c-7d2a745b412b4601b2d47f6a768d3a15",
"Description": "test1"
},
{
"Name": "Test2",
"WorkingDir": "",
"CommandContent": "eXVtIHVwZGF0ZQ==",
"Timeout": 3600,
"Type": "RunShellScript",
"CommandId": "c-7d2a745b412b4601b2d47f6a768d3a16",
"Description": "test2"
},
{
"Name": "Test3",
"WorkingDir": "",
"CommandContent": "c2VydmljZSBuZ2lueCByZWxvYWQ=",
"Timeout": 3600,
"Type": "RunShellScript",
"CommandId": "c-7d2a745b412b4601b2d47f6a768d3a17",
"Description": "test3"
},
{
"Name": "Test4",
"WorkingDir": "",
"CommandContent": "bHM=",
"Timeout": 3600,
"Type": "RunShellScript",
"CommandId": "c-7d2a745b412b4601b2d47f6a768d3a18",
"Description": "test4"
},
]
},
"PageNumber": 1,
"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0",
"PageSize": 10
}异常返回示例
XML 格式
<Error>
<RequestId>E69EF3CC-94CD-42E7-8926-F133B86387C0</RequestId>
<HostId>ecs.aliyuncs.com</HostId>
<Code>MissingParameter.RegionId</Code>
<Message>The input parameter “RegionId” that is mandatory for processing this request is not supplied.</Message>
</Error>JSON 格式
{
"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0",
"HostId": "ecs.aliyuncs.com"
"Code": "MissingParameter.RegionId"
"Message": "The input parameter “RegionId” that is mandatory for processing this request is not supplied."
}错误码
以下为本接口特有的错误码。更多错误码,请访问 API 错误中心。

以上是怎么使用DescribeCommands查询已经创建的云助手命令的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联成都网站设计公司行业资讯频道!
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。