module Stratosphere.EKS.PodIdentityAssociation ( PodIdentityAssociation(..), mkPodIdentityAssociation ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data PodIdentityAssociation = -- | See: PodIdentityAssociation {haddock_workaround_ :: (), -- | See: clusterName :: (Value Prelude.Text), -- | See: disableSessionTags :: (Prelude.Maybe (Value Prelude.Bool)), -- | See: namespace :: (Value Prelude.Text), -- | See: roleArn :: (Value Prelude.Text), -- | See: serviceAccount :: (Value Prelude.Text), -- | See: tags :: (Prelude.Maybe [Tag]), -- | See: targetRoleArn :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkPodIdentityAssociation :: Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> PodIdentityAssociation mkPodIdentityAssociation clusterName namespace roleArn serviceAccount = PodIdentityAssociation {haddock_workaround_ = (), clusterName = clusterName, namespace = namespace, roleArn = roleArn, serviceAccount = serviceAccount, disableSessionTags = Prelude.Nothing, tags = Prelude.Nothing, targetRoleArn = Prelude.Nothing} instance ToResourceProperties PodIdentityAssociation where toResourceProperties PodIdentityAssociation {..} = ResourceProperties {awsType = "AWS::EKS::PodIdentityAssociation", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["ClusterName" JSON..= clusterName, "Namespace" JSON..= namespace, "RoleArn" JSON..= roleArn, "ServiceAccount" JSON..= serviceAccount] (Prelude.catMaybes [(JSON..=) "DisableSessionTags" Prelude.<$> disableSessionTags, (JSON..=) "Tags" Prelude.<$> tags, (JSON..=) "TargetRoleArn" Prelude.<$> targetRoleArn]))} instance JSON.ToJSON PodIdentityAssociation where toJSON PodIdentityAssociation {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["ClusterName" JSON..= clusterName, "Namespace" JSON..= namespace, "RoleArn" JSON..= roleArn, "ServiceAccount" JSON..= serviceAccount] (Prelude.catMaybes [(JSON..=) "DisableSessionTags" Prelude.<$> disableSessionTags, (JSON..=) "Tags" Prelude.<$> tags, (JSON..=) "TargetRoleArn" Prelude.<$> targetRoleArn]))) instance Property "ClusterName" PodIdentityAssociation where type PropertyType "ClusterName" PodIdentityAssociation = Value Prelude.Text set newValue PodIdentityAssociation {..} = PodIdentityAssociation {clusterName = newValue, ..} instance Property "DisableSessionTags" PodIdentityAssociation where type PropertyType "DisableSessionTags" PodIdentityAssociation = Value Prelude.Bool set newValue PodIdentityAssociation {..} = PodIdentityAssociation {disableSessionTags = Prelude.pure newValue, ..} instance Property "Namespace" PodIdentityAssociation where type PropertyType "Namespace" PodIdentityAssociation = Value Prelude.Text set newValue PodIdentityAssociation {..} = PodIdentityAssociation {namespace = newValue, ..} instance Property "RoleArn" PodIdentityAssociation where type PropertyType "RoleArn" PodIdentityAssociation = Value Prelude.Text set newValue PodIdentityAssociation {..} = PodIdentityAssociation {roleArn = newValue, ..} instance Property "ServiceAccount" PodIdentityAssociation where type PropertyType "ServiceAccount" PodIdentityAssociation = Value Prelude.Text set newValue PodIdentityAssociation {..} = PodIdentityAssociation {serviceAccount = newValue, ..} instance Property "Tags" PodIdentityAssociation where type PropertyType "Tags" PodIdentityAssociation = [Tag] set newValue PodIdentityAssociation {..} = PodIdentityAssociation {tags = Prelude.pure newValue, ..} instance Property "TargetRoleArn" PodIdentityAssociation where type PropertyType "TargetRoleArn" PodIdentityAssociation = Value Prelude.Text set newValue PodIdentityAssociation {..} = PodIdentityAssociation {targetRoleArn = Prelude.pure newValue, ..}