Doc AWS SDK Examples GitHub リポジトリには、他にも SDK の例があります。 AWS
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
次のサンプルコードは、CreatePipeline
を使用する方法を説明しています。
- AWS CLI
-
パイプラインを作成するには
この例では、パイプラインの構造を含む作成済みの JSON ファイル (ここでは AWS CodePipeline でパイプラインを作成します。 MySecondPipeline.json) ファイルの構造など、パイプラインを作成するための要件の詳細については、 AWS CodePipeline ユーザーガイドを参照してください。
コマンド:
aws codepipeline create-pipeline --cli-input-json
file://MySecondPipeline.json
JSON ファイルのサンプルの内容:
{ "pipeline": { "roleArn": "arn:aws:iam::111111111111:role/AWS-CodePipeline-Service", "stages": [ { "name": "Source", "actions": [ { "inputArtifacts": [], "name": "Source", "actionTypeId": { "category": "Source", "owner": "AWS", "version": "1", "provider": "S3" }, "outputArtifacts": [ { "name": "MyApp" } ], "configuration": { "S3Bucket": "awscodepipeline-demo-bucket", "S3ObjectKey": "aws-codepipeline-s3-aws-codedeploy_linux.zip" }, "runOrder": 1 } ] }, { "name": "Beta", "actions": [ { "inputArtifacts": [ { "name": "MyApp" } ], "name": "CodePipelineDemoFleet", "actionTypeId": { "category": "Deploy", "owner": "AWS", "version": "1", "provider": "CodeDeploy" }, "outputArtifacts": [], "configuration": { "ApplicationName": "CodePipelineDemoApplication", "DeploymentGroupName": "CodePipelineDemoFleet" }, "runOrder": 1 } ] } ], "artifactStore": { "type": "S3", "location": "codepipeline-us-east-1-11EXAMPLE11" }, "name": "MySecondPipeline", "version": 1 } }
出力:
This command returns the structure of the pipeline.
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreatePipeline
」を参照してください。
-