EKS's own wording has not been measured. It answers as the REST JSON deserializer API Gateway and SES v2 were
+ * measured to, a {@code SerializationException} naming the JSON token it could not convert, and only a boolean
+ * member's scalar is checked: a structure, list or map of the wrong kind is refused too, any other scalar is left to
+ * the operation, as before.
+ */
+final class EksRequestShapes {
+
+ static final String RESOURCE_NAME = "aws/eks-request-shapes.json";
+
+ private static final RequestShapeCheck.Messages MESSAGES = new RequestShapeCheck.Messages(
+ "SerializationException",
+ "Start of structure or map found where not expected.",
+ "Start of list found where not expected",
+ ByPosition.same("Expected null"),
+ ByPosition.same("Expected list or null"),
+ ByPosition.same("Expected map or null"),
+ "%s can not be converted to a %s",
+ false,
+ null,
+ null,
+ Set.of("boolean"));
+
+ private static final RequestShapeCheck.Operations OPERATIONS =
+ new RequestShapeCheck.Operations(RESOURCE_NAME, "EKS request shapes", MESSAGES);
+
+ private EksRequestShapes() {
+ }
+
+ /** Checks an EKS request body against the body shape of {@code operation}. */
+ static void check(String operation, JsonNode request) {
+ OPERATIONS.check(operation, request);
+ }
+}
diff --git a/src/main/resources/aws/eks-request-shapes.json b/src/main/resources/aws/eks-request-shapes.json
new file mode 100644
index 0000000000..1f49197eda
--- /dev/null
+++ b/src/main/resources/aws/eks-request-shapes.json
@@ -0,0 +1,1215 @@
+{
+ "_source": {
+ "generator": "tools/aws/regen_eks_shapes.py",
+ "botocore": "botocore 1.43.118 (installed package)"
+ },
+ "operations": {
+ "ActivateCertificateAuthority": "ActivateCertificateAuthorityRequest",
+ "AssociateAccessPolicy": "AssociateAccessPolicyRequest",
+ "AssociateEncryptionConfig": "AssociateEncryptionConfigRequest",
+ "AssociateIdentityProviderConfig": "AssociateIdentityProviderConfigRequest",
+ "CancelUpdate": "CancelUpdateRequest",
+ "CreateAccessEntry": "CreateAccessEntryRequest",
+ "CreateAddon": "CreateAddonRequest",
+ "CreateCapability": "CreateCapabilityRequest",
+ "CreateCertificateAuthority": "CreateCertificateAuthorityRequest",
+ "CreateCluster": "CreateClusterRequest",
+ "CreateEksAnywhereSubscription": "CreateEksAnywhereSubscriptionRequest",
+ "CreateFargateProfile": "CreateFargateProfileRequest",
+ "CreateNodegroup": "CreateNodegroupRequest",
+ "CreatePodIdentityAssociation": "CreatePodIdentityAssociationRequest",
+ "DeleteAccessEntry": "DeleteAccessEntryRequest",
+ "DeleteAddon": "DeleteAddonRequest",
+ "DeleteCapability": "DeleteCapabilityRequest",
+ "DeleteCertificateAuthority": "DeleteCertificateAuthorityRequest",
+ "DeleteCluster": "DeleteClusterRequest",
+ "DeleteEksAnywhereSubscription": "DeleteEksAnywhereSubscriptionRequest",
+ "DeleteFargateProfile": "DeleteFargateProfileRequest",
+ "DeleteNodegroup": "DeleteNodegroupRequest",
+ "DeletePodIdentityAssociation": "DeletePodIdentityAssociationRequest",
+ "DeregisterCluster": "DeregisterClusterRequest",
+ "DescribeAccessEntry": "DescribeAccessEntryRequest",
+ "DescribeAddon": "DescribeAddonRequest",
+ "DescribeAddonConfiguration": "DescribeAddonConfigurationRequest",
+ "DescribeAddonVersions": "DescribeAddonVersionsRequest",
+ "DescribeCapability": "DescribeCapabilityRequest",
+ "DescribeCertificateAuthority": "DescribeCertificateAuthorityRequest",
+ "DescribeCluster": "DescribeClusterRequest",
+ "DescribeClusterVersions": "DescribeClusterVersionsRequest",
+ "DescribeEksAnywhereSubscription": "DescribeEksAnywhereSubscriptionRequest",
+ "DescribeFargateProfile": "DescribeFargateProfileRequest",
+ "DescribeIdentityProviderConfig": "DescribeIdentityProviderConfigRequest",
+ "DescribeInsight": "DescribeInsightRequest",
+ "DescribeInsightsRefresh": "DescribeInsightsRefreshRequest",
+ "DescribeNodegroup": "DescribeNodegroupRequest",
+ "DescribePodIdentityAssociation": "DescribePodIdentityAssociationRequest",
+ "DescribeUpdate": "DescribeUpdateRequest",
+ "DisassociateAccessPolicy": "DisassociateAccessPolicyRequest",
+ "DisassociateIdentityProviderConfig": "DisassociateIdentityProviderConfigRequest",
+ "ListAccessEntries": "ListAccessEntriesRequest",
+ "ListAccessPolicies": "ListAccessPoliciesRequest",
+ "ListAddons": "ListAddonsRequest",
+ "ListAssociatedAccessPolicies": "ListAssociatedAccessPoliciesRequest",
+ "ListCapabilities": "ListCapabilitiesRequest",
+ "ListCertificateAuthorities": "ListCertificateAuthoritiesRequest",
+ "ListClusters": "ListClustersRequest",
+ "ListEksAnywhereSubscriptions": "ListEksAnywhereSubscriptionsRequest",
+ "ListFargateProfiles": "ListFargateProfilesRequest",
+ "ListIdentityProviderConfigs": "ListIdentityProviderConfigsRequest",
+ "ListInsights": "ListInsightsRequest",
+ "ListNodegroups": "ListNodegroupsRequest",
+ "ListPodIdentityAssociations": "ListPodIdentityAssociationsRequest",
+ "ListTagsForResource": "ListTagsForResourceRequest",
+ "ListUpdates": "ListUpdatesRequest",
+ "RegisterCluster": "RegisterClusterRequest",
+ "StartInsightsRefresh": "StartInsightsRefreshRequest",
+ "TagResource": "TagResourceRequest",
+ "UntagResource": "UntagResourceRequest",
+ "UpdateAccessEntry": "UpdateAccessEntryRequest",
+ "UpdateAddon": "UpdateAddonRequest",
+ "UpdateCapability": "UpdateCapabilityRequest",
+ "UpdateClusterConfig": "UpdateClusterConfigRequest",
+ "UpdateClusterVersion": "UpdateClusterVersionRequest",
+ "UpdateEksAnywhereSubscription": "UpdateEksAnywhereSubscriptionRequest",
+ "UpdateNodegroupConfig": "UpdateNodegroupConfigRequest",
+ "UpdateNodegroupVersion": "UpdateNodegroupVersionRequest",
+ "UpdatePodIdentityAssociation": "UpdatePodIdentityAssociationRequest"
+ },
+ "shapes": {
+ "AMITypes": {
+ "type": "string"
+ },
+ "AccessScope": {
+ "type": "structure",
+ "members": {
+ "type": "AccessScopeType",
+ "namespaces": "StringList"
+ }
+ },
+ "AccessScopeType": {
+ "type": "string"
+ },
+ "AckConfigRequest": {
+ "type": "structure",
+ "members": {
+ "enableCrossNamespace": "BoxedBoolean",
+ "disabledServices": "AckDisabledServicesList"
+ }
+ },
+ "AckDisabledServicesList": {
+ "type": "list",
+ "member": "AckServiceName"
+ },
+ "AckServiceName": {
+ "type": "string"
+ },
+ "ActivateCertificateAuthorityRequest": {
+ "type": "structure",
+ "members": {
+ "clientRequestToken": "String"
+ }
+ },
+ "AddonNamespaceConfigRequest": {
+ "type": "structure",
+ "members": {
+ "namespace": "namespace"
+ }
+ },
+ "AddonPodIdentityAssociations": {
+ "type": "structure",
+ "members": {
+ "serviceAccount": "String",
+ "roleArn": "String"
+ }
+ },
+ "AddonPodIdentityAssociationsList": {
+ "type": "list",
+ "member": "AddonPodIdentityAssociations"
+ },
+ "ArgoCdAwsIdcConfigRequest": {
+ "type": "structure",
+ "members": {
+ "idcInstanceArn": "String",
+ "idcRegion": "String"
+ }
+ },
+ "ArgoCdConfigRequest": {
+ "type": "structure",
+ "members": {
+ "namespace": "String",
+ "awsIdc": "ArgoCdAwsIdcConfigRequest",
+ "rbacRoleMappings": "ArgoCdRoleMappingList",
+ "networkAccess": "ArgoCdNetworkAccessConfigRequest",
+ "endpointPrefix": "ArgoCdEndpointPrefix"
+ }
+ },
+ "ArgoCdEndpointPrefix": {
+ "type": "string"
+ },
+ "ArgoCdNetworkAccessConfigRequest": {
+ "type": "structure",
+ "members": {
+ "vpceIds": "StringList"
+ }
+ },
+ "ArgoCdRole": {
+ "type": "string"
+ },
+ "ArgoCdRoleMapping": {
+ "type": "structure",
+ "members": {
+ "role": "ArgoCdRole",
+ "identities": "SsoIdentityList"
+ }
+ },
+ "ArgoCdRoleMappingList": {
+ "type": "list",
+ "member": "ArgoCdRoleMapping"
+ },
+ "AssociateAccessPolicyRequest": {
+ "type": "structure",
+ "members": {
+ "policyArn": "String",
+ "accessScope": "AccessScope"
+ }
+ },
+ "AssociateEncryptionConfigRequest": {
+ "type": "structure",
+ "members": {
+ "encryptionConfig": "EncryptionConfigList",
+ "clientRequestToken": "String"
+ }
+ },
+ "AssociateIdentityProviderConfigRequest": {
+ "type": "structure",
+ "members": {
+ "oidc": "OidcIdentityProviderConfigRequest",
+ "tags": "TagMap",
+ "clientRequestToken": "String"
+ }
+ },
+ "AuthenticationMode": {
+ "type": "string"
+ },
+ "BlockStorage": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean"
+ }
+ },
+ "Boolean": {
+ "type": "boolean"
+ },
+ "BoxedBoolean": {
+ "type": "boolean"
+ },
+ "BoxedInteger": {
+ "type": "integer"
+ },
+ "CancelUpdateRequest": {
+ "type": "structure",
+ "members": {
+ "clientRequestToken": "String"
+ }
+ },
+ "CapabilityConfigurationRequest": {
+ "type": "structure",
+ "members": {
+ "argoCd": "ArgoCdConfigRequest",
+ "ack": "AckConfigRequest"
+ }
+ },
+ "CapabilityDeletePropagationPolicy": {
+ "type": "string"
+ },
+ "CapabilityType": {
+ "type": "string"
+ },
+ "Capacity": {
+ "type": "integer"
+ },
+ "CapacityTypes": {
+ "type": "string"
+ },
+ "Category": {
+ "type": "string"
+ },
+ "CategoryList": {
+ "type": "list",
+ "member": "Category"
+ },
+ "ClusterName": {
+ "type": "string"
+ },
+ "ComputeConfigRequest": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean",
+ "nodePools": "StringList",
+ "nodeRoleArn": "String"
+ }
+ },
+ "ConnectorConfigProvider": {
+ "type": "string"
+ },
+ "ConnectorConfigRequest": {
+ "type": "structure",
+ "members": {
+ "roleArn": "String",
+ "provider": "ConnectorConfigProvider"
+ }
+ },
+ "ControlPlaneEgressModeType": {
+ "type": "string"
+ },
+ "ControlPlanePlacementRequest": {
+ "type": "structure",
+ "members": {
+ "groupName": "String",
+ "spreadLevel": "SpreadLevel"
+ }
+ },
+ "ControlPlaneScalingConfig": {
+ "type": "structure",
+ "members": {
+ "tier": "ProvisionedControlPlaneTier"
+ }
+ },
+ "CreateAccessConfigRequest": {
+ "type": "structure",
+ "members": {
+ "bootstrapClusterCreatorAdminPermissions": "BoxedBoolean",
+ "authenticationMode": "AuthenticationMode"
+ }
+ },
+ "CreateAccessEntryRequest": {
+ "type": "structure",
+ "members": {
+ "principalArn": "String",
+ "kubernetesGroups": "StringList",
+ "tags": "TagMap",
+ "clientRequestToken": "String",
+ "username": "String",
+ "type": "String"
+ }
+ },
+ "CreateAddonRequest": {
+ "type": "structure",
+ "members": {
+ "addonName": "String",
+ "addonVersion": "String",
+ "serviceAccountRoleArn": "RoleArn",
+ "resolveConflicts": "ResolveConflicts",
+ "clientRequestToken": "String",
+ "tags": "TagMap",
+ "configurationValues": "String",
+ "podIdentityAssociations": "AddonPodIdentityAssociationsList",
+ "namespaceConfig": "AddonNamespaceConfigRequest"
+ }
+ },
+ "CreateCapabilityRequest": {
+ "type": "structure",
+ "members": {
+ "capabilityName": "String",
+ "clientRequestToken": "String",
+ "type": "CapabilityType",
+ "roleArn": "String",
+ "configuration": "CapabilityConfigurationRequest",
+ "tags": "TagMap",
+ "deletePropagationPolicy": "CapabilityDeletePropagationPolicy"
+ }
+ },
+ "CreateCertificateAuthorityRequest": {
+ "type": "structure",
+ "members": {
+ "clientRequestToken": "String"
+ }
+ },
+ "CreateClusterRequest": {
+ "type": "structure",
+ "members": {
+ "name": "ClusterName",
+ "version": "String",
+ "roleArn": "String",
+ "resourcesVpcConfig": "VpcConfigRequest",
+ "kubernetesNetworkConfig": "KubernetesNetworkConfigRequest",
+ "logging": "Logging",
+ "clientRequestToken": "String",
+ "tags": "TagMap",
+ "encryptionConfig": "EncryptionConfigList",
+ "outpostConfig": "OutpostConfigRequest",
+ "accessConfig": "CreateAccessConfigRequest",
+ "bootstrapSelfManagedAddons": "BoxedBoolean",
+ "upgradePolicy": "UpgradePolicyRequest",
+ "zonalShiftConfig": "ZonalShiftConfigRequest",
+ "remoteNetworkConfig": "RemoteNetworkConfigRequest",
+ "computeConfig": "ComputeConfigRequest",
+ "storageConfig": "StorageConfigRequest",
+ "deletionProtection": "BoxedBoolean",
+ "controlPlaneScalingConfig": "ControlPlaneScalingConfig",
+ "kubeApiServerConfig": "KubeApiServerConfigRequest",
+ "kubeSchedulerConfig": "KubeSchedulerConfigRequest",
+ "kubeControllerManagerConfig": "KubeControllerManagerConfigRequest"
+ }
+ },
+ "CreateEksAnywhereSubscriptionRequest": {
+ "type": "structure",
+ "members": {
+ "name": "EksAnywhereSubscriptionName",
+ "term": "EksAnywhereSubscriptionTerm",
+ "licenseQuantity": "Integer",
+ "licenseType": "EksAnywhereSubscriptionLicenseType",
+ "autoRenew": "Boolean",
+ "clientRequestToken": "String",
+ "tags": "TagMap"
+ }
+ },
+ "CreateFargateProfileRequest": {
+ "type": "structure",
+ "members": {
+ "fargateProfileName": "String",
+ "podExecutionRoleArn": "String",
+ "subnets": "StringList",
+ "selectors": "FargateProfileSelectors",
+ "clientRequestToken": "String",
+ "tags": "TagMap"
+ }
+ },
+ "CreateNodegroupRequest": {
+ "type": "structure",
+ "members": {
+ "nodegroupName": "String",
+ "scalingConfig": "NodegroupScalingConfig",
+ "diskSize": "BoxedInteger",
+ "subnets": "StringList",
+ "instanceTypes": "StringList",
+ "amiType": "AMITypes",
+ "remoteAccess": "RemoteAccessConfig",
+ "nodeRole": "String",
+ "labels": "labelsMap",
+ "taints": "taintsList",
+ "tags": "TagMap",
+ "clientRequestToken": "String",
+ "launchTemplate": "LaunchTemplateSpecification",
+ "updateConfig": "NodegroupUpdateConfig",
+ "nodeRepairConfig": "NodeRepairConfig",
+ "capacityType": "CapacityTypes",
+ "version": "String",
+ "releaseVersion": "String",
+ "warmPoolConfig": "WarmPoolConfig"
+ }
+ },
+ "CreatePodIdentityAssociationRequest": {
+ "type": "structure",
+ "members": {
+ "namespace": "String",
+ "serviceAccount": "String",
+ "roleArn": "String",
+ "clientRequestToken": "String",
+ "tags": "TagMap",
+ "disableSessionTags": "BoxedBoolean",
+ "targetRoleArn": "String",
+ "policy": "String"
+ }
+ },
+ "DeleteAccessEntryRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteAddonRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteCapabilityRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteCertificateAuthorityRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteClusterRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteEksAnywhereSubscriptionRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteFargateProfileRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeleteNodegroupRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeletePodIdentityAssociationRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DeregisterClusterRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeAccessEntryRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeAddonConfigurationRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeAddonRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeAddonVersionsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeCapabilityRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeCertificateAuthorityRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeClusterRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeClusterVersionsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeEksAnywhereSubscriptionRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeFargateProfileRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeIdentityProviderConfigRequest": {
+ "type": "structure",
+ "members": {
+ "identityProviderConfig": "IdentityProviderConfig"
+ }
+ },
+ "DescribeInsightRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeInsightsRefreshRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeNodegroupRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribePodIdentityAssociationRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DescribeUpdateRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DisassociateAccessPolicyRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "DisassociateIdentityProviderConfigRequest": {
+ "type": "structure",
+ "members": {
+ "identityProviderConfig": "IdentityProviderConfig",
+ "clientRequestToken": "String"
+ }
+ },
+ "EksAnywhereSubscriptionLicenseType": {
+ "type": "string"
+ },
+ "EksAnywhereSubscriptionName": {
+ "type": "string"
+ },
+ "EksAnywhereSubscriptionTerm": {
+ "type": "structure",
+ "members": {
+ "duration": "Integer",
+ "unit": "EksAnywhereSubscriptionTermUnit"
+ }
+ },
+ "EksAnywhereSubscriptionTermUnit": {
+ "type": "string"
+ },
+ "ElasticLoadBalancing": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean"
+ }
+ },
+ "EncryptionConfig": {
+ "type": "structure",
+ "members": {
+ "resources": "StringList",
+ "provider": "Provider"
+ }
+ },
+ "EncryptionConfigList": {
+ "type": "list",
+ "member": "EncryptionConfig"
+ },
+ "EtcdPlacementRequest": {
+ "type": "structure",
+ "members": {
+ "spreadLevel": "SpreadLevel"
+ }
+ },
+ "FargateProfileLabel": {
+ "type": "map",
+ "value": "String"
+ },
+ "FargateProfileSelector": {
+ "type": "structure",
+ "members": {
+ "namespace": "String",
+ "labels": "FargateProfileLabel"
+ }
+ },
+ "FargateProfileSelectors": {
+ "type": "list",
+ "member": "FargateProfileSelector"
+ },
+ "HorizontalPodAutoscalerControllerConfigRequest": {
+ "type": "structure",
+ "members": {
+ "horizontalPodAutoscalerSyncPeriod": "String"
+ }
+ },
+ "IdentityProviderConfig": {
+ "type": "structure",
+ "members": {
+ "type": "String",
+ "name": "String"
+ }
+ },
+ "InsightStatusValue": {
+ "type": "string"
+ },
+ "InsightStatusValueList": {
+ "type": "list",
+ "member": "InsightStatusValue"
+ },
+ "InsightsFilter": {
+ "type": "structure",
+ "members": {
+ "categories": "CategoryList",
+ "kubernetesVersions": "StringList",
+ "statuses": "InsightStatusValueList"
+ }
+ },
+ "Integer": {
+ "type": "integer"
+ },
+ "IpFamily": {
+ "type": "string"
+ },
+ "KubeApiServerConfigRequest": {
+ "type": "structure",
+ "members": {
+ "eventTtl": "String",
+ "serviceNodePortRange": "ServiceNodePortRange"
+ }
+ },
+ "KubeControllerManagerConfigRequest": {
+ "type": "structure",
+ "members": {
+ "podGcControllerConfig": "PodGcControllerConfigRequest",
+ "horizontalPodAutoscalerControllerConfig": "HorizontalPodAutoscalerControllerConfigRequest"
+ }
+ },
+ "KubeSchedulerConfigRequest": {
+ "type": "structure",
+ "members": {
+ "nodeResourcesFit": "NodeResourcesFitConfig"
+ }
+ },
+ "KubernetesNetworkConfigRequest": {
+ "type": "structure",
+ "members": {
+ "serviceIpv4Cidr": "String",
+ "ipFamily": "IpFamily",
+ "elasticLoadBalancing": "ElasticLoadBalancing"
+ }
+ },
+ "LaunchTemplateSpecification": {
+ "type": "structure",
+ "members": {
+ "name": "String",
+ "version": "String",
+ "id": "String"
+ }
+ },
+ "ListAccessEntriesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListAccessPoliciesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListAddonsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListAssociatedAccessPoliciesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListCapabilitiesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListCertificateAuthoritiesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListClustersRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListEksAnywhereSubscriptionsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListFargateProfilesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListIdentityProviderConfigsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListInsightsMaxResults": {
+ "type": "integer"
+ },
+ "ListInsightsRequest": {
+ "type": "structure",
+ "members": {
+ "filter": "InsightsFilter",
+ "maxResults": "ListInsightsMaxResults",
+ "nextToken": "String"
+ }
+ },
+ "ListNodegroupsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListPodIdentityAssociationsRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListTagsForResourceRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "ListUpdatesRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "LogSetup": {
+ "type": "structure",
+ "members": {
+ "types": "LogTypes",
+ "enabled": "BoxedBoolean"
+ }
+ },
+ "LogSetups": {
+ "type": "list",
+ "member": "LogSetup"
+ },
+ "LogType": {
+ "type": "string"
+ },
+ "LogTypes": {
+ "type": "list",
+ "member": "LogType"
+ },
+ "Logging": {
+ "type": "structure",
+ "members": {
+ "clusterLogging": "LogSetups"
+ }
+ },
+ "NodeRepairConfig": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean",
+ "maxUnhealthyNodeThresholdCount": "NonZeroInteger",
+ "maxUnhealthyNodeThresholdPercentage": "PercentCapacity",
+ "maxParallelNodesRepairedCount": "NonZeroInteger",
+ "maxParallelNodesRepairedPercentage": "PercentCapacity",
+ "nodeRepairConfigOverrides": "NodeRepairConfigOverridesList"
+ }
+ },
+ "NodeRepairConfigOverrides": {
+ "type": "structure",
+ "members": {
+ "nodeMonitoringCondition": "String",
+ "nodeUnhealthyReason": "String",
+ "minRepairWaitTimeMins": "NonZeroInteger",
+ "repairAction": "RepairAction"
+ }
+ },
+ "NodeRepairConfigOverridesList": {
+ "type": "list",
+ "member": "NodeRepairConfigOverrides"
+ },
+ "NodeResourcesFitConfig": {
+ "type": "structure",
+ "members": {
+ "scoringStrategy": "ScoringStrategy"
+ }
+ },
+ "NodegroupScalingConfig": {
+ "type": "structure",
+ "members": {
+ "minSize": "ZeroCapacity",
+ "maxSize": "Capacity",
+ "desiredSize": "ZeroCapacity"
+ }
+ },
+ "NodegroupUpdateConfig": {
+ "type": "structure",
+ "members": {
+ "maxUnavailable": "NonZeroInteger",
+ "maxUnavailablePercentage": "PercentCapacity",
+ "updateStrategy": "NodegroupUpdateStrategies"
+ }
+ },
+ "NodegroupUpdateStrategies": {
+ "type": "string"
+ },
+ "NonZeroInteger": {
+ "type": "integer"
+ },
+ "OidcIdentityProviderConfigRequest": {
+ "type": "structure",
+ "members": {
+ "identityProviderConfigName": "String",
+ "issuerUrl": "String",
+ "clientId": "String",
+ "usernameClaim": "String",
+ "usernamePrefix": "String",
+ "groupsClaim": "String",
+ "groupsPrefix": "String",
+ "requiredClaims": "requiredClaimsMap"
+ }
+ },
+ "OutpostConfigRequest": {
+ "type": "structure",
+ "members": {
+ "outpostArns": "StringList",
+ "controlPlaneInstanceType": "String",
+ "controlPlanePlacement": "ControlPlanePlacementRequest",
+ "etcdInstanceType": "String",
+ "etcdPlacement": "EtcdPlacementRequest"
+ }
+ },
+ "PercentCapacity": {
+ "type": "integer"
+ },
+ "PodGcControllerConfigRequest": {
+ "type": "structure",
+ "members": {
+ "terminatedPodGcThreshold": "TerminatedPodGcThresholdValue"
+ }
+ },
+ "Provider": {
+ "type": "structure",
+ "members": {
+ "keyArn": "String"
+ }
+ },
+ "ProvisionedControlPlaneTier": {
+ "type": "string"
+ },
+ "RegisterClusterRequest": {
+ "type": "structure",
+ "members": {
+ "name": "ClusterName",
+ "connectorConfig": "ConnectorConfigRequest",
+ "clientRequestToken": "String",
+ "tags": "TagMap"
+ }
+ },
+ "RemoteAccessConfig": {
+ "type": "structure",
+ "members": {
+ "ec2SshKey": "String",
+ "sourceSecurityGroups": "StringList"
+ }
+ },
+ "RemoteNetworkConfigRequest": {
+ "type": "structure",
+ "members": {
+ "remoteNodeNetworks": "RemoteNodeNetworkList",
+ "remotePodNetworks": "RemotePodNetworkList"
+ }
+ },
+ "RemoteNodeNetwork": {
+ "type": "structure",
+ "members": {
+ "cidrs": "StringList"
+ }
+ },
+ "RemoteNodeNetworkList": {
+ "type": "list",
+ "member": "RemoteNodeNetwork"
+ },
+ "RemotePodNetwork": {
+ "type": "structure",
+ "members": {
+ "cidrs": "StringList"
+ }
+ },
+ "RemotePodNetworkList": {
+ "type": "list",
+ "member": "RemotePodNetwork"
+ },
+ "RepairAction": {
+ "type": "string"
+ },
+ "ResolveConflicts": {
+ "type": "string"
+ },
+ "ResourceWeight": {
+ "type": "structure",
+ "members": {
+ "name": "ResourceWeightName",
+ "weight": "ResourceWeightValue"
+ }
+ },
+ "ResourceWeightList": {
+ "type": "list",
+ "member": "ResourceWeight"
+ },
+ "ResourceWeightName": {
+ "type": "string"
+ },
+ "ResourceWeightValue": {
+ "type": "integer"
+ },
+ "RoleArn": {
+ "type": "string"
+ },
+ "RollbackConfig": {
+ "type": "structure",
+ "members": {
+ "timeoutMinutes": "BoxedInteger"
+ }
+ },
+ "ScoringStrategy": {
+ "type": "structure",
+ "members": {
+ "type": "ScoringStrategyType",
+ "resources": "ResourceWeightList"
+ }
+ },
+ "ScoringStrategyType": {
+ "type": "string"
+ },
+ "ServiceNodePortRange": {
+ "type": "structure",
+ "members": {
+ "minPort": "Integer",
+ "maxPort": "Integer"
+ }
+ },
+ "SpreadLevel": {
+ "type": "string"
+ },
+ "SsoIdentity": {
+ "type": "structure",
+ "members": {
+ "id": "String",
+ "type": "SsoIdentityType"
+ }
+ },
+ "SsoIdentityList": {
+ "type": "list",
+ "member": "SsoIdentity"
+ },
+ "SsoIdentityType": {
+ "type": "string"
+ },
+ "StartInsightsRefreshRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "StorageConfigRequest": {
+ "type": "structure",
+ "members": {
+ "blockStorage": "BlockStorage"
+ }
+ },
+ "String": {
+ "type": "string"
+ },
+ "StringList": {
+ "type": "list",
+ "member": "String"
+ },
+ "SupportType": {
+ "type": "string"
+ },
+ "TagMap": {
+ "type": "map",
+ "value": "TagValue"
+ },
+ "TagResourceRequest": {
+ "type": "structure",
+ "members": {
+ "tags": "TagMap"
+ }
+ },
+ "TagValue": {
+ "type": "string"
+ },
+ "Taint": {
+ "type": "structure",
+ "members": {
+ "key": "taintKey",
+ "value": "taintValue",
+ "effect": "TaintEffect"
+ }
+ },
+ "TaintEffect": {
+ "type": "string"
+ },
+ "TerminatedPodGcThresholdValue": {
+ "type": "integer"
+ },
+ "UntagResourceRequest": {
+ "type": "structure",
+ "members": {}
+ },
+ "UpdateAccessConfigRequest": {
+ "type": "structure",
+ "members": {
+ "authenticationMode": "AuthenticationMode"
+ }
+ },
+ "UpdateAccessEntryRequest": {
+ "type": "structure",
+ "members": {
+ "kubernetesGroups": "StringList",
+ "clientRequestToken": "String",
+ "username": "String"
+ }
+ },
+ "UpdateAckConfig": {
+ "type": "structure",
+ "members": {
+ "enableCrossNamespace": "BoxedBoolean",
+ "disabledServices": "AckDisabledServicesList"
+ }
+ },
+ "UpdateAddonRequest": {
+ "type": "structure",
+ "members": {
+ "addonVersion": "String",
+ "serviceAccountRoleArn": "RoleArn",
+ "resolveConflicts": "ResolveConflicts",
+ "clientRequestToken": "String",
+ "configurationValues": "String",
+ "podIdentityAssociations": "AddonPodIdentityAssociationsList"
+ }
+ },
+ "UpdateArgoCdConfig": {
+ "type": "structure",
+ "members": {
+ "rbacRoleMappings": "UpdateRoleMappings",
+ "networkAccess": "ArgoCdNetworkAccessConfigRequest"
+ }
+ },
+ "UpdateCapabilityConfiguration": {
+ "type": "structure",
+ "members": {
+ "argoCd": "UpdateArgoCdConfig",
+ "ack": "UpdateAckConfig"
+ }
+ },
+ "UpdateCapabilityRequest": {
+ "type": "structure",
+ "members": {
+ "roleArn": "String",
+ "configuration": "UpdateCapabilityConfiguration",
+ "clientRequestToken": "String",
+ "deletePropagationPolicy": "CapabilityDeletePropagationPolicy"
+ }
+ },
+ "UpdateClusterConfigRequest": {
+ "type": "structure",
+ "members": {
+ "resourcesVpcConfig": "VpcConfigRequest",
+ "logging": "Logging",
+ "clientRequestToken": "String",
+ "accessConfig": "UpdateAccessConfigRequest",
+ "upgradePolicy": "UpgradePolicyRequest",
+ "zonalShiftConfig": "ZonalShiftConfigRequest",
+ "computeConfig": "ComputeConfigRequest",
+ "kubernetesNetworkConfig": "KubernetesNetworkConfigRequest",
+ "storageConfig": "StorageConfigRequest",
+ "remoteNetworkConfig": "RemoteNetworkConfigRequest",
+ "deletionProtection": "BoxedBoolean",
+ "controlPlaneScalingConfig": "ControlPlaneScalingConfig",
+ "kubeApiServerConfig": "KubeApiServerConfigRequest",
+ "kubeSchedulerConfig": "KubeSchedulerConfigRequest",
+ "kubeControllerManagerConfig": "KubeControllerManagerConfigRequest"
+ }
+ },
+ "UpdateClusterVersionRequest": {
+ "type": "structure",
+ "members": {
+ "version": "String",
+ "clientRequestToken": "String",
+ "force": "Boolean",
+ "rollbackConfig": "RollbackConfig"
+ }
+ },
+ "UpdateEksAnywhereSubscriptionRequest": {
+ "type": "structure",
+ "members": {
+ "autoRenew": "Boolean",
+ "clientRequestToken": "String"
+ }
+ },
+ "UpdateLabelsPayload": {
+ "type": "structure",
+ "members": {
+ "addOrUpdateLabels": "labelsMap",
+ "removeLabels": "labelsKeyList"
+ }
+ },
+ "UpdateNodegroupConfigRequest": {
+ "type": "structure",
+ "members": {
+ "labels": "UpdateLabelsPayload",
+ "taints": "UpdateTaintsPayload",
+ "scalingConfig": "NodegroupScalingConfig",
+ "updateConfig": "NodegroupUpdateConfig",
+ "nodeRepairConfig": "NodeRepairConfig",
+ "warmPoolConfig": "WarmPoolConfig",
+ "clientRequestToken": "String"
+ }
+ },
+ "UpdateNodegroupVersionRequest": {
+ "type": "structure",
+ "members": {
+ "version": "String",
+ "releaseVersion": "String",
+ "launchTemplate": "LaunchTemplateSpecification",
+ "force": "Boolean",
+ "clientRequestToken": "String"
+ }
+ },
+ "UpdatePodIdentityAssociationRequest": {
+ "type": "structure",
+ "members": {
+ "roleArn": "String",
+ "clientRequestToken": "String",
+ "disableSessionTags": "BoxedBoolean",
+ "targetRoleArn": "String",
+ "policy": "String"
+ }
+ },
+ "UpdateRoleMappings": {
+ "type": "structure",
+ "members": {
+ "addOrUpdateRoleMappings": "ArgoCdRoleMappingList",
+ "removeRoleMappings": "ArgoCdRoleMappingList"
+ }
+ },
+ "UpdateTaintsPayload": {
+ "type": "structure",
+ "members": {
+ "addOrUpdateTaints": "taintsList",
+ "removeTaints": "taintsList"
+ }
+ },
+ "UpgradePolicyRequest": {
+ "type": "structure",
+ "members": {
+ "supportType": "SupportType"
+ }
+ },
+ "VpcConfigRequest": {
+ "type": "structure",
+ "members": {
+ "subnetIds": "StringList",
+ "securityGroupIds": "StringList",
+ "endpointPublicAccess": "BoxedBoolean",
+ "endpointPrivateAccess": "BoxedBoolean",
+ "publicAccessCidrs": "StringList",
+ "controlPlaneEgressMode": "ControlPlaneEgressModeType"
+ }
+ },
+ "WarmPoolConfig": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean",
+ "minSize": "ZeroCapacity",
+ "maxGroupPreparedCapacity": "BoxedInteger",
+ "poolState": "WarmPoolState",
+ "reuseOnScaleIn": "BoxedBoolean"
+ }
+ },
+ "WarmPoolState": {
+ "type": "string"
+ },
+ "ZeroCapacity": {
+ "type": "integer"
+ },
+ "ZonalShiftConfigRequest": {
+ "type": "structure",
+ "members": {
+ "enabled": "BoxedBoolean"
+ }
+ },
+ "labelValue": {
+ "type": "string"
+ },
+ "labelsKeyList": {
+ "type": "list",
+ "member": "String"
+ },
+ "labelsMap": {
+ "type": "map",
+ "value": "labelValue"
+ },
+ "namespace": {
+ "type": "string"
+ },
+ "requiredClaimsMap": {
+ "type": "map",
+ "value": "requiredClaimsValue"
+ },
+ "requiredClaimsValue": {
+ "type": "string"
+ },
+ "taintKey": {
+ "type": "string"
+ },
+ "taintValue": {
+ "type": "string"
+ },
+ "taintsList": {
+ "type": "list",
+ "member": "Taint"
+ }
+ }
+}
diff --git a/src/main/resources/aws/request-condition-keys.json b/src/main/resources/aws/request-condition-keys.json
index ec0d9a732a..819cec9364 100644
--- a/src/main/resources/aws/request-condition-keys.json
+++ b/src/main/resources/aws/request-condition-keys.json
@@ -11,6 +11,17 @@
"ec2-instance-connect:privateIpAddress",
"ec2-instance-connect:remotePort"
],
+ "eks:CreateCluster": [
+ "eks:authenticationMode",
+ "eks:bootstrapClusterCreatorAdminPermissions",
+ "eks:endpointPrivateAccess",
+ "eks:endpointPublicAccess"
+ ],
+ "eks:UpdateClusterConfig": [
+ "eks:authenticationMode",
+ "eks:endpointPrivateAccess",
+ "eks:endpointPublicAccess"
+ ],
"lambda:CreateWebFunction": [
"lambda:Request/WebFunctionAuthType"
],
@@ -54,6 +65,31 @@
"remotePort"
]
},
+ "eks:CreateCluster": {
+ "eks:authenticationMode": [
+ "accessConfig.authenticationMode"
+ ],
+ "eks:bootstrapClusterCreatorAdminPermissions": [
+ "accessConfig.bootstrapClusterCreatorAdminPermissions"
+ ],
+ "eks:endpointPrivateAccess": [
+ "resourcesVpcConfig.endpointPrivateAccess"
+ ],
+ "eks:endpointPublicAccess": [
+ "resourcesVpcConfig.endpointPublicAccess"
+ ]
+ },
+ "eks:UpdateClusterConfig": {
+ "eks:authenticationMode": [
+ "accessConfig.authenticationMode"
+ ],
+ "eks:endpointPrivateAccess": [
+ "resourcesVpcConfig.endpointPrivateAccess"
+ ],
+ "eks:endpointPublicAccess": [
+ "resourcesVpcConfig.endpointPublicAccess"
+ ]
+ },
"lambda:CreateWebFunction": {
"lambda:Request/WebFunctionAuthType": [
"endpointConfig.authType"
@@ -87,6 +123,17 @@
}
},
"memberShapes": {
+ "eks:CreateCluster": {
+ "accessConfig.authenticationMode": "AuthenticationMode",
+ "accessConfig.bootstrapClusterCreatorAdminPermissions": "BoxedBoolean",
+ "resourcesVpcConfig.endpointPrivateAccess": "BoxedBoolean",
+ "resourcesVpcConfig.endpointPublicAccess": "BoxedBoolean"
+ },
+ "eks:UpdateClusterConfig": {
+ "accessConfig.authenticationMode": "AuthenticationMode",
+ "resourcesVpcConfig.endpointPrivateAccess": "BoxedBoolean",
+ "resourcesVpcConfig.endpointPublicAccess": "BoxedBoolean"
+ },
"lambda:CreateWebFunction": {
"endpointConfig.authType": "AuthType"
},
@@ -106,6 +153,7 @@
}
},
"protocols": {
+ "eks": "rest-json",
"lambda": "rest-json",
"redshift": "query",
"route53": "rest-xml"
diff --git a/src/test/java/io/floci/aws/core/common/EksClusterConditionsIntegrationTest.java b/src/test/java/io/floci/aws/core/common/EksClusterConditionsIntegrationTest.java
new file mode 100644
index 0000000000..9f9bf6915c
--- /dev/null
+++ b/src/test/java/io/floci/aws/core/common/EksClusterConditionsIntegrationTest.java
@@ -0,0 +1,205 @@
+package io.floci.aws.core.common;
+
+import io.floci.aws.testing.AwsTestClients;
+import io.floci.aws.testing.EnforcementFixtures;
+import io.floci.aws.testing.EnforcementFixtures.UserCredentials;
+import io.floci.aws.testing.IamEnforcementProfile;
+import io.floci.aws.testing.PartitionCleanup;
+import io.quarkus.test.common.http.TestHTTPResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.response.ValidatableResponse;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.eks.EksClient;
+import software.amazon.awssdk.services.eks.model.Cluster;
+import software.amazon.awssdk.services.eks.model.CreateClusterRequest;
+import software.amazon.awssdk.services.eks.model.EksException;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import static io.floci.aws.testing.EnforcementFixtures.auth;
+import static io.floci.aws.testing.IamTestPolicies.EMPTY_POLICY_DOCUMENT;
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@QuarkusTest
+@TestProfile(IamEnforcementProfile.class)
+class EksClusterConditionsIntegrationTest {
+ private static final String ACCOUNT = "000000000000";
+ private static final String CONDITIONS = """
+ {"StringEquals":{"eks:authenticationMode":"API_AND_CONFIG_MAP","aws:RequestTag/owner":"team"},
+ "Bool":{"eks:endpointPublicAccess":"true","eks:endpointPrivateAccess":"true",
+ "eks:bootstrapClusterCreatorAdminPermissions":"false"}}""";
+
+ @TestHTTPResource("/")
+ URI endpoint;
+ @RegisterExtension
+ final PartitionCleanup cleanup = new PartitionCleanup();
+
+ @ParameterizedTest
+ @ValueSource(strings = {"authenticationMode", "endpointPublicAccess", "endpointPrivateAccess", "bootstrap"})
+ void createRequiresEveryExplicitAttributeAndRetainsRequestTagConditions(String field) {
+ try (Fixture f = new Fixture()) {
+ f.policy(createGrant());
+ CreateClusterRequest request = f.request();
+ Cluster created = f.create(request);
+ assertEquals("API_AND_CONFIG_MAP", created.accessConfig().authenticationModeAsString());
+ assertFalse(created.accessConfig().bootstrapClusterCreatorAdminPermissions());
+ assertTrue(created.resourcesVpcConfig().endpointPublicAccess());
+ assertTrue(created.resourcesVpcConfig().endpointPrivateAccess());
+ assertEquals("team", created.tags().get("owner"));
+ denied(() -> f.create(changed(f.request(), field, false)));
+ denied(() -> f.create(changed(f.request(), field, true)));
+ denied(() -> f.create(f.request().toBuilder().tags(Map.of("owner", "other")).build()));
+ // All the positive attributes still require PassRole, not just the EKS grant.
+ f.policy(createGrant(), false);
+ denied(() -> f.create(f.request()));
+ }
+ }
+
+ @Test
+ void explicitDenySeesFalseAndMissingFieldsRemainAbsent() {
+ try (Fixture f = new Fixture()) {
+ f.policy("""
+ {"Effect":"Allow","Action":"eks:CreateCluster","Resource":"*"},
+ {"Effect":"Deny","Action":"eks:CreateCluster","Resource":"*",
+ "Condition":{"Bool":{"eks:bootstrapClusterCreatorAdminPermissions":"false"}}}""");
+ denied(() -> f.create(f.request()));
+ f.create(changed(f.request(), "bootstrap", true));
+ f.policy("""
+ {"Effect":"Allow","Action":"eks:CreateCluster","Resource":"*"},
+ {"Effect":"Deny","Action":"eks:CreateCluster","Resource":"*",
+ "Condition":{"Null":{"eks:authenticationMode":"true"}}}""");
+ denied(() -> f.create(changed(f.request(), "authenticationMode", true)));
+ f.create(f.request());
+ }
+ }
+
+ /**
+ * A number for a boolean member is refused rather than read as {@code true}, which the condition key of the
+ * same member would not carry; the boolean and its text both carry it, so the deny holds for either.
+ */
+ @ParameterizedTest
+ @ValueSource(strings = {"1", "true", "\"true\""})
+ void aBooleanMemberIsCheckedAsTheClusterReadsIt(String value) {
+ try (Fixture f = new Fixture()) {
+ f.policy("""
+ {"Effect":"Allow","Action":"eks:CreateCluster","Resource":"*"},
+ {"Effect":"Deny","Action":"eks:CreateCluster","Resource":"*",
+ "Condition":{"Bool":{"eks:endpointPublicAccess":"true"}}}""");
+ String name = "condition-" + UUID.randomUUID();
+ ValidatableResponse response = given().port(endpoint.getPort())
+ .header("Authorization", auth(f.accessKeyId, "eks")).contentType("application/json")
+ .body("{\"name\":\"%s\",\"roleArn\":\"%s\",\"resourcesVpcConfig\":{\"endpointPublicAccess\":%s}}"
+ .formatted(name, f.role, value))
+ .post("/clusters").then();
+ if ("1".equals(value)) {
+ response.statusCode(400).body(containsString("SerializationException"));
+ } else {
+ response.statusCode(403);
+ }
+ assertFalse(f.admin.listClusters(r -> { }).clusters().contains(name));
+ }
+ }
+
+ private static CreateClusterRequest changed(CreateClusterRequest request, String field, boolean omit) {
+ return switch (field) {
+ case "authenticationMode" -> request.toBuilder().accessConfig(request.accessConfig().toBuilder()
+ .authenticationMode(omit ? null : "API").build()).build();
+ case "bootstrap" -> request.toBuilder().accessConfig(request.accessConfig().toBuilder()
+ .bootstrapClusterCreatorAdminPermissions(omit ? null : true).build()).build();
+ case "endpointPublicAccess" -> request.toBuilder().resourcesVpcConfig(request.resourcesVpcConfig().toBuilder()
+ .endpointPublicAccess(omit ? null : false).build()).build();
+ case "endpointPrivateAccess" -> request.toBuilder().resourcesVpcConfig(request.resourcesVpcConfig().toBuilder()
+ .endpointPrivateAccess(omit ? null : false).build()).build();
+ default -> throw new IllegalArgumentException(field);
+ };
+ }
+
+ private static String createGrant() {
+ return """
+ {"Effect":"Allow","Action":"eks:CreateCluster","Resource":"*","Condition":%s}"""
+ .formatted(CONDITIONS);
+ }
+
+ private static void denied(Runnable call) {
+ EksException error = assertThrows(EksException.class, call::run);
+ assertEquals(403, error.statusCode());
+ assertEquals("AccessDeniedException", error.awsErrorDetails().errorCode());
+ }
+
+ private final class Fixture implements AutoCloseable {
+ final String user = "eks-condition-" + UUID.randomUUID();
+ final String role;
+ final String accessKeyId;
+ final EksClient admin;
+ final EksClient client;
+ final List