OpsWorks / Client / describe_commands

describe_commands#

OpsWorks.Client.describe_commands(**kwargs)#

Describes the results of specified commands.

Note

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.

See also: AWS API Documentation

Request Syntax

response = client.describe_commands(
    DeploymentId='string',
    InstanceId='string',
    CommandIds=[
        'string',
    ]
)
Parameters:
  • DeploymentId (string) – The deployment ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified deployment.

  • InstanceId (string) – The instance ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified instance.

  • CommandIds (list) –

    An array of command IDs. If you include this parameter, DescribeCommands returns a description of the specified commands. Otherwise, it returns a description of every command.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'Commands': [
        {
            'CommandId': 'string',
            'InstanceId': 'string',
            'DeploymentId': 'string',
            'CreatedAt': 'string',
            'AcknowledgedAt': 'string',
            'CompletedAt': 'string',
            'Status': 'string',
            'ExitCode': 123,
            'LogUrl': 'string',
            'Type': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    Contains the response to a DescribeCommands request.

    • Commands (list) –

      An array of Command objects that describe each of the specified commands.

      • (dict) –

        Describes a command.

        • CommandId (string) –

          The command ID.

        • InstanceId (string) –

          The ID of the instance where the command was executed.

        • DeploymentId (string) –

          The command deployment ID.

        • CreatedAt (string) –

          Date and time when the command was run.

        • AcknowledgedAt (string) –

          Date and time when the command was acknowledged.

        • CompletedAt (string) –

          Date when the command completed.

        • Status (string) –

          The command status:

          • failed

          • successful

          • skipped

          • pending

        • ExitCode (integer) –

          The command exit code.

        • LogUrl (string) –

          The URL of the command log.

        • Type (string) –

          The command type:

          • configure

          • deploy

          • execute_recipes

          • install_dependencies

          • restart

          • rollback

          • setup

          • start

          • stop

          • undeploy

          • update_custom_cookbooks

          • update_dependencies

Exceptions