interface ActionProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.CfnListener.ActionProperty |
Java | software.amazon.awscdk.services.elasticloadbalancingv2.CfnListener.ActionProperty |
Python | aws_cdk.aws_elasticloadbalancingv2.CfnListener.ActionProperty |
TypeScript | @aws-cdk/aws-elasticloadbalancingv2 » CfnListener » 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 * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
const actionProperty: elbv2.CfnListener.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: 'sessionTimeout',
},
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: 'sessionTimeout',
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
Name | Type | Description |
---|---|---|
type | string | The type of action. |
authenticate | IResolvable | Authenticate | [HTTPS listeners] Information for using Amazon Cognito to authenticate users. |
authenticate | IResolvable | Authenticate | [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). |
fixed | IResolvable | Fixed | [Application Load Balancer] Information for creating an action that returns a custom HTTP response. |
forward | IResolvable | Forward | Information for creating an action that distributes requests among one or more target groups. |
order? | number | The order for the action. |
redirect | IResolvable | Redirect | [Application Load Balancer] Information for creating a redirect action. |
target | string | The Amazon Resource Name (ARN) of the target group. |
type
Type:
string
The type of action.
authenticateCognitoConfig?
Type:
IResolvable
|
Authenticate
(optional)
[HTTPS listeners] Information for using Amazon Cognito to authenticate users.
Specify only when Type
is authenticate-cognito
.
authenticateOidcConfig?
Type:
IResolvable
|
Authenticate
(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
|
Fixed
(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
|
Forward
(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
|
Redirect
(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.