

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

# Cloud Control API 리소스 작업
<a name="resource-operations"></a>

 AWS Cloud Control API 를 사용하여의 리소스에 대한 또는 기타 명령 동사 구성 생성, 읽기, 업데이트, 제거 및 목록(-L) 작업을 수행합니다 AWS 계정.

**Topics**
+ [사전 조건](#resource-operations-prerequisites)
+ [보안 인증 지정](#resource-operations-permissions)
+ [요청이 고유한지 확인](#resource-operations-idempotency)
+ [고려 사항](#resource-operations-considerations)
+ [리소스 생성](resource-operations-create.md)
+ [리소스 업데이트](resource-operations-update.md)
+ [리소스 삭제](resource-operations-delete.md)
+ [리소스 검색](resource-operations-list.md)
+ [리소스 읽기](resource-operations-read.md)
+ [리소스 요청 관리](resource-operations-manage-requests.md)
+ [를 사용하여 리소스 식별 AWS Cloud Control API](resource-identifier.md)

## Cloud Control API로 리소스를 사용하기 위한 사전 요구 사항
<a name="resource-operations-prerequisites"></a>

Cloud Control API를 사용하여 특정 리소스를 프로비저닝하려면 해당 리소스 유형이 Cloud Control API를 지원하고 AWS 계정에서 사용할 수 있어야 합니다.
+ **에서 사용할 수 있는 리소스 AWS 계정**

  계정에서 사용할 수 있으려면 공개 리소스 유형을 활성화하고 비공개 리소스 유형을 등록해야 합니다. 지원되는 AWS 리소스 유형은 퍼블릭이며 항상 활성화됩니다. 자세한 내용은 [Cloud Control API 리소스 유형 사용](resource-types.md) 단원을 참조하십시오.
+ **클라우드 컨트롤 API를 지원하는 리소스**

  Cloud Control API를 지원하는 AWS 리소스 유형 목록은 섹션을 참조하세요[Cloud Control롤 API를 지원하는 리소스 유형](supported-resources.md).

  타사 리소스 유형(공개 및 비공개 모두)은 Cloud Control API를 지원합니다.

  특정 리소스 유형이 Cloud Control API를 지원하는지 확인하는 방법에 대한 자세한 내용은 [리소스 유형이 Cloud Control API를 지원하는지 여부 결정](resource-types.md#resource-types-determine-support) 섹션을 참조하세요.

리소스 유형 사용에 대한 자세한 내용은 [Cloud Control API 리소스 유형 사용](resource-types.md) 섹션을 참조하세요.

## 클라우드 컨트롤 API의 보안 인증 지정
<a name="resource-operations-permissions"></a>

사용자를 대신하여 AWS 리소스에 대한 작업을 수행하는 과정에서 Cloud Control API는 해당 리소스를 실제로 프로비저닝하는 기본 AWS 서비스를 호출해야 합니다. 이렇게 하려면 Cloud Control API에서 해당 서비스에 액세스하는 데 필요한 보안 인증이 필요합니다. Cloud Control API를 활성화하여 이러한 보안 인증을 획득하는 방법으로는 두 가지가 있습니다.
+ **사용자 보안 인증**

  기본적으로 Cloud Control API는 AWS 사용자 자격 증명을 사용하여 임시 세션을 생성하고 이를 사용하여 다운스트림 AWS 서비스에 필요한 호출을 수행합니다. 이 세션은 최대 24시간까지 지속되며, 이 시간이 지나면 Cloud Control API를 통해 행해지는 AWS 에 대한 모든 나머지 호출은 실패합니다.
+ **서비스 역할 보안 인증**

  리소스 작업 중에 리소스를 요청할 때 Cloud Control API가 맡을 서비스 역할을 지정할 수도 있습니다. 다른 장점 중에서도 서비스 역할을 지정하면 Cloud Control API가 기본 AWS 서비스를 최대 36시간 동안 직접 호출할 수 있다는 점입니다.

  서비스 역할을 사용하려면 리소스 작업 요청의 `RoleArn` 파라미터를 지정하세요.

  Cloud Control API 작업은 CloudFormation 서비스의 일부이므로 지정한 서비스 역할은 CloudFormation 서비스()에서 수임합니다`cloudformation.amazonaws.com`. 자세한 내용을 알아보려면 *AWS CloudFormation 사용 설명서*의 [CloudFormation 서비스 역할](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html)을 참조하세요.

각 리소스 핸들러에 필요한 권한은 해당 리소스 유형의 스키마 `handlers` 섹션에 정의되어 있습니다. 스키마 보기에 대한 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 섹션을 참조하세요. `handlers` 섹션은 [리소스 유형 정의 스키마](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers)에 정의되어 있습니다.

## Cloud Control API를 사용할 때 리소스 작업 요청이 고유한지 확인
<a name="resource-operations-idempotency"></a>

리소스 작업 요청을 생성, 삭제, 업데이트하여 멱등성 토큰을 지정하는 것이 가장 좋습니다. 범용 고유 식별자(UUID)와 같이 모든 요청에 대해 고유한 토큰을 지정하는 것이 좋습니다. 이러한 토큰을 사용하면 요청을 다시 시도해야 하는 경우 요청을 명확하게 구분할 수 있습니다.

`create-resource`, `delete-resource`, 및 `update-resource` 연산은 모두 매개 변수를 사용하며, 이 `client-token` 매개 변수는 멱등성 토큰으로 설정할 수 있습니다.

## 클라우드 제어 API 사용 시 고려 사항
<a name="resource-operations-considerations"></a>

Cloud Control API를 사용하여 리소스 작업을 수행할 때는 다음 서비스 동작을 고려하는 것이 좋습니다.
+ Cloud Control API는 각 리소스 작업을 다른 리소스 작업과 독립적으로 개별적으로 수행합니다.
+ Cloud Control API에 대한 단일 리소스 운영 요청은 사실 리소스를 프로비저닝하는 기본 서비스에 대한 다수의 직접 호출로 구성될 수 있습니다. 이로 인해 리소스 요청이 일부만 완료된 경우 실패하여 요청된 변경 사항 중 일부만 리소스에 적용될 수 있습니다.
+ 리소스 작업이 어느 시점에서든 실패하는 경우 Cloud Control API는 리소스를 이전 상태로 롤백하지 않습니다.
+ Cloud Control API를 사용하면 지정된 리소스에서 한 번에 하나의 리소스 작업만 수행할 수 있습니다. 하지만 리소스를 프로비저닝한 기본 서비스를 통해 리소스를 직접 운영할 수는 있습니다. 이 접근 방식은 예기치 않은 동작으로 이어질 수 있으므로 사용하지 않는 것이 좋습니다.

# 를 사용하여 리소스 생성 AWS Cloud Control API
<a name="resource-operations-create"></a>

`create-resource` 명령을 사용하여 리소스를 생성합니다.

## 리소스의 원하는 상태 작성
<a name="resource-operations-create-desiredstate"></a>

Cloud Control API가 리소스를 생성하려면 생성하려는 리소스의 원하는 상태를 지정해야 합니다.** 원하는 상태는 지정하려는 리소스 속성 목록과 원하는 값으로 구성됩니다.

리소스의 속성은 리소스 유형 스키마에 정의되어 있습니다. 여기에는 속성이 필요한지 여부, 유효한 값, 기타 속성 제약 조건이 포함됩니다. 리소스 속성 보기에 대한 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 섹션을 참조하세요.

지정하는 원하는 상태는 리소스 유형 스키마에 대해 유효해야 합니다.

예를 들어 특정 이름과 보존 정책이 90일인 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html) 리소스를 생성하려고 한다고 가정해 보겠습니다. 첫 번째 단계로 리소스의 원하는 상태를 JSON 텍스트 형식으로 작성해야 합니다.

```
{
  "LogGroupName": "CloudApiLogGroup",
  "RetentionInDays": 90
}
```

`create-resource` 명령을 호출할 때 원하는 상태를 문자열로 직접 인라인으로 전달하거나, 더 복잡한 원하는 상태 정의의 경우 파일 위치를 지정할 수 있습니다.

다음 AWS Command Line Interface (AWS CLI) 명령은 리소스를 생성하고 `desired-state` 파라미터에 로그 그룹 이름을 지정하는 것 `90`외에도 리소스의 `RetentionInDays` 속성이 로 설정되도록 지정합니다.

```
$ aws cloudcontrol create-resource --type-name AWS::Logs::LogGroup \
    --desired-state '{"LogGroupName": "CloudApiLogGroup", "RetentionInDays":90}'
```

## 리소스 생성 요청 진행 상황 추적
<a name="resource-operations-create-progress"></a>

이 `create-resource` 명령은 `ProgressEvent` 객체를 반환하며, 이를 사용하여 리소스 생성 요청의 현재 상태를 모니터링할 수 있습니다. 자세한 내용은 [리소스 작업 요청의 진행 상황 추적](resource-operations-manage-requests.md#resource-operations-manage-requests-track) 단원을 참조하십시오.

# 를 사용하여 리소스 업데이트 AWS Cloud Control API
<a name="resource-operations-update"></a>

`update-resource` 명령을 사용하여 기존 리소스를 업데이트합니다. 여기에는 원래 Cloud Control API를 사용하여 프로비저닝되지 않은 리소스가 포함됩니다.

**중요**  
다른 서비스에서 적극적으로 관리하고 있는 리소스를 업데이트하기 위해 Cloud Control API를 사용하지 않는 것이 좋습니다. 이렇게 하면 예상치 못한 결과가 발생할 수 있습니다. 예를 들어 Cloud Control API를 사용하여 현재 CloudFormation 스택의 일부인 리소스를 업데이트하지 마십시오.

기존 리소스를 업데이트하려면 리소스 식별자를 지정해야 합니다. 리소스의 식별자를 결정하는 방법에 대한 자세한 내용은 [리소스의 기본 식별자 사용](resource-identifier.md#resource-identifier-using) 섹션을 참조하세요.

리소스를 업데이트하면 리소스 속성 값이 변경됩니다. 리소스의 속성은 리소스 유형 스키마에 정의되어 있습니다. 여기에는 속성이 필요한지 여부, 유효한 값, 기타 속성 제약 조건이 포함됩니다. 리소스 속성 보기에 대한 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 섹션을 참조하세요.

## 패치 문서 작성
<a name="resource-operations-update-patch"></a>

리소스를 업데이트하려면 먼저 업데이트를 JSON 패치 문서에 포함된 *패치 작업* 목록으로 정의합니다. 이 패치 문서는 [RFC 6902 - 자바스크립트 객체 표기법(](https://datatracker.ietf.org/doc/html/rfc6902)JSON) 패치에 정의된 표준을 준수해야 합니다.**

각 패치 작업은 특정 리소스 속성에 대한 단일 업데이트를 정의합니다. 다음 속성이 필요합니다.
+ `op`: 작업 유형. 클라우드 제어 API는 RFC 6902에 정의된 모든 작업(`add`, `remove`, `replace`,`move`, `copy` 및 `test`)을 지원합니다.
+ `path`: 리소스 스키마의 `properties` 섹션을 기준으로 한 리소스 속성의 경로입니다.

작업에 따라 추가 속성이 필요할 수 있습니다. 자세한 내용은 RFC 6902를 참조하세요.

`update-resource` 명령을 사용할 때 패치 문서를 문자열로 인라인으로 지정하거나 파일 위치를 지정할 수 있습니다.

다음 예시에서는 라는 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html) 리소스의 보존 정책을 90일로 업데이트`CloudControlApiLogGroup`합니다.

```
$ aws cloudcontrol update-resource --type-name AWS::Logs::LogGroup \
    --identifier CloudControlApiLogGroup \
    --patch-document '[{"op":"replace","path":"RetentionInDays","value":90}]'
```

## 클라우드 컨트롤 API가 리소스를 업데이트하는 방법
<a name="resource-operations-update-how"></a>

리소스를 업데이트하기 위해 Cloud Control API는 먼저 리소스의 현재 상태를 검색한 다음 2단계 프로세스를 통해 리소스를 업데이트합니다.
+ Cloud Control API는 업데이트 요청에 지정된 패치 작업을 리소스의 현재 상태와 결합하여 업데이트 후 원하는 리소스 상태를 생성합니다. 작업은 패치 문서에 표시된 순서대로 순차적으로 적용됩니다. 시퀀스의 각 작업은 리소스의 현재 상태에 적용되며, 결과 리소스 상태는 다음 작업의 대상이 됩니다.

  이 시점에서는 다음과 같은 경우 전체 업데이트 요청이 실패합니다.
  + 요청에 포함된 패치 작업이 잘못되었습니다.
  + `op` 유형 `test`의 패치 작업이 실패합니다.

  이 경우 전체 업데이트 요청이 실패하고 Cloud Control API는 리소스를 업데이트하지 않습니다.
+ 그러면 Cloud Control API가 리소스 유형의 업데이트 핸들러를 호출하여 리소스를 업데이트합니다.

  업데이트 핸들러가 어느 시점에서든 실패하더라도 Cloud Control API는 리소스를 이전 상태로 롤백하지 않습니다.**

예를 들어 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html) 리소스를 업데이트하도록 정의된 다음 패치 문서를 생각해 보세요. 이 문서에는 두 가지 패치 작업이 포함되어 있습니다. 첫 번째 작업은 `test` 유형이며 리소스의 보존 정책이 3653일로 설정되어 있는지 확인합니다. 이 경우 리소스가 테스트를 통과하고 Cloud Control API가 다음 작업으로 진행합니다. 이 작업은 현재 보존 정책 값을 180일로 대체합니다. 리소스의 보존 정책이 3653일 이외의 값으로 설정된 경우 첫 번째 `test` 작업은 실패하고 Cloud Control API는 두 번째 `replace` 작업을 실행하지 않습니다.

```
[
  {
    "op": "test",
    "path": "/RetentionInDays",
    "value":3653
  },
  {
    "op": "replace",
    "path": "/RetentionInDays",
    "value":180
  }
]
```

## 업데이트 리소스 요청 진행 상황 추적
<a name="resource-operations-update-progress"></a>

`update-resource` 명령은 `ProgressEvent` 객체를 반환하며, 이를 사용하여 리소스 운영 요청의 현재 상태를 추적할 수 있습니다. 자세한 내용은 [리소스 작업 요청의 진행 상황 추적](resource-operations-manage-requests.md#resource-operations-manage-requests-track) 단원을 참조하십시오.

# 를 사용하여 리소스 삭제 AWS Cloud Control API
<a name="resource-operations-delete"></a>

기존 리소스를 삭제하려면 `delete-resource` 명령을 사용합니다. Cloud Control API를 사용하여 리소스를 처음 프로비저닝했는지 여부에 관계없이 리소스를 삭제할 수 있습니다.

**중요**  
다른 서비스에서 적극적으로 관리하고 있는 리소스를 삭제하기 위해 Cloud Control API를 사용하지 않는 것이 좋습니다. 이렇게 하면 예상치 못한 결과가 발생할 수 있습니다. 예를 들어 Cloud Control API를 사용하여 현재 CloudFormation 스택의 일부인 리소스를 삭제하지 마십시오.

기존 리소스를 업데이트하려면 리소스 식별자를 지정해야 합니다. 리소스 식별자 찾기에 대한 자세한 내용은 [리소스의 기본 식별자 사용](resource-identifier.md#resource-identifier-using) 섹션을 참조하세요.

다음 예제에서는 이름이 인 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html) 리소스를 삭제합니다`CloudControlApiLogGroup`.

```
$ aws cloudcontrol delete-resource \
    --type-name AWS::Logs::LogGroup --identifier CloudControlApiLogGroup
```

## 리소스 삭제 요청 진행 상황 추적
<a name="resource-operations-delete-progress"></a>

이 `delete-resource` 명령은 `ProgressEvent` 객체를 반환하며 이는 리소스 작업 요청의 현재 상태를 추적하는 데 사용할 수 있습니다. 자세한 내용은 [리소스 작업 요청의 진행 상황 추적](resource-operations-manage-requests.md#resource-operations-manage-requests-track) 단원을 참조하십시오.

# 를 사용하여 리소스 검색 AWS Cloud Control API
<a name="resource-operations-list"></a>

`list-resources` 명령을 사용하여 AND에 현재 현재 AWS 계정 및 AWS 리전에 프로비저닝된 리소스를 검색할 수 있습니다. 여기에는 Cloud Control API를 통해 프로비저닝되었는지, 기본 서비스를 통해 직접 프로비저닝되었는지 또는 기타 메커니즘(예: AWS CloudFormation 스택의 일부)을 통해 프로비저닝되었는지에 관계없이 지정된 리소스 유형의 모든 리소스가 포함됩니다.

각 리소스에 대해 반환되는 정보는 다음과 같습니다.
+ 이 리소스의 기본 식별자입니다.
+ 선택적으로 리소스의 현재 상태를 자세히 설명하는 *일부 또는 모든* 리소스의 속성을 포함할 수 있습니다. 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 단원을 참조하십시오.

다음 예제는 `AWS::Logs::LogGroup` 리소스 목록을 반환합니다.

```
$ aws cloudcontrol list-resources --type-name AWS::Logs::LogGroup
```

Cloud Control API는 계정에 있는 지정된 리소스 유형의 리소스 목록을 반환합니다. 예를 들어, `list-resources`는 클라우드 제어 API를 통해 프로비저닝되었는지 여부에 관계없이 계정에 있는 모든 `AWS::Logs::LogGroup` 리소스의 기본 식별자 및 리소스 속성을 반환합니다. 반환되는 정보는 계정의 리소스에 따라 다음과 비슷합니다.

```
{
  "TypeName": "AWS::Logs::LogGroup",
  "ResourceDescriptions":
  [
    {
      "Identifier": "CloudControlExample", 
      "Properties": '{"RetentionInDays":180, "LogGroupName": "CloudControlExample", "Arn": "arn:aws:logs:us-west-2:123456789012:log-group:CloudControlExample:*"}'
    },
    {
      "Identifier": "AnotherLogGroupResourceExample", 
      "Properties": '{"RetentionInDays":90, "LogGroupName": "AnotherLogGroupResourceExample", "Arn": "arn:aws:logs:us-west-2:123456789012:log-group:AnotherLogGroupResourceExample:*"}'
    }
  ]
}
```

다음 예시에서는 `AWS::Kinesis::Stream` 리소스 목록을 요청합니다.

```
$ aws cloudcontrol list-resources --type-name AWS::Kinesis::Stream
```

Kinesis 스트림의 경우 Cloud Control API는 리소스 속성의 *하위 집합*과 함께 각 스트림의 기본 식별자를 반환합니다. 이 경우에는 단일 속성인 `Name`만 있습니다. 그런 다음 스트림의 기본 식별자를 `get-resource`와 함께 사용하여 리소스의 전체 현재 상태를 요청할 수 있습니다.

```
{
    "TypeName": "AWS::Kinesis::Stream",
    "ResourceDescriptions": [
        {
            "Identifier": "MyKinesisStream",
            "Properties": '{"Name": "MyKinesisStream"}'
        },
        {
            "Identifier": "AnotherStream",
            "Properties": '{"Name": "AnotherStream"}'
        }
    ]
}
```

## 추가 정보가 필요한 리소스
<a name="resource-operations-list-containers"></a>

특정 리소스에서는 요청의 일부로 나열하려는 리소스에 대한 추가 정보를 제공해야 합니다. 이러한 경우에는 `ResourceModel` 파라미터를 사용하여 이러한 속성을 지정해야 합니다.

아래 표에는 이러한 리소스와 목록 요청 중에 `ResourceModel` 파라미터에 지정하는 속성이 나열되어 있습니다.


| 리소스 | 필수 속성 | 
| --- | --- | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationversion.html)  |  `RestApiId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html)  |  `RestApiId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-resourceversion.html)  |  `TypeArn` 또는 `TypeName`  | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-customerprofiles-integration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-customerprofiles-integration.html)   | `DomainName` | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-customerprofiles-objecttype.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-customerprofiles-objecttype.html)   | `DomainName` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewaymulticastgroupmember.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewaymulticastgroupmember.html)  |  `TransitGatewayMulticastDomainId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewaymulticastgroupsource.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewaymulticastgroupsource.html)  |  `TransitGatewayMulticastDomainId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html) | `Cluster`, `Service` 및 `ID` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html)  |  `ClusterName`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html)  |  `ClusterName`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html)  |  `LoadBalancerArn`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html)  |  `ListenerArn`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversion.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/cloudcontrolapi/latest/userguide/resource-operations-list.html)  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-schemaversionmetadata.html)  |  `SchemaVersionId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-accesspolicy.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-accesspolicy.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/cloudcontrolapi/latest/userguide/resource-operations-list.html)  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-dashboard.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-dashboard.html)  |  `ProjectId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-project.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-project.html)  |  `PortalId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-datasource.html)  |  `IndexId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-faq.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kendra-faq.html)  |  `IndexId`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowentitlement.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowentitlement.html)  |  `FlowArn`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowoutput.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowoutput.html)  |  `FlowArn`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowsource.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowsource.html)  |  `FlowArn`  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowvpcinterface.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-flowvpcinterface.html)  |  `FlowArn`  | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-asset.html)   | `PackagingGroupId` | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-packagingconfiguration.html)   | `PackagingGroupId` | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-loggingconfiguration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkfirewall-loggingconfiguration.html)   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/cloudcontrolapi/latest/userguide/resource-operations-list.html)  | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-analysis.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-analysis.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-dashboard.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-dashboard.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-dataset.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-dataset.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-datasource.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-datasource.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-template.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-template.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-theme.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-quicksight-theme.html)  | `AwsAccountId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxytargetgroup.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxytargetgroup.html)  | `DBProxyName` | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-accesspoint.html)   | `Bucket` | 
|   [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3outposts-bucket.html)   | `OutpostId` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-assignment.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-assignment.html)  | `InstanceArn`, `PermissionSetArn`, `PrincipalId`, `PrincipalType`, `TargetId`, 및 `TargetType` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-instanceaccesscontrolattributeconfiguration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-instanceaccesscontrolattributeconfiguration.html)  | `InstanceArn` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-permissionset.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sso-permissionset.html)  | `InstanceArn` 및 `PermissionSetArn` | 
|  [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html)  | `Scope` | 

# 를 사용하여 리소스 읽기 AWS Cloud Control API
<a name="resource-operations-read"></a>

리소스의 기본 식별자를 사용하여 `get-resource` 명령을 호출하여 리소스에 대한 세부 정보를 검색할 수 있습니다. 리소스의 기본 식별자를 검색하는 방법에 대한 자세한 내용은 [를 사용하여 리소스 식별 AWS Cloud Control API](resource-identifier.md) 섹션을 참조하세요.

`get-resource`가 반환되는 정보에는 속성 값, 지원되는 이벤트, 필요한 권한 등 리소스의 현재 상태를 자세히 설명하는 리소스 스키마가 포함됩니다. 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 단원을 참조하십시오.

다음 예제는 `LogGroupResourceExample`이라는 이름의 `AWS::Logs::LogGroup` 리소스의 현재 상태를 반환합니다. `AWS::Logs::LogGroup` 리소스의 경우 로그 그룹 이름이 기본 식별자입니다.

```
$ aws cloudcontrol get-resource --type-name AWS::Logs::LogGroup --identifier LogGroupResourceExample
```

# 를 사용하여 리소스 작업 요청 관리 AWS Cloud Control API
<a name="resource-operations-manage-requests"></a>

리소스 작업은 비동기식이기 때문에 `create-resource` 및 `update-resource`와 같은 리소스 요청은 리소스 생성 또는 업데이트 요청의 현재 상태에 대한 정보가 포함된 `ProgressEvent` 개체를 반환합니다.

예를 들어, 리소스 생성 요청은 처음에 `ProgressEvent` 객체를 반환할 수 있습니다.

```
{
    "ProgressEvent": {
        "EventTime": "2021-08-09T18:17:15.219Z",
        "TypeName": "AWS::Logs::LogGroup",
        "OperationStatus": "IN_PROGRESS",
        "Operation": "CREATE",
        "Identifier": "LogGroupResourceExample",
        "RequestToken": "5f40c577-3534-4b20-9599-0b0123456789"
    }
}
```

`ProgressEvent` 객체에서 반환되는 정보에는 리소스 작업 요청을 추적하거나 취소하는 데 사용할 수 있는 요청 토큰이 포함되어 있습니다.

**참고**  
리소스 작업 요청은 7일 후에 만료됩니다.

## 활성 리소스 작업 요청 목록
<a name="resource-operations-manage-requests-list"></a>

`list-resource-requests` 명령을 사용하여 AWS 계정 및에 대한 활성 리소스 작업 요청 목록을 반환합니다 AWS 리전. 요청 유형 및 상태별로 목록을 필터링할 수 있습니다.

리소스 작업 요청은 7일 후에 만료됩니다.

다음 예시에서는 활성 리소스 작업 요청을 반환하지만 아직 진행 중인 리소스 생성 요청은 필터링합니다.

```
$ aws cloudcontrol list-resource-requests --resource-request-status-filter \
    Operations=CREATE,OperationStatuses=IN_PROGRESS
```

각 리소스 작업에 대해 반환되는 정보에는 리소스 작업 요청을 추적하거나 취소하는 데 사용할 수 있는 요청 토큰이 포함되어 있습니다.

```
{
    "ResourceRequestStatusSummaries": [
        {
            "EventTime": "2021-08-09T18:17:16.591Z",
            "TypeName": "AWS::Logs::LogGroup",
            "OperationStatus": "SUCCESS",
            "Operation": "CREATE",
            "Identifier": "LogGroupResourceExample",
            "RequestToken": "5f40c577-3534-4b20-9599-0b0123456789"
        }
    ]
}
```

## 리소스 작업 요청의 진행 상황 추적
<a name="resource-operations-manage-requests-track"></a>

리소스 작업 요청의 진행 상황을 추적하려면 `get-resource-request-status` 명령을 사용합니다. 이 명령은 초기 리소스 작업 요청 중에 생성된 `ProgressEvent` 개체에 포함된 요청 토큰을 사용합니다. (`list-resource-requests` 명령을 사용하여 리소스 작업 요청에 대한 요청 토큰을 검색할 수도 있습니다.) `get-resource-request-status` 명령은 업데이트된 `ProgressEvent` 객체를 반환하며 이는 현재 요청의 상태 정보가 포함되어 있습니다.

다음 예제를 참조하세요.

```
$ aws cloudcontrol get-resource-request-status \
    --request-token 5f40c577-3534-4b20-9599-0b0123456789
```



## 리소스 작업 요청 취소
<a name="resource-operations-manage-requests-cancel"></a>

`cancel-resource-request` 명령을 사용하여 현재 진행 중인 리소스 작업 요청을 취소합니다. 지정된 리소스에 대해 한 번에 하나의 작업만 수행할 수 있기 때문에 리소스를 사용할 수 있게 하려면 현재 리소스 작업을 취소하여 다른 작업을 수행해야 하는 경우가 있을 수 있습니다.

리소스 요청을 취소해도 Cloud Control API가 모든 리소스 작업을 즉시 취소할 수 있다는 보장은 없습니다. 대신 Cloud Control API는 리소스 이벤트 핸들러에 대한 추가 호출을 중단합니다. Cloud Control API에 대한 단일 리소스 운영 요청은 사실 리소스를 프로비저닝하는 기본 서비스에 대한 여러 호출로 구성될 수 있습니다. 따라서 리소스 작업 요청을 취소하면 요청이 부분적으로 완료된 상태로 남아 요청된 변경 사항 중 일부만 리소스에 적용될 수 있습니다. Cloud Control API는 리소스를 이전 상태로 롤백하지 않습니다.

상태가 `PENDING` 또는 `IN_PROGRESS`인 리소스 작업 요청만 취소할 수 있습니다.

**참고**  
`CancelResourceRequest`를 호출하면 Cloud Control API에서 수행한 작업은 취소되지만 다운스트림 서비스에서 이미 시작된 비동기 작업은 종료되지 않습니다.

# 를 사용하여 리소스 식별 AWS Cloud Control API
<a name="resource-identifier"></a>

모든 리소스 유형에는 기본 식별자로 정의된 속성이 있습니다.** 이 속성의 값은 지정된 AWS 계정 및에서 해당 유형의 각 리소스에 대해 고유해야 합니다 AWS 리전. 예를 들어, 많은 리소스 유형에는 해당 유형의 각 리소스에 대해 고유해야 하는 `Name` 속성이 포함되어 있습니다. 경우에 따라 기본 식별자는 고유한 식별자를 형성하는 여러 속성의 조합으로 정의됩니다. 이 기본 식별자를 리소스 유형과 함께 사용하면 `update-resource` 또는 `delete-resource`같은 리소스 작업을 수행할 리소스를 정확히 지정할 수 있습니다.

또한 일부 리소스 유형에서는 해당 유형의 리소스를 고유하게 식별하는 데 사용할 수 있는 보조 식별자를 정의합니다.**

리소스 유형의 기본 식별자가 되는 리소스 속성(또는 `primaryIdentifier` 속성 조합)을 확인하려면 리소스 유형 스키마의 속성을 참조하세요. 스키마에는 정의된 보조 식별자도 포함됩니다. 자세한 내용은 [리소스 유형 스키마 보기](resource-types.md#resource-types-schemas) 단원을 참조하십시오.

## 리소스의 기본 식별자 가져오기
<a name="resource-identifier-getting"></a>

Cloud Control API 명령어를 사용하여 특정 리소스의 식별자 값을 찾을 수 있습니다.** 다음 각 명령은 지정된 리소스의 기본 식별자가 포함된 `ProgressEvent` 객체를 반환합니다.
+ 

  ```
  cancel-resource-request
  ```
+ 

  ```
  create-resource
  ```
+ 

  ```
  get-resource-request-status
  ```
+ 

  ```
  list-resource-requests
  ```

## 리소스의 기본 식별자 사용
<a name="resource-identifier-using"></a>

Cloud Control API 명령어를 사용하는 경우 리소스 스키마의 리소스 유형에 정의된 기본 식별자 또는 보조 식별자를 지정할 수 있습니다. 식별자를 1개씩만 지정할 수 있습니다. 기본 식별자는 문자열 또는 JSON으로 지정할 수 있고 보조 식별자는 JSON으로 지정해야 합니다.

복합 기본 식별자(즉, 여러 리소스 속성으로 구성된 식별자)의 경우 기본 식별자를 문자열로 지정하려면 기본 식별자 *정의에 지정된 순서*대로 속성 값을 `|`로 구분하여 나열합니다.

예를 들어, 리소스의 기본 식별자는 다음과 같이 정의됩니다.

`"primaryIdentifier": [ "/properties/DatabaseName", "/properties/TableName" ]`

따라서 리소스의 기본 식별자를 문자열로 지정하려면 다음 형식을 사용합니다.

`DatabaseName|TableName`

예를 들어, 데이터베이스 이름이 `MyDatabase`이고 테이블 이름이 `MyTable`인 데이터베이스가 있다고 가정하면 `MyDatabase|MyTable`을 지정합니다.

JSON으로 지정된 복합 식별자의 경우 다음 예제와 같이 속성 순서가 필요하지 않습니다.

```
{
  "TableName": "MyTable",
  "DatabaseName": "MyDatabase"
}
```

리소스 식별자에 대한 자세한 내용은 확장 개발을 위한 CloudFormation 명령줄 인터페이스 사용자 이동의 [기본 식별자](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-primaryidentifier)를 참조하세요.**