HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //lib/python3/dist-packages/awscli/examples/deploy/batch-get-deployment-targets.rst
**To retrieve the targets associated with a deployment**

The following ``batch-get-deployment-targets`` example returns information about one of the targets associated with the specified deployment. ::

    aws deploy batch-get-deployment-targets \
        --deployment-id "d-1A2B3C4D5" \
        --target-ids "i-01a2b3c4d5e6f1111"

Output::

    {
        "deploymentTargets": [
            {
                "deploymentTargetType": "InstanceTarget",
                "instanceTarget": {
                    "lifecycleEvents": [
                        {
                            "startTime": 1556918592.162,
                            "lifecycleEventName": "ApplicationStop",
                            "status": "Succeeded",
                            "endTime": 1556918592.247,
                            "diagnostics": {
                                "scriptName": "",
                                "errorCode": "Success",
                                "logTail": "",
                                "message": "Succeeded"
                            }
                        },
                        {
                            "startTime": 1556918593.193,
                            "lifecycleEventName": "DownloadBundle",
                            "status": "Succeeded",
                            "endTime": 1556918593.981,
                            "diagnostics": {
                                "scriptName": "",
                                "errorCode": "Success",
                                "logTail": "",
                                "message": "Succeeded"
                            }
                        },
                        {
                            "startTime": 1556918594.805,
                            "lifecycleEventName": "BeforeInstall",
                            "status": "Succeeded",
                            "endTime": 1556918681.807,
                            "diagnostics": {
                                "scriptName": "",
                                "errorCode": "Success",
                                "logTail": "",
                                "message": "Succeeded"
                            }
                        }
                    ],
                    "targetArn": "arn:aws:ec2:us-west-2:123456789012:instance/i-01a2b3c4d5e6f1111",
                    "deploymentId": "d-1A2B3C4D5",
                    "lastUpdatedAt": 1556918687.504,
                    "targetId": "i-01a2b3c4d5e6f1111",
                    "status": "Succeeded"
                }
            }
        ]
    }

For more information, see `BatchGetDeploymentTargets <https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_BatchGetDeploymentTargets.html>`_ in the *AWS CodeDeploy API Reference*.