首頁 > 運維 > linux運維 > 主體

使用DescribeCommands查詢已經建立的雲端助理命令

坏嘻嘻
發布: 2018-09-27 14:26:47
原創
1907 人瀏覽過

本文在介紹使用DescribeCommands查詢已經建立的雲端助手指令的基礎上,重點探討了其具體步驟,本文內容緊湊,希望大家可以有所收穫。

DescribeCommands

#請求參數

使用DescribeCommands查詢已經建立的雲端助理命令

使用DescribeCommands查詢已經建立的雲端助理命令

使用DescribeCommands查詢已經建立的雲端助理命令

使用DescribeCommands查詢已經建立的雲端助理命令

# #傳回參數

資料集類型CommandSetType

命令類型CommandType

範例

##請求範例

https://ecs.aliyuncs.com/?Action=DescribeCommands
&RegionId=cn-hangzhou
&<公共请求参数>
登入後複製
正常傳回範例

XML 格式

使用DescribeCommands查詢已經建立的雲端助理命令

<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查詢已經建立的雲端助理命令的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板