Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan GetDeploymentInstance
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanGetDeploymentInstance
.
- CLI
-
- AWS CLI
-
Untuk mendapatkan informasi tentang instance penerapan
get-deployment-instance
Contoh berikut menampilkan informasi tentang instance penyebaran yang terkait dengan penerapan yang ditentukan.aws deploy get-deployment-instance --deployment-id
d-QA4G4F9EX
--instance-idi-902e9fEX
Output:
{ "instanceSummary": { "instanceId": "arn:aws:ec2:us-east-1:80398EXAMPLE:instance/i-902e9fEX", "lifecycleEvents": [ { "status": "Succeeded", "endTime": 1408480726.569, "startTime": 1408480726.437, "lifecycleEventName": "ApplicationStop" }, { "status": "Succeeded", "endTime": 1408480728.016, "startTime": 1408480727.665, "lifecycleEventName": "DownloadBundle" }, { "status": "Succeeded", "endTime": 1408480729.744, "startTime": 1408480729.125, "lifecycleEventName": "BeforeInstall" }, { "status": "Succeeded", "endTime": 1408480730.979, "startTime": 1408480730.844, "lifecycleEventName": "Install" }, { "status": "Failed", "endTime": 1408480732.603, "startTime": 1408480732.1, "lifecycleEventName": "AfterInstall" }, { "status": "Skipped", "endTime": 1408480732.606, "lifecycleEventName": "ApplicationStart" }, { "status": "Skipped", "endTime": 1408480732.606, "lifecycleEventName": "ValidateService" } ], "deploymentId": "d-QA4G4F9EX", "lastUpdatedAt": 1408480733.152, "status": "Failed" } }
-
Untuk detail API, lihat GetDeploymentInstance
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini mendapatkan informasi tentang instance yang ditentukan untuk penerapan yang ditentukan.
Get-CDDeploymentInstance -DeploymentId d-QZMRGSTEX -InstanceId i-254e22EX
Output:
DeploymentId : d-QZMRGSTEX InstanceId : arn:aws:ec2:us-east-1:80398EXAMPLE:instance/i-254e22EX LastUpdatedAt : 7/23/2015 11:25:24 PM LifecycleEvents : {ApplicationStop, DownloadBundle, BeforeInstall, Install...} Status : Succeeded
-
Untuk detail API, lihat GetDeploymentInstancedi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini mendapatkan informasi tentang instance yang ditentukan untuk penerapan yang ditentukan.
Get-CDDeploymentInstance -DeploymentId d-QZMRGSTEX -InstanceId i-254e22EX
Output:
DeploymentId : d-QZMRGSTEX InstanceId : arn:aws:ec2:us-east-1:80398EXAMPLE:instance/i-254e22EX LastUpdatedAt : 7/23/2015 11:25:24 PM LifecycleEvents : {ApplicationStop, DownloadBundle, BeforeInstall, Install...} Status : Succeeded
-
Untuk detail API, lihat GetDeploymentInstancedi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-