CLI で RegisterApplicationRevision を使用する - AWS SDK コードサンプル

AWS Doc SDK Examples GitHub リポジトリには、他にも用意されている AWS SDK サンプルがあります。

CLI で RegisterApplicationRevision を使用する

次のサンプルコードは、RegisterApplicationRevision を使用する方法を説明しています。

CLI
AWS CLI

アップロード済みのアプリケーションリビジョンに関する情報を登録するには

次の register-application-revision の例では、Amazon S3 に保存されているアップロード済みのアプリケーションリビジョンに関する情報を AWS CodeDeploy に登録しています。

aws deploy register-application-revision \ --application-name WordPress_App \ --description "Revised WordPress application" \ --s3-location bucket=amzn-s3-demo-bucket,key=RevisedWordPressApp.zip,bundleType=zip,eTag=cecc9b8a08eac650a6e71fdb88EXAMPLE

このコマンドでは何も出力されません。

  • API の詳細については、「AWS CLI コマンドリファレンス」の「RegisterApplicationRevision」を参照してください。

PowerShell
Tools for PowerShell V4

例 1: この例では、指定されたアプリケーションに対し、指定された Amazon S3 ロケーションでアプリケーションリビジョンを登録します。

Register-CDApplicationRevision -ApplicationName MyNewApplication -S3Location_Bucket amzn-s3-demo-bucket -S3Location_BundleType zip -S3Location_Key aws-codedeploy_linux-master.zip -Revision_RevisionType S3
  • API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス (V4)」の「RegisterApplicationRevision」を参照してください。

Tools for PowerShell V5

例 1: この例では、指定されたアプリケーションに対し、指定された Amazon S3 ロケーションでアプリケーションリビジョンを登録します。

Register-CDApplicationRevision -ApplicationName MyNewApplication -S3Location_Bucket amzn-s3-demo-bucket -S3Location_BundleType zip -S3Location_Key aws-codedeploy_linux-master.zip -Revision_RevisionType S3
  • API の詳細については、「AWS Tools for PowerShell コマンドレットリファレンス (V5)」の「RegisterApplicationRevision」を参照してください。