

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

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

# 将 `ListFargateProfiles` 与 CLI 配合使用
<a name="eks_example_eks_ListFargateProfiles_section"></a>

以下代码示例演示如何使用 `ListFargateProfiles`。

------
#### [ CLI ]

**AWS CLI**  
**列出您的 Amazon EKS 集群中名为 ``my-eks-cluster的所有 fargate 配置文件**  
以下`list-fargate-profiles`示例列出了名为的 Amazon EKS 集群中的所有 fargate 配置文件。 my-eks-cluster  

```
aws eks list-fargate-profiles \
    --cluster-name my-eks-cluster
```
输出：  

```
{
    "fargateProfileNames": [
        "my-fargate-profile"
    ]
}
```
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[ListFargateProfiles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/list-fargate-profiles.html)*中的。

------
#### [ PowerShell ]

**适用于 PowerShell V4 的工具**  
**示例 1：此 cmdlet 列出了与指定区域中指定集群关联的 AWS Fargate 配置文件。 AWS 账户 **  

```
Get-EKSFargateProfileList -ClusterName "TEST"
```
**输出**：  

```
EKSFargate
EKSFargateProfile
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 4) [ListFargateProfiles](https://docs.aws.amazon.com/powershell/v4/reference)中的。

**适用于 PowerShell V5 的工具**  
**示例 1：此 cmdlet 列出了与指定区域中指定集群关联的 AWS Fargate 配置文件。 AWS 账户 **  

```
Get-EKSFargateProfileList -ClusterName "TEST"
```
**输出**：  

```
EKSFargate
EKSFargateProfile
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 5) [ListFargateProfiles](https://docs.aws.amazon.com/powershell/v5/reference)中的。

------