import { ResourceBase } from '../resource' ; import { Value , List } from '../dataTypes' ; export class SourceIpConfig { Values ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class AuthenticateOidcConfig { OnUnauthenticatedRequest ? : Value < string > ; TokenEndpoint ! : Value < string > ; SessionTimeout ? : Value < number > ; Scope ? : Value < string > ; Issuer ! : Value < string > ; ClientSecret ! : Value < string > ; UserInfoEndpoint ! : Value < string > ; ClientId ! : Value < string > ; AuthorizationEndpoint ! : Value < string > ; SessionCookieName ? : Value < string > ; UseExistingClientSecret ? : Value < boolean > ; AuthenticationRequestExtraParams ? : { [ key ] : Value < string > ; } ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class AuthenticateCognitoConfig { OnUnauthenticatedRequest ? : Value < string > ; UserPoolClientId ! : Value < string > ; UserPoolDomain ! : Value < string > ; SessionTimeout ? : Value < number > ; Scope ? : Value < string > ; SessionCookieName ? : Value < string > ; UserPoolArn ! : Value < string > ; AuthenticationRequestExtraParams ? : { [ key ] : Value < string > ; } ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class QueryStringKeyValue { Value ? : Value < string > ; Key ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class QueryStringConfig { Values ? : List < QueryStringKeyValue > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class PathPatternConfig { Values ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RuleCondition { Field ? : Value < string > ; Values ? : List < Value < string > > ; HttpRequestMethodConfig ? : HttpRequestMethodConfig ; PathPatternConfig ? : PathPatternConfig ; HttpHeaderConfig ? : HttpHeaderConfig ; SourceIpConfig ? : SourceIpConfig ; HostHeaderConfig ? : HostHeaderConfig ; QueryStringConfig ? : QueryStringConfig ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RedirectConfig { Path ? : Value < string > ; Query ? : Value < string > ; Port ? : Value < string > ; Host ? : Value < string > ; Protocol ? : Value < string > ; StatusCode ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HostHeaderConfig { Values ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class FixedResponseConfig { ContentType ? : Value < string > ; StatusCode ! : Value < string > ; MessageBody ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Action { Order ? : Value < number > ; TargetGroupArn ? : Value < string > ; FixedResponseConfig ? : FixedResponseConfig ; AuthenticateCognitoConfig ? : AuthenticateCognitoConfig ; Type ! : Value < string > ; RedirectConfig ? : RedirectConfig ; ForwardConfig ? : ForwardConfig ; AuthenticateOidcConfig ? : AuthenticateOidcConfig ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpHeaderConfig { Values ? : List < Value < string > > ; HttpHeaderName ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class ForwardConfig { TargetGroupStickinessConfig ? : TargetGroupStickinessConfig ; TargetGroups ? : List < TargetGroupTuple > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TargetGroupTuple { TargetGroupArn ? : Value < string > ; Weight ? : Value < number > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class HttpRequestMethodConfig { Values ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TargetGroupStickinessConfig { Enabled ? : Value < boolean > ; DurationSeconds ? : Value < number > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export interface ListenerRuleProperties { ListenerArn : Value < string > ; Actions : List < Action > ; Priority : Value < number > ; Conditions : List < RuleCondition > ; } export default class ListenerRule extends ResourceBase < ListenerRuleProperties > { static SourceIpConfig = SourceIpConfig ; static AuthenticateOidcConfig = AuthenticateOidcConfig ; static AuthenticateCognitoConfig = AuthenticateCognitoConfig ; static QueryStringKeyValue = QueryStringKeyValue ; static QueryStringConfig = QueryStringConfig ; static PathPatternConfig = PathPatternConfig ; static RuleCondition = RuleCondition ; static RedirectConfig = RedirectConfig ; static HostHeaderConfig = HostHeaderConfig ; static FixedResponseConfig = FixedResponseConfig ; static Action = Action ; static HttpHeaderConfig = HttpHeaderConfig ; static ForwardConfig = ForwardConfig ; static TargetGroupTuple = TargetGroupTuple ; static HttpRequestMethodConfig = HttpRequestMethodConfig ; static TargetGroupStickinessConfig = TargetGroupStickinessConfig ; constructor ( properties ) { super ( 'AWS::ElasticLoadBalancingV2::ListenerRule' , properties ) ; } }