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

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

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

重要

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

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"