6.2.4. Update launch configuration

 
MethodURIDescription
PUT/v1.0/{tenantId}/groups/{groupId}/launch

Updates an existing launch configuration for the specified scaling group.

To change the launch configuration, specify the new configuration in the request body in JSON format. Configuration elements include from which image to create a server, which load balancers to join the server to, which networks to add the server to, and other metadata. If the update is successful, no response body is returned.

This table shows the possible response codes for this operation:

Response CodeNameDescription
204Success But No ContentThe update launch configuration request succeeded.
400InvalidJsonErrorThe request is refused because the body was invalid JSON".
400ValidationErrorThe request body had valid JSON but with unexpected properties or values in it. Please note that there can be many combinations that cause this error. We will try to list the most common mistakes users are likely to make in a particular request. ".
400InvalidLaunchConfigurationThe "imageRef" value is invalid or not active.
400InvalidLaunchConfigurationThe "flavorRef" value is invalid.
400InvalidLaunchConfigurationThe base64 encoding for the "path" argument in the "personality" parameter is invalid.
400InvalidLaunchConfigurationThe number of files in the "personality" parameter exceeds maximum limit.
400InvalidLaunchConfigurationThe content of the files in the "personality" parameter exceeds the maximum size limit allowed.
400InvalidLaunchConfigurationThe load balancer ID provided is invalid.
401InvalidCredentialsThe X-Auth-Token the user supplied is bad.
403ForbiddenThe user does not have permission to perform the resource; for example, the user only has an observer role and attempted to perform something only available to a user with an admin role. Note, some API nodes also use this status code for other things.
404NoSuchScalingGroupErrorThe specified scaling group was not found.
405InvalidMethodThe method used is unavailable for the endpoint.
413RateLimitErrorThe user has surpassed their rate limit.
415UnsupportedMediaTypeThe request is refused because the content type of the request is not "application/json".
500InternalErrorAn error internal to the application has occurred, please file a bug report.
503ServiceUnavailableThe requested service is unavailable, please file a bug report.

 6.2.4.1. Request

This table shows the header parameters for the update launch configuration request:

NameTypeDescription

X-Auth-Token

​String

(Required)

A valid authentication token.

This table shows the URI parameters for the update launch configuration request:

NameTypeDescription

{tenantId}

​String

A subscriber to the auto scaling service.

{groupId}

​U​U​ID

A scaling group.

This list shows the body parameters for the request:

  • args: Object. Optional.

    The item to be configured. Must be server or loadbalancer. Most launch configurations have both a server and a load balancer configured.

    • loadBalancers: Array. Optional.

      Details about one or more load balancers to add new servers to. All servers will be added to these load balancers with the IP addresses of their ServiceNet network. All servers will be enabled and equally weighted. Any new servers that are not connected to the ServiceNet network will not be added to any load balancers.

      • port: Integer. Required.

        The port number of the service (on the new servers) to use for this particular load balancer. In most cases, this port number is 80.

      • loadBalancerId: Integer. Required.

        The ID of the load balancer to which new servers will be added.

    • server: Object. Required.

      The attributes Auto Scale will use to create a new server. For more information, see: "Create Servers" in the cloud servers developer's guide. The attributes that are specified for the server entity will apply to all new servers in the scaling group. The configured server name is the base for created servers.

      • flavorRef: String. Required.

        The flavor of the server image. Specifies the flavor Id for the server. A flavor is a resource configuration for a server. For more information on available flavors, see the “Server Flavors” section.

      • imageRef: String. Required.

        The ID of the cloud server image, from which new server images will be created.

      • personality: Array. Optional.

        The file path and/or the content that you want to inject into a server image. For more information, see the Server Personality documentation for Rackspace Cloud Servers

        • path: String. Required.

          The path to the file that contains data that will be injected into the file system of the new cloud server image.

        • contents: String. Required.

          The content items that will be injected into the file system of the new cloud server image.

 

Example 6.10. Update launch configuration: JSON request

{
   "type":"launch_server",
   "args":{
      "server":{
         "flavorRef":"performance1-4",
         "name":"webhead",
         "imageRef":"0d589460-f177-4b0f-81c1-8ab8903ac7d8",
         "OS-DCF:diskConfig":"AUTO",
         "metadata":{
            "mykey":"myvalue"
         },
         "personality":[

         ],
         "networks":[
            {
               "uuid":"11111111-1111-1111-1111-111111111111"
            }
         ]
      },
      "loadBalancers":[
         {
            "loadBalancerId":2200,
            "port":8081
         }
      ]
   }
}



loading table of contents...