Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

cancel_command

cancel_command(**kwargs)

Attempts to cancel the command specified by the Command ID. There is no guarantee that the command will be terminated and the underlying process stopped.

See also: AWS API Documentation

Request Syntax

response = client.cancel_command(
    CommandId='string',
    InstanceIds=[
        'string',
    ]
)
Parameters
  • CommandId (string) --

    [REQUIRED]

    The ID of the command you want to cancel.

  • InstanceIds (list) --

    (Optional) A list of managed node IDs on which you want to cancel the command. If not provided, the command is canceled on every node on which it was requested.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

    Whether or not the command was successfully canceled. There is no guarantee that a request can be canceled.

Exceptions

  • SSM.Client.exceptions.InternalServerError
  • SSM.Client.exceptions.InvalidCommandId
  • SSM.Client.exceptions.InvalidInstanceId
  • SSM.Client.exceptions.DuplicateInstanceId