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', 'type': 'STRING'|'INTEGER'|'DOUBLE'|'LONG'|'UNSIGNEDLONG'|'BOOLEAN'|'BINARY', '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' }, 'valueConditions': [ { 'comparisonOperator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'LESS_THAN_EQUALS'|'GREATER_THAN'|'GREATER_THAN_EQUALS'|'IN_SET'|'NOT_IN_SET'|'IN_RANGE'|'NOT_IN_RANGE', 'operand': { 'number': 'string', 'numbers': [ 'string', ], 'string': 'string', 'strings': [ 'string', ], 'numberRange': { 'min': 'string', 'max': 'string' } } }, ], 'description': 'string' }, ], 'payload': { 'content': b'bytes', 'contentType': 'string' }, 'payloadTemplate': 'string', 'preprocessor': { 'awsJsonSubstitution': { 'outputFormat': 'JSON'|'CBOR' } }, '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.
type (string) –
The type of the command parameter.
value (dict) –
Parameter value that overrides the default value, if set.
S (string) –
An attribute of type String. For example:
"S": "Hello"B (boolean) –
An attribute of type Boolean. For example:
"BOOL": trueI (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": trueI (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.
valueConditions (list) –
The list of conditions that a command parameter value must satisfy to create a command execution.
(dict) –
A condition for the command parameter that must be evaluated to true for successful creation of a command execution.
comparisonOperator (string) –
The comparison operator for the command parameter.
Note
IN_RANGE, and NOT_IN_RANGE operators include boundary values.
operand (dict) –
The comparison operand for the command parameter.
number (string) –
An operand of number value type, defined as a string.
numbers (list) –
A List of operands of numerical value type, defined as strings.
(string) –
string (string) –
An operand of string value type.
strings (list) –
A List of operands of string value type.
(string) –
numberRange (dict) –
An operand of numerical range value type.
min (string) –
The minimum value of a numerical range of a command parameter value.
max (string) –
The maximum value of a numerical range of a command parameter value.
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.
payloadTemplate (string) –
The payload template for the dynamic command.
preprocessor (dict) –
Configuration that determines how
payloadTemplateis processed to generate command execution payload.awsJsonSubstitution (dict) –
Configuration for the JSON substitution preprocessor.
outputFormat (string) –
Converts the command preprocessor result to the format defined by this parameter, before sending it to the device.
roleArn (string) –
The IAM role that you provided when creating the command with
AWS-IoT-FleetWiseas 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