

Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. [AWS](https://github.com/awsdocs/aws-doc-sdk-examples) 

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# CloudFormation 를 사용한 예제 AWS CLI
<a name="cli_2_cloudformation_code_examples"></a>

다음 코드 예제에서는를와 AWS Command Line Interface 함께 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다 CloudFormation.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

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

다음 코드 예제에서는 `activate-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형을 활성화하려면**  
다음 `activate-type` 예제에서는 퍼블릭 타사 익스텐션을 활성화하여 스택 템플릿에서 사용할 수 있도록 합니다.  

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

```
{
    "Arn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/Example-Test-Alias"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ActivateType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/activate-type.html)을 참조하세요.

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

다음 코드 예제에서는 `batch-describe-type-configurations`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형 구성을 일괄 설명하는 방법**  
다음 `batch-describe-type-configurations` 예제에서는 유형에 대한 데이터를 구성합니다.  

```
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"
```
출력:  

```
{
    "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"
        }
    ]
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchDescribeTypeConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/batch-describe-type-configurations.html)를 참조하세요.

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

다음 코드 예제에서는 `cancel-update-stack`의 사용 방법을 보여줍니다.

**AWS CLI**  
**진행 중인 스택 업데이트를 취소하는 방법**  
다음 `cancel-update-stack` 명령은 `myteststack` 스택의 스택 업데이트를 취소합니다.  

```
aws cloudformation cancel-update-stack --stack-name myteststack
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CancelUpdateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/cancel-update-stack.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `continue-update-rollback`의 사용 방법을 보여줍니다.

**AWS CLI**  
**업데이트 롤백을 재시도하는 방법**  
다음 `continue-update-rollback` 예제에서는 이전에 실패한 스택 업데이트에서 롤백 작업을 재개합니다.  

```
aws cloudformation continue-update-rollback \
    --stack-name my-stack
```
이 명령은 출력을 생성하지 않습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ContinueUpdateRollback](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/continue-update-rollback.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `create-change-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**변경 세트를 생성하려면**  
다음 `create-change-set` 예제에서는 `CAPABILITY_IAM` 기능을 사용하여 변경 세트를 생성합니다. 파일은 IAM 리소스를 포함하는 스택을 정의하는 현재 폴더의 AWS CloudFormation 템플릿`template.yaml`입니다.  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-change-set.html)를 참조하세요.

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

다음 코드 예시는 `create-generated-template`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스캔한 리소스에서 생성된 템플릿 만들기**  
다음 `create-generated-template` 예제에서는 스캔한 리소스에서 이름이 `MyTemplate`인 생성된 템플릿을 생성합니다.  

```
aws cloudformation create-generated-template \
    --generated-template-name MyTemplate \
    --resources file://resources.json
```
`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"
        }
    }
]
```
출력:  

```
{
  "Arn":
    "arn:aws:cloudformation:us-east-1:123456789012:generatedtemplate/7fc8512c-d8cb-4e02-b266-d39c48344e48",
  "Name": "MyTemplate"
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [IaC 생성기로 스캔한 리소스에서 CloudFormation 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-generated-template.html) 섹션을 참조하세요.

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

다음 코드 예시는 `create-stack-instances`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 인스턴스를 생성하려면**  
다음 `create-stack-instances` 예제에서는 두 계정과 네 리전에서 스택 세트의 인스턴스를 생성합니다. 내결함성 설정을 사용하면 일부 스택을 생성할 수 없더라도 모든 계정과 리전에서 업데이트를 시도할 수 있습니다.  

```
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
```
출력:  

```
{
    "OperationId": "d7995c31-83c2-xmpl-a3d4-e9ca2811563f"
}
```
`create-stack-set` 명령을 사용하여 스택을 생성합니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-instances.html)를 참조하세요.

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

다음 코드 예시는 `create-stack-refactor`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 리팩터링 작업에 대한 스택 정의를 생성하려면**  
다음 `create-stack-refactor` 예제에서는 스택 리팩터링을 위한 스택 정의를 생성합니다.  

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

```
{
    "StackRefactorId": "9c384f70-4e07-4ed7-a65d-fee5eb430841"
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [스택 리팩터링](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-refactor.html) 섹션을 참조하세요.

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

다음 코드 예시는 `create-stack-set`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 세트를 생성하려면**  
다음 `create-stack-set` 예제에서는 지정된 YAML 파일 temlplate을 사용하여 스택 세트를 생성합니다. `template.yaml`는 스택을 정의하는 현재 폴더의 AWS CloudFormation 템플릿입니다.  

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

```
{
    "StackSetId": "my-stack-set:8d0f160b-d157-xmpl-a8e6-c0ce8e5d8cc1"
}
```
스택 세트에 스택 인스턴스를 추가하려면 `create-stack-instances` 명령을 사용하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack-set.html)를 참조하세요.

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

다음 코드 예시는 `create-stack`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 스택을 생성하려면**  
다음 `create-stacks` 명령에서는 `sampletemplate.json` 템플릿을 사용하여 이름이 `myteststack`인 스택을 생성합니다.  

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

```
{
    "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896"
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용 설명서*의 스택을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-stack.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `deactivate-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형을 비활성화하려면**  
다음 `deactivate-type` 예제에서는 이 계정 및 리전에서 이전에 활성화된 퍼블릭 익스텐션을 비활성화합니다.  

```
aws cloudformation deactivate-type \
    --region us-west-2 \
    --type MODULE \
    --type-name Example::Test::Type::MODULE
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeactivateType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deactivate-type.html)을 참조하세요.

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

다음 코드 예제에서는 `delete-change-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**변경 세트를 삭제하려면**  
다음 `delete-change-set` 예제에서는 변경 세트 이름과 스택 이름을 지정하여 변경 세트를 삭제합니다.  

```
aws cloudformation delete-change-set \
    --stack-name my-stack \
    --change-set-name my-change-set
```
이 명령은 출력을 생성하지 않습니다.  
다음 `delete-change-set` 예제에서는 변경 세트의 전체 ARN을 지정하여 변경 세트를 삭제합니다.  

```
aws cloudformation delete-change-set \
    --change-set-name arn:aws:cloudformation:us-east-2:123456789012:changeSet/my-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0
```
이 명령은 출력을 생성하지 않습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-change-set.html)를 참조하세요.

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

다음 코드 예시는 `delete-generated-template`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**생성된 템플릿을 삭제하려면**  
다음 `delete-generated-template` 예제에서는 지정된 템플릿을 삭제합니다.  

```
aws cloudformation delete-generated-template \
    --generated-template-name MyTemplate
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [기존 리소스에서 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-generated-template.html) 섹션을 참조하세요.

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

다음 코드 예시는 `delete-stack-instances`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 인스턴스를 삭제하려면**  
다음 `delete-stack-instances` 예제에서는 두 리전의 두 계정에 있는 스택 세트의 인스턴스를 삭제하고 스택을 종료합니다.  

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

```
{
    "OperationId": "ad49f10c-fd1d-413f-a20a-8de6e2fa8f27"
}
```
빈 스택 세트를 삭제하려면 `delete-stack-set` 명령을 사용하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack-instances.html)를 참조하세요.

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

다음 코드 예제에서는 `delete-stack-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트를 삭제하려면**  
다음 명령은 지정된 빈 스택 세트를 삭제합니다. 스택 세트는 비어 있어야 합니다.  

```
aws cloudformation delete-stack-set \
    --stack-set-name my-stack-set
```
이 명령은 출력을 생성하지 않습니다.  
스택 세트에서 인스턴스를 삭제하려면 `delete-stack-instances` 명령을 사용하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack-set.html)를 참조하세요.

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

다음 코드 예제에서는 `delete-stack`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택을 삭제하는 방법**  
다음 `delete-stack` 예제에서는 지정된 스택을 삭제합니다.  

```
aws cloudformation delete-stack \
    --stack-name my-stack
```
이 명령은 출력을 생성하지 않습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/delete-stack.html)을 참조하세요.

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

다음 코드 예제에서는 `deploy`의 사용 방법을 보여줍니다.

**AWS CLI**  
다음 명령은 이름이 `template.json`인 템플릿을 `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
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [Deploy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy.html)를 참조하세요.

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

다음 코드 예제에서는 `deregister-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형 버전 등록을 취소하려면**  
다음 `deregister-type` 예제에서는 CloudFormation 레지스트리의 활성 사용에서 지정된 유형 버전을 제거하여 CloudFormation 작업에서 더 이상 사용할 수 없도록 합니다.  

```
aws cloudformation deregister-type \
    --type RESOURCE \
    --type-name My::Logs::LogGroup \
    --version-id 00000002
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeregisterType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deregister-type.html)을 참조하세요.

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

다음 코드 예제에서는 `describe-account-limits`의 사용 방법을 보여줍니다.

**AWS CLI**  
**계정 한도에 대한 정보를 가져오려면**  
다음 명령은 현재 계정에 대한 리전 제한 목록을 검색합니다.  

```
aws cloudformation describe-account-limits
```
출력:  

```
{
    "AccountLimits": [
        {
            "Name": "StackLimit",
            "Value": 200
        },
        {
            "Name": "StackOutputsLimit",
            "Value": 60
        },
        {
            "Name": "ConcurrentResourcesLimit",
            "Value": 2500
        }
    ]
}
```
+  API 세부 정보는 **AWS CLI 명령 참조의 [DescribeAccountLimits](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-account-limits.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `describe-change-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**변경 집합에 대한 정보를 얻으려면**  
다음 `describe-change-set` 예제에서는 변경 세트 이름 및 스택 이름으로 지정된 변경 세트의 세부 정보를 표시합니다.  

```
aws cloudformation describe-change-set \
    --change-set-name my-change-set \
    --stack-name my-stack
```
다음 `describe-change-set` 예제에서는 변경 세트의 전체 ARN에 지정된 변경 세트의 세부 정보를 표시합니다.  

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

```
{
    "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
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-change-set.html)를 참조하세요.

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

다음 코드 예시는 `describe-generated-template`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**생성된 템플릿을 설명하려면**  
다음 `describe-generated-template` 예제에서는 지정된 템플릿을 설명합니다.  

```
aws cloudformation describe-generated-template \
    --generated-template-name MyTemplate
```
출력:  

```
{
    "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
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [기존 리소스에서 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeGeneratedTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-generated-template.html) 섹션을 참조하세요.

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

다음 코드 예시는 `describe-publisher`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**게시자를 설명하려면**  
다음 `describe-publisher` 예제에서는 게시자에 대한 정보를 구성합니다.  

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

```
{
    "PublisherId": "000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c",
    "PublisherStatus": "VERIFIED",
    "IdentityProvider": "AWS_Marketplace",
    "PublisherProfile": "https://aws.amazon.com/marketplace/seller-profile?id=2c5dc1f0-17cd-4259-8e46-822a83gdtegd"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribePublisher](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-publisher.html)를 참조하세요.

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

다음 코드 예시는 `describe-resource-scan`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**리소스 스캔을 설명하려면**  
다음 `describe-resource-scan` 예제에서는 지정된 스캔 ID가 있는 리소스 스캔을 설명합니다.  

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

```
{
    "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
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [기존 리소스에서 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeResourceScan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-resource-scan.html) 섹션을 참조하세요.

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

다음 코드 예시는 `describe-stack-drift-detection-status`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**드리프트 감지 작업의 상태를 확인하려면**  
다음 `describe-stack-drift-detection-status` 예제에서는 드리프트 감지 작업의 상태를 표시합니다. ID를 얻으려면 `detect-stack-drift` 명령을 실행하세요.  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackDriftDetectionStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-drift-detection-status.html)를 참조하세요.

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

다음 코드 예제에서는 `describe-stack-events`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 이벤트를 설명하려면**  
다음 `describe-stack-events` 예제에서는 지정된 스택의 가장 최근 이벤트 2개를 표시합니다.  

```
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=="
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-events.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `describe-stack-instance`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 인스턴스를 설명하려면**  
다음 명령은 지정된 계정 및 리전에서 지정된 스택 세트의 인스턴스를 설명합니다. 스택 세트는 현재 리전 및 계정에 있고 인스턴스는 계정 `123456789012`의 `us-west-2` 리전에 있습니다.  

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

```
{
    "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=)."
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackInstance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-instance.html)를 참조하세요.

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

다음 코드 예시는 `describe-stack-refactor`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 리팩터링 작업을 설명하려면**  
다음 `describe-stack-refactor` 예제에서는 지정된 스택 리팩터링 ID로 스택 리팩터링 작업을 설명합니다.  

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

```
{
    "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"
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [스택 리팩터링](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-refactor.html) 섹션을 참조하세요.

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

다음 코드 예시는 `describe-stack-resource-drifts`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 정의에서 드리프트된 리소스에 대한 정보를 가져오려면**  
다음 명령은 지정된 스택의 드리프트된 리소스에 대한 정보를 표시합니다. 드리프트 감지를 시작하려면 `detect-stack-drift` 명령을 사용하세요.  

```
aws cloudformation describe-stack-resource-drifts \
    --stack-name my-stack
```
출력에는 out-of-band에서 수정된 AWS Lambda 함수가 표시됩니다.  

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackResourceDrifts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resource-drifts.html)를 참조하세요.

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

다음 코드 예제에서는 `describe-stack-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 리소스에 대한 정보를 가져오려면**  
다음 `describe-stack-resource` 예제에서는 지정된 스택의 이름이 `MyFunction`인 리소스에 대한 세부 정보를 표시합니다.  

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

```
{
    "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"
        }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resource.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `describe-stack-resources`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 리소스에 대한 정보를 가져오려면**  
다음 `describe-stack-resources` 예제에서는 지정된 스택의 리소스에 대한 세부 정보를 표시합니다.  

```
aws cloudformation describe-stack-resources \
    --stack-name my-stack
```
출력:  

```
{
    "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"
            }
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-resources.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `describe-stack-set-operation`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트 작업에 대한 정보를 가져오려면**  
다음 describe-stack-set-operation 예제에서는 지정된 스택 세트의 업데이트 작업에 대한 세부 정보를 표시합니다.  

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

```
{
    "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"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackSetOperation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-set-operation.html)을 참조하세요.

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

다음 코드 예제에서는 `describe-stack-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트에 대한 정보를 가져오려면**  
다음 describe-stack-set 예제에서는 지정된 스택 세트에 대한 세부 정보를 표시합니다.  

```
aws cloudformation describe-stack-set \
    --stack-set-name my-stack-set
```
출력:  

```
{
    "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"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stack-set.html)를 참조하세요.

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

다음 코드 예시는 `describe-stacks`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 스택을 설명하려면**  
다음 `describe-stacks` 명령에서는 `myteststack` 스택에 대한 요약 정보를 보여줍니다.  

```
aws cloudformation describe-stacks --stack-name myteststack
```
출력:  

```
{
    "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
        }
    ]
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용 설명서*의 스택을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeStacks](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-stacks.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `describe-type-registration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형 등록 정보를 표시하려면**  
다음 `describe-type-registration` 예제에서는 유형의 현재 상태, 유형, 버전을 포함하여 지정된 유형 등록에 대한 정보를 표시합니다.  

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

```
{
    "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"
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeTypeRegistration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-type-registration.html)을 참조하세요.

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

다음 코드 예제에서는 `describe-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형 정보를 표시하려면**  
다음 `describe-type` 예제에서는 지정된 유형에 대한 정보를 표시합니다.  

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

```
{
    "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]"
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/describe-type.html)을 참조하세요.

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

다음 코드 예제에서는 `detect-stack-drift`의 사용 방법을 보여줍니다.

**AWS CLI**  
**드리프트된 리소스를 감지하려면**  
다음 `detect-stack-drift` 예제에서는 지정된 스택에 대한 드리프트 감지를 시작합니다.  

```
aws cloudformation detect-stack-drift \
    --stack-name my-stack
```
출력:  

```
{
    "StackDriftDetectionId": "1a229160-e4d9-xmpl-ab67-0a4f93df83d4"
}
```
그런 다음 이 ID를 `describe-stack-resource-drifts` 명령과 함께 사용하여 드리프트된 리소스를 설명할 수 있습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DetectStackDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-drift.html)를 참조하세요.

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

다음 코드 예제에서는 `detect-stack-resource-drift`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스의 드리프트를 감지하려면**  
다음 `detect-stack-resource-drift` 예제에서는 드리프트에 대해 `MyStack`라는 스택에 `MyFunction`라는 리소스를 확인합니다.  

```
aws cloudformation detect-stack-resource-drift \
   --stack-name MyStack \
   --logical-resource-id MyFunction
```
출력에는 out-of-band에서 수정된 AWS Lambda 함수가 표시됩니다.  

```
{
    "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"
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DetectStackResourceDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-resource-drift.html)를 참조하세요.

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

다음 코드 예제에서는 `detect-stack-set-drift`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트 및 모든 관련 스택 인스턴스에서 드리프트를 감지하려면**  
다음 `detect-stack-set-drift` 예제에서는 해당 스택 세트와 연결된 모든 스택 인스턴스를 포함하여 지정된 스택 세트에서 드리프트 감지 작업을 시작하고 드리프트 작업의 상태를 추적하는 데 사용할 수 있는 작업 ID를 반환합니다.  

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

```
{
    "OperationId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [스택 세트에서 관리되지 않는 구성 변경 사항 감지](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-drift.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DetectStackSetDrift](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/detect-stack-set-drift.html)를 참조하세요.

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

다음 코드 예제에서는 `estimate-template-cost`의 사용 방법을 보여줍니다.

**AWS CLI**  
**템플릿 비용을 추정하려면**  
다음 `estimate-template-cost` 예제에서는 현재 폴더에서 이름이 `template.yaml`인 템플릿에 대한 예상 비용을 생성합니다.  

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

```
{
    "Url": "http://calculator.s3.amazonaws.com/calc5.html?key=cloudformation/7870825a-xmpl-4def-92e7-c4f8dd360cca"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [EstimateTemplateCost](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/estimate-template-cost.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `execute-change-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**변경 세트를 실행하려면**  
다음 `execute-change-set` 예제에서는 변경 세트 이름 및 스택 이름으로 지정된 변경 세트를 실행합니다.  

```
aws cloudformation execute-change-set \
    --change-set-name my-change-set \
    --stack-name my-stack
```
다음 `execute-change-set` 예제에서는 변경 세트의 전체 ARN에서 지정된 변경 세트를 실행합니다.  

```
aws cloudformation execute-change-set \
    --change-set-name arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-change-set/bc9555ba-a949-xmpl-bfb8-f41d04ec5784
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ExecuteChangeSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/execute-change-set.html)를 참조하세요.

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

다음 코드 예시는 `execute-stack-refactor`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 리팩터링 작업을 완료하려면**  
다음 `execute-stack-refactor` 예시에서는 지정된 스택 리팩터링 ID로 스택 리팩터링 작업을 완료합니다.  

```
aws cloudformation execute-stack-refactor \
    --stack-refactor-id 9c384f70-4e07-4ed7-a65d-fee5eb430841
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [스택 리팩터링](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ExecuteStackRefactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/execute-stack-refactor.html) 섹션을 참조하세요.

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

다음 코드 예시는 `get-stack-policy`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 정책을 보려면**  
다음 `get-stack-policy` 예제에서는 지정된 스택에 대한 스택 정책을 표시합니다. 스택에 정책을 연결하려면 `set-stack-policy` 명령을 사용하세요.  

```
aws cloudformation get-stack-policy \
    --stack-name my-stack
```
출력:  

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetStackPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-stack-policy.html)를 참조하세요.

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

다음 코드 예제에서는 `get-template-summary`의 사용 방법을 보여줍니다.

**AWS CLI**  
**템플릿 요약을 표시하려면**  
다음 명령은 지정된 템플릿 파일의 리소스 및 메타데이터에 대한 요약 정보를 표시합니다.  

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

```
{
    "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"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetTemplateSummary](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-template-summary.html)를 참조하세요.

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

다음 코드 예시는 `get-template`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 스택의 템플릿 본문을 보려면**  
다음 `get-template` 명령에서는 `myteststack` 스택에 대한 템플릿을 보여줍니다.  

```
aws cloudformation get-template --stack-name myteststack
```
출력:  

```
{
    "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"
                }
            }
        }
    }
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/get-template.html)을 참조하세요.

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

다음 코드 예제에서는 `list-change-sets`의 사용 방법을 보여줍니다.

**AWS CLI**  
**변경 세트를 나열하려면**  
다음 `list-change-sets` 예제에서는 지정된 스택에 대해 보류 중인 변경 세트 목록을 표시합니다.  

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

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListChangeSets](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-change-sets.html)를 참조하세요.

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

다음 코드 예제에서는 `list-exports`의 사용 방법을 보여줍니다.

**AWS CLI**  
**내보내기를 나열하려면**  
다음 `list-exports` 예제에서는 현재 리전의 스택에서 내보내기 목록을 표시합니다.  

```
aws cloudformation list-exports
```
출력:  

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListExports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-exports.html)를 참조하세요.

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

다음 코드 예시는 `list-generated-templates`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**생성된 템플릿을 나열하려면**  
다음 `list-generated-templates` 예시에서는 모든 생성된 템플릿을 나열합니다.  

```
aws cloudformation list-generated-templates
```
출력:  

```
{
    "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
        }
    ]
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [기존 리소스에서 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListGeneratedTemplates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-generated-templates.html) 섹션을 참조하세요.

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

다음 코드 예시는 `list-imports`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**가져오기를 나열하려면**  
다음 `list-imports` 예제에서는 지정된 내보내기를 가져오는 스택을 나열합니다. 사용 가능한 내보내기 목록을 가져오려면 `list-exports` 명령을 사용하세요.  

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

```
{
    "Imports": [
        "my-database-stack"
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListImports](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-imports.html)를 참조하세요.

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

다음 코드 예시는 `list-resource-scan-related-resources`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**리소스 스캔에서 관련 리소스를 나열하려면**  
다음 `list-resource-scan-related-resources` 예시에서는 `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
```
`resources.json`의 콘텐츠:  

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

```
{
    "RelatedResources": [
        {
            "ResourceType": "AWS::EKS::Nodegroup",
            "ResourceIdentifier": {
                "NodegroupName": "MyAppNodegroupName"
            },
            "ManagedByStack": false
        },
        {
            "ResourceType": "AWS::IAM::Role",
            "ResourceIdentifier": {
                "RoleId": "arn:aws::iam::123456789012:role/MyAppIAMRole"
            },
            "ManagedByStack": false
        }
    ]
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [IaC 생성기로 스캔한 리소스에서 CloudFormation 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListResourceScanRelatedResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-resource-scan-related-resources.html) 섹션을 참조하세요.

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

다음 코드 예시는 `list-resource-scan-resources`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**리소스 스캔의 리소스를 나열하려면**  
다음 `list-resource-scan-resources` 예시에서는 지정된 리소스 스캔의 리소스를 리소스 식별자별로 필터링하여 나열합니다.  

```
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
```
출력:  

```
{
    "Resources": [
        {
            "ResourceType": "AWS::EKS::Cluster",
            "ResourceIdentifier": {
                "ClusterName": "MyAppClusterName"
            },
            "ManagedByStack": false
        },
        {
            "ResourceType": "AWS::AutoScaling::AutoScalingGroup",
            "ResourceIdentifier": {
                "AutoScalingGroupName": "MyAppASGName"
            },
            "ManagedByStack": false
        }
    ]
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [IaC 생성기로 스캔한 리소스에서 CloudFormation 템플릿 생성](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListResourceScanResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-resource-scan-resources.html) 섹션을 참조하세요.

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

다음 코드 예시는 `list-stack-instances`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택의 인스턴스를 나열하려면**  
다음 `list-stack-instances` 예제에서는 지정된 스택 세트에서 생성된 인스턴스를 나열합니다.  

```
aws cloudformation list-stack-instances \
    --stack-set-name enable-config
```
예제 출력에는 오류로 인해 업데이트하지 못한 스택에 대한 세부 정보가 포함됩니다.  

```
{
    "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)."
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-instances.html)를 참조하세요.

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

다음 코드 예시는 `list-stack-refactor-actions`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 리팩터링 작업에 대한 작업을 나열하려면**  
다음 `list-stack-refactor-actions` 예시에서는 지정된 스택 리팩터링 ID로 스택 리팩터링 작업에 대한 작업을 나열합니다.  

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

```
{
    "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"
                }
            }
        }
    ]
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [스택 리팩터링](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-refactoring.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackRefactorActions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-refactor-actions.html) 섹션을 참조하세요.

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

다음 코드 예시는 `list-stack-resources`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택의 리소스를 나열하려면**  
다음 명령은 지정된 스택의 리소스 목록을 표시합니다.  

```
aws cloudformation list-stack-resources \
    --stack-name my-stack
```
출력:  

```
{
    "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"
            }
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-resources.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `list-stack-set-operation-results`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트 작업 결과를 나열하려면**  
다음 명령은 지정된 스택 세트의 인스턴스에 대한 업데이트 작업 결과를 표시합니다.  

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

```
{
    "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"
        }
    ]
}
```
**참고:** 계정 게이트 함수를 생성하지 않는 한 `AccountGateResult`의 `SKIPPED` 상태는 성공적인 작업에 대해 예상됩니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackSetOperationResults](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-set-operation-results.html)를 참조하세요.

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

다음 코드 예제에서는 `list-stack-set-operations`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트 작업을 나열하려면**  
다음 `list-stack-set-operations` 예제에서는 지정된 스택 세트에 대한 최신 작업 목록을 표시합니다.  

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

```
{
    "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"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackSetOperations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-set-operations.html)를 참조하세요.

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

다음 코드 예제에서는 `list-stack-sets`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트를 나열하려면**  
다음 `list-stack-sets` 예제에서는 현재 리전 및 계정의 스택 세트 목록을 표시합니다.  

```
aws cloudformation list-stack-sets
```
출력:  

```
{
    "Summaries": [
        {
            "StackSetName": "enable-config",
            "StackSetId": "enable-config:296a3360-xmpl-40af-be78-9341e95bf743",
            "Description": "Enable AWS Config",
            "Status": "ACTIVE"
        }
    ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStackSets](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stack-sets.html)를 참조하세요.

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

다음 코드 예시는 `list-stacks`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 스택을 나열하려면**  
다음 `list-stacks` 명령에서는 상태가 `CREATE_COMPLETE`인 모든 스택에 대한 요약 내용을 보여줍니다.  

```
aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE
```
출력:  

```
[
    {
        "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"
    }
]
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListStacks](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-stacks.html) 섹션을 참조하세요.

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

다음 코드 예제에서는 `list-type-registrations`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형의 완료된 등록을 나열하려면**  
다음 `list-type-registrations` 예제에서는 지정된 유형에 대해 완료된 유형 등록 목록을 표시합니다.  

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

```
{
    "RegistrationTokenList": [
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333"
    ]
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTypeRegistrations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-type-registrations.html)를 참조하세요.

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

다음 코드 예제에서는 `list-type-versions`의 사용 방법을 보여줍니다.

**AWS CLI**  
**익스텐션 버전을 나열하려면**  
다음 `list-type-versions` 예제에서는 익스텐션 버전에 대한 요약 정보를 반환합니다.  

```
aws cloudformation list-type-versions \
  --endpoint https://example.com \
  --region us-west-2 \
  --type RESOURCE \
  --type-name My::Resource::Example \
  --publisher-id 123456789012
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTypeVersions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-type-versions.html)를 참조하세요.

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

다음 코드 예제에서는 `list-types`의 사용 방법을 보여줍니다.

**AWS CLI**  
**계정의 프라이빗 리소스 유형을 나열하려면**  
다음 `list-types` 예제에서는 현재 AWS 계정에 현재 등록된 프라이빗 리소스 유형의 목록을 표시합니다.  

```
aws cloudformation list-types
```
출력:  

```
{
    "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"
        }
    ]
}
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTypes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/list-types.html)를 참조하세요.

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

