Remplacer le certificat SSL utilisé par un load balancer HTTPS ou SSL

Vous pouvez spécifier un nouveau certificat SSL à utiliser par un load balancer avec terminaison SSL.

Ce certificat remplace celui utilisé par les listeners HTTPS ou SSL pour le load balancer spécifié. Il doit être au format x509 et téléchargé dans Elastic Identity Management (EIM).

Les formats de certificat x509 suivants sont acceptés : x509, PEM, CER, CRT, CSV, RSA, et TXT.

Remplacer le certificat SSL utilisé par un load balancer HTTPS ou SSL avec OSC CLI

Avant de commencer : Téléchargez un certificat serveur SSL dans Elastic Identity Management (EIM). Pour en savoir plus, voir Importer un certificat serveur.

À ce jour, cette section est disponible en anglais uniquement.

The UpdateLoadBalancer command modifies the specified attribute of a load balancer. You can specify only one attribute at a time.

You can set a new SSL certificate to an SSL or HTTPS listener of a load balancer.
This certificate replaces any certificate used on the same load balancer and port.

You can also replace the currently enabled policy for the load balancer with another one.
If the PolicyNames parameter is empty, the currently enabled policy is disabled.

Request sample: Updating SSL certificate
$ osc-cli api UpdateLoadBalancer --profile "default" \
    --LoadBalancerName "private-lb-example" \
    --LoadBalancerPort 443 \
    --ServerCertificateId "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LoadBalancerName: The name of the load balancer.

  • LoadBalancerPort: (optional) The port on which the load balancer is listening (between 1 and 65535, both included). This parameter is required if you want to update the server certificate.

  • ServerCertificateId: (optional) The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs). If this parameter is specified, you must also specify the LoadBalancerPort parameter.

The UpdateLoadBalancer command returns the following elements:

  • LoadBalancer: Information about the load balancer.

  • ResponseContext: Information about the context of the response.

Result sample: Updating SSL certificate
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}

Remplacer le certificat SSL utilisé par un load balancer HTTPS ou SSL avec AWS CLI

Avant de commencer : Téléchargez un certificat serveur SSL dans Elastic Identity Management (EIM). Pour en savoir plus, voir Importer un certificat serveur.

Pour remplacer le certificat serveur utilisé par un load balancer, utilisez la commande set-load-balancer-listener-ssl-certificate suivant cette syntaxe :

Exemple de requête
$ aws elb set-load-balancer-listener-ssl-certificate \
    --profile YOUR_PROFILE \
    --load-balancer-name my-load-balancer \
    --load-balancer-port 443 \
    --ssl-certificate-id arn:aws:iam::123456789000:server-certificate/division/subdivision/my-server-certificate \
    --endpoint https://lbu.eu-west-2.outscale.com

Cette commande contient les attributs suivants que vous devez spécifier :

  • (optionnel) profile : Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

  • load-balancer-name : Le nom du load balancer.

  • load-balancer-port : Le port utilisant le certificat SSL.

  • ssl-certificate-id : L’OUTSCALE Resource Name (ORN) du certificat. Pour en savoir plus, voir Obtenir des informations à propos d’un certificat serveur.

  • endpoint : Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête.

Le certificat serveur spécifié remplace celui utilisé par les listeners HTTPS du load balancer.

Page connexe

Méthodes API correspondantes

AWS™ et Amazon Web Services™ sont des marques de commerce d’Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.