Command Data Bag (aws_opsworks_command)
Important
The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers.
We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post
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 Chef::Log.info("********** The command's type is '#{command['type']}' **********") Chef::Log.info("********** The command was sent at '#{command['sent_at']}' **********") search("aws_opsworks_command").each do |command| Chef::Log.info("********** The command's type is '#{command['type']}' **********") Chef::Log.info("********** The command was sent at '#{command['sent_at']}' **********") end
- args
-
Arguments for the command (string).
- command_id
-
The command's random unique identifier, assigned by AWS OpsWorks Stacks (string).
- iam_user_arn
-
If the command is created by the customer, the Amazon Resource Name (ARN) of the user who created the command (string).
- instance_id
-
The identifier of the instance that the command was run on (string).
- sent_at
-
The timestamp of when AWS OpsWorks Stacks ran the command (string).
- type
-
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"
-