다음 코드 예제에서는 `package`의 사용 방법을 보여줍니다.

**AWS CLI**  
다음 명령은 로컬 아티팩트를 S3 버킷 `bucket-name`에 업로드하여 `template.json`라는 템플릿을 내보내고 내보낸 템플릿을 `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
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [Package](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/package.html)를 참조하세요.

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

다음 코드 예제에서는 `publish-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**익스텐션을 게시하려면**  
다음 `publish-type` 예제에서는 지정된 확장을 이 리전의 퍼블릭 익스텐션으로 CloudFormation 레지스트리에 게시합니다.  

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

```
{
    "PublicTypeArn":"arn:aws:cloudformation:us-west-2::type/resource/000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c/Example-Test-1234567890abcdef0/1.0.0"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PublishType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/publish-type.html)을 참조하세요.

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

다음 코드 예제에서는 `register-publisher`의 사용 방법을 보여줍니다.

**AWS CLI**  
**게시자를 등록하려면**  
다음 `register-publisher` 예제에서는 게시자를 등록하고 용어 및 조건 파라미터를 수락합니다.  

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

```
{
    "PublisherId": "000q6TfUovXsEMmgKowxDZLlwqr2QUshd2e75c8c"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RegisterPublisher](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/register-publisher.html)를 참조하세요.

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

