Command Data Bag (aws_opsworks_command) - AWS OpsWorks

Command Data Bag (aws_opsworks_command)

Represents settings for a command that AWS OpsWorks Stacks runs on one or more instances.

The following example shows how to use Chef search to search through a single data bag item and then multiple data bag items to write messages to the Chef log with the commands' types and when they were sent:

command = search("aws_opsworks_command").first"********** The command's type is '#{command['type']}' **********")"********** The command was sent at '#{command['sent_at']}' **********") search("aws_opsworks_command").each do |command|"********** The command's type is '#{command['type']}' **********")"********** The command was sent at '#{command['sent_at']}' **********") end

Arguments for the command (string).


The command's random unique identifier, assigned by AWS OpsWorks Stacks (string).


If the command is created by the customer, the Amazon Resource Name (ARN) of the user who created the command (string).


The identifier of the instance that the command was run on (string).


The timestamp of when AWS OpsWorks Stacks ran the command (string).


The command's type (string). Valid values include:

  • "configure"

  • "deploy"

  • "deregister"

  • "execute_recipes"

  • "grant_remote_access"

  • "install_dependencies"

  • "restart"

  • "revoke_remote_access"

  • "rollback"

  • "setup"

  • "shutdown"

  • "start"

  • "stop"

  • "sync_remote_users"

  • "undeploy"

  • "update_agent"

  • "update_custom_cookbooks"

  • "update_dependencies"