本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
EKS 上的 Amazon EMR 示例使用 Amazon CLI
以下代码示例向您展示了如何在 EKS 上使用 Amazon EMR 来执行操作和实现常见场景。 Amazon Command Line Interface
操作是大型程序的代码摘录,必须在上下文中运行。您可以通过操作了解如何调用单个服务函数,还可以通过函数相关场景和跨服务示例的上下文查看操作。
场景是展示如何通过在同一服务中调用多个函数来完成特定任务任务的代码示例。
每个示例都包含一个指向的链接 GitHub,您可以在其中找到有关如何在上下文中设置和运行代码的说明。
主题
操作
以下代码示例演示如何使用 update-role-trust-policy
。
- Amazon CLI
-
更新要与 EKS 上的 Amazon EMR 一起使用的 IAM 角色的信任策略
此示例命令更新名为 e xample_iam_role 的角色的信任策略,以便该角色可以与名为 example_cl uster 的 EKS 集群中的 example_n am espelace 命名空间的 EKS 上的 Amazon EMR 一起使用。
命令:
aws emr-containers update-role-trust-policy \ --cluster example_cluster \ --namespace example_namespace \ --role-name example_iam_role
输出:
If the trust policy has already been updated, then the output will be: Trust policy statement already exists for role example_iam_role. No changes were made! If the trust policy has not been updated yet, then the output will be: Successfully updated trust policy of role example_iam_role.
-
有关 API 的详细信息,请参阅Amazon CLI 命令参考UpdateRoleTrustPolicy
中的。
-