

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在上与您的 EMR 无服务器应用程序交互 AWS CLI
<a name="applications-cli"></a>

从中创建 AWS CLI、描述和删除各个应用程序。您还可以列出所有应用程序，以便直观地访问。本节介绍如何执行这些操作。有关更多应用程序操作，如启动、停止和更新应用程序，请参阅 [EMR Serverless API 参考](https://docs.aws.amazon.com/emr-serverless/latest/APIReference/Welcome.html)。有关如何使用使用 EMR Serverless API 的示例 适用于 Java 的 AWS SDK，请参阅我们存储库中的 [Java 示例](https://github.com/aws-samples/emr-serverless-samples/tree/main/examples/java-api)。 GitHub 有关如何使用使用 EMR Serverless API 的示例 AWS SDK for Python (Boto)，请参阅我们存储库中的 Pyth [on 示例](https://github.com/aws-samples/emr-serverless-samples/tree/main/examples/python-api)。 GitHub 

要创建应用程序，请使用 `create-application`。必须将 `SPARK` 或 `HIVE` 指定为应用程序 `type`。该命令将返回应用程序的 ARN、名称和 ID。

```
aws emr-serverless create-application \
--name my-application-name \
--type 'application-type' \
--release-label release-version
```

要描述应用程序，请使用 `get-application` 并提供 `application-id`。该命令将返回应用程序的状态和容量相关配置。

```
aws emr-serverless get-application \
--application-id application-id
```

要列出所有应用程序，请调用 `list-applications`。该命令将返回与 `get-application` 相同的属性，但包括所有应用程序。

```
aws emr-serverless list-applications
```

要删除应用程序，请调用 `delete-application` 并提供 `application-id`。

```
aws emr-serverless delete-application \
--application-id application-id
```