2018/05/30 - Elastic Load Balancing - 7 updated api methods
Changes Update elbv2 client to latest version
{'DefaultActions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}Response
{'Listeners': {'DefaultActions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-cognito', 'authenticate-oidc'}}}}
Creates a listener for the specified Application Load Balancer or Network Load Balancer.
To update a listener, use ModifyListener. When you are finished with a listener, you can delete it using DeleteListener. If you are finished with both the listener and the load balancer, you can delete them both using DeleteLoadBalancer.
This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple listeners with the same settings, each call succeeds.
For more information, see Listeners for Your Application Load Balancers in the Application Load Balancers Guide and Listeners for Your Network Load Balancers in the Network Load Balancers Guide.
See also: AWS API Documentation
Request Syntax
client.create_listener( LoadBalancerArn='string', Protocol='HTTP'|'HTTPS'|'TCP', Port=123, SslPolicy='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], DefaultActions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the load balancer.
string
[REQUIRED]
The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocol is TCP.
integer
[REQUIRED]
The port on which the load balancer is listening.
string
[HTTPS listeners] The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
list
[HTTPS listeners] The default SSL server certificate. You must provide exactly one certificate. To create a certificate list, use AddListenerCertificates.
(dict) --
Information about an SSL server certificate.
CertificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
IsDefault (boolean) --
Indicates whether the certificate is the default certificate.
list
[REQUIRED]
The actions for the default rule. The rule must include one forward action.
If the action type is forward, you can specify a single target group. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
If the action type is authenticate-oidc, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.
If the action type is authenticate-cognito, you can use Amazon Cognito to authenticate users as they access your application.
(dict) --
Information about an action.
Type (string) -- [REQUIRED]
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) -- [REQUIRED]
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) -- [REQUIRED]
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) -- [REQUIRED]
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) -- [REQUIRED]
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier.
ClientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) -- [REQUIRED]
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) -- [REQUIRED]
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
dict
Response Syntax
{ 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] }, ] }
Response Structure
(dict) --
Listeners (list) --
Information about the listener.
(dict) --
Information about a listener.
ListenerArn (string) --
The Amazon Resource Name (ARN) of the listener.
LoadBalancerArn (string) --
The Amazon Resource Name (ARN) of the load balancer.
Port (integer) --
The port on which the load balancer is listening.
Protocol (string) --
The protocol for connections from clients to the load balancer.
Certificates (list) --
The SSL server certificate. You must provide a certificate if the protocol is HTTPS.
(dict) --
Information about an SSL server certificate.
CertificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
IsDefault (boolean) --
Indicates whether the certificate is the default certificate.
SslPolicy (string) --
The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
DefaultActions (list) --
The default actions for the listener.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
{'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny | ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny | ' 'allow | ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}Response
{'Rules': {'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}}
Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.
Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener Rules in the Application Load Balancers Guide.
To view your current rules, use DescribeRules. To update a rule, use ModifyRule. To set the priorities of your rules, use SetRulePriorities. To delete a rule, use DeleteRule.
See also: AWS API Documentation
Request Syntax
client.create_rule( ListenerArn='string', Conditions=[ { 'Field': 'string', 'Values': [ 'string', ] }, ], Priority=123, Actions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the listener.
list
[REQUIRED]
The conditions. Each condition specifies a field name and a single value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern. A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
integer
[REQUIRED]
The rule priority. A listener can't have multiple rules with the same priority.
list
[REQUIRED]
The actions. Each rule must include one forward action.
If the action type is forward, you can specify a single target group.
If the action type is authenticate-oidc, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.
If the action type is authenticate-cognito, you can use Amazon Cognito to authenticate users as they access your application.
(dict) --
Information about an action.
Type (string) -- [REQUIRED]
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) -- [REQUIRED]
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) -- [REQUIRED]
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) -- [REQUIRED]
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) -- [REQUIRED]
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier.
ClientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) -- [REQUIRED]
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) -- [REQUIRED]
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
dict
Response Syntax
{ 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ] }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ], 'IsDefault': True|False }, ] }
Response Structure
(dict) --
Rules (list) --
Information about the rule.
(dict) --
Information about a rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
Priority (string) --
The priority.
Conditions (list) --
The conditions.
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
Actions (list) --
The actions.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
IsDefault (boolean) --
Indicates whether this is the default rule.
{'Listeners': {'DefaultActions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-cognito', 'authenticate-oidc'}}}}
Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer. You must specify either a load balancer or one or more listeners.
See also: AWS API Documentation
Request Syntax
client.describe_listeners( LoadBalancerArn='string', ListenerArns=[ 'string', ], Marker='string', PageSize=123 )
string
The Amazon Resource Name (ARN) of the load balancer.
list
The Amazon Resource Names (ARN) of the listeners.
(string) --
string
The marker for the next set of results. (You received this marker from a previous call.)
integer
The maximum number of results to return with this call.
dict
Response Syntax
{ 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] }, ], 'NextMarker': 'string' }
Response Structure
(dict) --
Listeners (list) --
Information about the listeners.
(dict) --
Information about a listener.
ListenerArn (string) --
The Amazon Resource Name (ARN) of the listener.
LoadBalancerArn (string) --
The Amazon Resource Name (ARN) of the load balancer.
Port (integer) --
The port on which the load balancer is listening.
Protocol (string) --
The protocol for connections from clients to the load balancer.
Certificates (list) --
The SSL server certificate. You must provide a certificate if the protocol is HTTPS.
(dict) --
Information about an SSL server certificate.
CertificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
IsDefault (boolean) --
Indicates whether the certificate is the default certificate.
SslPolicy (string) --
The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
DefaultActions (list) --
The default actions for the listener.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
NextMarker (string) --
The marker to use when requesting the next set of results. If there are no additional results, the string is empty.
{'Rules': {'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}}
Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.
See also: AWS API Documentation
Request Syntax
client.describe_rules( ListenerArn='string', RuleArns=[ 'string', ], Marker='string', PageSize=123 )
string
The Amazon Resource Name (ARN) of the listener.
list
The Amazon Resource Names (ARN) of the rules.
(string) --
string
The marker for the next set of results. (You received this marker from a previous call.)
integer
The maximum number of results to return with this call.
dict
Response Syntax
{ 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ] }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ], 'IsDefault': True|False }, ], 'NextMarker': 'string' }
Response Structure
(dict) --
Rules (list) --
Information about the rules.
(dict) --
Information about a rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
Priority (string) --
The priority.
Conditions (list) --
The conditions.
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
Actions (list) --
The actions.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
IsDefault (boolean) --
Indicates whether this is the default rule.
NextMarker (string) --
The marker to use when requesting the next set of results. If there are no additional results, the string is empty.
{'DefaultActions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}Response
{'Listeners': {'DefaultActions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-cognito', 'authenticate-oidc'}}}}
Modifies the specified properties of the specified listener.
Any properties that you do not specify retain their current values. However, changing the protocol from HTTPS to HTTP removes the security policy and SSL certificate properties. If you change the protocol from HTTP to HTTPS, you must add the security policy and server certificate.
See also: AWS API Documentation
Request Syntax
client.modify_listener( ListenerArn='string', Port=123, Protocol='HTTP'|'HTTPS'|'TCP', SslPolicy='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], DefaultActions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the listener.
integer
The port for connections from clients to the load balancer.
string
The protocol for connections from clients to the load balancer. Application Load Balancers support HTTP and HTTPS and Network Load Balancers support TCP.
string
[HTTPS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see Security Policies in the Application Load Balancers Guide.
list
[HTTPS listeners] The default SSL server certificate. You must provide exactly one certificate. To create a certificate list, use AddListenerCertificates.
(dict) --
Information about an SSL server certificate.
CertificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
IsDefault (boolean) --
Indicates whether the certificate is the default certificate.
list
The actions for the default rule. The rule must include one forward action.
If the action type is forward, you can specify a single target group. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
If the action type is authenticate-oidc, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.
If the action type is authenticate-cognito, you can use Amazon Cognito to authenticate users as they access your application.
(dict) --
Information about an action.
Type (string) -- [REQUIRED]
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) -- [REQUIRED]
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) -- [REQUIRED]
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) -- [REQUIRED]
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) -- [REQUIRED]
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier.
ClientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) -- [REQUIRED]
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) -- [REQUIRED]
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
dict
Response Syntax
{ 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] }, ] }
Response Structure
(dict) --
Listeners (list) --
Information about the modified listener.
(dict) --
Information about a listener.
ListenerArn (string) --
The Amazon Resource Name (ARN) of the listener.
LoadBalancerArn (string) --
The Amazon Resource Name (ARN) of the load balancer.
Port (integer) --
The port on which the load balancer is listening.
Protocol (string) --
The protocol for connections from clients to the load balancer.
Certificates (list) --
The SSL server certificate. You must provide a certificate if the protocol is HTTPS.
(dict) --
Information about an SSL server certificate.
CertificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
IsDefault (boolean) --
Indicates whether the certificate is the default certificate.
SslPolicy (string) --
The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
DefaultActions (list) --
The default actions for the listener.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
{'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny | ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny | ' 'allow | ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}Response
{'Rules': {'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}}
Modifies the specified rule.
Any existing properties that you do not modify retain their current values.
To modify the actions for the default rule, use ModifyListener.
See also: AWS API Documentation
Request Syntax
client.modify_rule( RuleArn='string', Conditions=[ { 'Field': 'string', 'Values': [ 'string', ] }, ], Actions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the rule.
list
The conditions. Each condition specifies a field name and a single value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern. A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
list
The actions.
If the action type is forward, you can specify a single target group.
If the action type is authenticate-oidc, you can use an identity provider that is OpenID Connect (OIDC) compliant to authenticate users as they access your application.
If the action type is authenticate-cognito, you can use Amazon Cognito to authenticate users as they access your application.
(dict) --
Information about an action.
Type (string) -- [REQUIRED]
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) -- [REQUIRED]
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) -- [REQUIRED]
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) -- [REQUIRED]
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) -- [REQUIRED]
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier.
ClientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) -- [REQUIRED]
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) -- [REQUIRED]
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
dict
Response Syntax
{ 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ] }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ], 'IsDefault': True|False }, ] }
Response Structure
(dict) --
Rules (list) --
Information about the modified rule.
(dict) --
Information about a rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
Priority (string) --
The priority.
Conditions (list) --
The conditions.
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
Actions (list) --
The actions.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
IsDefault (boolean) --
Indicates whether this is the default rule.
{'Rules': {'Actions': {'AuthenticateCognitoConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string'}, 'AuthenticateOidcConfig': {'AuthenticationRequestExtraParams': {'string': 'string'}, 'AuthorizationEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'Issuer': 'string', 'OnUnauthenticatedRequest': 'deny ' '| ' 'allow ' '| ' 'authenticate', 'Scope': 'string', 'SessionCookieName': 'string', 'SessionTimeout': 'long', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string'}, 'Order': 'integer', 'Type': {'authenticate-oidc', 'authenticate-cognito'}}}}
Sets the priorities of the specified rules.
You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.
See also: AWS API Documentation
Request Syntax
client.set_rule_priorities( RulePriorities=[ { 'RuleArn': 'string', 'Priority': 123 }, ] )
list
[REQUIRED]
The rule priorities.
(dict) --
Information about the priorities for the rules for a listener.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
Priority (integer) --
The rule priority.
dict
Response Syntax
{ 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ] }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123 }, ], 'IsDefault': True|False }, ] }
Response Structure
(dict) --
Rules (list) --
Information about the rules.
(dict) --
Information about a rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
Priority (string) --
The priority.
Conditions (list) --
The conditions.
(dict) --
Information about a condition for a rule.
Field (string) --
The name of the field. The possible values are host-header and path-pattern.
Values (list) --
The condition value.
If the field name is host-header, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
.
(matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern, you can specify a single path pattern (for example, /img/*). A path pattern is case sensitive, can be up to 128 characters in length, and can contain any of the following characters. Note that you can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
(matches 0 or more characters)
? (matches exactly 1 character)
(string) --
Actions (list) --
The actions.
(dict) --
Information about an action.
Type (string) --
The type of action. Each rule must include one forward action.
TargetGroupArn (string) --
The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward.
For a default rule, the protocol of the target group must be HTTP or HTTPS for an Application Load Balancer or TCP for a Network Load Balancer.
AuthenticateOidcConfig (dict) --
[HTTPS listener] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
Issuer (string) --
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
AuthorizationEndpoint (string) --
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
TokenEndpoint (string) --
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
UserInfoEndpoint (string) --
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
ClientId (string) --
The OAuth 2.0 client identifier.
ClientSecret (string) --
The OAuth 2.0 client secret.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
AuthenticateCognitoConfig (dict) --
[HTTPS listener] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.
UserPoolArn (string) --
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
UserPoolClientId (string) --
The ID of the Amazon Cognito user pool client.
UserPoolDomain (string) --
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
SessionCookieName (string) --
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
Scope (string) --
The set of user claims to be requested from the IdP. The default is openid.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
SessionTimeout (integer) --
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
AuthenticationRequestExtraParams (dict) --
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
(string) --
(string) --
OnUnauthenticatedRequest (string) --
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Order (integer) --
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. The forward action must be performed last.
IsDefault (boolean) --
Indicates whether this is the default rule.