IoT / Client / get_command

get_command#

IoT.Client.get_command(**kwargs)#

Gets information about the specified command.

See also: AWS API Documentation

Request Syntax

response = client.get_command(
    commandId='string'
)
Parameters:

commandId (string) –

[REQUIRED]

The unique identifier of the command for which you want to retrieve information.

Return type:

dict

Returns:

Response Syntax

{
    'commandId': 'string',
    'commandArn': 'string',
    'namespace': 'AWS-IoT'|'AWS-IoT-FleetWise',
    'displayName': 'string',
    'description': 'string',
    'mandatoryParameters': [
        {
            'name': 'string',
            'value': {
                'S': 'string',
                'B': True|False,
                'I': 123,
                'L': 123,
                'D': 123.0,
                'BIN': b'bytes',
                'UL': 'string'
            },
            'defaultValue': {
                'S': 'string',
                'B': True|False,
                'I': 123,
                'L': 123,
                'D': 123.0,
                'BIN': b'bytes',
                'UL': 'string'
            },
            'description': 'string'
        },
    ],
    'payload': {
        'content': b'bytes',
        'contentType': 'string'
    },
    'roleArn': 'string',
    'createdAt': datetime(2015, 1, 1),
    'lastUpdatedAt': datetime(2015, 1, 1),
    'deprecated': True|False,
    'pendingDeletion': True|False
}

Response Structure

  • (dict) –

    • commandId (string) –

      The unique identifier of the command.

    • commandArn (string) –

      The Amazon Resource Number (ARN) of the command. For example, arn:aws:iot:<region>:<accountid>:command/<commandId>

    • namespace (string) –

      The namespace of the command.

    • displayName (string) –

      The user-friendly name in the console for the command.

    • description (string) –

      A short text description of the command.

    • mandatoryParameters (list) –

      A list of parameters for the command created.

      • (dict) –

        A map of key-value pairs that describe the command.

        • name (string) –

          The name of a specific parameter used in a command and command execution.

        • value (dict) –

          The value used to describe the command. When you assign a value to a parameter, it will override any default value that you had already specified.

          • S (string) –

            An attribute of type String. For example:

            "S": "Hello"

          • B (boolean) –

            An attribute of type Boolean. For example:

            "BOOL": true

          • I (integer) –

            An attribute of type Integer (Thirty-Two Bits).

          • L (integer) –

            An attribute of type Long.

          • D (float) –

            An attribute of type Double (Sixty-Four Bits).

          • BIN (bytes) –

            An attribute of type Binary. For example:

            "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

          • UL (string) –

            An attribute of type unsigned long.

        • defaultValue (dict) –

          The default value used to describe the command. This is the value assumed by the parameter if no other value is assigned to it.

          • S (string) –

            An attribute of type String. For example:

            "S": "Hello"

          • B (boolean) –

            An attribute of type Boolean. For example:

            "BOOL": true

          • I (integer) –

            An attribute of type Integer (Thirty-Two Bits).

          • L (integer) –

            An attribute of type Long.

          • D (float) –

            An attribute of type Double (Sixty-Four Bits).

          • BIN (bytes) –

            An attribute of type Binary. For example:

            "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

          • UL (string) –

            An attribute of type unsigned long.

        • description (string) –

          The description of the command parameter.

    • payload (dict) –

      The payload object that you provided for the command.

      • content (bytes) –

        The static payload file for the command.

      • contentType (string) –

        The content type that specifies the format type of the payload file. This field must use a type/subtype format, such as application/json. For information about various content types, see Common MIME types.

    • roleArn (string) –

      The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.

    • createdAt (datetime) –

      The timestamp, when the command was created.

    • lastUpdatedAt (datetime) –

      The timestamp, when the command was last updated.

    • deprecated (boolean) –

      Indicates whether the command has been deprecated.

    • pendingDeletion (boolean) –

      Indicates whether the command is being deleted.

Exceptions