All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.spinnaker.keel.clouddriver.model.ApplicationLoadBalancerModel.kt Maven / Gradle / Ivy

The newest version!
package com.netflix.spinnaker.keel.clouddriver.model

import com.fasterxml.jackson.annotation.JsonAlias
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.netflix.spinnaker.keel.api.Moniker
import java.time.Duration

data class ApplicationLoadBalancerModel(
  override val moniker: Moniker?,
  override val loadBalancerName: String,
  override val loadBalancerType: String = "application",
  override val availabilityZones: Set,
  override val vpcId: String,
  override val subnets: Set,
  override val scheme: String?,
  override val dnsName: String,
  val idleTimeout: Int,
  val securityGroups: Set,
  val listeners: List,
  val targetGroups: List,
  val ipAddressType: String,
  @get:JsonAnyGetter val properties: Map = emptyMap()
) : AmazonLoadBalancer {
  data class ApplicationLoadBalancerListener(
    val port: Int,
    val protocol: String,
    val certificates: List?,
    val defaultActions: List,
    val rules: List
  )

  data class Certificate(
    val certificateArn: String
  )

  data class Action(
    val type: String,
    val order: Int,
    val targetGroupName: String?,
    val redirectConfig: RedirectConfig?,
    val authenticateOidcConfig: AuthenticateOidcConfig?
  )

  data class Rule(
    val priority: String,
    val conditions: List?,
    val actions: List,
    val default: Boolean
  )

  data class Condition(
    val field: String,
    val values: List
  )

  data class RedirectConfig(
    val protocol: String,
    val port: String?,
    val host: String,
    val path: String,
    val query: String?,
    val statusCode: String
  )

  data class AuthenticateOidcConfig(
    val issuer: String,
    val authorizationEndpoint: String,
    val tokenEndpoint: String,
    val userInfoEndpoint: String,
    val clientId: String,
    val sessionCookieName: String,
    val scope: String,
    val sessionTimeout: Long,
    val onUnauthenticatedRequest: String = "authenticate",
    val authenticationRequestExtraParams: Map = emptyMap()
  )

  data class TargetGroup(
    val targetGroupName: String,
    val loadBalancerNames: List,
    val targetType: String,
    val matcher: TargetGroupMatcher,
    val protocol: String,
    val port: Int,
    val healthCheckEnabled: Boolean,
    val healthCheckTimeoutSeconds: Int,
    val healthCheckPort: String, // quoted number (e.g., "8080") or "traffic-port"
    val healthCheckProtocol: String,
    val healthCheckPath: String,
    val healthCheckIntervalSeconds: Int,
    val healthyThresholdCount: Int,
    val unhealthyThresholdCount: Int,
    val vpcId: String,
    val attributes: TargetGroupAttributes,
    @get:JsonAnyGetter val properties: Map = emptyMap()
  )

  data class TargetGroupMatcher(
    val httpCode: String
  )

  data class TargetGroupAttributes(
    @JsonAlias("stickiness.enabled")
    val stickinessEnabled: Boolean = false,

    @JsonAlias("deregistration_delay.timeout_seconds")
    val deregistrationDelay: Int = 300,

    @JsonAlias("stickiness.type")
    val stickinessType: String = "lb_cookie",

    @JsonAlias("stickiness.lb_cookie.duration_seconds")
    val stickinessDuration: Int = 86400,

    @JsonAlias("slow_start.duration_seconds")
    val slowStartDurationSeconds: Int = 0,

    @get:JsonAnyGetter val properties: Map = emptyMap()
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy