Skip to content

Commit

Permalink
feat(client-eks): This release adds support to surface async fargate …
Browse files Browse the repository at this point in the history
…customer errors from async path to customer through describe-fargate-profile API response.
  • Loading branch information
awstools committed Jun 18, 2024
1 parent 472d873 commit 34e2d61
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 0 deletions.
11 changes: 11 additions & 0 deletions clients/client-eks/src/commands/CreateFargateProfileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ export interface CreateFargateProfileCommandOutput extends CreateFargateProfileR
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // health: { // FargateProfileHealth
* // issues: [ // FargateProfileIssueList
* // { // FargateProfileIssue
* // code: "PodExecutionRoleAlreadyInUse" || "AccessDenied" || "ClusterUnreachable" || "InternalFailure",
* // message: "STRING_VALUE",
* // resourceIds: [
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // },
* // },
* // };
*
Expand Down
11 changes: 11 additions & 0 deletions clients/client-eks/src/commands/DeleteFargateProfileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ export interface DeleteFargateProfileCommandOutput extends DeleteFargateProfileR
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // health: { // FargateProfileHealth
* // issues: [ // FargateProfileIssueList
* // { // FargateProfileIssue
* // code: "PodExecutionRoleAlreadyInUse" || "AccessDenied" || "ClusterUnreachable" || "InternalFailure",
* // message: "STRING_VALUE",
* // resourceIds: [
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // },
* // },
* // };
*
Expand Down
11 changes: 11 additions & 0 deletions clients/client-eks/src/commands/DescribeFargateProfileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ export interface DescribeFargateProfileCommandOutput extends DescribeFargateProf
* // tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // health: { // FargateProfileHealth
* // issues: [ // FargateProfileIssueList
* // { // FargateProfileIssue
* // code: "PodExecutionRoleAlreadyInUse" || "AccessDenied" || "ClusterUnreachable" || "InternalFailure",
* // message: "STRING_VALUE",
* // resourceIds: [
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // },
* // },
* // };
*
Expand Down
60 changes: 60 additions & 0 deletions clients/client-eks/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2866,6 +2866,59 @@ export interface CreateFargateProfileRequest {
tags?: Record<string, string>;
}

/**
* @public
* @enum
*/
export const FargateProfileIssueCode = {
ACCESS_DENIED: "AccessDenied",
CLUSTER_UNREACHABLE: "ClusterUnreachable",
INTERNAL_FAILURE: "InternalFailure",
POD_EXECUTION_ROLE_ALREADY_IN_USE: "PodExecutionRoleAlreadyInUse",
} as const;

/**
* @public
*/
export type FargateProfileIssueCode = (typeof FargateProfileIssueCode)[keyof typeof FargateProfileIssueCode];

/**
* <p>An issue that is associated with the Fargate profile.</p>
* @public
*/
export interface FargateProfileIssue {
/**
* <p>A brief description of the error.</p>
* @public
*/
code?: FargateProfileIssueCode;

/**
* <p>The error message associated with the issue.</p>
* @public
*/
message?: string;

/**
* <p>The Amazon Web Services resources that are affected by this issue.</p>
* @public
*/
resourceIds?: string[];
}

/**
* <p>The health status of the Fargate profile. If there are issues with
* your Fargate profile's health, they are listed here.</p>
* @public
*/
export interface FargateProfileHealth {
/**
* <p>Any issues that are associated with the Fargate profile.</p>
* @public
*/
issues?: FargateProfileIssue[];
}

/**
* @public
* @enum
Expand Down Expand Up @@ -2947,6 +3000,13 @@ export interface FargateProfile {
* @public
*/
tags?: Record<string, string>;

/**
* <p>The health status of the Fargate profile. If there are issues with
* your Fargate profile's health, they are listed here.</p>
* @public
*/
health?: FargateProfileHealth;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions clients/client-eks/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3312,6 +3312,7 @@ const de_FargateProfile = (output: any, context: __SerdeContext): FargateProfile
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
fargateProfileArn: __expectString,
fargateProfileName: __expectString,
health: _json,
podExecutionRoleArn: __expectString,
selectors: _json,
status: __expectString,
Expand All @@ -3320,6 +3321,12 @@ const de_FargateProfile = (output: any, context: __SerdeContext): FargateProfile
}) as any;
};

// de_FargateProfileHealth omitted.

// de_FargateProfileIssue omitted.

// de_FargateProfileIssueList omitted.

// de_FargateProfileLabel omitted.

// de_FargateProfileSelector omitted.
Expand Down
81 changes: 81 additions & 0 deletions codegen/sdk-codegen/aws-models/eks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6127,12 +6127,93 @@
"traits": {
"smithy.api#documentation": "<p>Metadata that assists with categorization and organization.\n Each tag consists of a key and an optional value. You define both. Tags don't\n propagate to any other cluster or Amazon Web Services resources.</p>"
}
},
"health": {
"target": "com.amazonaws.eks#FargateProfileHealth",
"traits": {
"smithy.api#documentation": "<p>The health status of the Fargate profile. If there are issues with\n your Fargate profile's health, they are listed here.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>An object representing an Fargate profile.</p>"
}
},
"com.amazonaws.eks#FargateProfileHealth": {
"type": "structure",
"members": {
"issues": {
"target": "com.amazonaws.eks#FargateProfileIssueList",
"traits": {
"smithy.api#documentation": "<p>Any issues that are associated with the Fargate profile.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>The health status of the Fargate profile. If there are issues with\n your Fargate profile's health, they are listed here.</p>"
}
},
"com.amazonaws.eks#FargateProfileIssue": {
"type": "structure",
"members": {
"code": {
"target": "com.amazonaws.eks#FargateProfileIssueCode",
"traits": {
"smithy.api#documentation": "<p>A brief description of the error.</p>"
}
},
"message": {
"target": "com.amazonaws.eks#String",
"traits": {
"smithy.api#documentation": "<p>The error message associated with the issue.</p>"
}
},
"resourceIds": {
"target": "com.amazonaws.eks#StringList",
"traits": {
"smithy.api#documentation": "<p>The Amazon Web Services resources that are affected by this issue.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>An issue that is associated with the Fargate profile.</p>"
}
},
"com.amazonaws.eks#FargateProfileIssueCode": {
"type": "enum",
"members": {
"POD_EXECUTION_ROLE_ALREADY_IN_USE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "PodExecutionRoleAlreadyInUse"
}
},
"ACCESS_DENIED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "AccessDenied"
}
},
"CLUSTER_UNREACHABLE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "ClusterUnreachable"
}
},
"INTERNAL_FAILURE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "InternalFailure"
}
}
}
},
"com.amazonaws.eks#FargateProfileIssueList": {
"type": "list",
"member": {
"target": "com.amazonaws.eks#FargateProfileIssue"
}
},
"com.amazonaws.eks#FargateProfileLabel": {
"type": "map",
"key": {
Expand Down

0 comments on commit 34e2d61

Please sign in to comment.