将 ListFargateProfiles 与 CLI 配合使用 - AWS SDK 代码示例

AWS 文档 SDK 示例 GitHub 存储库中还有更多 AWS SDK 示例。

ListFargateProfiles 与 CLI 配合使用

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

CLI
AWS CLI

列出名为“my-eks-cluster”的 Amazon EKS 集群中的所有 Fargate 配置文件

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

aws eks list-fargate-profiles \ --cluster-name my-eks-cluster

输出:

{ "fargateProfileNames": [ "my-fargate-profile" ] }
PowerShell
Tools for PowerShell V4

示例 1:此 cmdlet 列出与您 AWS 账户 在指定区域中的指定集群关联的 AWS Fargate 配置文件。

Get-EKSFargateProfileList -ClusterName "TEST"

输出

EKSFargate EKSFargateProfile
  • 有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet Reference (V4)》中的 ListFargateProfiles

Tools for PowerShell V5

示例 1:此 cmdlet 列出与您 AWS 账户 在指定区域中的指定集群关联的 AWS Fargate 配置文件。

Get-EKSFargateProfileList -ClusterName "TEST"

输出

EKSFargate EKSFargateProfile
  • 有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet Reference (V5)》中的 ListFargateProfiles