# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean, double, integer
from .validators.eks import VALID_TAINT_EFFECT # noqa: F401
from .validators.eks import (
validate_cluster_logging,
validate_taint_effect,
validate_taint_key,
validate_taint_value,
)
[docs]class AccessScope(AWSProperty):
"""
`AccessScope <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-accessentry-accessscope.html>`__
"""
props: PropsDictType = {
"Namespaces": ([str], False),
"Type": (str, True),
}
[docs]class AccessPolicy(AWSProperty):
"""
`AccessPolicy <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-accessentry-accesspolicy.html>`__
"""
props: PropsDictType = {
"AccessScope": (AccessScope, True),
"PolicyArn": (str, True),
}
[docs]class AccessEntry(AWSObject):
"""
`AccessEntry <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-accessentry.html>`__
"""
resource_type = "AWS::EKS::AccessEntry"
props: PropsDictType = {
"AccessPolicies": ([AccessPolicy], False),
"ClusterName": (str, True),
"KubernetesGroups": ([str], False),
"PrincipalArn": (str, True),
"Tags": (Tags, False),
"Type": (str, False),
"Username": (str, False),
}
[docs]class Addon(AWSObject):
"""
`Addon <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-addon.html>`__
"""
resource_type = "AWS::EKS::Addon"
props: PropsDictType = {
"AddonName": (str, True),
"AddonVersion": (str, False),
"ClusterName": (str, True),
"ConfigurationValues": (str, False),
"PreserveOnDelete": (boolean, False),
"ResolveConflicts": (str, False),
"ServiceAccountRoleArn": (str, False),
"Tags": (Tags, False),
}
[docs]class AccessConfig(AWSProperty):
"""
`AccessConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-accessconfig.html>`__
"""
props: PropsDictType = {
"AuthenticationMode": (str, False),
"BootstrapClusterCreatorAdminPermissions": (boolean, False),
}
[docs]class Provider(AWSProperty):
"""
`Provider <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-provider.html>`__
"""
props: PropsDictType = {
"KeyArn": (str, False),
}
[docs]class EncryptionConfig(AWSProperty):
"""
`EncryptionConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-encryptionconfig.html>`__
"""
props: PropsDictType = {
"Provider": (Provider, False),
"Resources": ([str], False),
}
[docs]class KubernetesNetworkConfig(AWSProperty):
"""
`KubernetesNetworkConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-kubernetesnetworkconfig.html>`__
"""
props: PropsDictType = {
"IpFamily": (str, False),
"ServiceIpv4Cidr": (str, False),
"ServiceIpv6Cidr": (str, False),
}
[docs]class LoggingTypeConfig(AWSProperty):
"""
`LoggingTypeConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-loggingtypeconfig.html>`__
"""
props: PropsDictType = {
"Type": (str, False),
}
[docs]class ClusterLogging(AWSProperty):
"""
`ClusterLogging <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-clusterlogging.html>`__
"""
props: PropsDictType = {
"EnabledTypes": ([LoggingTypeConfig], False),
}
[docs] def validate(self):
validate_cluster_logging(self)
[docs]class Logging(AWSProperty):
"""
`Logging <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-logging.html>`__
"""
props: PropsDictType = {
"ClusterLogging": (ClusterLogging, False),
}
[docs]class ControlPlanePlacement(AWSProperty):
"""
`ControlPlanePlacement <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-controlplaneplacement.html>`__
"""
props: PropsDictType = {
"GroupName": (str, False),
}
[docs]class OutpostConfig(AWSProperty):
"""
`OutpostConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-outpostconfig.html>`__
"""
props: PropsDictType = {
"ControlPlaneInstanceType": (str, True),
"ControlPlanePlacement": (ControlPlanePlacement, False),
"OutpostArns": ([str], True),
}
[docs]class ResourcesVpcConfig(AWSProperty):
"""
`ResourcesVpcConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-resourcesvpcconfig.html>`__
"""
props: PropsDictType = {
"EndpointPrivateAccess": (boolean, False),
"EndpointPublicAccess": (boolean, False),
"PublicAccessCidrs": ([str], False),
"SecurityGroupIds": ([str], False),
"SubnetIds": ([str], True),
}
[docs]class Cluster(AWSObject):
"""
`Cluster <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-cluster.html>`__
"""
resource_type = "AWS::EKS::Cluster"
props: PropsDictType = {
"AccessConfig": (AccessConfig, False),
"EncryptionConfig": ([EncryptionConfig], False),
"KubernetesNetworkConfig": (KubernetesNetworkConfig, False),
"Logging": (Logging, False),
"Name": (str, False),
"OutpostConfig": (OutpostConfig, False),
"ResourcesVpcConfig": (ResourcesVpcConfig, True),
"RoleArn": (str, True),
"Tags": (Tags, False),
"Version": (str, False),
}
[docs]class Label(AWSProperty):
"""
`Label <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-fargateprofile-label.html>`__
"""
props: PropsDictType = {
"Key": (str, True),
"Value": (str, True),
}
[docs]class Selector(AWSProperty):
"""
`Selector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-fargateprofile-selector.html>`__
"""
props: PropsDictType = {
"Labels": ([Label], False),
"Namespace": (str, True),
}
[docs]class FargateProfile(AWSObject):
"""
`FargateProfile <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html>`__
"""
resource_type = "AWS::EKS::FargateProfile"
props: PropsDictType = {
"ClusterName": (str, True),
"FargateProfileName": (str, False),
"PodExecutionRoleArn": (str, True),
"Selectors": ([Selector], True),
"Subnets": ([str], False),
"Tags": (Tags, False),
}
[docs]class RequiredClaim(AWSProperty):
"""
`RequiredClaim <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-identityproviderconfig-requiredclaim.html>`__
"""
props: PropsDictType = {
"Key": (str, True),
"Value": (str, True),
}
[docs]class OidcIdentityProviderConfig(AWSProperty):
"""
`OidcIdentityProviderConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-identityproviderconfig-oidcidentityproviderconfig.html>`__
"""
props: PropsDictType = {
"ClientId": (str, True),
"GroupsClaim": (str, False),
"GroupsPrefix": (str, False),
"IssuerUrl": (str, True),
"RequiredClaims": ([RequiredClaim], False),
"UsernameClaim": (str, False),
"UsernamePrefix": (str, False),
}
[docs]class IdentityProviderConfig(AWSObject):
"""
`IdentityProviderConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-identityproviderconfig.html>`__
"""
resource_type = "AWS::EKS::IdentityProviderConfig"
props: PropsDictType = {
"ClusterName": (str, True),
"IdentityProviderConfigName": (str, False),
"Oidc": (OidcIdentityProviderConfig, False),
"Tags": (Tags, False),
"Type": (str, True),
}
[docs]class LaunchTemplateSpecification(AWSProperty):
"""
`LaunchTemplateSpecification <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-launchtemplatespecification.html>`__
"""
props: PropsDictType = {
"Id": (str, False),
"Name": (str, False),
"Version": (str, False),
}
[docs]class RemoteAccess(AWSProperty):
"""
`RemoteAccess <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-remoteaccess.html>`__
"""
props: PropsDictType = {
"Ec2SshKey": (str, True),
"SourceSecurityGroups": ([str], False),
}
[docs]class ScalingConfig(AWSProperty):
"""
`ScalingConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-scalingconfig.html>`__
"""
props: PropsDictType = {
"DesiredSize": (integer, False),
"MaxSize": (integer, False),
"MinSize": (integer, False),
}
[docs]class Taint(AWSProperty):
"""
`Taint <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-taint.html>`__
"""
props: PropsDictType = {
"Effect": (validate_taint_effect, False),
"Key": (validate_taint_key, False),
"Value": (validate_taint_value, False),
}
[docs]class UpdateConfig(AWSProperty):
"""
`UpdateConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html>`__
"""
props: PropsDictType = {
"MaxUnavailable": (double, False),
"MaxUnavailablePercentage": (double, False),
}
[docs]class Nodegroup(AWSObject):
"""
`Nodegroup <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html>`__
"""
resource_type = "AWS::EKS::Nodegroup"
props: PropsDictType = {
"AmiType": (str, False),
"CapacityType": (str, False),
"ClusterName": (str, True),
"DiskSize": (integer, False),
"ForceUpdateEnabled": (boolean, False),
"InstanceTypes": ([str], False),
"Labels": (dict, False),
"LaunchTemplate": (LaunchTemplateSpecification, False),
"NodeRole": (str, True),
"NodegroupName": (str, False),
"ReleaseVersion": (str, False),
"RemoteAccess": (RemoteAccess, False),
"ScalingConfig": (ScalingConfig, False),
"Subnets": ([str], True),
"Tags": (dict, False),
"Taints": ([Taint], False),
"UpdateConfig": (UpdateConfig, False),
"Version": (str, False),
}
[docs]class PodIdentityAssociation(AWSObject):
"""
`PodIdentityAssociation <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-podidentityassociation.html>`__
"""
resource_type = "AWS::EKS::PodIdentityAssociation"
props: PropsDictType = {
"ClusterName": (str, True),
"Namespace": (str, True),
"RoleArn": (str, True),
"ServiceAccount": (str, True),
"Tags": (Tags, False),
}