다음 코드 예제에서는 `register-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스 유형을 등록하려면**  
다음 `register-type` 예제에서는 지정된 리소스 유형을 사용자 계정의 프라이빗 리소스 유형으로 등록합니다.  

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

```
{
    "RegistrationToken": "f5525280-104e-4d35-bef5-8f1f1example"
}
```
자세한 내용은 *유형 개발을 위한 CloudFormation 명령줄 인터페이스 사용자 가이드*에서 [리소스 공급자 등록](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-register.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RegisterType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/register-type.html)을 참조하세요.

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

다음 코드 예제에서는 `set-stack-policy`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 정책을 적용하려면**  
다음 `set-stack-policy` 예제에서는 지정된 스택의 지정된 리소스에 대한 업데이트를 비활성화합니다. `stack-policy.json`은 스택의 리소스에 허용되는 작업을 정의하는 JSON 문서입니다.  

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

```
{
  "Statement" : [
    {
      "Effect" : "Allow",
      "Action" : "Update:*",
      "Principal": "*",
      "Resource" : "*"
    },
    {
      "Effect" : "Deny",
      "Action" : "Update:*",
      "Principal": "*",
      "Resource" : "LogicalResourceId/bucket"
    }
  ]
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SetStackPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-stack-policy.html)를 참조하세요.

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

다음 코드 예제에서는 `set-type-configuration`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터를 구성하려면**  
다음 `set-type-configuration` 예제에서는 지정된 계정 및 리전에서 등록된 CloudFormation 익스텐션의 구성 데이터를 지정합니다.  

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

```
{
    "ConfigurationArn": "arn:aws:cloudformation:us-west-2:123456789012:type-configuration/resource/Example-Test-Type/default"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SetTypeConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-type-configuration.html)을 참조하세요.

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

다음 코드 예제에서는 `set-type-default-version`의 사용 방법을 보여줍니다.

**AWS CLI**  
**유형의 기본 버전을 설정하려면**  
다음 `set-type-default-version` 예제에서는 지정된 유형 버전을 이 유형의 기본값으로 설정합니다.  

```
aws cloudformation set-type-default-version \
    --type RESOURCE \
    --type-name My::Logs::LogGroup \
    --version-id 00000003
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용을 알아보려면 *AWS CloudFormation 사용자 가이드*의 [CloudFormation 레지스트리 사용](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SetTypeDefaultVersion](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/set-type-default-version.html)을 참조하세요.

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

다음 코드 예제에서는 `signal-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스에 신호를 보내려면**  
다음 `signal-resource` 예제는 `my-stack`라는 스택에 `MyWaitCondition`라는 대기 조건을 충족하도록 `success` 신호를 보냅니다.  

```
aws cloudformation signal-resource \
    --stack-name my-stack \
    --logical-resource-id MyWaitCondition \
    --unique-id 1234 \
    --status SUCCESS
```
이 명령은 출력을 생성하지 않습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SignalResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/signal-resource.html)를 참조하세요.

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

다음 코드 예시는 `start-resource-scan`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**리소스 스캔을 시작하려면**  
다음 `start-resource-scan` 예시에서는 현재 계정 및 리전의 모든 기존 리소스를 스캔하는 리소스 스캔을 시작합니다.  

```
aws cloudformation start-resource-scan
```
출력:  

```
{
    "ResourceScanId":
      "arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a699f15-489c-43ca-a3ef-3e6ecfa5da60"
}
```
자세한 내용은 *AWS CloudFormation 사용 설명서*의 [CloudFormation IaC 생성기로 리소스 스캔 시작](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-start-resource-scan.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StartResourceScan](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/start-resource-scan.html)을 참조하세요.

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

다음 코드 예시는 `stop-stack-set-operation`의 사용 방법을 보여 줍니다.

**AWS CLI**  
**스택 세트 작업을 중지하려면**  
다음 `stop-stack-set-operation` 예제에서는 지정된 스택 세트에 대한 프로모션 내 업데이트 작업을 중지합니다.  

```
aws cloudformation stop-stack-set-operation \
    --stack-set-name my-stack-set \
    --operation-id 1261cd27-490b-xmpl-ab42-793a896c69e6
```
이 명령은 출력을 생성하지 않습니다.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StopStackSetOperation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/stop-stack-set-operation.html)을 참조하세요.

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

다음 코드 예제에서는 `test-type`의 사용 방법을 보여줍니다.

**AWS CLI**  
**익스텐션을 테스트하려면**  
다음 `test-type` 예제에서는 등록된 익스텐션을 테스트하여 CloudFormation 레지스트리에 게시되는 데 필요한 모든 요구 사항을 충족하는지 확인합니다.  

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

```
{
    "TypeVersionArn": "arn:aws:cloudformation:us-west-2:123456789012:type/resource/Sample-Test-Resource123/00000001"
}
```
자세한 내용은 [AWS CloudFormation 사용 설명서의 CloudFormation 레지스트리 사용을](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html) 참조하세요. *AWS CloudFormation *  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TestType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/test-type.html)을 참조하세요.

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

다음 코드 예제에서는 `update-stack-instances`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 인스턴스를 업데이트하려면**  
다음 `update-stack-instances` 예제에서는 최신 설정을 사용하여 두 리전의 두 계정에 있는 스택 인스턴스에 대한 업데이트를 재시도합니다. 지정된 내결함성 설정을 사용하면 일부 스택을 업데이트할 수 없더라도 모든 계정과 리전에서 업데이트를 시도할 수 있습니다.  

```
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
```
출력:  

```
{
    "OperationId": "103ebdf2-21ea-xmpl-8892-de5e30733132"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateStackInstances](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack-instances.html)를 참조하세요.

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

다음 코드 예제에서는 `update-stack-set`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스택 세트를 업데이트하려면**  
다음 `update-stack-set` 예제에서는 지정된 스택 세트의 스택 인스턴스에 키 이름 `Owner`와 `IT` 값이 포함된 태그를 추가합니다.  

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

```
{
    "OperationId": "e2b60321-6cab-xmpl-bde7-530c6f47950e"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateStackSet](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack-set.html)를 참조하세요.

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

다음 코드 예시는 `update-stack`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 스택을 업데이트하려면**  
다음 `update-stack` 명령에서는 `mystack` 스택의 템플릿 및 입력 파라미터를 업데이트합니다.  

```
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` 명령에서는 `mystack` 스택의 `SubnetIDs` 파라미터값만 업데이트합니다. 파라미터값을 지정하지 않으면 템플릿에 지정된 기본값이 사용됩니다.  

```
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` 명령에서는 `mystack` 스택에 스택 알림 주제 2개를 추가합니다.  

```
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"
```
자세한 내용을 알아보려면 *AWS CloudFormation 사용 설명서*의 [AWS CloudFormation 스택 업데이트](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateStack](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-stack.html)을 참조하세요.

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

다음 코드 예제에서는 `update-termination-protection`의 사용 방법을 보여줍니다.

**AWS CLI**  
**종료 방지 기능을 활성화하려면**  
다음 `update-termination-protection` 예제에서는 지정된 스택에서 종료 방지를 활성화합니다.  

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

```
{
    "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204"
}
```
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateTerminationProtection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/update-termination-protection.html)을 참조하세요.

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

다음 코드 예시는 `validate-template`의 사용 방법을 보여 줍니다.

**AWS CLI**  
** AWS CloudFormation 템플릿을 검증하려면**  
다음 `validate-template` 명령은 `sampletemplate.json` 템플릿의 유효성을 확인합니다.  

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

```
{
    "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": []
}
```
자세한 내용은 AWS CloudFormation *AWS 사용 설명서의 CloudFormation *템플릿 작업을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ValidateTemplate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/validate-template.html)을 참조하세요.