- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteFargateProfileCommand
Deletes an Fargate profile.
When you delete a Fargate profile, any Pod
running on Fargate that was created with the profile is deleted. If the Pod
matches another Fargate profile, then it is scheduled on Fargate with that profile. If it no longer matches any Fargate profiles, then it's not scheduled on Fargate and may remain in a pending state.
Only one Fargate profile in a cluster can be in the DELETING
status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EKSClient, DeleteFargateProfileCommand } from "@aws-sdk/client-eks"; // ES Modules import
// const { EKSClient, DeleteFargateProfileCommand } = require("@aws-sdk/client-eks"); // CommonJS import
const client = new EKSClient(config);
const input = { // DeleteFargateProfileRequest
clusterName: "STRING_VALUE", // required
fargateProfileName: "STRING_VALUE", // required
};
const command = new DeleteFargateProfileCommand(input);
const response = await client.send(command);
// { // DeleteFargateProfileResponse
// fargateProfile: { // FargateProfile
// fargateProfileName: "STRING_VALUE",
// fargateProfileArn: "STRING_VALUE",
// clusterName: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// podExecutionRoleArn: "STRING_VALUE",
// subnets: [ // StringList
// "STRING_VALUE",
// ],
// selectors: [ // FargateProfileSelectors
// { // FargateProfileSelector
// namespace: "STRING_VALUE",
// labels: { // FargateProfileLabel
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// status: "CREATING" || "ACTIVE" || "DELETING" || "CREATE_FAILED" || "DELETE_FAILED",
// tags: { // TagMap
// "<keys>": "STRING_VALUE",
// },
// health: { // FargateProfileHealth
// issues: [ // FargateProfileIssueList
// { // FargateProfileIssue
// code: "PodExecutionRoleAlreadyInUse" || "AccessDenied" || "ClusterUnreachable" || "InternalFailure",
// message: "STRING_VALUE",
// resourceIds: [
// "STRING_VALUE",
// ],
// },
// ],
// },
// },
// };
DeleteFargateProfileCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
clusterName Required | string | undefined | The name of your cluster. |
fargateProfileName Required | string | undefined | The name of the Fargate profile to delete. |
DeleteFargateProfileCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
fargateProfile | FargateProfile | undefined | The deleted Fargate profile. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ClientException | client | These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal that doesn't have permissions to use the action or resource or specifying an identifier that is not valid. |
InvalidParameterException | client | The specified parameter is invalid. Review the available parameters for the API request. |
ResourceNotFoundException | client | The specified resource could not be found. You can view your available clusters with |
ServerException | server | These errors are usually caused by a server-side issue. |
EKSServiceException | Base exception class for all service exceptions from EKS service. |