View a markdown version of this page

AWS Service Catalog menyebarkan referensi tindakan - AWS CodePipeline

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

AWS Service Catalog menyebarkan referensi tindakan

Anda menggunakan AWS Service Catalog tindakan untuk menyebarkan template menggunakan pipeline Anda. Ini adalah template sumber daya yang telah Anda buat di Katalog Layanan.

Tipe tindakan

  • Kategori: Deploy

  • Pemilik: AWS

  • Penyedia: ServiceCatalog

  • Versi: 1

Parameter konfigurasi

TemplateFilePath

Wajib: Ya

Jalur file untuk template sumber daya Anda di lokasi sumber Anda.

ProductVersionName

Wajib: Ya

Versi produk di Katalog Layanan.

ProductType

Wajib: Ya

Jenis produk dalam Katalog Layanan.

ProductId

Wajib: Ya

ID produk di Katalog Layanan.

ProductVersionDescription

Wajib: Tidak

Deskripsi versi produk di Katalog Layanan.

Artefak masukan

  • Jumlah artefak: 1

  • Deskripsi: Ini adalah artefak masukan untuk tindakan Anda.

Artefak keluaran

  • Jumlah artefak: 0

  • Deskripsi: Artefak keluaran tidak berlaku untuk jenis tindakan ini.

Izin peran layanan: Tindakan Katalog Layanan

Untuk dukungan Katalog Layanan, tambahkan berikut ini ke pernyataan kebijakan Anda:

{ "Effect": "Allow", "Action": [ "servicecatalog:ListProvisioningArtifacts", "servicecatalog:CreateProvisioningArtifact", "servicecatalog:DescribeProvisioningArtifact", "servicecatalog:DeleteProvisioningArtifact", "servicecatalog:UpdateProduct" ], "Resource": "resource_ARN" }, { "Effect": "Allow", "Action": [ "cloudformation:ValidateTemplate" ], "Resource": "resource_ARN" }

Contoh konfigurasi tindakan berdasarkan jenis file konfigurasi

Contoh berikut menunjukkan konfigurasi yang valid untuk tindakan penerapan yang menggunakan Katalog Layanan, untuk pipeline yang dibuat di konsol tanpa file konfigurasi terpisah:

"configuration": { "TemplateFilePath": "S3_template.json", "ProductVersionName": "devops S3 v2", "ProductType": "CLOUD_FORMATION_TEMPLATE", "ProductVersionDescription": "Product version description", "ProductId": "prod-example123456" }

Contoh berikut menunjukkan konfigurasi yang valid untuk tindakan penerapan yang menggunakan Katalog Layanan, untuk pipeline yang dibuat di konsol dengan file sample_config.json konfigurasi terpisah:

"configuration": { "ConfigurationFilePath": "sample_config.json", "ProductId": "prod-example123456" }

Contoh konfigurasi tindakan

YAML
Name: ActionName ActionTypeId: Category: Deploy Owner: AWS Version: 1 Provider: ServiceCatalog OutputArtifacts: - Name: myOutputArtifact Configuration: TemplateFilePath: S3_template.json ProductVersionName: devops S3 v2 ProductType: CLOUD_FORMATION_TEMPLATE ProductVersionDescription: Product version description ProductId: prod-example123456
JSON
{ "Name": "ActionName", "ActionTypeId": { "Category": "Deploy", "Owner": "AWS", "Version": 1, "Provider": "ServiceCatalog" }, "OutputArtifacts": [ { "Name": "myOutputArtifact" } ], "Configuration": { "TemplateFilePath": "S3_template.json", "ProductVersionName": "devops S3 v2", "ProductType": "CLOUD_FORMATION_TEMPLATE", "ProductVersionDescription": "Product version description", "ProductId": "prod-example123456" } }

Sumber daya terkait berikut dapat membantu Anda saat Anda mengerjakan tindakan ini.