Elastic Load Balancing

2017/10/10 - Elastic Load Balancing - 3 new 3 updated api methods

RemoveListenerCertificates (new) Link ¶

Removes the specified certificate from the specified secure listener.

You can't remove the default certificate for a listener. To replace the default certificate, call ModifyListener.

To list the certificates for your listener, use DescribeListenerCertificates.

See also: AWS API Documentation

Request Syntax

client.remove_listener_certificates(
    ListenerArn='string',
    Certificates=[
        {
            'CertificateArn': 'string',
            'IsDefault': True|False
        },
    ]
)
type ListenerArn

string

param ListenerArn

[REQUIRED]

The Amazon Resource Name (ARN) of the listener.

type Certificates

list

param Certificates

[REQUIRED]

The certificate to remove. You can specify one certificate per call.

  • (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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeListenerCertificates (new) Link ¶

Describes the certificates for the specified secure listener.

See also: AWS API Documentation

Request Syntax

client.describe_listener_certificates(
    ListenerArn='string',
    Marker='string',
    PageSize=123
)
type ListenerArn

string

param ListenerArn

[REQUIRED]

The Amazon Resource Names (ARN) of the listener.

type Marker

string

param Marker

The marker for the next set of results. (You received this marker from a previous call.)

type PageSize

integer

param PageSize

The maximum number of results to return with this call.

rtype

dict

returns

Response Syntax

{
    'Certificates': [
        {
            'CertificateArn': 'string',
            'IsDefault': True|False
        },
    ],
    'NextMarker': 'string'
}

Response Structure

  • (dict) --

    • Certificates (list) --

      Information about the certificates.

      • (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.

    • NextMarker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

AddListenerCertificates (new) Link ¶

Adds the specified certificate to the specified secure listener.

If the certificate was already added, the call is successful but the certificate is not added again.

To list the certificates for your listener, use DescribeListenerCertificates. To remove certificates from your listener, use RemoveListenerCertificates.

See also: AWS API Documentation

Request Syntax

client.add_listener_certificates(
    ListenerArn='string',
    Certificates=[
        {
            'CertificateArn': 'string',
            'IsDefault': True|False
        },
    ]
)
type ListenerArn

string

param ListenerArn

[REQUIRED]

The Amazon Resource Name (ARN) of the listener.

type Certificates

list

param Certificates

[REQUIRED]

The certificate to add. You can specify one certificate per call.

  • (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.

rtype

dict

returns

Response Syntax

{
    'Certificates': [
        {
            'CertificateArn': 'string',
            'IsDefault': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • Certificates (list) --

      Information about the certificates.

      • (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.

CreateListener (updated) Link ¶
Changes (request, response)
Request
{'Certificates': {'IsDefault': 'boolean'}}
Response
{'Listeners': {'Certificates': {'IsDefault': 'boolean'}}}

Creates a listener for the specified Application Load Balancer or Network Load Balancer.

You can create up to 10 listeners per 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.

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',
            'TargetGroupArn': 'string'
        },
    ]
)
type LoadBalancerArn

string

param LoadBalancerArn

[REQUIRED]

The Amazon Resource Name (ARN) of the load balancer.

type Protocol

string

param Protocol

[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.

type Port

integer

param Port

[REQUIRED]

The port on which the load balancer is listening.

type SslPolicy

string

param SslPolicy

[HTTPS listeners] The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.

type Certificates

list

param Certificates

[HTTPS listeners] The SSL server certificate. You must provide exactly one certificate.

  • (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.

type DefaultActions

list

param DefaultActions

[REQUIRED]

The default action for the listener. For Application Load Balancers, the protocol of the specified target group must be HTTP or HTTPS. For Network Load Balancers, the protocol of the specified target group must be TCP.

  • (dict) --

    Information about an action.

    • Type (string) -- [REQUIRED]

      The type of action.

    • TargetGroupArn (string) -- [REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'Listeners': [
        {
            'ListenerArn': 'string',
            'LoadBalancerArn': 'string',
            'Port': 123,
            'Protocol': 'HTTP'|'HTTPS'|'TCP',
            'Certificates': [
                {
                    'CertificateArn': 'string',
                    'IsDefault': True|False
                },
            ],
            'SslPolicy': 'string',
            'DefaultActions': [
                {
                    'Type': 'forward',
                    'TargetGroupArn': 'string'
                },
            ]
        },
    ]
}

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.

            • TargetGroupArn (string) --

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

DescribeListeners (updated) Link ¶
Changes (response)
{'Listeners': {'Certificates': {'IsDefault': 'boolean'}}}

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
)
type LoadBalancerArn

string

param LoadBalancerArn

The Amazon Resource Name (ARN) of the load balancer.

type ListenerArns

list

param ListenerArns

The Amazon Resource Names (ARN) of the listeners.

  • (string) --

type Marker

string

param Marker

The marker for the next set of results. (You received this marker from a previous call.)

type PageSize

integer

param PageSize

The maximum number of results to return with this call.

rtype

dict

returns

Response Syntax

{
    'Listeners': [
        {
            'ListenerArn': 'string',
            'LoadBalancerArn': 'string',
            'Port': 123,
            'Protocol': 'HTTP'|'HTTPS'|'TCP',
            'Certificates': [
                {
                    'CertificateArn': 'string',
                    'IsDefault': True|False
                },
            ],
            'SslPolicy': 'string',
            'DefaultActions': [
                {
                    'Type': 'forward',
                    'TargetGroupArn': 'string'
                },
            ]
        },
    ],
    '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.

            • TargetGroupArn (string) --

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

    • NextMarker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

ModifyListener (updated) Link ¶
Changes (request, response)
Request
{'Certificates': {'IsDefault': 'boolean'}}
Response
{'Listeners': {'Certificates': {'IsDefault': 'boolean'}}}

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',
            'TargetGroupArn': 'string'
        },
    ]
)
type ListenerArn

string

param ListenerArn

[REQUIRED]

The Amazon Resource Name (ARN) of the listener.

type Port

integer

param Port

The port for connections from clients to the load balancer.

type Protocol

string

param Protocol

The protocol for connections from clients to the load balancer. Application Load Balancers support HTTP and HTTPS and Network Load Balancers support TCP.

type SslPolicy

string

param SslPolicy

The security policy that defines which protocols and ciphers are supported. For more information, see Security Policies in the Application Load Balancers Guide .

type Certificates

list

param Certificates

The default SSL server certificate.

  • (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.

type DefaultActions

list

param DefaultActions

The default action. For Application Load Balancers, the protocol of the specified target group must be HTTP or HTTPS. For Network Load Balancers, the protocol of the specified target group must be TCP.

  • (dict) --

    Information about an action.

    • Type (string) -- [REQUIRED]

      The type of action.

    • TargetGroupArn (string) -- [REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'Listeners': [
        {
            'ListenerArn': 'string',
            'LoadBalancerArn': 'string',
            'Port': 123,
            'Protocol': 'HTTP'|'HTTPS'|'TCP',
            'Certificates': [
                {
                    'CertificateArn': 'string',
                    'IsDefault': True|False
                },
            ],
            'SslPolicy': 'string',
            'DefaultActions': [
                {
                    'Type': 'forward',
                    'TargetGroupArn': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Listeners (list) --

      Information about the modified 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.

            • TargetGroupArn (string) --

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