Weitere AWS-SDK-Beispiele sind im GitHub-Repository Beispiele für AWS Doc SDKs
Verwendung von GetApplicationRevision mit einer CLI
Die folgenden Code-Beispiele zeigen, wie GetApplicationRevision verwendet wird.
- CLI
-
- AWS CLI
-
So rufen Sie Informationen zu einer Anwendungsrevision ab
Im folgenden
get-application-revision-Beispiel werden Informationen zu einer Anwendungsrevision angezeigt, die der angegebenen Anwendung zugeordnet ist.aws deploy get-application-revision \ --application-nameWordPress_App\ --s3-locationbucket=amzn-s3-demo-bucket,bundleType=zip,eTag=dd56cfdEXAMPLE8e768f9d77fEXAMPLE,key=WordPressApp.zipAusgabe:
{ "applicationName": "WordPress_App", "revisionInfo": { "description": "Application revision registered by Deployment ID: d-A1B2C3111", "registerTime": 1411076520.009, "deploymentGroups": "WordPress_DG", "lastUsedTime": 1411076520.009, "firstUsedTime": 1411076520.009 }, "revision": { "revisionType": "S3", "s3Location": { "bundleType": "zip", "eTag": "dd56cfdEXAMPLE8e768f9d77fEXAMPLE", "bucket": "amzn-s3-demo-bucket", "key": "WordPressApp.zip" } } }-
Weitere API-Informationen finden Sie unter GetApplicationRevision
in der AWS CLI-Befehlsreferenz.
-
- PowerShell
-
- Tools für PowerShell V4
-
Beispiel 1: In diesem Beispiel werden Informationen zur angegebenen Anwendungsrevision abgerufen.
$revision = Get-CDApplicationRevision -ApplicationName CodeDeployDemoApplication -S3Location_Bucket amzn-s3-demo-bucket -Revision_RevisionType S3 -S3Location_Key 5xd27EX.zip -S3Location_BundleType zip -S3Location_ETag 4565c1ac97187f190c1a90265EXAMPLE Write-Output ("Description = " + $revision.RevisionInfo.Description + ", RegisterTime = " + $revision.RevisionInfo.RegisterTime)Ausgabe:
Description = Application revision registered by Deployment ID: d-CX9CHN3EX, RegisterTime = 07/20/2015 23:46:42-
Weitere API-Informationen finden Sie unter GetApplicationRevision in der AWS -Tools für PowerShell-Cmdlet-Referenz (V4).
-
- Tools für PowerShell V5
-
Beispiel 1: In diesem Beispiel werden Informationen zur angegebenen Anwendungsrevision abgerufen.
$revision = Get-CDApplicationRevision -ApplicationName CodeDeployDemoApplication -S3Location_Bucket amzn-s3-demo-bucket -Revision_RevisionType S3 -S3Location_Key 5xd27EX.zip -S3Location_BundleType zip -S3Location_ETag 4565c1ac97187f190c1a90265EXAMPLE Write-Output ("Description = " + $revision.RevisionInfo.Description + ", RegisterTime = " + $revision.RevisionInfo.RegisterTime)Ausgabe:
Description = Application revision registered by Deployment ID: d-CX9CHN3EX, RegisterTime = 07/20/2015 23:46:42-
Weitere API-Informationen finden Sie unter GetApplicationRevision in der AWS -Tools für PowerShell-Cmdlet-Referenz (V5).
-