fbpx
POSThttps://api.spotinst.io/loadBalancer/listener?accountId={ACCOUNT_ID}

Create a new listener

URL Parameters

Parameter Type Description
ACCOUNT_ID String

Account ID from Spotinst console

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "listener": {
    "balancerId": "lb-5470a9fb",
    "protocol": "HTTPS",
    "port": "443",
    "tlsConfig": {
      "minVersion": "TLS10",
      "maxVersion": "TLS12",
      "sessionTicketsDisabled": true,
      "preferServerCipherSuites": true,
      "cipherSuites": [
        "TLS_RSA_WITH_AES_256_CBC_SHA",
        "TLS_RSA_WITH_AES_128_CBC_SHA256"
      ],
      "insecureSkipVerify": false,
      "certificateIds": [
        "ce-12345",
        "ce-67890"
      ]
    },
    "tags": [
      {
        "key": "Environment",
        "value": "Production"
      }
    ]
  }
}

Body Attributes


  • listener.balancerId * String
    The id of the balancer
  • listener.protocol * String
    The protocol to allow connections to the load balancer
  • listener.port * Integer
    The port on which the load balancer is listening.
  • listener.tlsConfig.minVersion * String
    MinVersion contains the minimum SSL/TLS version that is acceptable (1.0 is the minimum)
  • listener.tlsConfig.maxVersion * String
    MaxVersion contains the maximum SSL/TLS version that is acceptable.
  • listener.tlsConfig.sessionTicketsDisabled * String
    May be set to true to disable session ticket (resumption) support
  • listener.tlsConfig.preferServerCipherSuites * Boolean
    Controls whether the server selects the client’s most preferred ciphersuite, or the server’s most preferred ciphersuite
  • listener.tlsConfig.cipherSuites * String
    List of supported cipher suites. If cipherSuites is nil, TLS uses a list of suites supported by the implementation
  • listner.tlsConfig.insecureSkipVerify * Integer
    Controls whether a client verifies the server’s certificate chain and host name. If InsecureSkipVerify is true, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks. (This should be used only for testing)
  • listener.tlsConfig.certificateIds * Boolean
    Contains one or more certificate chains to present to the other side of the connection.
  • listener.tags.key String
    The tags key
  • listener.tags.value String
    The tags value
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "kind": "spotinst:lb:listener",
  "items": [
    {
      "id": "ls-12345",
      "balancerId": "lb-5470a9fb",
      "protocol": "HTTPS",
      "port": "443",
      "tlsConfig": {
        "minVersion": "TLS10",
        "maxVersion": "TLS12",
        "sessionTicketsDisabled": true,
        "preferServerCipherSuites": true,
        "cipherSuites": [
          "TLS_RSA_WITH_AES_256_CBC_SHA",
          "TLS_RSA_WITH_AES_128_CBC_SHA256"
        ],
        "insecureSkipVerify": false,
        "certificateIds": [
          "ce-12345",
          "ce-67890"
        ]
      },
      "tags": [
        {
          "key": "Environment",
          "value": "Production"
        }
      ]
    }
  ],
  "count": 1
}