aws-cdk-lib.aws_elasticloadbalancingv2.CfnListenerRule.ActionProperty

interface ActionProperty

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancingV2.CfnListenerRule.ActionProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#CfnListenerRule_ActionProperty
Javasoftware.amazon.awscdk.services.elasticloadbalancingv2.CfnListenerRule.ActionProperty
Pythonaws_cdk.aws_elasticloadbalancingv2.CfnListenerRule.ActionProperty
TypeScript aws-cdk-lib » aws_elasticloadbalancingv2 » CfnListenerRule » ActionProperty

Specifies an action for a listener rule.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const actionProperty: elbv2.CfnListenerRule.ActionProperty = {
  type: 'type',

  // the properties below are optional
  authenticateCognitoConfig: {
    userPoolArn: 'userPoolArn',
    userPoolClientId: 'userPoolClientId',
    userPoolDomain: 'userPoolDomain',

    // the properties below are optional
    authenticationRequestExtraParams: {
      authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
    },
    onUnauthenticatedRequest: 'onUnauthenticatedRequest',
    scope: 'scope',
    sessionCookieName: 'sessionCookieName',
    sessionTimeout: 123,
  },
  authenticateOidcConfig: {
    authorizationEndpoint: 'authorizationEndpoint',
    clientId: 'clientId',
    issuer: 'issuer',
    tokenEndpoint: 'tokenEndpoint',
    userInfoEndpoint: 'userInfoEndpoint',

    // the properties below are optional
    authenticationRequestExtraParams: {
      authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
    },
    clientSecret: 'clientSecret',
    onUnauthenticatedRequest: 'onUnauthenticatedRequest',
    scope: 'scope',
    sessionCookieName: 'sessionCookieName',
    sessionTimeout: 123,
    useExistingClientSecret: false,
  },
  fixedResponseConfig: {
    statusCode: 'statusCode',

    // the properties below are optional
    contentType: 'contentType',
    messageBody: 'messageBody',
  },
  forwardConfig: {
    targetGroups: [{
      targetGroupArn: 'targetGroupArn',
      weight: 123,
    }],
    targetGroupStickinessConfig: {
      durationSeconds: 123,
      enabled: false,
    },
  },
  order: 123,
  redirectConfig: {
    statusCode: 'statusCode',

    // the properties below are optional
    host: 'host',
    path: 'path',
    port: 'port',
    protocol: 'protocol',
    query: 'query',
  },
  targetGroupArn: 'targetGroupArn',
};

Properties

NameTypeDescription
typestringThe type of action.
authenticateCognitoConfig?IResolvable | AuthenticateCognitoConfigProperty[HTTPS listeners] Information for using Amazon Cognito to authenticate users.
authenticateOidcConfig?IResolvable | AuthenticateOidcConfigProperty[HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC).
fixedResponseConfig?IResolvable | FixedResponseConfigProperty[Application Load Balancer] Information for creating an action that returns a custom HTTP response.
forwardConfig?IResolvable | ForwardConfigPropertyInformation for creating an action that distributes requests among one or more target groups.
order?numberThe order for the action.
redirectConfig?IResolvable | RedirectConfigProperty[Application Load Balancer] Information for creating a redirect action.
targetGroupArn?stringThe Amazon Resource Name (ARN) of the target group.

type

Type: string

The type of action.


authenticateCognitoConfig?

Type: IResolvable | AuthenticateCognitoConfigProperty (optional)

[HTTPS listeners] Information for using Amazon Cognito to authenticate users.

Specify only when Type is authenticate-cognito .


authenticateOidcConfig?

Type: IResolvable | AuthenticateOidcConfigProperty (optional)

[HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC).

Specify only when Type is authenticate-oidc .


fixedResponseConfig?

Type: IResolvable | FixedResponseConfigProperty (optional)

[Application Load Balancer] Information for creating an action that returns a custom HTTP response.

Specify only when Type is fixed-response .


forwardConfig?

Type: IResolvable | ForwardConfigProperty (optional)

Information for creating an action that distributes requests among one or more target groups.

For Network Load Balancers, you can specify a single target group. Specify only when Type is forward . If you specify both ForwardConfig and TargetGroupArn , you can specify only one target group using ForwardConfig and it must be the same target group specified in TargetGroupArn .


order?

Type: number (optional)

The order for the action.

This value is required for rules with multiple actions. The action with the lowest value for order is performed first.


redirectConfig?

Type: IResolvable | RedirectConfigProperty (optional)

[Application Load Balancer] Information for creating a redirect action.

Specify only when Type is redirect .


targetGroupArn?

Type: string (optional)

The Amazon Resource Name (ARN) of the target group.

Specify only when Type is forward and you want to route to a single target group. To route to one or more target groups, use ForwardConfig instead.