コマンドデータバッグ (aws_opsworks_command) - AWS OpsWorks

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

コマンドデータバッグ (aws_opsworks_command)

重要

AWS OpsWorks Stacks は新規顧客を受け付けなくなりました。既存のお客様は、2024 年 5 月 26 日までは OpsWorks コンソール、 API、 CLI、および CloudFormation リソースを通常どおり使用できますが、その時点でこれらのリソースは廃止されます。この移行に備えて、できるだけ早くスタックを AWS Systems Manager に移行することをおすすめします。詳細については、AWS OpsWorks Stacks サポート終了に関する FAQ および AWS Systems Manager アプリケーションマネージャへの AWS OpsWorks Stacks アプリケーションの移行 を参照してください。

1 つ以上のインスタンスで AWS OpsWorks スタックが実行するコマンドの設定を表します。

以下の例は、Chef 検索を使用して単一のデータバッグ項目を通じて検索を実行し、次に複数のデータバッグ項目を使用して、コマンドのタイプと送信されるタイミングとともに Chef ログにメッセージを書き込む方法を示しています。

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

コマンドの引数 (文字列)。

command_id

AWS OpsWorks スタックによって割り当てられる、コマンドのランダムな一意の識別子 (文字列)。

iam_user_arn

コマンドがユーザーによって作成された場合、コマンドを作成したユーザーの Amazon リソース名 (ARN) (文字列)。

instance_id

コマンドが実行されたインスタンスの識別子 (文字列)。

sent_at

AWS OpsWorks スタックがコマンドを実行したときのタイムスタンプ (文字列)。

type

コマンドのタイプ (文字列)。有効な値を次に示します。

  • "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"