Hay más ejemplos de AWS SDK disponibles en el repositorio de GitHub de ejemplos de AWS SDK de documentos
Utilizar DeleteFargateProfile con una CLI
Los siguientes ejemplos de código muestran cómo utilizar DeleteFargateProfile.
- CLI
-
- AWS CLI
-
Ejemplo 1: creación de un perfil de Fargate de EKS para un selector con un espacio de nombres
En el siguiente ejemplo de
delete-fargate-profilese crea de un perfil de Fargate de EKS para un selector con un espacio de nombres.aws eks delete-fargate-profile \ --cluster-namemy-eks-cluster\ --fargate-profile-namemy-fargate-profileSalida:
{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-east-2:111122223333:fargateprofile/my-eks-cluster/my-fargate-profile/1ac72bb3-3fc6-2631-f1e1-98bff53bed62", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T11:48:39.975000-04:00", "podExecutionRoleArn": "arn:aws:iam::111122223333:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default", "labels": { "foo": "bar" } } ], "status": "DELETING", "tags": {} } }Para obtener más información, consulte AWS Fargate profile - Deleting a Fargate en la Guía del usuario de Amazon EKS.
-
Para obtener información sobre la API, consulte DeleteFargateProfile
en la Referencia de comandos de la AWS CLI.
-
- PowerShell
-
- Herramientas para PowerShell V4
-
Ejemplo 1: Este cmdlet elimina un perfil de AWS Fargate. Al eliminar un perfil de Fargate, se eliminan todos los pods que se programaron en Fargate con el perfil.
Remove-EKSFargateProfile -FargateProfileName "EKSFargate" -ClusterName "TEST"Salida:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-EKSFargateProfile (DeleteFargateProfile)" on target "EKSFargate". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y ClusterName : TEST CreatedAt : 12/26/2019 12:34:47 PM FargateProfileArn : arn:aws:eks:us-east-2:012345678912:fargateprofile/TEST/EKSFargate/42b7a119-e16b-a279-ce97-bdf303adec92 FargateProfileName : EKSFargate PodExecutionRoleArn : arn:aws:iam::012345678912:role/AmazonEKSFargatePodExecutionRole Selectors : {Amazon.EKS.Model.FargateProfileSelector} Status : DELETING Subnets : {subnet-0cd976f08d5fbfaae, subnet-02f6ff500ff2067a0} Tags : {}-
Para obtener información sobre la API, consulte DeleteFargateProfile en la Referencia de cmdlets de Herramientas de AWS para PowerShell (V4).
-
- Herramientas para PowerShell V5
-
Ejemplo 1: Este cmdlet elimina un perfil de AWS Fargate. Al eliminar un perfil de Fargate, se eliminan todos los pods que se programaron en Fargate con el perfil.
Remove-EKSFargateProfile -FargateProfileName "EKSFargate" -ClusterName "TEST"Salida:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-EKSFargateProfile (DeleteFargateProfile)" on target "EKSFargate". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y ClusterName : TEST CreatedAt : 12/26/2019 12:34:47 PM FargateProfileArn : arn:aws:eks:us-east-2:012345678912:fargateprofile/TEST/EKSFargate/42b7a119-e16b-a279-ce97-bdf303adec92 FargateProfileName : EKSFargate PodExecutionRoleArn : arn:aws:iam::012345678912:role/AmazonEKSFargatePodExecutionRole Selectors : {Amazon.EKS.Model.FargateProfileSelector} Status : DELETING Subnets : {subnet-0cd976f08d5fbfaae, subnet-02f6ff500ff2067a0} Tags : {}-
Para obtener información sobre la API, consulte DeleteFargateProfile en la Referencia de cmdlets de Herramientas de AWS para PowerShell (V5).
-