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 GetDeploymentGroup
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanGetDeploymentGroup
.
- CLI
-
- AWS CLI
-
Untuk melihat informasi tentang grup penyebaran
get-deployment-group
Contoh berikut menampilkan informasi tentang grup penyebaran yang terkait dengan aplikasi yang ditentukan.aws deploy get-deployment-group \ --application-name
WordPress_App
\ --deployment-group-nameWordPress_DG
Output:
{ "deploymentGroupInfo": { "applicationName": "WordPress_App", "autoScalingGroups": [ "CodeDeployDemo-ASG" ], "deploymentConfigName": "CodeDeployDefault.OneAtATime", "ec2TagFilters": [ { "Type": "KEY_AND_VALUE", "Value": "CodeDeployDemo", "Key": "Name" } ], "deploymentGroupId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "serviceRoleArn": "arn:aws:iam::123456789012:role/CodeDeployDemoRole", "deploymentGroupName": "WordPress_DG" } }
-
Untuk detail API, lihat GetDeploymentGroup
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell
-
Contoh 1: Contoh ini mendapatkan informasi tentang grup penyebaran yang ditentukan.
Get-CDDeploymentGroup -ApplicationName CodeDeployDemoApplication -DeploymentGroupName CodeDeployDemoFleet
Output:
ApplicationName : CodeDeployDemoApplication AutoScalingGroups : {} DeploymentConfigName : CodeDeployDefault.OneAtATime DeploymentGroupId : 7d7c098a-b444-4b27-96ef-22791EXAMPLE DeploymentGroupName : CodeDeployDemoFleet Ec2TagFilters : {Name} OnPremisesInstanceTagFilters : {} ServiceRoleArn : arn:aws:iam::80398EXAMPLE:role/CodeDeploySampleStack-4ph6EX-CodeDeployTrustRole-O9MWP7XTL8EX TargetRevision : Amazon.CodeDeploy.Model.RevisionLocation
-
Untuk detail API, lihat GetDeploymentGroupdi Referensi Alat AWS untuk PowerShell Cmdlet.
-
GetDeploymentConfig
GetDeploymentInstance