

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

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

# CloudFormation contoh menggunakan AWS CLI
<a name="cli_2_cloudformation_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan AWS Command Line Interface with CloudFormation.

*Tindakan* merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

**Topics**
+ [Tindakan](#actions)

## Tindakan
<a name="actions"></a>

### `activate-type`
<a name="cloudformation_ActivateType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`activate-type`.

**AWS CLI**  
**Untuk mengaktifkan tipe**  
`activate-type`Contoh berikut mengaktifkan ekstensi pihak ketiga publik, membuatnya tersedia untuk digunakan dalam template tumpukan.  

```
aws cloudformation activate-type \
    --region us-west-2 \
    --type RESOURCE \
    --type-name Example::Test::1234567890abcdef0 \
    --type-name-alias Example::Test::Alias
```
Output:  

```
{
    "Arn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/Example-Test-Alias"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ActivateType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/activate-type.html)di *Referensi AWS CLI Perintah*. 

### `batch-describe-type-configurations`
<a name="cloudformation_BatchDescribeTypeConfigurations_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`batch-describe-type-configurations`.

**AWS CLI**  
**Untuk menggambarkan konfigurasi tipe secara batch**  
`batch-describe-type-configurations`Contoh berikut mengkonfigurasi data untuk tipe.  

```
aws cloudformation batch-describe-type-configurations \
    --region us-west-2 \
    --type-configuration-identifiers TypeArn="arn:aws:cloudformation:us-west-2:123456789012:type/resource/Example-Test-Type,TypeConfigurationAlias=MyConfiguration"
```
Output:  

```
{
    "Errors": [],
    "UnprocessedTypeConfigurations": [],
    "TypeConfigurations": [
        {
            "Arn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/Example-Test-Type",
            "Alias": "MyConfiguration",
            "Configuration": "{\n        \"Example\": {\n            \"ApiKey\": \"examplekey\",\n            \"ApplicationKey\": \"examplekey1\",\n            \"ApiURL\": \"exampleurl\"\n            }\n}",
            "LastUpdated": "2021-10-01T15:25:46.210000+00:00",
            "TypeArn": "arn:aws:cloudformation:us-east-1:123456789012:type/resource/Example-Test-Type"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [BatchDescribeTypeConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/batch-describe-type-configurations.html)di *Referensi AWS CLI Perintah*. 

### `cancel-update-stack`
<a name="cloudformation_CancelUpdateStack_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`cancel-update-stack`.

**AWS CLI**  
**Untuk membatalkan pembaruan tumpukan yang sedang berlangsung**  
`cancel-update-stack`Perintah berikut membatalkan pembaruan tumpukan pada `myteststack` tumpukan:  

```
aws cloudformation cancel-update-stack --stack-name myteststack
```
+  Untuk detail API, lihat [CancelUpdateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/cancel-update-stack.html)di *Referensi AWS CLI Perintah*. 

### `continue-update-rollback`
<a name="cloudformation_ContinueUpdateRollback_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`continue-update-rollback`.

**AWS CLI**  
**Untuk mencoba kembali rollback pembaruan**  
`continue-update-rollback`Contoh berikut melanjutkan operasi rollback dari pembaruan tumpukan yang sebelumnya gagal.  

```
aws cloudformation continue-update-rollback \
    --stack-name my-stack
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [ContinueUpdateRollback](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/continue-update-rollback.html)di *Referensi AWS CLI Perintah*. 

### `create-change-set`
<a name="cloudformation_CreateChangeSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-change-set`.

**AWS CLI**  
**Untuk membuat set perubahan**  
`create-change-set`Contoh berikut membuat set perubahan dengan `CAPABILITY_IAM` kemampuan. File `template.yaml` adalah AWS CloudFormation template di folder saat ini yang mendefinisikan tumpukan yang menyertakan sumber daya IAM.  

```
aws cloudformation create-change-set \
    --stack-name my-application \
    --change-set-name my-change-set \
    --template-body file://template.yaml \
    --capabilities CAPABILITY_IAM
```
Output:  

```
{
    "Id": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/bc9555ba-a949-xmpl-bfb8-f41d04ec5784",
    "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-application/d0a825a0-e4cd-xmpl-b9fb-061c69e99204"
}
```
+  Untuk detail API, lihat [CreateChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-change-set.html)di *Referensi AWS CLI Perintah*. 

### `create-generated-template`
<a name="cloudformation_CreateGeneratedTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-generated-template`.

**AWS CLI**  
**Untuk membuat template yang dihasilkan dari sumber daya yang dipindai**  
`create-generated-template`Contoh berikut membuat template yang dihasilkan bernama `MyTemplate` dari sumber daya yang dipindai.  

```
aws cloudformation create-generated-template \
    --generated-template-name MyTemplate \
    --resources file://resources.json
```
Isi dari `resources.json`:  

```
[
    {
        "ResourceType": "AWS::EKS::Cluster",
        "LogicalResourceId":"MyCluster",
        "ResourceIdentifier": {
            "ClusterName": "MyAppClusterName"
        }
    },
    {
        "ResourceType": "AWS::AutoScaling::AutoScalingGroup",
        "LogicalResourceId":"MyASG",
        "ResourceIdentifier": {
            "AutoScalingGroupName": "MyAppASGName"
        }
    },
    {
        "ResourceType": "AWS::EKS::Nodegroup",
        "LogicalResourceId":"MyNodegroup",
        "ResourceIdentifier": {
            "NodegroupName": "MyAppNodegroupName"
        }
    },
    {
        "ResourceType": "AWS::IAM::Role",
        "LogicalResourceId":"MyRole",
        "ResourceIdentifier": {
            "RoleId": "arn:aws::iam::123456789012:role/MyAppIAMRole"
        }
    }
]
```
Output:  

```
{
  "Arn":
    "arn:aws:cloudformation:us-east-1:123456789012:generatedtemplate/7fc8512c-d8cb-4e02-b266-d39c48344e48",
  "Name": "MyTemplate"
}
```
Untuk informasi selengkapnya, lihat [Membuat CloudFormation templat dari sumber daya yang dipindai dengan generator IAc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html) di *AWS CloudFormation Panduan Pengguna*.  
+  Untuk detail API, lihat [CreateGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-generated-template.html)di *Referensi AWS CLI Perintah*. 

### `create-stack-instances`
<a name="cloudformation_CreateStackInstances_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-stack-instances`.

**AWS CLI**  
**Untuk membuat instance tumpukan**  
`create-stack-instances`Contoh berikut membuat instance dari tumpukan yang disetel dalam dua akun dan di empat wilayah. Pengaturan toleransi kesalahan memastikan bahwa pembaruan dicoba di semua akun dan wilayah, bahkan jika beberapa tumpukan tidak dapat dibuat.  

```
aws cloudformation create-stack-instances \
    --stack-set-name my-stack-set \
    --accounts 123456789012 223456789012 \
    --regions us-east-1 us-east-2 us-west-1 us-west-2 \
    --operation-preferences FailureToleranceCount=7
```
Output:  

```
{
    "OperationId": "d7995c31-83c2-xmpl-a3d4-e9ca2811563f"
}
```
Untuk membuat set tumpukan, gunakan `create-stack-set` perintah.  
+  Untuk detail API, lihat [CreateStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-instances.html)di *Referensi AWS CLI Perintah*. 

### `create-stack-refactor`
<a name="cloudformation_CreateStackRefactor_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-stack-refactor`.

**AWS CLI**  
**Untuk membuat definisi tumpukan untuk operasi refactor tumpukan**  
`create-stack-refactor`Contoh berikut menciptakan definisi stack untuk stack refactoring.  

```
aws cloudformation create-stack-refactor \
    --stack-definitions \
      StackName=Stack1,TemplateBody@=file://template1-updated.yaml \
      StackName=Stack2,TemplateBody@=file://template2-updated.yaml
```
Output:  

```
{
    "StackRefactorId": "9c384f70-4e07-4ed7-a65d-fee5eb430841"
}
```
*Untuk informasi selengkapnya, lihat [Stack refactoring](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html) di Panduan Pengguna.AWS CloudFormation *  
+  Untuk detail API, lihat [CreateStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-refactor.html)di *Referensi AWS CLI Perintah*. 

### `create-stack-set`
<a name="cloudformation_CreateStackSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-stack-set`.

**AWS CLI**  
**Untuk membuat set tumpukan**  
`create-stack-set`Contoh berikut membuat kumpulan tumpukan menggunakan temlplate file YAMM yang ditentukan. `template.yaml`adalah AWS CloudFormation template di folder saat ini yang mendefinisikan tumpukan.  

```
aws cloudformation create-stack-set \
    --stack-set-name my-stack-set \
    --template-body file://template.yaml \
    --description "SNS topic"
```
Output:  

```
{
    "StackSetId": "my-stack-set:8d0f160b-d157-xmpl-a8e6-c0ce8e5d8cc1"
}
```
Untuk menambahkan instance tumpukan ke set tumpukan, gunakan `create-stack-instances` perintah.  
+  Untuk detail API, lihat [CreateStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-set.html)di *Referensi AWS CLI Perintah*. 

### `create-stack`
<a name="cloudformation_CreateStack_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-stack`.

**AWS CLI**  
**Untuk membuat AWS CloudFormation tumpukan**  
`create-stacks`Perintah berikut membuat tumpukan dengan nama `myteststack` menggunakan `sampletemplate.json` template:  

```
aws cloudformation create-stack --stack-name myteststack --template-body file://sampletemplate.json --parameters ParameterKey=KeyPairName,ParameterValue=TestKey ParameterKey=SubnetIDs,ParameterValue=SubnetID1\\,SubnetID2
```
Output:  

```
{
    "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896"
}
```
Untuk informasi selengkapnya, lihat Tumpukan di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [CreateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack.html)di *Referensi AWS CLI Perintah*. 

### `deactivate-type`
<a name="cloudformation_DeactivateType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`deactivate-type`.

**AWS CLI**  
**Untuk menonaktifkan tipe**  
`deactivate-type`Contoh berikut menonaktifkan ekstensi publik yang sebelumnya diaktifkan di akun dan Wilayah ini.  

```
aws cloudformation deactivate-type \
    --region us-west-2 \
    --type MODULE \
    --type-name Example::Test::Type::MODULE
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DeactivateType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deactivate-type.html)di *Referensi AWS CLI Perintah*. 

### `delete-change-set`
<a name="cloudformation_DeleteChangeSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-change-set`.

**AWS CLI**  
**Untuk menghapus set perubahan**  
`delete-change-set`Contoh berikut menghapus set perubahan dengan menentukan nama set perubahan dan nama tumpukan.  

```
aws cloudformation delete-change-set \
    --stack-name my-stack \
    --change-set-name my-change-set
```
Perintah ini tidak menghasilkan output.  
`delete-change-set`Contoh berikut menghapus set perubahan dengan menentukan ARN lengkap dari set perubahan.  

```
aws cloudformation delete-change-set \
    --change-set-name arn:aws:cloudformation:us-east-2:123456789012:changeSet/my-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [DeleteChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-change-set.html)di *Referensi AWS CLI Perintah*. 

### `delete-generated-template`
<a name="cloudformation_DeleteGeneratedTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-generated-template`.

**AWS CLI**  
**Untuk menghapus template yang dihasilkan**  
`delete-generated-template`Contoh berikut menghapus template yang ditentukan.  

```
aws cloudformation delete-generated-template \
    --generated-template-name MyTemplate
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Membuat templat dari sumber daya yang ada](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DeleteGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-generated-template.html)di *Referensi AWS CLI Perintah*. 

### `delete-stack-instances`
<a name="cloudformation_DeleteStackInstances_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-stack-instances`.

**AWS CLI**  
**Untuk menghapus instance tumpukan**  
`delete-stack-instances`Contoh berikut menghapus instance tumpukan yang disetel dalam dua akun di dua wilayah dan mengakhiri tumpukan.  

```
aws cloudformation delete-stack-instances \
    --stack-set-name my-stack-set \
    --accounts 123456789012 567890123456 \
    --regions us-east-1 us-west-1 \
    --no-retain-stacks
```
Output:  

```
{
    "OperationId": "ad49f10c-fd1d-413f-a20a-8de6e2fa8f27"
}
```
Untuk menghapus kumpulan tumpukan kosong, gunakan `delete-stack-set` perintah.  
+  Untuk detail API, lihat [DeleteStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack-instances.html)di *Referensi AWS CLI Perintah*. 

### `delete-stack-set`
<a name="cloudformation_DeleteStackSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-stack-set`.

**AWS CLI**  
**Untuk menghapus set tumpukan**  
Perintah berikut menghapus set tumpukan kosong yang ditentukan. Set tumpukan harus kosong.  

```
aws cloudformation delete-stack-set \
    --stack-set-name my-stack-set
```
Perintah ini tidak menghasilkan output.  
Untuk menghapus instance dari kumpulan tumpukan, gunakan `delete-stack-instances` perintah.  
+  Untuk detail API, lihat [DeleteStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack-set.html)di *Referensi AWS CLI Perintah*. 

### `delete-stack`
<a name="cloudformation_DeleteStack_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-stack`.

**AWS CLI**  
**Untuk menghapus tumpukan**  
`delete-stack`Contoh berikut menghapus tumpukan yang ditentukan.  

```
aws cloudformation delete-stack \
    --stack-name my-stack
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [DeleteStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack.html)di *Referensi AWS CLI Perintah*. 

### `deploy`
<a name="cloudformation_Deploy_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`deploy`.

**AWS CLI**  
Berikut perintah menyebarkan template bernama `template.json` ke tumpukan bernama`my-new-stack`:  

```
aws cloudformation deploy --template-file /path_to_template/template.json --stack-name my-new-stack --parameter-overrides Key1=Value1 Key2=Value2 --tags Key1=Value1 Key2=Value2
```
+  Untuk detail API, lihat [Menerapkan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy.html) di *Referensi AWS CLI Perintah*. 

### `deregister-type`
<a name="cloudformation_DeregisterType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`deregister-type`.

**AWS CLI**  
**Untuk membatalkan pendaftaran versi tipe**  
`deregister-type`Contoh berikut menghapus versi tipe yang ditentukan dari penggunaan aktif dalam CloudFormation registri, sehingga tidak dapat lagi digunakan dalam CloudFormation operasi.  

```
aws cloudformation deregister-type \
    --type RESOURCE \
    --type-name My::Logs::LogGroup \
    --version-id 00000002
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DeregisterType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deregister-type.html)di *Referensi AWS CLI Perintah*. 

### `describe-account-limits`
<a name="cloudformation_DescribeAccountLimits_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-account-limits`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang batas akun Anda**  
Perintah berikut mengambil daftar batas regional untuk akun saat ini.  

```
aws cloudformation describe-account-limits
```
Output:  

```
{
    "AccountLimits": [
        {
            "Name": "StackLimit",
            "Value": 200
        },
        {
            "Name": "StackOutputsLimit",
            "Value": 60
        },
        {
            "Name": "ConcurrentResourcesLimit",
            "Value": 2500
        }
    ]
}
```
+  Untuk detail API, lihat [DescribeAccountLimits](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-account-limits.html)di *Referensi AWS CLI Perintah*. 

### `describe-change-set`
<a name="cloudformation_DescribeChangeSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-change-set`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang set perubahan**  
`describe-change-set`Contoh berikut menampilkan rincian dari set perubahan yang ditentukan oleh nama set perubahan dan nama stack.  

```
aws cloudformation describe-change-set \
    --change-set-name my-change-set \
    --stack-name my-stack
```
`describe-change-set`Contoh berikut menampilkan rincian set perubahan yang ditentukan oleh ARN lengkap dari set perubahan:  

```
aws cloudformation describe-change-set \
    --change-set-name arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/bc9555ba-a949-xmpl-bfb8-f41d04ec5784
```
Output:  

```
{
    "Changes": [
        {
            "Type": "Resource",
            "ResourceChange": {
                "Action": "Modify",
                "LogicalResourceId": "function",
                "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
                "ResourceType": "AWS::Lambda::Function",
                "Replacement": "False",
                "Scope": [
                    "Properties"
                ],
                "Details": [
                    {
                        "Target": {
                            "Attribute": "Properties",
                            "Name": "Timeout",
                            "RequiresRecreation": "Never"
                        },
                        "Evaluation": "Static",
                        "ChangeSource": "DirectModification"
                    }
                ]
            }
        }
    ],
    "ChangeSetName": "my-change-set",
    "ChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0",
    "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
    "StackName": "my-stack",
    "Description": null,
    "Parameters": null,
    "CreationTime": "2019-10-02T05:20:56.651Z",
    "ExecutionStatus": "AVAILABLE",
    "Status": "CREATE_COMPLETE",
    "StatusReason": null,
    "NotificationARNs": [],
    "RollbackConfiguration": {},
    "Capabilities": [
        "CAPABILITY_IAM"
    ],
    "Tags": null
}
```
+  Untuk detail API, lihat [DescribeChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-change-set.html)di *Referensi AWS CLI Perintah*. 

### `describe-generated-template`
<a name="cloudformation_DescribeGeneratedTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-generated-template`.

**AWS CLI**  
**Untuk menggambarkan template yang dihasilkan**  
`describe-generated-template`Contoh berikut menjelaskan template yang ditentukan.  

```
aws cloudformation describe-generated-template \
    --generated-template-name MyTemplate
```
Output:  

```
{
    "GeneratedTemplateId": "arn:aws:cloudformation:us-east-1:123456789012:generatedTemplate/7d881acf-f307-4ded-910e-f8fb49b96894",
    "GeneratedTemplateName": "MyTemplate",
    "Resources": [
        {
            "ResourceType": "AWS::EC2::SecurityGroup",
            "LogicalResourceId": "EC2SecurityGroup",
            "ResourceIdentifier": {
                "Id": "sg-1234567890abcdef0"
            },
            "ResourceStatus": "COMPLETE",
            "ResourceStatusReason": "Resource Template complete",
            "Warnings": []
        },
        {
            "ResourceType": "AWS::EC2::Instance",
            "LogicalResourceId": "EC2Instance",
            "ResourceIdentifier": {
                "InstanceId": "i-1234567890abcdef0"
            },
            "ResourceStatus": "COMPLETE",
            "ResourceStatusReason": "Resource Template complete",
            "Warnings": []
        },
        {
            "ResourceType": "AWS::EC2::KeyPair",
            "LogicalResourceId": "EC2KeyPairSshkeypair",
            "ResourceIdentifier": {
                "KeyName": "sshkeypair"
            },
            "ResourceStatus": "COMPLETE",
            "ResourceStatusReason": "Resource Template complete",
            "Warnings": []
        }
    ],
    "Status": "COMPLETE",
    "StatusReason": "All resources complete",
    "CreationTime": "2025-09-23T19:38:06.435000+00:00",
    "LastUpdatedTime": "2025-09-23T19:38:10.798000+00:00",
    "Progress": {
        "ResourcesSucceeded": 3,
        "ResourcesFailed": 0,
        "ResourcesProcessing": 0,
        "ResourcesPending": 0
    },
    "TemplateConfiguration": {
        "DeletionPolicy": "RETAIN",
        "UpdateReplacePolicy": "RETAIN"
    },
    "TotalWarnings": 0
}
```
Untuk informasi selengkapnya, lihat [Membuat templat dari sumber daya yang ada](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribeGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-generated-template.html)di *Referensi AWS CLI Perintah*. 

### `describe-publisher`
<a name="cloudformation_DescribePublisher_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-publisher`.

**AWS CLI**  
**Untuk menggambarkan penerbit**  
`describe-publisher`Contoh berikut mengkonfigurasi informasi untuk penerbit.  

```
aws cloudformation describe-publisher \
    --region us-west-2 \
    --publisher-id 000q6TfUovXsEMmgKowxDZLlwqr2QUsh
```
Output:  

```
{
    "PublisherId": "000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c",
    "PublisherStatus": "VERIFIED",
    "IdentityProvider": "AWS_Marketplace",
    "PublisherProfile": "https://aws.amazon.com/marketplace/seller-profile?id=2c5dc1f0-17cd-4259-8e46-822a83gdtegd"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribePublisher](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-publisher.html)di *Referensi AWS CLI Perintah*. 

### `describe-resource-scan`
<a name="cloudformation_DescribeResourceScan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-resource-scan`.

**AWS CLI**  
**Untuk menggambarkan pemindaian sumber daya**  
`describe-resource-scan`Contoh berikut menjelaskan pemindaian sumber daya dengan ID pemindaian yang ditentukan.  

```
aws cloudformation describe-resource-scan --region \
    --resource-scan-id arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60
```
Output:  

```
{
    "ResourceScanId": "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60",
    "Status": "COMPLETE",
    "StartTime": "2025-08-21T03:10:38.485000+00:00",
    "EndTime": "2025-08-21T03:20:28.485000+00:00",
    "PercentageCompleted": 100.0,
    "ResourceTypes": [
        "AWS::CloudFront::CachePolicy",
        "AWS::CloudFront::OriginRequestPolicy",
        "AWS::EC2::DHCPOptions",
        "AWS::EC2::InternetGateway",
        "AWS::EC2::KeyPair",
        "AWS::EC2::NetworkAcl",
        "AWS::EC2::NetworkInsightsPath",
        "AWS::EC2::NetworkInterface",
        "AWS::EC2::PlacementGroup",
        "AWS::EC2::Route",
        "AWS::EC2::RouteTable",
        "AWS::EC2::SecurityGroup",
        "AWS::EC2::Subnet",
        "AWS::EC2::SubnetCidrBlock",
        "AWS::EC2::SubnetNetworkAclAssociation",
        "AWS::EC2::SubnetRouteTableAssociation",
        ...
    ],
    "ResourcesRead": 676
}
```
Untuk informasi selengkapnya, lihat [Membuat templat dari sumber daya yang ada](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribeResourceScan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-resource-scan.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-drift-detection-status`
<a name="cloudformation_DescribeStackDriftDetectionStatus_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-drift-detection-status`.

**AWS CLI**  
**Untuk memeriksa status operasi deteksi drift**  
`describe-stack-drift-detection-status`Contoh berikut menampilkan status operasi deteksi drift. Dapatkan ID by menjalankan `detect-stack-drift` perintah.  

```
aws cloudformation describe-stack-drift-detection-status \
    --stack-drift-detection-id 1a229160-e4d9-xmpl-ab67-0a4f93df83d4
```
Output:  

```
{
    "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
    "StackDriftDetectionId": "1a229160-e4d9-xmpl-ab67-0a4f93df83d4",
    "StackDriftStatus": "DRIFTED",
    "DetectionStatus": "DETECTION_COMPLETE",
    "DriftedStackResourceCount": 1,
    "Timestamp": "2019-10-02T05:54:30.902Z"
}
```
+  Untuk detail API, lihat [DescribeStackDriftDetectionStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-drift-detection-status.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-events`
<a name="cloudformation_DescribeStackEvents_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-events`.

**AWS CLI**  
**Untuk menggambarkan peristiwa tumpukan**  
`describe-stack-events`Contoh berikut menampilkan 2 peristiwa terbaru untuk tumpukan tertentu.  

```
aws cloudformation describe-stack-events \
    --stack-name my-stack \
    --max-items 2

{
    "StackEvents": [
        {
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "EventId": "4e1516d0-e4d6-xmpl-b94f-0a51958a168c",
            "StackName": "my-stack",
            "LogicalResourceId": "my-stack",
            "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "ResourceType": "AWS::CloudFormation::Stack",
            "Timestamp": "2019-10-02T05:34:29.556Z",
            "ResourceStatus": "UPDATE_COMPLETE"
        },
        {
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "EventId": "4dd3c810-e4d6-xmpl-bade-0aaf8b31ab7a",
            "StackName": "my-stack",
            "LogicalResourceId": "my-stack",
            "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "ResourceType": "AWS::CloudFormation::Stack",
            "Timestamp": "2019-10-02T05:34:29.127Z",
            "ResourceStatus": "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
        }
    ],
    "NextToken": "eyJOZXh0VG9XMPLiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ=="
}
```
+  Untuk detail API, lihat [DescribeStackEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-events.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-instance`
<a name="cloudformation_DescribeStackInstance_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-instance`.

**AWS CLI**  
**Untuk menggambarkan instance tumpukan**  
Perintah berikut menjelaskan sebuah instance dari set stack yang ditentukan dalam akun dan Region yang ditentukan. Kumpulan tumpukan ada di wilayah dan akun saat ini, dan instance ada di `us-west-2` wilayah di akun`123456789012`. :  

```
aws cloudformation describe-stack-instance \
    --stack-set-name my-stack-set \
    --stack-instance-account 123456789012 \
    --stack-instance-region us-west-2
```
Output:  

```
{
    "StackInstance": {
        "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
        "Region": "us-west-2",
        "Account": "123456789012",
        "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/StackSet-enable-config-e6cac20f-xmpl-46e9-8314-53e0d4591532/4287f9a0-e615-xmpl-894a-12b31d3117be",
        "ParameterOverrides": [],
        "Status": "OUTDATED",
        "StatusReason": "ResourceLogicalId:ConfigBucket, ResourceType:AWS::S3::Bucket, ResourceStatusReason:You have attempted to create more buckets than allowed (Service: Amazon S3; Status Code: 400; Error Code: TooManyBuckets; Request ID: F7F21CXMPL580224; S3 Extended Request ID: egd/Fdt89BXMPLyiqbMNljVk55Yqqvi3NYW2nKLUVWhUGEhNfCmZdyj967lhriaG/dWMobSO40o=)."
    }
}
```
+  Untuk detail API, lihat [DescribeStackInstance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-instance.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-refactor`
<a name="cloudformation_DescribeStackRefactor_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-refactor`.

**AWS CLI**  
**Untuk menggambarkan operasi refactor tumpukan**  
`describe-stack-refactor`Contoh berikut menjelaskan operasi refactor stack dengan ID refactor stack yang ditentukan.  

```
aws cloudformation describe-stack-refactor \
    --stack-refactor-id 9c384f70-4e07-4ed7-a65d-fee5eb430841
```
Output:  

```
{
    "StackRefactorId": "9c384f70-4e07-4ed7-a65d-fee5eb430841",
    "StackIds": [
        "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack1/3e6a1ff0-94b1-11f0-aa6f-0a88d2e03acf",
        "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack2/5da91650-94b1-11f0-81cf-0a23500e151b"
    ],
    "ExecutionStatus": "AVAILABLE",
    "Status": "CREATE_COMPLETE"
}
```
*Untuk informasi selengkapnya, lihat [Stack refactoring](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html) di Panduan Pengguna.AWS CloudFormation *  
+  Untuk detail API, lihat [DescribeStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-refactor.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-resource-drifts`
<a name="cloudformation_DescribeStackResourceDrifts_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-resource-drifts`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang sumber daya yang melayang dari definisi tumpukan**  
Perintah berikut menampilkan informasi tentang sumber daya hanyut untuk tumpukan yang ditentukan. Untuk memulai deteksi drift, gunakan perintah. `detect-stack-drift` :  

```
aws cloudformation describe-stack-resource-drifts \
    --stack-name my-stack
```
Output menunjukkan fungsi AWS Lambda yang telah dimodifikasi: out-of-band  

```
{
    "StackResourceDrifts": [
        {
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "LogicalResourceId": "function",
            "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
            "ResourceType": "AWS::Lambda::Function",
            "ExpectedProperties": "{\"Description\":\"Write a file to S3.\",\"Environment\":{\"Variables\":{\"bucket\":\"my-stack-bucket-1vc62xmplgguf\"}},\"Handler\":\"index.handler\",\"MemorySize\":128,\"Role\":\"arn:aws:iam::123456789012:role/my-functionRole-HIZXMPLEOM9E\",\"Runtime\":\"nodejs10.x\",\"Tags\":[{\"Key\":\"lambda:createdBy\",\"Value\":\"SAM\"}],\"Timeout\":900,\"TracingConfig\":{\"Mode\":\"Active\"}}",
            "ActualProperties": "{\"Description\":\"Write a file to S3.\",\"Environment\":{\"Variables\":{\"bucket\":\"my-stack-bucket-1vc62xmplgguf\"}},\"Handler\":\"index.handler\",\"MemorySize\":256,\"Role\":\"arn:aws:iam::123456789012:role/my-functionRole-HIZXMPLEOM9E\",\"Runtime\":\"nodejs10.x\",\"Tags\":[{\"Key\":\"lambda:createdBy\",\"Value\":\"SAM\"}],\"Timeout\":22,\"TracingConfig\":{\"Mode\":\"Active\"}}",
            "PropertyDifferences": [
                {
                    "PropertyPath": "/MemorySize",
                    "ExpectedValue": "128",
                    "ActualValue": "256",
                    "DifferenceType": "NOT_EQUAL"
                },
                {
                    "PropertyPath": "/Timeout",
                    "ExpectedValue": "900",
                    "ActualValue": "22",
                    "DifferenceType": "NOT_EQUAL"
                }
            ],
            "StackResourceDriftStatus": "MODIFIED",
            "Timestamp": "2019-10-02T05:54:44.064Z"
        }
    ]
}
```
+  Untuk detail API, lihat [DescribeStackResourceDrifts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resource-drifts.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-resource`
<a name="cloudformation_DescribeStackResource_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-resource`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang sumber daya tumpukan**  
`describe-stack-resource`Contoh berikut menampilkan rincian untuk sumber daya bernama `MyFunction` dalam tumpukan tertentu.  

```
aws cloudformation describe-stack-resource \
    --stack-name MyStack \
    --logical-resource-id MyFunction
```
Output:  

```
{
    "StackResourceDetail": {
        "StackName": "MyStack",
        "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/MyStack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
        "LogicalResourceId": "MyFunction",
        "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
        "ResourceType": "AWS::Lambda::Function",
        "LastUpdatedTimestamp": "2019-10-02T05:34:27.989Z",
        "ResourceStatus": "UPDATE_COMPLETE",
        "Metadata": "{}",
        "DriftInformation": {
            "StackResourceDriftStatus": "IN_SYNC"
        }
    }
}
```
+  Untuk detail API, lihat [DescribeStackResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resource.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-resources`
<a name="cloudformation_DescribeStackResources_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-resources`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang sumber daya tumpukan**  
`describe-stack-resources`Contoh berikut menampilkan rincian untuk sumber daya dalam tumpukan tertentu.  

```
aws cloudformation describe-stack-resources \
    --stack-name my-stack
```
Output:  

```
{
    "StackResources": [
        {
            "StackName": "my-stack",
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "LogicalResourceId": "bucket",
            "PhysicalResourceId": "my-stack-bucket-1vc62xmplgguf",
            "ResourceType": "AWS::S3::Bucket",
            "Timestamp": "2019-10-02T04:34:11.345Z",
            "ResourceStatus": "CREATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        },
        {
            "StackName": "my-stack",
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "LogicalResourceId": "function",
            "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
            "ResourceType": "AWS::Lambda::Function",
            "Timestamp": "2019-10-02T05:34:27.989Z",
            "ResourceStatus": "UPDATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        },
        {
            "StackName": "my-stack",
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "LogicalResourceId": "functionRole",
            "PhysicalResourceId": "my-functionRole-HIZXMPLEOM9E",
            "ResourceType": "AWS::IAM::Role",
            "Timestamp": "2019-10-02T04:34:06.350Z",
            "ResourceStatus": "CREATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        }
    ]
}
```
+  Untuk detail API, lihat [DescribeStackResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resources.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-set-operation`
<a name="cloudformation_DescribeStackSetOperation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-set-operation`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang operasi stack set**  
Contoh describe-stack-set-operation `berikut menampilkan detail untuk operasi pembaruan pada set tumpukan yang ditentukan.  

```
aws cloudformation describe-stack-set-operation \
    --stack-set-name enable-config \
    --operation-id 35d45ebc-ed88-xmpl-ab59-0197a1fc83a0
```
Output:  

```
{
    "StackSetOperation": {
        "OperationId": "35d45ebc-ed88-xmpl-ab59-0197a1fc83a0",
        "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
        "Action": "UPDATE",
        "Status": "SUCCEEDED",
        "OperationPreferences": {
            "RegionOrder": [
                "us-east-1",
                "us-west-2",
                "eu-west-1",
                "us-west-1"
            ],
            "FailureToleranceCount": 7,
            "MaxConcurrentCount": 2
        },
        "AdministrationRoleARN": "arn:aws:iam::123456789012:role/AWSCloudFormationStackSetAdministrationRole",
        "ExecutionRoleName": "AWSCloudFormationStackSetExecutionRole",
        "CreationTimestamp": "2019-10-03T16:28:44.377Z",
        "EndTimestamp": "2019-10-03T16:42:08.607Z"
    }
}
```
+  Untuk detail API, lihat [DescribeStackSetOperation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-set-operation.html)di *Referensi AWS CLI Perintah*. 

### `describe-stack-set`
<a name="cloudformation_DescribeStackSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stack-set`.

**AWS CLI**  
**Untuk mendapatkan informasi tentang kumpulan tumpukan**  
Contoh describe-stack-set `berikut menampilkan rincian tentang set stack yang ditentukan.  

```
aws cloudformation describe-stack-set \
    --stack-set-name my-stack-set
```
Output:  

```
{
    "StackSet": {
        "StackSetName": "my-stack-set",
        "StackSetId": "my-stack-set:296a3360-xmpl-40af-be78-9341e95bf743",
        "Description": "Create an Amazon SNS topic",
        "Status": "ACTIVE",
        "TemplateBody": "AWSTemplateFormatVersion: '2010-09-09'\nDescription: An AWS SNS topic\nResources:\n  topic:\n    Type: AWS::SNS::Topic",
        "Parameters": [],
        "Capabilities": [],
        "Tags": [],
        "StackSetARN": "arn:aws:cloudformation:us-west-2:123456789012:stackset/enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
        "AdministrationRoleARN": "arn:aws:iam::123456789012:role/AWSCloudFormationStackSetAdministrationRole",
        "ExecutionRoleName": "AWSCloudFormationStackSetExecutionRole"
    }
}
```
+  Untuk detail API, lihat [DescribeStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-set.html)di *Referensi AWS CLI Perintah*. 

### `describe-stacks`
<a name="cloudformation_DescribeStacks_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-stacks`.

**AWS CLI**  
**Untuk menggambarkan AWS CloudFormation tumpukan**  
`describe-stacks`Perintah berikut menunjukkan informasi ringkasan untuk `myteststack` tumpukan:  

```
aws cloudformation describe-stacks --stack-name myteststack
```
Output:  

```
{
    "Stacks":  [
        {
            "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896",
            "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
            "Tags": [],
            "Outputs": [
                {
                    "Description": "Name of S3 bucket to hold website content",
                    "OutputKey": "BucketName",
                    "OutputValue": "myteststack-s3bucket-jssofi1zie2w"
                }
            ],
            "StackStatusReason": null,
            "CreationTime": "2013-08-23T01:02:15.422Z",
            "Capabilities": [],
            "StackName": "myteststack",
            "StackStatus": "CREATE_COMPLETE",
            "DisableRollback": false
        }
    ]
}
```
Untuk informasi selengkapnya, lihat Tumpukan di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribeStacks](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stacks.html)di *Referensi AWS CLI Perintah*. 

### `describe-type-registration`
<a name="cloudformation_DescribeTypeRegistration_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-type-registration`.

**AWS CLI**  
**Untuk menampilkan informasi pendaftaran jenis**  
`describe-type-registration`Contoh berikut menampilkan informasi tentang pendaftaran jenis yang ditentukan, termasuk status, jenis, dan versi tipe saat ini.  

```
aws cloudformation describe-type-registration \
    --registration-token a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
Output:  

```
{
    "ProgressStatus": "COMPLETE",
    "TypeArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/My-Logs-LogGroup",
    "Description": "Deployment is currently in DEPLOY_STAGE of status COMPLETED; ",
    "TypeVersionArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/My-Logs-LogGroup/00000001"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribeTypeRegistration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-type-registration.html)di *Referensi AWS CLI Perintah*. 

### `describe-type`
<a name="cloudformation_DescribeType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`describe-type`.

**AWS CLI**  
**Untuk menampilkan informasi jenis**  
`describe-type`Contoh berikut menampilkan informasi untuk jenis yang ditentukan.  

```
aws cloudformation describe-type \
    --type-name My::Logs::LogGroup \
    --type RESOURCE
```
Output:  

```
{
    "SourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-logs.git",
    "Description": "Customized resource derived from AWS::Logs::LogGroup",
    "TimeCreated": "2019-12-03T23:29:33.321Z",
    "Visibility": "PRIVATE",
    "TypeName": "My::Logs::LogGroup",
    "LastUpdated": "2019-12-03T23:29:33.321Z",
    "DeprecatedStatus": "LIVE",
    "ProvisioningType": "FULLY_MUTABLE",
    "Type": "RESOURCE",
    "Arn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/My-Logs-LogGroup/00000001",
    "Schema": "[details omitted]"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DescribeType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-type.html)di *Referensi AWS CLI Perintah*. 

### `detect-stack-drift`
<a name="cloudformation_DetectStackDrift_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`detect-stack-drift`.

**AWS CLI**  
**Untuk mendeteksi sumber daya yang melayang**  
`detect-stack-drift`Contoh berikut memulai deteksi drift untuk tumpukan tertentu.  

```
aws cloudformation detect-stack-drift \
    --stack-name my-stack
```
Output:  

```
{
    "StackDriftDetectionId": "1a229160-e4d9-xmpl-ab67-0a4f93df83d4"
}
```
Anda kemudian dapat menggunakan ID ini dengan `describe-stack-resource-drifts` perintah untuk menggambarkan sumber daya yang hanyut.  
+  Untuk detail API, lihat [DetectStackDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-drift.html)di *Referensi AWS CLI Perintah*. 

### `detect-stack-resource-drift`
<a name="cloudformation_DetectStackResourceDrift_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`detect-stack-resource-drift`.

**AWS CLI**  
**Untuk mendeteksi penyimpangan untuk sumber daya**  
`detect-stack-resource-drift`Contoh berikut memeriksa sumber daya bernama `MyFunction` dalam tumpukan bernama `MyStack` drift:  

```
aws cloudformation detect-stack-resource-drift \
   --stack-name MyStack \
   --logical-resource-id MyFunction
```
Output menunjukkan fungsi AWS Lambda yang telah dimodifikasi: out-of-band  

```
{
    "StackResourceDrift": {
        "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/MyStack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
        "LogicalResourceId": "MyFunction",
        "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
        "ResourceType": "AWS::Lambda::Function",
        "ExpectedProperties": "{\"Description\":\"Write a file to S3.\",\"Environment\":{\"Variables\":{\"bucket\":\"my-stack-bucket-1vc62xmplgguf\"}},\"Handler\":\"index.handler\",\"MemorySize\":128,\"Role\":\"arn:aws:iam::123456789012:role/my-functionRole-HIZXMPLEOM9E\",\"Runtime\":\"nodejs10.x\",\"Tags\":[{\"Key\":\"lambda:createdBy\",\"Value\":\"SAM\"}],\"Timeout\":900,\"TracingConfig\":{\"Mode\":\"Active\"}}",
        "ActualProperties": "{\"Description\":\"Write a file to S3.\",\"Environment\":{\"Variables\":{\"bucket\":\"my-stack-bucket-1vc62xmplgguf\"}},\"Handler\":\"index.handler\",\"MemorySize\":256,\"Role\":\"arn:aws:iam::123456789012:role/my-functionRole-HIZXMPLEOM9E\",\"Runtime\":\"nodejs10.x\",\"Tags\":[{\"Key\":\"lambda:createdBy\",\"Value\":\"SAM\"}],\"Timeout\":22,\"TracingConfig\":{\"Mode\":\"Active\"}}",
        "PropertyDifferences": [
            {
                "PropertyPath": "/MemorySize",
                "ExpectedValue": "128",
                "ActualValue": "256",
                "DifferenceType": "NOT_EQUAL"
            },
            {
                "PropertyPath": "/Timeout",
                "ExpectedValue": "900",
                "ActualValue": "22",
                "DifferenceType": "NOT_EQUAL"
            }
        ],
        "StackResourceDriftStatus": "MODIFIED",
        "Timestamp": "2019-10-02T05:58:47.433Z"
    }
}
```
+  Untuk detail API, lihat [DetectStackResourceDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-resource-drift.html)di *Referensi AWS CLI Perintah*. 

### `detect-stack-set-drift`
<a name="cloudformation_DetectStackSetDrift_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`detect-stack-set-drift`.

**AWS CLI**  
**Untuk mendeteksi penyimpangan pada kumpulan tumpukan dan semua instance tumpukan terkait**  
`detect-stack-set-drift`Contoh berikut memulai operasi deteksi drift pada set tumpukan yang ditentukan, termasuk semua instance tumpukan yang terkait dengan kumpulan tumpukan itu, dan mengembalikan ID operasi yang dapat digunakan untuk melacak status operasi drift.  

```
aws cloudformation detect-stack-set-drift \
    --stack-set-name stack-set-drift-example
```
Output:  

```
{
    "OperationId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
```
Untuk informasi selengkapnya, lihat [Mendeteksi Perubahan Konfigurasi Tidak Terkelola dalam Kumpulan Tumpukan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html) di Panduan *AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [DetectStackSetDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-set-drift.html)di *Referensi AWS CLI Perintah*. 

### `estimate-template-cost`
<a name="cloudformation_EstimateTemplateCost_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`estimate-template-cost`.

**AWS CLI**  
**Untuk memperkirakan biaya template**  
`estimate-template-cost`Contoh berikut menghasilkan perkiraan biaya untuk template bernama `template.yaml` dalam folder saat ini.  

```
aws cloudformation estimate-template-cost \
    --template-body file://template.yaml
```
Output:  

```
{
    "Url": "http://calculator.s3.amazonaws.com/calc5.html?key=cloudformation/7870825a-xmpl-4def-92e7-c4f8dd360cca"
}
```
+  Untuk detail API, lihat [EstimateTemplateCost](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/estimate-template-cost.html)di *Referensi AWS CLI Perintah*. 

### `execute-change-set`
<a name="cloudformation_ExecuteChangeSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`execute-change-set`.

**AWS CLI**  
**Untuk menjalankan set perubahan**  
`execute-change-set`Contoh berikut mengeksekusi set perubahan yang ditentukan oleh mengubah nama set dan nama stack.  

```
aws cloudformation execute-change-set \
    --change-set-name my-change-set \
    --stack-name my-stack
```
`execute-change-set`Contoh berikut mengeksekusi set perubahan yang ditentukan oleh ARN penuh dari set perubahan.  

```
aws cloudformation execute-change-set \
    --change-set-name arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/bc9555ba-a949-xmpl-bfb8-f41d04ec5784
```
+  Untuk detail API, lihat [ExecuteChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/execute-change-set.html)di *Referensi AWS CLI Perintah*. 

### `execute-stack-refactor`
<a name="cloudformation_ExecuteStackRefactor_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`execute-stack-refactor`.

**AWS CLI**  
**Untuk menyelesaikan operasi refactor tumpukan**  
`execute-stack-refactor`Contoh berikut menyelesaikan operasi refactor stack dengan ID refactor stack yang ditentukan.  

```
aws cloudformation execute-stack-refactor \
    --stack-refactor-id 9c384f70-4e07-4ed7-a65d-fee5eb430841
```
Perintah ini tidak menghasilkan output.  
*Untuk informasi selengkapnya, lihat [Stack refactoring](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html) di Panduan Pengguna.AWS CloudFormation *  
+  Untuk detail API, lihat [ExecuteStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/execute-stack-refactor.html)di *Referensi AWS CLI Perintah*. 

### `get-stack-policy`
<a name="cloudformation_GetStackPolicy_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-stack-policy`.

**AWS CLI**  
**Untuk melihat kebijakan tumpukan**  
`get-stack-policy`Contoh berikut menampilkan kebijakan tumpukan untuk tumpukan tertentu. Untuk melampirkan kebijakan ke tumpukan, gunakan `set-stack-policy` perintah.  

```
aws cloudformation get-stack-policy \
    --stack-name my-stack
```
Output:  

```
{
    "StackPolicyBody": "{\n  \"Statement\" : [\n    {\n      \"Effect\" : \"Allow\",\n      \"Action\" : \"Update:*\",\n      \"Principal\": \"*\",\n      \"Resource\" : \"*\"\n    },\n    {\n      \"Effect\" : \"Deny\",\n      \"Action\" : \"Update:*\",\n      \"Principal\": \"*\",\n      \"Resource\" : \"LogicalResourceId/bucket\"\n    }\n  ]\n}\n"
}
```
+  Untuk detail API, lihat [GetStackPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-stack-policy.html)di *Referensi AWS CLI Perintah*. 

### `get-template-summary`
<a name="cloudformation_GetTemplateSummary_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-template-summary`.

**AWS CLI**  
**Untuk menampilkan ringkasan template**  
Perintah berikut menampilkan informasi ringkasan tentang sumber daya dan metadata untuk file template yang ditentukan.  

```
aws cloudformation get-template-summary \
   --template-body file://template.yaml
```
Output:  

```
{
    "Parameters": [],
    "Description": "A VPC and subnets.",
    "ResourceTypes": [
        "AWS::EC2::VPC",
        "AWS::EC2::Subnet",
        "AWS::EC2::Subnet",
        "AWS::EC2::RouteTable",
        "AWS::EC2::VPCEndpoint",
        "AWS::EC2::SubnetRouteTableAssociation",
        "AWS::EC2::SubnetRouteTableAssociation",
        "AWS::EC2::VPCEndpoint"
    ],
    "Version": "2010-09-09"
}
```
+  Untuk detail API, lihat [GetTemplateSummary](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-template-summary.html)di *Referensi AWS CLI Perintah*. 

### `get-template`
<a name="cloudformation_GetTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-template`.

**AWS CLI**  
**Untuk melihat badan template untuk AWS CloudFormation tumpukan**  
`get-template`Perintah berikut menunjukkan template untuk `myteststack` tumpukan:  

```
aws cloudformation get-template --stack-name myteststack
```
Output:  

```
{
    "TemplateBody": {
        "AWSTemplateFormatVersion": "2010-09-09",
        "Outputs": {
            "BucketName": {
                "Description": "Name of S3 bucket to hold website content",
                "Value": {
                    "Ref": "S3Bucket"
                }
            }
        },
        "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
        "Resources": {
            "S3Bucket": {
                "Type": "AWS::S3::Bucket",
                "Properties": {
                    "AccessControl": "PublicRead"
                }
            }
        }
    }
}
```
+  Untuk detail API, lihat [GetTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-template.html)di *Referensi AWS CLI Perintah*. 

### `list-change-sets`
<a name="cloudformation_ListChangeSets_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-change-sets`.

**AWS CLI**  
**Untuk membuat daftar set perubahan**  
`list-change-sets`Contoh berikut menampilkan daftar set perubahan yang tertunda untuk tumpukan tertentu.  

```
aws cloudformation list-change-sets \
   --stack-name my-stack
```
Output:  

```
{
    "Summaries": [
        {
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204",
            "StackName": "my-stack",
            "ChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/70160340-7914-xmpl-bcbf-128a1fa78b5d",
            "ChangeSetName": "my-change-set",
            "ExecutionStatus": "AVAILABLE",
            "Status": "CREATE_COMPLETE",
            "CreationTime": "2019-10-02T05:38:54.297Z"
        }
    ]
}
```
+  Untuk detail API, lihat [ListChangeSets](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-change-sets.html)di *Referensi AWS CLI Perintah*. 

### `list-exports`
<a name="cloudformation_ListExports_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-exports`.

**AWS CLI**  
**Untuk daftar ekspor**  
`list-exports`Contoh berikut menampilkan daftar ekspor dari tumpukan di wilayah saat ini.  

```
aws cloudformation list-exports
```
Output:  

```
{
    "Exports": [
        {
            "ExportingStackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/private-vpc/99764070-b56c-xmpl-bee8-062a88d1d800",
            "Name": "private-vpc-subnet-a",
            "Value": "subnet-07b410xmplddcfa03"
        },
        {
            "ExportingStackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/private-vpc/99764070-b56c-xmpl-bee8-062a88d1d800",
            "Name": "private-vpc-subnet-b",
            "Value": "subnet-075ed3xmplebd2fb1"
        },
        {
            "ExportingStackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/private-vpc/99764070-b56c-xmpl-bee8-062a88d1d800",
            "Name": "private-vpc-vpcid",
            "Value": "vpc-011d7xmpl100e9841"
        }
    ]
}
```
+  Untuk detail API, lihat [ListExports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-exports.html)di *Referensi AWS CLI Perintah*. 

### `list-generated-templates`
<a name="cloudformation_ListGeneratedTemplates_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-generated-templates`.

**AWS CLI**  
**Untuk membuat daftar template yang dihasilkan**  
`list-generated-templates`Contoh berikut mencantumkan semua template yang dihasilkan.  

```
aws cloudformation list-generated-templates
```
Output:  

```
{
    "Summaries": [
        {
            "GeneratedTemplateId": "arn:aws:cloudformation:us-east-1:123456789012:generatedtemplate/7fc8512c-d8cb-4e02-b266-d39c48344e48",
            "GeneratedTemplateName": "MyTemplate",
            "Status": "COMPLETE",
            "StatusReason": "All resources complete",
            "CreationTime": "2025-09-23T20:13:24.283000+00:00",
            "LastUpdatedTime": "2025-09-23T20:13:28.610000+00:00",
            "NumberOfResources": 4
        },
        {
            "GeneratedTemplateId": "arn:aws:cloudformation:us-east-1:123456789012:generatedTemplate/f10dd1c4-edc6-4823-8153-ab6112b8d051",
            "GeneratedTemplateName": "MyEC2InstanceTemplate",
            "Status": "COMPLETE",
            "StatusReason": "All resources complete",
            "CreationTime": "2024-08-08T19:35:49.790000+00:00",
            "LastUpdatedTime": "2024-08-08T19:35:52.207000+00:00",
            "NumberOfResources": 3
        },
        {
            "GeneratedTemplateId": "arn:aws:cloudformation:us-east-1:123456789012:generatedTemplate/e5a1c89f-7ce2-41bd-9bdf-75b7c852e3ca",
            "GeneratedTemplateName": "MyEKSNodeGroupTemplate",
            "Status": "COMPLETE",
            "StatusReason": "All resources complete",
            "CreationTime": "2024-07-16T20:39:27.883000+00:00",
            "LastUpdatedTime": "2024-07-16T20:39:35.766000+00:00",
            "NumberOfResources": 4
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Membuat templat dari sumber daya yang ada](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ListGeneratedTemplates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-generated-templates.html)di *Referensi AWS CLI Perintah*. 

### `list-imports`
<a name="cloudformation_ListImports_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-imports`.

**AWS CLI**  
**Untuk daftar impor**  
`list-imports`Contoh berikut mencantumkan tumpukan yang mengimpor ekspor yang ditentukan. Untuk mendapatkan daftar ekspor yang tersedia, gunakan `list-exports` perintah.  

```
aws cloudformation list-imports \
    --export-name private-vpc-vpcid
```
Output:  

```
{
    "Imports": [
        "my-database-stack"
    ]
}
```
+  Untuk detail API, lihat [ListImports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-imports.html)di *Referensi AWS CLI Perintah*. 

### `list-resource-scan-related-resources`
<a name="cloudformation_ListResourceScanRelatedResources_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-resource-scan-related-resources`.

**AWS CLI**  
**Untuk membuat daftar sumber daya terkait dari pemindaian sumber daya**  
`list-resource-scan-related-resources`Contoh berikut mencantumkan sumber daya dari pemindaian sumber daya tertentu yang terkait dengan sumber daya di`resources.json`.  

```
aws cloudformation list-resource-scan-related-resources \
    --resource-scan-id arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60 \
    --resources file://resources.json
```
Isi dari `resources.json`:  

```
[
    {
        "ResourceType": "AWS::EKS::Cluster",
        "ResourceIdentifier": {
            "ClusterName": "MyAppClusterName"
        }
    },
    {
        "ResourceType": "AWS::AutoScaling::AutoScalingGroup",
        "ResourceIdentifier": {
            "AutoScalingGroupName": "MyAppASGName"
        }
    }
]
```
Output:  

```
{
    "RelatedResources": [
        {
            "ResourceType": "AWS::EKS::Nodegroup",
            "ResourceIdentifier": {
                "NodegroupName": "MyAppNodegroupName"
            },
            "ManagedByStack": false
        },
        {
            "ResourceType": "AWS::IAM::Role",
            "ResourceIdentifier": {
                "RoleId": "arn:aws::iam::123456789012:role/MyAppIAMRole"
            },
            "ManagedByStack": false
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Membuat CloudFormation templat dari sumber daya yang dipindai dengan generator IAc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html) di *AWS CloudFormation Panduan Pengguna*.  
+  Untuk detail API, lihat [ListResourceScanRelatedResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-resource-scan-related-resources.html)di *Referensi AWS CLI Perintah*. 

### `list-resource-scan-resources`
<a name="cloudformation_ListResourceScanResources_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-resource-scan-resources`.

**AWS CLI**  
**Untuk membuat daftar sumber daya dari pemindaian sumber daya**  
`list-resource-scan-resources`Contoh berikut mencantumkan sumber daya dari pemindaian sumber daya yang ditentukan, disaring oleh pengenal sumber daya.  

```
aws cloudformation list-resource-scan-resources \
    --resource-scan-id arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60 \
    --resource-identifier MyApp
```
Output:  

```
{
    "Resources": [
        {
            "ResourceType": "AWS::EKS::Cluster",
            "ResourceIdentifier": {
                "ClusterName": "MyAppClusterName"
            },
            "ManagedByStack": false
        },
        {
            "ResourceType": "AWS::AutoScaling::AutoScalingGroup",
            "ResourceIdentifier": {
                "AutoScalingGroupName": "MyAppASGName"
            },
            "ManagedByStack": false
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Membuat CloudFormation templat dari sumber daya yang dipindai dengan generator IAc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html) di *AWS CloudFormation Panduan Pengguna*.  
+  Untuk detail API, lihat [ListResourceScanResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-resource-scan-resources.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-instances`
<a name="cloudformation_ListStackInstances_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-instances`.

**AWS CLI**  
**Untuk membuat daftar instance untuk tumpukan**  
`list-stack-instances`Contoh berikut mencantumkan instance yang dibuat dari set stack yang ditentukan.  

```
aws cloudformation list-stack-instances \
    --stack-set-name enable-config
```
Output contoh mencakup detail tentang tumpukan yang gagal diperbarui karena kesalahan:  

```
{
    "Summaries": [
        {
            "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
            "Region": "us-west-2",
            "Account": "123456789012",
            "StackId": "arn:aws:cloudformation:ap-northeast-1:123456789012:stack/StackSet-enable-config-35a6ac50-d9f8-4084-86e4-7da34d5de4c4/a1631cd0-e5fb-xmpl-b474-0aa20f14f06e",
            "Status": "CURRENT"
        },
        {
            "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
            "Region": "us-west-2",
            "Account": "123456789012",
            "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/StackSet-enable-config-e6cac20f-xmpl-46e9-8314-53e0d4591532/eab53680-e5fa-xmpl-ba14-0a522351f81e",
            "Status": "OUTDATED",
            "StatusReason": "ResourceLogicalId:ConfigDeliveryChannel, ResourceType:AWS::Config::DeliveryChannel, ResourceStatusReason:Failed to put delivery channel 'StackSet-enable-config-e6cac20f-xmpl-46e9-8314-53e0d4591532-ConfigDeliveryChannel-1OJWJ7XD59WR0' because the maximum number of delivery channels: 1 is reached. (Service: AmazonConfig; Status Code: 400; Error Code: MaxNumberOfDeliveryChannelsExceededException; Request ID: d14b34a0-ef7c-xmpl-acf8-8a864370ae56)."
        }
    ]
}
```
+  Untuk detail API, lihat [ListStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-instances.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-refactor-actions`
<a name="cloudformation_ListStackRefactorActions_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-refactor-actions`.

**AWS CLI**  
**Untuk membuat daftar tindakan untuk operasi refactor tumpukan**  
`list-stack-refactor-actions`Contoh berikut mencantumkan tindakan untuk operasi refactor stack dengan ID refactor stack yang ditentukan.  

```
aws cloudformation list-stack-refactor-actions \
    --stack-refactor-id 9c384f70-4e07-4ed7-a65d-fee5eb430841
```
Output:  

```
{
    "StackRefactorActions": [
        {
            "Action": "MOVE",
            "Entity": "RESOURCE",
            "PhysicalResourceId": "MyTestLambdaRole",
            "Description": "No configuration changes detected.",
            "Detection": "AUTO",
            "TagResources": [],
            "UntagResources": [],
            "ResourceMapping": {
                "Source": {
                    "StackName": "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack1/3e6a1ff0-94b1-11f0-aa6f-0a88d2e03acf",
                    "LogicalResourceId": "MyLambdaRole"
                },
                "Destination": {
                    "StackName": "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack2/5da91650-94b1-11f0-81cf-0a23500e151b",
                    "LogicalResourceId": "MyLambdaRole"
                }
            }
        },
        {
            "Action": "MOVE",
            "Entity": "RESOURCE",
            "PhysicalResourceId": "MyTestFunction",
            "Description": "Resource configuration changes will be validated during refactor execution.",
            "Detection": "AUTO",
            "TagResources": [
                {
                    "Key": "aws:cloudformation:stack-name",
                    "Value": "Stack2"
                },
                {
                    "Key": "aws:cloudformation:logical-id",
                    "Value": "MyFunction"
                },
                {
                    "Key": "aws:cloudformation:stack-id",
                    "Value": "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack2/5da91650-94b1-11f0-81cf-0a23500e151b"
                }
            ],
            "UntagResources": [
                "aws:cloudformation:stack-name",
                "aws:cloudformation:logical-id",
                "aws:cloudformation:stack-id"
            ],
            "ResourceMapping": {
                "Source": {
                    "StackName": "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack1/3e6a1ff0-94b1-11f0-aa6f-0a88d2e03acf",
                    "LogicalResourceId": "MyFunction"
                },
                "Destination": {
                    "StackName": "arn:aws:cloudformation:us-east-1:123456789012:stack/Stack2/5da91650-94b1-11f0-81cf-0a23500e151b",
                    "LogicalResourceId": "MyFunction"
                }
            }
        }
    ]
}
```
*Untuk informasi selengkapnya, lihat [Stack refactoring](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html) di Panduan Pengguna.AWS CloudFormation *  
+  Untuk detail API, lihat [ListStackRefactorActions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-refactor-actions.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-resources`
<a name="cloudformation_ListStackResources_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-resources`.

**AWS CLI**  
**Untuk membuat daftar sumber daya dalam tumpukan**  
Perintah berikut menampilkan daftar sumber daya dalam tumpukan yang ditentukan.  

```
aws cloudformation list-stack-resources \
    --stack-name my-stack
```
Output:  

```
{
    "StackResourceSummaries": [
        {
            "LogicalResourceId": "bucket",
            "PhysicalResourceId": "my-stack-bucket-1vc62xmplgguf",
            "ResourceType": "AWS::S3::Bucket",
            "LastUpdatedTimestamp": "2019-10-02T04:34:11.345Z",
            "ResourceStatus": "CREATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        },
        {
            "LogicalResourceId": "function",
            "PhysicalResourceId": "my-function-SEZV4XMPL4S5",
            "ResourceType": "AWS::Lambda::Function",
            "LastUpdatedTimestamp": "2019-10-02T05:34:27.989Z",
            "ResourceStatus": "UPDATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        },
        {
            "LogicalResourceId": "functionRole",
            "PhysicalResourceId": "my-functionRole-HIZXMPLEOM9E",
            "ResourceType": "AWS::IAM::Role",
            "LastUpdatedTimestamp": "2019-10-02T04:34:06.350Z",
            "ResourceStatus": "CREATE_COMPLETE",
            "DriftInformation": {
                "StackResourceDriftStatus": "IN_SYNC"
            }
        }
    ]
}
```
+  Untuk detail API, lihat [ListStackResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-resources.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-set-operation-results`
<a name="cloudformation_ListStackSetOperationResults_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-set-operation-results`.

**AWS CLI**  
**Untuk mencantumkan hasil operasi set tumpukan**  
Perintah berikut menampilkan hasil operasi pembaruan pada instance dalam kumpulan tumpukan yang ditentukan.  

```
aws cloudformation list-stack-set-operation-results \
    --stack-set-name enable-config \
    --operation-id 35d45ebc-ed88-xmpl-ab59-0197a1fc83a0
```
Output:  

```
{
    "Summaries": [
        {
            "Account": "223456789012",
            "Region": "us-west-2",
            "Status": "SUCCEEDED",
            "AccountGateResult": {
                "Status": "SKIPPED",
                "StatusReason": "Function not found: arn:aws:lambda:eu-west-1:223456789012:function:AWSCloudFormationStackSetAccountGate"
            }
        },
        {
            "Account": "223456789012",
            "Region": "ap-south-1",
            "Status": "CANCELLED",
            "StatusReason": "Cancelled since failure tolerance has exceeded"
        }
    ]
}
```
**Catatan:** `SKIPPED` Status untuk `AccountGateResult` diharapkan untuk operasi yang berhasil kecuali Anda membuat fungsi gerbang akun.  
+  Untuk detail API, lihat [ListStackSetOperationResults](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-set-operation-results.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-set-operations`
<a name="cloudformation_ListStackSetOperations_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-set-operations`.

**AWS CLI**  
**Untuk membuat daftar operasi set tumpukan**  
`list-stack-set-operations`Contoh berikut menampilkan daftar operasi terbaru pada set stack yang ditentukan.  

```
aws cloudformation list-stack-set-operations \
    --stack-set-name my-stack-set
```
Output:  

```
{
    "Summaries": [
        {
            "OperationId": "35d45ebc-ed88-xmpl-ab59-0197a1fc83a0",
            "Action": "UPDATE",
            "Status": "SUCCEEDED",
            "CreationTimestamp": "2019-10-03T16:28:44.377Z",
            "EndTimestamp": "2019-10-03T16:42:08.607Z"
        },
        {
            "OperationId": "891aa98f-7118-xmpl-00b2-00954d1dd0d6",
            "Action": "UPDATE",
            "Status": "FAILED",
            "CreationTimestamp": "2019-10-03T15:43:53.916Z",
            "EndTimestamp": "2019-10-03T15:45:58.925Z"
        }
    ]
}
```
+  Untuk detail API, lihat [ListStackSetOperations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-set-operations.html)di *Referensi AWS CLI Perintah*. 

### `list-stack-sets`
<a name="cloudformation_ListStackSets_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stack-sets`.

**AWS CLI**  
**Untuk membuat daftar set tumpukan**  
`list-stack-sets`Contoh berikut menampilkan daftar set tumpukan di wilayah dan akun saat ini.  

```
aws cloudformation list-stack-sets
```
Output:  

```
{
    "Summaries": [
        {
            "StackSetName": "enable-config",
            "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
            "Description": "Enable AWS Config",
            "Status": "ACTIVE"
        }
    ]
}
```
+  Untuk detail API, lihat [ListStackSets](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-sets.html)di *Referensi AWS CLI Perintah*. 

### `list-stacks`
<a name="cloudformation_ListStacks_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-stacks`.

**AWS CLI**  
**Untuk daftar AWS CloudFormation tumpukan**  
`list-stacks`Perintah berikut menunjukkan ringkasan semua tumpukan yang memiliki status`CREATE_COMPLETE`:  

```
aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE
```
Output:  

```
[
    {
        "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896",
        "TemplateDescription": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
        "StackStatusReason": null,
        "CreationTime": "2013-08-26T03:27:10.190Z",
        "StackName": "myteststack",
        "StackStatus": "CREATE_COMPLETE"
    }
]
```
+  Untuk detail API, lihat [ListStacks](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stacks.html)di *Referensi AWS CLI Perintah*. 

### `list-type-registrations`
<a name="cloudformation_ListTypeRegistrations_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-type-registrations`.

**AWS CLI**  
**Untuk membuat daftar pendaftaran lengkap dari suatu jenis**  
`list-type-registrations`Contoh berikut menampilkan daftar pendaftaran tipe lengkap untuk jenis yang ditentukan.  

```
aws cloudformation list-type-registrations \
    --type RESOURCE \
    --type-name My::Logs::LogGroup \
    --registration-status-filter COMPLETE
```
Output:  

```
{
    "RegistrationTokenList": [
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333"
    ]
}
```
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ListTypeRegistrations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-type-registrations.html)di *Referensi AWS CLI Perintah*. 

### `list-type-versions`
<a name="cloudformation_ListTypeVersions_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-type-versions`.

**AWS CLI**  
**Untuk membuat daftar versi ekstensi**  
`list-type-versions`Contoh berikut mengembalikan informasi ringkasan tentang versi ekstensi.  

```
aws cloudformation list-type-versions \
  --endpoint https://example.com \
  --region us-west-2 \
  --type RESOURCE \
  --type-name My::Resource::Example \
  --publisher-id 123456789012
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ListTypeVersions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-type-versions.html)di *Referensi AWS CLI Perintah*. 

### `list-types`
<a name="cloudformation_ListTypes_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-types`.

**AWS CLI**  
**Untuk mencantumkan jenis sumber daya pribadi di akun**  
`list-types`Contoh berikut menampilkan daftar jenis sumber daya pribadi yang saat ini terdaftar di AWS akun saat ini.  

```
aws cloudformation list-types
```
Output:  

```
{
    "TypeSummaries": [
        {
            "Description": "WordPress blog resource for internal use",
            "LastUpdated": "2019-12-04T18:28:15.059Z",
            "TypeName": "My::WordPress::BlogExample",
            "TypeArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/My-WordPress-BlogExample",
            "DefaultVersionId": "00000005",
            "Type": "RESOURCE"
        },
        {
            "Description": "Customized resource derived from AWS::Logs::LogGroup",
            "LastUpdated": "2019-12-04T18:28:15.059Z",
            "TypeName": "My::Logs::LogGroup",
            "TypeArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/My-Logs-LogGroup",
            "DefaultVersionId": "00000003",
            "Type": "RESOURCE"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ListTypes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-types.html)di *Referensi AWS CLI Perintah*. 

### `package`
<a name="cloudformation_Package_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`package`.

**AWS CLI**  
Perintah berikut mengekspor template bernama `template.json` dengan mengunggah artefak lokal ke bucket S3 `bucket-name` dan menulis template yang diekspor ke: `packaged-template.json`  

```
aws cloudformation package --template-file /path_to_template/template.json --s3-bucket bucket-name --output-template-file packaged-template.json --use-json
```
+  Untuk detail API, lihat [Package](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/package.html) in *AWS CLI Command Reference*. 

### `publish-type`
<a name="cloudformation_PublishType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`publish-type`.

**AWS CLI**  
**Untuk mempublikasikan ekstensi**  
`publish-type`Contoh berikut menerbitkan ekstensi yang ditentukan ke CloudFormation registri sebagai ekstensi publik di Wilayah ini.  

```
aws cloudformation publish-type \
  --region us-west-2 \
  --type RESOURCE \
  --type-name Example::Test::1234567890abcdef0
```
Output:  

```
{
    "PublicTypeArn":"arn:aws:cloudformation:us-west-2::type/resource/000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c/Example-Test-1234567890abcdef0/1.0.0"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [PublishType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/publish-type.html)di *Referensi AWS CLI Perintah*. 

### `register-publisher`
<a name="cloudformation_RegisterPublisher_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`register-publisher`.

**AWS CLI**  
**Untuk mendaftarkan penerbit**  
`register-publisher`Contoh berikut mendaftarkan penerbit dan menerima parameter syarat dan kondisi.  

```
aws cloudformation register-publisher \
  --region us-west-2 \
  --accept-terms-and-conditions
```
Output:  

```
{
    "PublisherId": "000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [RegisterPublisher](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/register-publisher.html)di *Referensi AWS CLI Perintah*. 

### `register-type`
<a name="cloudformation_RegisterType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`register-type`.

**AWS CLI**  
**Untuk mendaftarkan jenis sumber daya**  
`register-type`Contoh berikut mendaftarkan jenis sumber daya yang ditentukan sebagai tipe sumber daya pribadi di akun pengguna.  

```
aws cloudformation register-type \
    --type-name My::Organization::ResourceName \
    --schema-handler-package s3://bucket_name/my-organization-resource_name.zip \
    --type RESOURCE
```
Output:  

```
{
    "RegistrationToken": "f5525280-104e-4d35-bef5-8f1f1example"
}
```
Untuk informasi selengkapnya, lihat [Mendaftarkan Penyedia Sumber Daya](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-register.html) di *Panduan Pengguna Antarmuka Baris CloudFormation Perintah untuk Pengembangan Jenis*.  
+  Untuk detail API, lihat [RegisterType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/register-type.html)di *Referensi AWS CLI Perintah*. 

### `set-stack-policy`
<a name="cloudformation_SetStackPolicy_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`set-stack-policy`.

**AWS CLI**  
**Untuk menerapkan kebijakan tumpukan**  
`set-stack-policy`Contoh berikut menonaktifkan pembaruan untuk sumber daya yang ditentukan dalam tumpukan yang ditentukan. `stack-policy.json`adalah dokumen JSON yang mendefinisikan operasi yang diizinkan pada sumber daya di tumpukan.  

```
aws cloudformation set-stack-policy \
    --stack-name my-stack \
    --stack-policy-body file://stack-policy.json
```
Output:  

```
{
  "Statement" : [
    {
      "Effect" : "Allow",
      "Action" : "Update:*",
      "Principal": "*",
      "Resource" : "*"
    },
    {
      "Effect" : "Deny",
      "Action" : "Update:*",
      "Principal": "*",
      "Resource" : "LogicalResourceId/bucket"
    }
  ]
}
```
+  Untuk detail API, lihat [SetStackPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-stack-policy.html)di *Referensi AWS CLI Perintah*. 

### `set-type-configuration`
<a name="cloudformation_SetTypeConfiguration_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`set-type-configuration`.

**AWS CLI**  
**Untuk mengkonfigurasi data**  
`set-type-configuration`Contoh berikut menentukan data konfigurasi untuk CloudFormation ekstensi terdaftar, di akun yang diberikan dan Wilayah.  

```
aws cloudformation set-type-configuration \
    --region us-west-2 \
    --type RESOURCE \
    --type-name Example::Test::Type \
    --configuration-alias default \
    --configuration "{\"CredentialKey\": \"testUserCredential\"}"
```
Output:  

```
{
    "ConfigurationArn": "arn:aws:cloudformation:us-west-2:123456789012:type-configuration/resource/Example-Test-Type/default"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [SetTypeConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-type-configuration.html)di *Referensi AWS CLI Perintah*. 

### `set-type-default-version`
<a name="cloudformation_SetTypeDefaultVersion_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`set-type-default-version`.

**AWS CLI**  
**Untuk menyetel versi default tipe**  
`set-type-default-version`Contoh berikut menetapkan versi tipe tertentu yang akan digunakan sebagai default untuk jenis ini.  

```
aws cloudformation set-type-default-version \
    --type RESOURCE \
    --type-name My::Logs::LogGroup \
    --version-id 00000003
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menggunakan CloudFormation Registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [SetTypeDefaultVersion](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-type-default-version.html)di *Referensi AWS CLI Perintah*. 

### `signal-resource`
<a name="cloudformation_SignalResource_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`signal-resource`.

**AWS CLI**  
**Untuk memberi sinyal sumber daya**  
`signal-resource`Contoh berikut sinyal `success` untuk memenuhi kondisi tunggu bernama `MyWaitCondition` dalam tumpukan bernama`my-stack`.  

```
aws cloudformation signal-resource \
    --stack-name my-stack \
    --logical-resource-id MyWaitCondition \
    --unique-id 1234 \
    --status SUCCESS
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [SignalResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/signal-resource.html)di *Referensi AWS CLI Perintah*. 

### `start-resource-scan`
<a name="cloudformation_StartResourceScan_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`start-resource-scan`.

**AWS CLI**  
**Untuk memulai pemindaian sumber daya**  
`start-resource-scan`Contoh berikut memulai pemindaian sumber daya yang memindai semua sumber daya yang ada di akun saat ini dan Wilayah.  

```
aws cloudformation start-resource-scan
```
Output:  

```
{
    "ResourceScanId":
      "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60"
}
```
Untuk informasi selengkapnya, lihat [Memulai pemindaian sumber daya dengan generator CloudFormation IAC](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-start-resource-scan.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [StartResourceScan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/start-resource-scan.html)di *Referensi AWS CLI Perintah*. 

### `stop-stack-set-operation`
<a name="cloudformation_StopStackSetOperation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`stop-stack-set-operation`.

**AWS CLI**  
**Untuk menghentikan operasi set tumpukan**  
`stop-stack-set-operation`Contoh berikut menghentikan operasi pembaruan dalam progess pada set tumpukan yang ditentukan.  

```
aws cloudformation stop-stack-set-operation \
    --stack-set-name my-stack-set \
    --operation-id 1261cd27-490b-xmpl-ab42-793a896c69e6
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [StopStackSetOperation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/stop-stack-set-operation.html)di *Referensi AWS CLI Perintah*. 

### `test-type`
<a name="cloudformation_TestType_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`test-type`.

**AWS CLI**  
**Untuk menguji ekstensi**  
`test-type`Contoh berikut menguji ekstensi terdaftar untuk memastikannya memenuhi semua persyaratan yang diperlukan untuk dipublikasikan di CloudFormation registri.  

```
aws cloudformation test-type \
    --arn arn:aws:cloudformation:us-west-2:123456789012:type/resource/Sample-Test-Resource123/00000001
```
Output:  

```
{
    "TypeVersionArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/Sample-Test-Resource123/00000001"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan AWS CloudFormation registri](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [TestType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/test-type.html)di *Referensi AWS CLI Perintah*. 

### `update-stack-instances`
<a name="cloudformation_UpdateStackInstances_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-stack-instances`.

**AWS CLI**  
**Untuk memperbarui instance tumpukan**  
`update-stack-instances`Contoh berikut mencoba ulang pembaruan pada instance tumpukan di dua akun di dua wilayah dengan pengaturan terbaru. Pengaturan toleransi kesalahan yang ditentukan memastikan bahwa pembaruan dicoba di semua akun dan wilayah, bahkan jika beberapa tumpukan tidak dapat diperbarui.  

```
aws cloudformation update-stack-instances \
    --stack-set-name my-stack-set \
    --accounts 123456789012 567890123456 \
    --regions us-east-1 us-west-2 \
    --operation-preferences FailureToleranceCount=3
```
Output:  

```
{
    "OperationId": "103ebdf2-21ea-xmpl-8892-de5e30733132"
}
```
+  Untuk detail API, lihat [UpdateStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack-instances.html)di *Referensi AWS CLI Perintah*. 

### `update-stack-set`
<a name="cloudformation_UpdateStackSet_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-stack-set`.

**AWS CLI**  
**Untuk memperbarui set tumpukan**  
`update-stack-set`Contoh berikut menambahkan tag dengan nama kunci `Owner` dan nilai `IT` untuk instance stack dalam set stack yang ditentukan.  

```
aws cloudformation update-stack-set \
    --stack-set-name my-stack-set \
    --use-previous-template \
    --tags Key=Owner,Value=IT
```
Output:  

```
{
    "OperationId": "e2b60321-6cab-xmpl-bde7-530c6f47950e"
}
```
+  Untuk detail API, lihat [UpdateStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack-set.html)di *Referensi AWS CLI Perintah*. 

### `update-stack`
<a name="cloudformation_UpdateStack_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-stack`.

**AWS CLI**  
**Untuk memperbarui AWS CloudFormation tumpukan**  
`update-stack`Perintah berikut memperbarui template dan parameter input untuk `mystack` tumpukan:  

```
aws cloudformation update-stack --stack-name mystack --template-url https://s3.amazonaws.com/sample/updated.template --parameters ParameterKey=KeyPairName,ParameterValue=SampleKeyPair ParameterKey=SubnetIDs,ParameterValue=SampleSubnetID1\\,SampleSubnetID2
```
`update-stack`Perintah berikut memperbarui hanya nilai `SubnetIDs` parameter untuk `mystack` tumpukan. Jika Anda tidak menentukan nilai parameter, nilai default yang ditentukan dalam template digunakan:  

```
aws cloudformation update-stack --stack-name mystack --template-url https://s3.amazonaws.com/sample/updated.template --parameters ParameterKey=KeyPairName,UsePreviousValue=true ParameterKey=SubnetIDs,ParameterValue=SampleSubnetID1\\,UpdatedSampleSubnetID2
```
`update-stack`Perintah berikut menambahkan dua topik notifikasi `mystack` tumpukan ke tumpukan:  

```
aws cloudformation update-stack --stack-name mystack --use-previous-template --notification-arns "arn:aws:sns:use-east-1:123456789012:mytopic1" "arn:aws:sns:us-east-1:123456789012:mytopic2"
```
Untuk informasi selengkapnya, lihat [AWS CloudFormation tumpukan pembaruan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [UpdateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack.html)di *Referensi AWS CLI Perintah*. 

### `update-termination-protection`
<a name="cloudformation_UpdateTerminationProtection_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-termination-protection`.

**AWS CLI**  
**Untuk mengaktifkan perlindungan terminasi**  
`update-termination-protection`Contoh berikut memungkinkan perlindungan terminasi pada tumpukan yang ditentukan.  

```
aws cloudformation update-termination-protection \
    --stack-name my-stack \
    --enable-termination-protection
```
Output:  

```
{
    "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204"
}
```
+  Untuk detail API, lihat [UpdateTerminationProtection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-termination-protection.html)di *Referensi AWS CLI Perintah*. 

### `validate-template`
<a name="cloudformation_ValidateTemplate_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`validate-template`.

**AWS CLI**  
**Untuk memvalidasi template AWS CloudFormation **  
`validate-template`Perintah berikut memvalidasi `sampletemplate.json` template:  

```
aws cloudformation validate-template --template-body file://sampletemplate.json
```
Output:  

```
{
    "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
    "Parameters": [],
    "Capabilities": []
}
```
Untuk informasi selengkapnya, lihat Bekerja dengan AWS CloudFormation Template di *Panduan AWS CloudFormation Pengguna*.  
+  Untuk detail API, lihat [ValidateTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/validate-template.html)di *Referensi AWS CLI Perintah*. 