Home  >  Article  >  Operation and Maintenance  >  Use DescribeCommands to query the created cloud assistant commands

Use DescribeCommands to query the created cloud assistant commands

坏嘻嘻
坏嘻嘻Original
2018-09-27 14:26:481895browse

This article introduces the use of DescribeCommands to query the created cloud assistant commands, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something.

DescribeCommands

Request Parameters

Use DescribeCommands to query the created cloud assistant commands

Return parameters

Use DescribeCommands to query the created cloud assistant commands

##Data set type CommandSetType

Use DescribeCommands to query the created cloud assistant commands

Command TypeCommandType

Use DescribeCommands to query the created cloud assistant commands

Example

Request Example

https://ecs.aliyuncs.com/?Action=DescribeCommands
&RegionId=cn-hangzhou
&<公共请求参数>

Normal return example

XML format

<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 format

{
    "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
}

Exception return example

XML format

<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 format

{
    "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."
}

Error codes

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

Use DescribeCommands to query the created cloud assistant commands

The above is the detailed content of Use DescribeCommands to query the created cloud assistant commands. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn