

# AWS CLI를 사용한 Lake Formation 예시
<a name="cli_lakeformation_code_examples"></a>

다음 코드 예시에서는 Lake Formation에서 AWS Command Line Interface를 사용하여 일반적인 시나리오를 구현하고 개별 서비스 작업을 수행하는 방법을 보여줍니다.

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

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

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

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

### `add-lf-tags-to-resource`
<a name="lakeformation_AddLfTagsToResource_cli_topic"></a>

다음 코드 예시에서는 `add-lf-tags-to-resource` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**기존 리소스에 하나 이상의 LF 태그를 연결하는 방법**  
다음 `add-lf-tags-to-resource` 예시에서는 주어진 LF 태그를 테이블 리소스에 연결합니다.  

```
aws lakeformation add-lf-tags-to-resource \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Resource": {
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "Name": "dl_tpc_promotion"
        }
    },
    "LFTags": [{
        "CatalogId": "123456789111",
        "TagKey": "usergroup",
        "TagValues": [
            "analyst"
        ]
    }]
}
```
출력:  

```
{
    "Failures": []
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Assigning LF-Tags to Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/TBAC-assigning-tags.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [AddLfTagsToResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/add-lf-tags-to-resource.html) 섹션을 참조하세요.

### `batch-grant-permissions`
<a name="lakeformation_BatchGrantPermissions_cli_topic"></a>

다음 코드 예시에서는 `batch-grant-permissions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**위탁자에 리소스에 대한 권한을 대량 부여하는 방법**  
다음 `batch-grant-permissions` 예시에서는 위탁자에게 지정된 리소스에 대한 액세스 권한을 대량 부여합니다.  

```
aws lakeformation batch-grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Entries": [{
            "Id": "1",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "Name": "dl_tpc_promotion"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": [
                "ALL"
            ]
        },
        {
            "Id": "2",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "Name": "dl_tpc_customer"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": [
                "ALL"
            ]
        },
        {
            "Id": "3",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-business-analyst"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "Name": "dl_tpc_promotion"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": [
                "ALL"
            ]
        },
        {
            "Id": "4",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
            },
            "Resource": {
                "DataCellsFilter": {
                    "TableCatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "TableName": "dl_tpc_item",
                    "Name": "developer_item"
                }
            },
            "Permissions": [
                "SELECT"
            ],
            "PermissionsWithGrantOption": []
        }
    ]
}
```
출력:  

```
{
    "Failures": []
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchGrantPermissions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/batch-grant-permissions.html) 섹션을 참조하세요.

### `batch-revoke-permissions`
<a name="lakeformation_BatchRevokePermissions_cli_topic"></a>

다음 코드 예시에서는 `batch-revoke-permissions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**위탁자의 리소스에 대한 권한 대량 취소**  
다음 `batch-revoke-permissions` 예시에서는 위탁자로부터 지정된 리소스에 대한 액세스를 대량으로 취소합니다.  

```
aws lakeformation batch-revoke-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Entries": [{
            "Id": "1",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "Name": "dl_tpc_promotion"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": [
                "ALL"
            ]
        },
        {
            "Id": "2",
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-business-analyst"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "tpc",
                    "Name": "dl_tpc_promotion"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": [
                "ALL"
            ]
        }
    ]
}
```
출력:  

```
{
    "Failures": []
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchRevokePermissions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/batch-revoke-permissions.html) 섹션을 참조하세요.

### `cancel-transaction`
<a name="lakeformation_CancelTransaction_cli_topic"></a>

다음 코드 예시에서는 `cancel-transaction` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**트랜잭션을 취소하는 방법**  
다음 `cancel-transaction` 예시에서는 트랜잭션을 취소합니다.  

```
aws lakeformation cancel-transaction \
    --transaction-id='b014d972ca8347b89825e33c5774aec4'
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CancelTransaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/cancel-transaction.html) 섹션을 참조하세요.

### `commit-transaction`
<a name="lakeformation_CommitTransaction_cli_topic"></a>

다음 코드 예시에서는 `commit-transaction` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**트랜잭션 커밋**  
다음 `commit-transaction` 예시에서는 트랜잭션을 커밋합니다.  

```
aws lakeformation commit-transaction \
    --transaction-id='b014d972ca8347b89825e33c5774aec4'
```
출력:  

```
{
    "TransactionStatus": "committed"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CommitTransaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/commit-transaction.html) 섹션을 참조하세요.

### `create-data-cells-filter`
<a name="lakeformation_CreateDataCellsFilter_cli_topic"></a>

다음 코드 예시에서는 `create-data-cells-filter` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**예시 1: 데이터 셀 필터를 생성하는 방법**  
다음 `create-data-cells-filter` 예시에서는 행 조건에 따라 특정 열에 대한 액세스 권한을 부여할 수 있는 데이터 셀 필터를 생성합니다.  

```
aws lakeformation create-data-cells-filter \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "TableData": {
        "ColumnNames": ["p_channel_details", "p_start_date_sk", "p_promo_name"],
        "DatabaseName": "tpc",
        "Name": "developer_promotion",
        "RowFilter": {
            "FilterExpression": "p_promo_name='ese'"
        },
        "TableCatalogId": "123456789111",
        "TableName": "dl_tpc_promotion"
    }
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Data filtering and cell-level security in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/data-filtering.html)을 참조하세요.  
**예시 2: 열 필터를 생성하는 방법**  
다음 `create-data-cells-filter` 예시에서는 특정 열에 대한 액세스 권한을 부여할 수 있는 데이터 필터를 만듭니다.  

```
aws lakeformation create-data-cells-filter \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "TableData": {
        "ColumnNames": ["p_channel_details", "p_start_date_sk", "p_promo_name"],
        "DatabaseName": "tpc",
        "Name": "developer_promotion_allrows",
        "RowFilter": {
            "AllRowsWildcard": {}
        },
        "TableCatalogId": "123456789111",
        "TableName": "dl_tpc_promotion"
    }
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Data filtering and cell-level security in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/data-filtering.html)을 참조하세요.  
**예시 3: 제외 열을 사용하여 데이터 필터를 생성하는 방법**  
다음 `create-data-cells-filter` 예시에서는 언급된 열을 제외한 모든 열에 대한 액세스 권한을 허용하는 데이터 필터를 생성합니다.  

```
aws lakeformation create-data-cells-filter \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "TableData": {
        "ColumnWildcard": {
            "ExcludedColumnNames": ["p_channel_details", "p_start_date_sk"]
        },
        "DatabaseName": "tpc",
        "Name": "developer_promotion_excludecolumn",
        "RowFilter": {
            "AllRowsWildcard": {}
        },
        "TableCatalogId": "123456789111",
        "TableName": "dl_tpc_promotion"
    }
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Data filtering and cell-level security in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/data-filtering.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateDataCellsFilter](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/create-data-cells-filter.html) 섹션을 참조하세요.

### `create-lf-tag`
<a name="lakeformation_CreateLfTag_cli_topic"></a>

다음 코드 예시에서는 `create-lf-tag` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LF 태그 생성**  
다음 `create-lf-tag` 예시에서는 지정된 이름과 값을 가진 LF 태그를 생성합니다.  

```
aws lakeformation create-lf-tag \
    --catalog-id '123456789111' \
    --tag-key 'usergroup' \
    --tag-values '["developer","analyst","campaign"]'
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing LF-Tags for metadata access control](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-tags.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateLfTag](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/create-lf-tag.html) 섹션을 참조하세요.

### `delete-data-cells-filter`
<a name="lakeformation_DeleteDataCellsFilter_cli_topic"></a>

다음 코드 예시에서는 `delete-data-cells-filter` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**데이터 셀 필터를 삭제하는 방법**  
다음 `delete-data-cells-filter` 예시에서는 지정된 데이터 셀 필터를 삭제합니다.  

```
aws lakeformation delete-data-cells-filter \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "TableCatalogId": "123456789111",
    "DatabaseName": "tpc",
    "TableName": "dl_tpc_promotion",
    "Name": "developer_promotion"
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Data filtering and cell-level security in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/data-filtering.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteDataCellsFilter](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/delete-data-cells-filter.html) 섹션을 참조하세요.

### `delete-lf-tag`
<a name="lakeformation_DeleteLfTag_cli_topic"></a>

다음 코드 예시에서는 `delete-lf-tag` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LF 태그 정의를 삭제하는 방법**  
다음 `delete-lf-tag` 예시에서는 LF 태그 정의를 삭제합니다.  

```
aws lakeformation delete-lf-tag \
    --catalog-id '123456789111' \
    --tag-key 'usergroup'
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing LF-Tags for metadata access control](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-tags.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteLfTag](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/delete-lf-tag.html) 섹션을 참조하세요.

### `delete-objects-on-cancel`
<a name="lakeformation_DeleteObjectsOnCancel_cli_topic"></a>

다음 코드 예시에서는 `delete-objects-on-cancel` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**트랜잭션이 취소될 때 객체를 삭제하는 방법**  
다음 `delete-objects-on-cancel` 예시에서는 트랜잭션이 취소될 때 나열된 s3 객체를 삭제합니다.  

```
aws lakeformation delete-objects-on-cancel \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "012345678901",
    "DatabaseName": "tpc",
    "TableName": "dl_tpc_household_demographics_gov",
    "TransactionId": "1234d972ca8347b89825e33c5774aec4",
    "Objects": [{
        "Uri": "s3://lf-data-lake-012345678901/target/dl_tpc_household_demographics_gov/run-unnamed-1-part-block-0-r-00000-snappy-ff26b17504414fe88b302cd795eabd00.parquet",
        "ETag": "1234ab1fc50a316b149b4e1f21a73800"
    }]
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteObjectsOnCancel](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/delete-objects-on-cancel.html) 섹션을 참조하세요.

### `deregister-resource`
<a name="lakeformation_DeregisterResource_cli_topic"></a>

다음 코드 예시에서는 `deregister-resource` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**데이터 레이크 스토리지 등록을 취소하는 방법**  
다음 `deregister-resource` 예시에서는 리소스를 Lake Formation에서 관리하는 것으로 등록을 취소합니다.  

```
aws lakeformation deregister-resource \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "ResourceArn": "arn:aws:s3:::lf-emr-athena-result-123"
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Adding an Amazon S3 location to your data lake](https://docs.aws.amazon.com/lake-formation/latest/dg/register-data-lake.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeregisterResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/deregister-resource.html) 섹션을 참조하세요.

### `describe-transaction`
<a name="lakeformation_DescribeTransaction_cli_topic"></a>

다음 코드 예시에서는 `describe-transaction` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**트랜잭션 세부 정보를 검색하는 방법**  
다음 `describe-transaction` 예시에서는 단일 트랜잭션의 세부 정보를 반환합니다.  

```
aws lakeformation describe-transaction \
    --transaction-id='8cb4b1a7cc8d486fbaca9a64e7d9f5ce'
```
출력:  

```
{
    "TransactionDescription": {
        "TransactionId": "12345972ca8347b89825e33c5774aec4",
        "TransactionStatus": "committed",
        "TransactionStartTime": "2022-08-10T14:29:04.046000+00:00",
        "TransactionEndTime": "2022-08-10T14:29:09.681000+00:00"
    }
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeTransaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/describe-transaction.html) 섹션을 참조하세요.

### `extend-transaction`
<a name="lakeformation_ExtendTransaction_cli_topic"></a>

다음 코드 예시에서는 `extend-transaction` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**트랜잭션을 확장하는 방법**  
다음 `extend-transaction` 예시는 트랜잭션을 확장합니다.  

```
aws lakeformation extend-transaction \
    --transaction-id='8cb4b1a7cc8d486fbaca9a64e7d9f5ce'
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ExtendTransaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/extend-transaction.html) 섹션을 참조하세요.

### `get-data-lake-settings`
<a name="lakeformation_GetDataLakeSettings_cli_topic"></a>

다음 코드 예시에서는 `get-data-lake-settings` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**AWS Lake Formation 관리형 데이터 레이크 설정을 검색하는 방법**  
다음 `get-data-lake-settings` 예시에서는 데이터 레이크 관리자 및 기타 데이터 레이크 설정 목록을 검색합니다.  

```
aws lakeformation get-data-lake-settings \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111"
}
```
출력:  

```
{
    "DataLakeSettings": {
        "DataLakeAdmins": [{
            "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
        }],
        "CreateDatabaseDefaultPermissions": [],
        "CreateTableDefaultPermissions": [
                {
                        "Principal": {
                            "DataLakePrincipalIdentifier": "IAM_ALLOWED_PRINCIPALS"
                        },
                        "Permissions": [
                            "ALL"
                        ]
                }
        ],
        "TrustedResourceOwners": [],
        "AllowExternalDataFiltering": true,
        "ExternalDataFilteringAllowList": [{
            "DataLakePrincipalIdentifier": "123456789111"
        }],
        "AuthorizedSessionTagValueList": [
            "Amazon EMR"
        ]
    }
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Changing the default security settings for your data lake](https://docs.aws.amazon.com/lake-formation/latest/dg/change-settings.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDataLakeSettings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-data-lake-settings.html) 섹션을 참조하세요.

### `get-effective-permissions-for-path`
<a name="lakeformation_GetEffectivePermissionsForPath_cli_topic"></a>

다음 코드 예시에서는 `get-effective-permissions-for-path` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**특정 경로에 있는 리소스에 대한 권한을 검색하는 방법**  
다음 `get-effective-permissions-for-path` 예시에서는 Amazon S3의 경로에 있는 지정된 테이블 또는 데이터베이스 리소스에 대한 Lake Formation 권한을 반환합니다.  

```
aws lakeformation get-effective-permissions-for-path \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "ResourceArn": "arn:aws:s3:::lf-data-lake-123456789111"
}
```
출력:  

```
{
    "Permissions": [{
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-campaign-manager"
            },
            "Resource": {
                "Database": {
                    "Name": "tpc"
                }
            },
            "Permissions": [
                "DESCRIBE"
            ],
            "PermissionsWithGrantOption": []
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:role/EMR-RuntimeRole"
            },
            "Resource": {
                "Database": {
                    "Name": "tpc"
                }
            },
            "Permissions": [
                "ALL"
            ],
            "PermissionsWithGrantOption": []
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:saml-provider/oktaSAMLProvider:user/emr-developer"
            },
            "Resource": {
                "Database": {
                    "Name": "tpc"
                }
            },
            "Permissions": [
                "ALL",
                "DESCRIBE"
            ],
            "PermissionsWithGrantOption": []
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
            },
            "Resource": {
                "Database": {
                    "Name": "tpc"
                }
            },
            "Permissions": [
                "ALL",
                "ALTER",
                "CREATE_TABLE",
                "DESCRIBE",
                "DROP"
            ],
            "PermissionsWithGrantOption": [
                "ALL",
                "ALTER",
                "CREATE_TABLE",
                "DESCRIBE",
                "DROP"
            ]
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:role/LF-GlueServiceRole"
            },
            "Resource": {
                "Database": {
                    "Name": "tpc"
                }
            },
            "Permissions": [
                "CREATE_TABLE"
            ],
            "PermissionsWithGrantOption": []
        }
    ],
    "NextToken": "E5SlJDSTZleUp6SWpvaU9UQTNORE0zTXpFeE5Ua3pJbjE5TENKbGVIQnBjbUYwYVc5dUlqcDdJbk5sWTI5dVpITWlPakUyTm=="
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing Lake Formation permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetEffectivePermissionsForPath](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-effective-permissions-for-path.html) 섹션을 참조하세요.

### `get-lf-tag`
<a name="lakeformation_GetLfTag_cli_topic"></a>

다음 코드 예시에서는 `get-lf-tag` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LF 태그 정의를 검색하는 방법**  
다음 `get-lf-tag` 예시에서는 LF 태그 정의를 검색합니다.  

```
aws lakeformation get-lf-tag \
    --catalog-id '123456789111' \
    --tag-key 'usergroup'
```
출력:  

```
{
    "CatalogId": "123456789111",
    "TagKey": "usergroup",
    "TagValues": [
        "analyst",
        "campaign",
        "developer"
    ]
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing LF-Tags for metadata access control](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-tags.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetLfTag](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-lf-tag.html) 섹션을 참조하세요.

### `get-query-state`
<a name="lakeformation_GetQueryState_cli_topic"></a>

다음 코드 예시에서는 `get-query-state` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**제출된 쿼리의 상태를 검색하는 방법**  
다음 `get-query-state` 예시에서는 이전에 제출한 쿼리의 상태를 반환합니다.  

```
aws lakeformation get-query-state \
    --query-id='1234273f-4a62-4cda-8d98-69615ee8be9b'
```
출력:  

```
{
    "State": "FINISHED"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Transactional data operations](https://docs.aws.amazon.com/lake-formation/latest/dg/transactions-data-operations.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetQueryState](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-query-state.html) 섹션을 참조하세요.

### `get-query-statistics`
<a name="lakeformation_GetQueryStatistics_cli_topic"></a>

다음 코드 예시에서는 `get-query-statistics` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**쿼리 통계를 검색하는 방법**  
다음 `get-query-statistics` 예시에서는 쿼리의 계획 및 실행에 대한 통계를 검색합니다.  

```
aws lakeformation get-query-statistics \
    --query-id='1234273f-4a62-4cda-8d98-69615ee8be9b'
```
출력:  

```
{
    "ExecutionStatistics": {
        "AverageExecutionTimeMillis": 0,
        "DataScannedBytes": 0,
        "WorkUnitsExecutedCount": 0
    },
    "PlanningStatistics": {
        "EstimatedDataToScanBytes": 43235,
        "PlanningTimeMillis": 2377,
        "QueueTimeMillis": 440,
        "WorkUnitsGeneratedCount": 1
    },
    "QuerySubmissionTime": "2022-08-11T02:14:38.641870+00:00"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Transactional data operations](https://docs.aws.amazon.com/lake-formation/latest/dg/transactions-data-operations.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetQueryStatistics](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-query-statistics.html) 섹션을 참조하세요.

### `get-resource-lf-tags`
<a name="lakeformation_GetResourceLfTags_cli_topic"></a>

다음 코드 예시에서는 `get-resource-lf-tags` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LF 태그 나열**  
다음 `list-lf-tags` 예시에서는 요청자가 볼 수 있는 권한이 있는 LF 태그 목록을 반환합니다.  

```
aws lakeformation list-lf-tags \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "ResourceShareType": "ALL",
    "MaxResults": 2
}
```
출력:  

```
{
"LFTags": [{
        "CatalogId": "123456789111",
        "TagKey": "category",
        "TagValues": [
            "private",
            "public"
        ]
    },
    {
        "CatalogId": "123456789111",
        "TagKey": "group",
        "TagValues": [
            "analyst",
            "campaign",
            "developer"
        ]
    }],
    "NextToken": "kIiwiZXhwaXJhdGlvbiI6eyJzZWNvbmRzIjoxNjYwMDY4dCI6ZmFsc2V9"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing LF-Tags for metadata access control](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-tags.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetResourceLfTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-resource-lf-tags.html) 섹션을 참조하세요.

### `get-table-objects`
<a name="lakeformation_GetTableObjects_cli_topic"></a>

다음 코드 예시에서는 `get-table-objects` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**관리 테이블의 객체를 나열하는 방법**  
다음 `get-table-objects` 예시에서는 지정된 관리 테이블을 구성하는 Amazon S3 객체 세트를 반환합니다.  

```
aws lakeformation get-table-objects \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "012345678901",
    "DatabaseName": "tpc",
    "TableName": "dl_tpc_household_demographics_gov",
    "QueryAsOfTime": "2022-08-10T15:00:00"
}
```
출력:  

```
{
    "Objects": [{
        "PartitionValues": [],
        "Objects": [{
            "Uri": "s3://lf-data-lake-012345678901/target/dl_tpc_household_demographics_gov/run-unnamed-1-part-block-0-r-00000-snappy-ff26b17504414fe88b302cd795eabd00.parquet",
            "ETag": "12345b1fc50a316b149b4e1f21a73800",
            "Size": 43235
        }]
    }]
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetTableObjects](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-table-objects.html) 섹션을 참조하세요.

### `get-work-unit-results`
<a name="lakeformation_GetWorkUnitResults_cli_topic"></a>

다음 코드 예시에서는 `get-work-unit-results` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**지정된 쿼리의 작업 단위를 검색하는 방법**  
다음 `get-work-unit-results` 예시에서는 쿼리에서 가져온 작업 단위를 반환합니다.  

```
aws lakeformation get-work-units \
    --query-id='1234273f-4a62-4cda-8d98-69615ee8be9b' \
    --work-unit-id '0' \
    --work-unit-token 'B2fMSdmQXe9umX8Ux8XCo4=' outfile
```
출력:  

```
outfile with Blob content.
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Transactional data operations](https://docs.aws.amazon.com/lake-formation/latest/dg/transactions-data-operations.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetWorkUnitResults](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-work-unit-results.html) 섹션을 참조하세요.

### `get-work-units`
<a name="lakeformation_GetWorkUnits_cli_topic"></a>

다음 코드 예시에서는 `get-work-units` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**작업 단위를 검색하는 방법**  
다음 `get-work-units` 예시에서는 StartQueryPlanning 작업에서 생성된 작업 단위를 검색합니다.  

```
aws lakeformation get-work-units \
    --query-id='1234273f-4a62-4cda-8d98-69615ee8be9b'
```
출력:  

```
{
    "WorkUnitRanges": [{
        "WorkUnitIdMax": 0,
        "WorkUnitIdMin": 0,
        "WorkUnitToken": "1234eMAk4kLO4umqEL4Z5WuxL04AXwABABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREEwYm9QbkhINmFYTWphbmMxZW1PQmEyMGlUb0JFbXNlWmRYc0NmckRIR1dmQ0hjY2YzNFdMcmNXb2JGZmhEK0QvZz09AAEAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzLWVhc3QtMTo3MDkxNTAyNDkyNDk6a2V5L2VmYmI3NDUyLTY1MjYtNGJiOS1iNmZhLTEzYzJkMTM3MmU2OQC4AQIBAHg6eWNF2ZrQATTAuPDJVCEAQSyIF67vX+f88jzGrYq22gE6jkQlpOB+Oet2eqNUmFudAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMCOEWRdafowek3RUmAgEQgDsYZZE84nnnbNmvsqCBPLh19nLQ10mUWOg9IfiaOwefEn6L920V0x1LpJACo7MtIBLXnbGcz2dFDZjFygIAAAAADAAAEAAAAAAAAAAAAAAAAAAQSQf8XDSI5pvR4Fx4JsrS/////wAAAAEAAAAAAAAAAAAAAAEAAACX3/w5h75QAPomfKH+cyEKYU1yccUmBl+VSojiGOtdsUk7vcjYXUUboYm3dvqRqX2s4gROMOn+Ij8R0/8jYmnHkpvyAFNVRPyETyIKg7k5Z9+5I1c2d3446Jw/moWGGxjH8AEG9h27ytmOhozxDOEi/F2ZoXz6wlGDfGUo/2WxCkYOhTyNaw6TM+7drTM7yrW4iNVLUM0LX0xnFjIAhLhooWJek6vjQZUAZzBlAjBH8okRtYP8R7AY2Wls/hqFBhG0V4l42AC0LxsuZbMQrE2SzWZUZ0E9Uew7/n0cyX4CMQDR79INyv4ysMByW9kKGGKyba+cCNklExMR+btBQBmMuB2fMSdmQXe9umX8Ux8XCo4="
    }],
    "QueryId": "1234273f-4a62-4cda-8d98-69615ee8be9b"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Transactional data operations](https://docs.aws.amazon.com/lake-formation/latest/dg/transactions-data-operations.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetWorkUnits](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/get-work-units.html) 섹션을 참조하세요.

### `grant-permissions`
<a name="lakeformation_GrantPermissions_cli_topic"></a>

다음 코드 예시에서는 `grant-permissions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**예시 1: LF 태그를 사용하여 리소스에 대한 위탁자에 권한 부여**  
다음 `grant-permissions` 예시에서는 LF 태그 정책과 일치하는 데이터베이스 리소스의 위탁자에게 모든 권한을 부여합니다.  

```
aws lakeformation grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
    },
    "Resource": {
        "LFTagPolicy": {
            "CatalogId": "123456789111",
            "ResourceType": "DATABASE",
            "Expression": [{
                "TagKey": "usergroup",
                "TagValues": [
                    "analyst",
                    "developer"
                ]
            }]
        }
    },
    "Permissions": [
        "ALL"
    ],
    "PermissionsWithGrantOption": [
        "ALL"
    ]
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
**예시 2: 위탁자에 열 수준 권한을 부여하는 방법**  
다음 `grant-permissions` 예시에서는 위탁자에게 특정 열을 선택할 수 있는 권한을 부여합니다.  

```
aws lakeformation grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
    },
    "Resource": {
        "TableWithColumns": {
            "CatalogId": "123456789111",
            "ColumnNames": ["p_end_date_sk"],
            "DatabaseName": "tpc",
            "Name": "dl_tpc_promotion"
        }
    },
    "Permissions": [
        "SELECT"
    ],
    "PermissionsWithGrantOption": []
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
**예시 3: 위탁자에 테이블 권한을 부여하는 방법**  
다음 `grant-permissions` 예시에서는 지정된 데이터베이스의 모든 테이블에 대한 선택 권한을 위탁자에게 부여합니다.  

```
aws lakeformation grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
    },
    "Resource": {
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "TableWildcard": {}
        }
    },
    "Permissions": [
        "SELECT"
    ],
    "PermissionsWithGrantOption": []
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
**예시 4: 위탁자에게 LF 태그에 대한 권한을 부여하는 방법**  
다음 `grant-permissions` 예시에서는 위탁자에게 LF 태그에 대한 연결 권한을 부여합니다.  

```
aws lakeformation grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
    },
    "Resource": {
        "LFTag": {
            "CatalogId": "123456789111",
            "TagKey": "category",
            "TagValues": [
                "private", "public"
            ]
        }

    },
    "Permissions": [
        "ASSOCIATE"
    ],
    "PermissionsWithGrantOption": []
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
**예시 5: 위탁자에게 데이터 위치에 대한 권한을 부여하는 방법**  
다음 `grant-permissions` 예시에서는 위탁자에게 데이터 위치에 대한 권한을 부여합니다.  

```
aws lakeformation grant-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
    },
    "Resource": {
        "DataLocation": {
            "CatalogId": "123456789111",
            "ResourceArn": "arn:aws:s3:::lf-data-lake-123456789111"
        }
    },
    "Permissions": [
        "DATA_LOCATION_ACCESS"
    ],
    "PermissionsWithGrantOption": []
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GrantPermissions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/grant-permissions.html) 섹션을 참조하세요.

### `list-data-cells-filter`
<a name="lakeformation_ListDataCellsFilter_cli_topic"></a>

다음 코드 예시에서는 `list-data-cells-filter` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**데이터 셀 필터를 나열하는 방법**  
다음 `list-data-cells-filter` 예시에서는 지정된 테이블에 대한 데이터 셀 필터를 나열합니다.  

```
aws lakeformation list-data-cells-filter \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "MaxResults": 2,
    "Table": {
        "CatalogId": "123456789111",
        "DatabaseName": "tpc",
        "Name": "dl_tpc_promotion"
    }
}
```
출력:  

```
{
    "DataCellsFilters": [{
            "TableCatalogId": "123456789111",
            "DatabaseName": "tpc",
            "TableName": "dl_tpc_promotion",
            "Name": "developer_promotion",
            "RowFilter": {
                "FilterExpression": "p_promo_name='ese'"
            },
            "ColumnNames": [
                "p_channel_details",
                "p_start_date_sk",
                "p_purpose",
                "p_promo_id",
                "p_promo_name",
                "p_end_date_sk",
                "p_discount_active"
            ]
        },
        {
            "TableCatalogId": "123456789111",
            "DatabaseName": "tpc",
            "TableName": "dl_tpc_promotion",
            "Name": "developer_promotion_allrows",
            "RowFilter": {
                "FilterExpression": "TRUE",
                "AllRowsWildcard": {}
            },
            "ColumnNames": [
                "p_channel_details",
                "p_start_date_sk",
                "p_promo_name"
            ]
        }
    ],
    "NextToken": "2MDA2MTgwNiwibmFub3MiOjE0MDAwMDAwMH19"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Data filtering and cell-level security in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/data-filtering.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListDataCellsFilter](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/list-data-cells-filter.html) 섹션을 참조하세요.

### `list-permissions`
<a name="lakeformation_ListPermissions_cli_topic"></a>

다음 코드 예시에서는 `list-permissions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**예시 1: 리소스에 대한 위탁자 권한 목록을 검색하는 방법**  
다음 `list-permissions` 예시에서는 데이터베이스 리소스에 대한 위탁자 권한 목록을 반환합니다.  

```
aws lakeformation list-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "ResourceType": "DATABASE",
    "MaxResults": 2
}
```
출력:  

```
{
    "PrincipalResourcePermissions": [{
        "Principal": {
            "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-campaign-manager"
        },
        "Resource": {
            "Database": {
                "CatalogId": "123456789111",
                "Name": "tpc"
            }
        },
        "Permissions": [
            "DESCRIBE"
        ],
        "PermissionsWithGrantOption": []
    }],
    "NextToken": "E5SlJDSTZleUp6SWpvaU9UQTNORE0zTXpFeE5Ua3pJbjE5TENKbGVIQnBjbUYwYVc5dUlqcDdJbk5sWTI5dVpITWlPakUyTm"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing Lake Formation permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-permissions.html)를 참조하세요.  
**예시 2: 데이터 필터를 사용하여 테이블의 위탁자 권한 목록을 검색하는 방법**  
다음 `list-permissions` 예시에서는 위탁자에게 부여된 관련 데이터 필터와 함께 테이블의 권한을 나열합니다.  

```
aws lakeformation list-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Resource": {
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "Name": "dl_tpc_customer"
        }
    },
    "IncludeRelated": "TRUE",
    "MaxResults": 10
}
```
출력:  

```
{
    "PrincipalResourcePermissions": [{
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:role/Admin"
            },
            "Resource": {
                "Table": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "customer",
                    "Name": "customer_invoice"
                }
            },
            "Permissions": [
                "ALL",
                "ALTER",
                "DELETE",
                "DESCRIBE",
                "DROP",
                "INSERT"
            ],
            "PermissionsWithGrantOption": [
                "ALL",
                "ALTER",
                "DELETE",
                "DESCRIBE",
                "DROP",
                "INSERT"
            ]
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:role/Admin"
            },
            "Resource": {
                "TableWithColumns": {
                    "CatalogId": "123456789111",
                    "DatabaseName": "customer",
                    "Name": "customer_invoice",
                    "ColumnWildcard": {}
                }
            },
            "Permissions": [
                "SELECT"
            ],
            "PermissionsWithGrantOption": [
                "SELECT"
            ]
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:role/Admin"
            },
            "Resource": {
                "DataCellsFilter": {
                    "TableCatalogId": "123456789111",
                    "DatabaseName": "customer",
                    "TableName": "customer_invoice",
                    "Name": "dl_us_customer"
                }
            },
            "Permissions": [
                "DESCRIBE",
                "SELECT",
                "DROP"
            ],
            "PermissionsWithGrantOption": []
        }
    ],
    "NextToken": "VyeUFjY291bnRQZXJtaXNzaW9ucyI6ZmFsc2V9"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing Lake Formation permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-permissions.html)를 참조하세요.  
**예시 3: LF 태그에 대한 위탁자 권한 목록을 검색하는 방법**  
다음 `list-permissions` 예시에서는 위탁자에게 부여된 LF 태그에 대한 권한을 나열합니다.  

```
aws lakeformation list-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Resource": {
        "LFTag": {
            "CatalogId": "123456789111",
            "TagKey": "category",
            "TagValues": [
                "private"
            ]
        }
    },
    "MaxResults": 10
}
```
출력:  

```
{
    "PrincipalResourcePermissions": [{
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
            },
            "Resource": {
                "LFTag": {
                    "CatalogId": "123456789111",
                    "TagKey": "category",
                    "TagValues": [
                        "*"
                    ]
                }
            },
            "Permissions": [
                "DESCRIBE"
            ],
            "PermissionsWithGrantOption": [
                "DESCRIBE"
            ]
        },
        {
            "Principal": {
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
            },
            "Resource": {
                "LFTag": {
                    "CatalogId": "123456789111",
                    "TagKey": "category",
                    "TagValues": [
                        "*"
                    ]
                }
            },
            "Permissions": [
                "ASSOCIATE"
            ],
            "PermissionsWithGrantOption": [
                "ASSOCIATE"
            ]
        }
    ],
    "NextToken": "EJwY21GMGFXOXVJanA3SW5Ocm1pc3Npb25zIjpmYWxzZX0="
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing Lake Formation permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListPermissions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/list-permissions.html) 섹션을 참조하세요.

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

다음 코드 예시에서는 `list-resources` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**Lake Formation에서 관리하는 리소스를 나열하는 방법**  
다음 `list-resources` 예시에서는 Lake Formation에서 관리하는 조건과 일치하는 리소스를 나열합니다.  

```
aws lakeformation list-resources \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "FilterConditionList": [{
        "Field": "ROLE_ARN",
        "ComparisonOperator": "CONTAINS",
        "StringValueList": [
            "123456789111"
        ]
    }],
    "MaxResults": 10
}
```
출력:  

```
{
    "ResourceInfoList": [{
            "ResourceArn": "arn:aws:s3:::lf-data-lake-123456789111",
            "RoleArn": "arn:aws:iam::123456789111:role/LF-GlueServiceRole",
            "LastModified": "2022-07-21T02:12:46.669000+00:00"
        },
        {
            "ResourceArn": "arn:aws:s3:::lf-emr-test-123456789111",
            "RoleArn": "arn:aws:iam::123456789111:role/EMRLFS3Role",
            "LastModified": "2022-07-29T16:22:03.211000+00:00"
        }
    ]
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing Lake Formation permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListResources](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/list-resources.html) 섹션을 참조하세요.

### `list-transactions`
<a name="lakeformation_ListTransactions_cli_topic"></a>

다음 코드 예시에서는 `list-transactions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**모든 트랜잭션 세부 정보를 나열하는 방법**  
다음 `list-transactions` 예시에서는 트랜잭션 및 해당 상태에 대한 메타데이터를 반환합니다.  

```
aws lakeformation list-transactions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "StatusFilter": "ALL",
    "MaxResults": 3
}
```
출력:  

```
{
    "Transactions": [{
            "TransactionId": "1234569f08804cb790d950d4d0fe485e",
            "TransactionStatus": "committed",
            "TransactionStartTime": "2022-08-10T14:32:29.220000+00:00",
            "TransactionEndTime": "2022-08-10T14:32:33.751000+00:00"
        },
        {
            "TransactionId": "12345972ca8347b89825e33c5774aec4",
            "TransactionStatus": "committed",
            "TransactionStartTime": "2022-08-10T14:29:04.046000+00:00",
            "TransactionEndTime": "2022-08-10T14:29:09.681000+00:00"
        },
        {
            "TransactionId": "12345daf6cb047dbba8ad9b0414613b2",
            "TransactionStatus": "committed",
            "TransactionStartTime": "2022-08-10T13:56:51.261000+00:00",
            "TransactionEndTime": "2022-08-10T13:56:51.547000+00:00"
        }
    ],
    "NextToken": "77X1ebypsI7os+X2lhHsZLGNCDK3nNGpwRdFpicSOHgcX1/QMoniUAKcpR3kj3ts3PVdMA=="
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTransactions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/list-transactions.html) 섹션을 참조하세요.

### `put-data-lake-settings`
<a name="lakeformation_PutDataLakeSettings_cli_topic"></a>

다음 코드 예시에서는 `put-data-lake-settings` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**AWS Lake Formation 관리형 데이터 레이크 설정을 설정하는 방법**  
다음 `put-data-lake-settings` 예시에서는 데이터 레이크 관리자 및 기타 데이터 레이크 설정 목록을 설정합니다.  

```
aws lakeformation put-data-lake-settings \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "DataLakeSettings": {
        "DataLakeAdmins": [{
                "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-admin"
            }
        ],
        "CreateDatabaseDefaultPermissions": [],
        "CreateTableDefaultPermissions": [],
        "TrustedResourceOwners": [],
        "AllowExternalDataFiltering": true,
        "ExternalDataFilteringAllowList": [{
            "DataLakePrincipalIdentifier ": "123456789111"
        }],
        "AuthorizedSessionTagValueList": ["Amazon EMR"]
    }
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Changing the default security settings for your data lake](https://docs.aws.amazon.com/lake-formation/latest/dg/change-settings.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [PutDataLakeSettings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/put-data-lake-settings.html) 섹션을 참조하세요.

### `register-resource`
<a name="lakeformation_RegisterResource_cli_topic"></a>

다음 코드 예시에서는 `register-resource` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**예시 1: Service Linked Role을 사용하여 데이터 레이크 스토리지 등록**  
다음 `register-resource` 예시에서는 서비스 연결 역할을 사용하여 Lake Formation에서 관리하는 대로 리소스를 등록합니다.  

```
aws lakeformation register-resource \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "ResourceArn": "arn:aws:s3:::lf-emr-athena-result-123",
    "UseServiceLinkedRole": true
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Adding an Amazon S3 location to your data lake](https://docs.aws.amazon.com/lake-formation/latest/dg/register-data-lake.html)를 참조하세요.  
**예시 2: 사용자 지정 역할을 사용하여 데이터 레이크 스토리지 등록**  
다음 `register-resource` 예시에서는 사용자 지정 역할을 사용하여 Lake Formation에서 관리하는 대로 리소스를 등록합니다.  

```
aws lakeformation register-resource \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "ResourceArn": "arn:aws:s3:::lf-emr-athena-result-123",
    "UseServiceLinkedRole": false,
    "RoleArn": "arn:aws:iam::123456789111:role/LF-GlueServiceRole"
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Adding an Amazon S3 location to your data lake](https://docs.aws.amazon.com/lake-formation/latest/dg/register-data-lake.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RegisterResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/register-resource.html) 섹션을 참조하세요.

### `remove-lf-tags-from-resource`
<a name="lakeformation_RemoveLfTagsFromResource_cli_topic"></a>

다음 코드 예시에서는 `remove-lf-tags-from-resource` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**리소스에서 LF 태그 제거**  
다음 `remove-lf-tags-from-resource` 예시에서는 테이블 리소스와의 LF 태그 연결을 제거합니다.  

```
aws lakeformation remove-lf-tags-from-resource \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Resource": {
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "Name": "dl_tpc_promotion"
        }
    },
    "LFTags": [{
        "CatalogId": "123456789111",
        "TagKey": "usergroup",
        "TagValues": [
            "developer"
        ]
    }]
}
```
출력:  

```
{
    "Failures": []
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Assigning LF-Tags to Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/TBAC-assigning-tags.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RemoveLfTagsFromResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/remove-lf-tags-from-resource.html) 섹션을 참조하세요.

### `revoke-permissions`
<a name="lakeformation_RevokePermissions_cli_topic"></a>

다음 코드 예시에서는 `revoke-permissions` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**위탁자의 리소스에 대한 권한을 취소하는 방법**  
다음 `revoke-permissions` 예시에서는 지정된 데이터베이스의 특정 테이블에 대한 위탁자 액세스를 취소합니다.  

```
aws lakeformation revoke-permissions \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "123456789111",
    "Principal": {
        "DataLakePrincipalIdentifier": "arn:aws:iam::123456789111:user/lf-developer"
    },
    "Resource": {
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "Name": "dl_tpc_promotion"
        }
    },
    "Permissions": [
        "ALL"
    ],
    "PermissionsWithGrantOption": []
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Granting and revoking permissions on Data Catalog resources](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-catalog-permissions.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [RevokePermissions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/revoke-permissions.html) 섹션을 참조하세요.

### `search-databases-by-lf-tags`
<a name="lakeformation_SearchDatabasesByLfTags_cli_topic"></a>

다음 코드 예시에서는 `search-databases-by-lf-tags` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LFTags로 데이터베이스 리소스를 검색하는 방법**  
다음 `search-databases-by-lf-tags` 예시는 LFTag 표현식과 일치하는 데이터베이스 리소스를 검색합니다.  

```
aws lakeformation search-databases-by-lf-tags \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "MaxResults": 1,
    "CatalogId": "123456789111",
    "Expression": [{
        "TagKey": "usergroup",
        "TagValues": [
            "developer"
        ]
    }]
}
```
출력:  

```
{
    "DatabaseList": [{
        "Database": {
            "CatalogId": "123456789111",
            "Name": "tpc"
        },
        "LFTags": [{
            "CatalogId": "123456789111",
            "TagKey": "usergroup",
            "TagValues": [
                "developer"
            ]
        }]
    }]
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Viewing the resources that a LF-Tag is assigned to](https://docs.aws.amazon.com/lake-formation/latest/dg/TBAC-view-tag-resources.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SearchDatabasesByLfTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/search-databases-by-lf-tags.html) 섹션을 참조하세요.

### `search-tables-by-lf-tags`
<a name="lakeformation_SearchTablesByLfTags_cli_topic"></a>

다음 코드 예시에서는 `search-tables-by-lf-tags` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LFTags로 테이블 리소스를 검색하는 방법**  
다음 `search-tables-by-lf-tags` 예시에서는 LFTag 표현식과 일치하는 테이블 리소스를 검색합니다.  

```
aws lakeformation search-tables-by-lf-tags \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "MaxResults": 2,
    "CatalogId": "123456789111",
    "Expression": [{
        "TagKey": "usergroup",
        "TagValues": [
            "developer"
        ]
    }]
}
```
출력:  

```
{
    "NextToken": "c2VhcmNoQWxsVGFnc0luVGFibGVzIjpmYWxzZX0=",
    "TableList": [{
        "Table": {
            "CatalogId": "123456789111",
            "DatabaseName": "tpc",
            "Name": "dl_tpc_item"
        },
        "LFTagOnDatabase": [{
            "CatalogId": "123456789111",
            "TagKey": "usergroup",
            "TagValues": [
                "developer"
            ]
        }],
        "LFTagsOnTable": [{
            "CatalogId": "123456789111",
            "TagKey": "usergroup",
            "TagValues": [
                "developer"
            ]
        }],
        "LFTagsOnColumns": [{
                "Name": "i_item_desc",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_container",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_wholesale_cost",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_manufact_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_brand_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_formulation",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_current_price",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_size",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_rec_start_date",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_manufact",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_item_sk",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_manager_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_item_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_class_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_class",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_category",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_category_id",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_brand",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_units",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_rec_end_date",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_color",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            },
            {
                "Name": "i_product_name",
                "LFTags": [{
                    "CatalogId": "123456789111",
                    "TagKey": "usergroup",
                    "TagValues": [
                        "developer"
                    ]
                }]
            }
        ]
    }]
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Viewing the resources that a LF-Tag is assigned to](https://docs.aws.amazon.com/lake-formation/latest/dg/TBAC-view-tag-resources.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [SearchTablesByLfTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/search-tables-by-lf-tags.html) 섹션을 참조하세요.

### `start-query-planning`
<a name="lakeformation_StartQueryPlanning_cli_topic"></a>

다음 코드 예시에서는 `start-query-planning` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**쿼리 문을 처리하는 방법**  
다음 `start-query-planning` 예시에서는 쿼리 문을 처리하기 위한 요청을 제출합니다.  

```
aws lakeformation start-query-planning \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "QueryPlanningContext": {
        "CatalogId": "012345678901",
        "DatabaseName": "tpc"
    },
    "QueryString": "select * from dl_tpc_household_demographics_gov where hd_income_band_sk=9"
}
```
출력:  

```
{
    "QueryId": "772a273f-4a62-4cda-8d98-69615ee8be9b"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StartQueryPlanning](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/start-query-planning.html) 섹션을 참조하세요.

### `start-transaction`
<a name="lakeformation_StartTransaction_cli_topic"></a>

다음 코드 예시에서는 `start-transaction` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**새 트랜잭션 시작**  
다음 `start-transaction` 예시에서는 새 트랜잭션을 시작하고 트랜잭션 ID를 반환합니다.  

```
aws lakeformation start-transaction \
    --transaction-type = 'READ_AND_WRITE'
```
출력:  

```
{
    "TransactionId": "b014d972ca8347b89825e33c5774aec4"
}
```
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StartTransaction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/start-transaction.html) 섹션을 참조하세요.

### `update-lf-tag`
<a name="lakeformation_UpdateLfTag_cli_topic"></a>

다음 코드 예시에서는 `update-lf-tag` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**LF 태그 정의를 업데이트하는 방법**  
다음 `update-lf-tag` 예시에서는 LF 태그 정의를 업데이트합니다.  

```
aws lakeformation update-lf-tag \
    --catalog-id '123456789111' \
    --tag-key 'usergroup' \
    --tag-values-to-add '["admin"]'
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Managing LF-Tags for metadata access control](https://docs.aws.amazon.com/lake-formation/latest/dg/managing-tags.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateLfTag](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/update-lf-tag.html) 섹션을 참조하세요.

### `update-table-objects`
<a name="lakeformation_UpdateTableObjects_cli_topic"></a>

다음 코드 예시에서는 `update-table-objects` 코드를 사용하는 방법을 보여줍니다.

**AWS CLI**  
**관리 테이블의 객체를 수정하는 방법**  
다음 `update-table-objects` 예시에서는 제공된 S3 객체를 지정된 관리 테이블에 추가합니다.  

```
aws lakeformation update-table-objects \
    --cli-input-json file://input.json
```
`input.json`의 콘텐츠:  

```
{
    "CatalogId": "012345678901",
    "DatabaseName": "tpc",
    "TableName": "dl_tpc_household_demographics_gov",
    "TransactionId": "12347a9f75424b9b915f6ff201d2a190",
    "WriteOperations": [{
        "AddObject": {
            "Uri": "s3://lf-data-lake-012345678901/target/dl_tpc_household_demographics_gov/run-unnamed-1-part-block-0-r-00000-snappy-ff26b17504414fe88b302cd795eabd00.parquet",
            "ETag": "1234ab1fc50a316b149b4e1f21a73800",
            "Size": 42200
        }
    }]
}
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *AWS Lake Formation 개발자 안내서*의 [Reading from and writing to the data lake within transactions](https://docs.aws.amazon.com/lake-formation/latest/dg/transaction-ops.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateTableObjects](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/update-table-objects.html) 섹션을 참조하세요.