curl --request PUT \
--url https://api.example.com/api/v2/instances/{instanceID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "my-host"
},
"spec": {
"flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31",
"networking": {
"securityGroups": [
"dd5954af-1d71-4abf-bb16-5729c7163886"
]
}
}
}
'{
"metadata": {
"id": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"name": "my-host",
"organizationId": "d4600d6e-e965-4b44-a808-84fb2fa36702",
"projectId": "cae219d7-10e5-4601-8c2c-ee7e066b93ce",
"creationTime": "2023-07-31T10:45:45Z",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31",
"networking": {
"publicIP": true,
"securityGroups": [
"dd5954af-1d71-4abf-bb16-5729c7163886"
]
}
},
"status": {
"regionId": "bb518c64-6856-4d67-a799-314ba668649f",
"networkId": "b059b3e6-9ae5-42b7-94b4-f42fb7a6baee",
"privateIP": "192.168.0.3",
"publicIP": "183.45.68.162",
"powerState": "Running"
}
}Update an instance.
curl --request PUT \
--url https://api.example.com/api/v2/instances/{instanceID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "my-host"
},
"spec": {
"flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31",
"networking": {
"securityGroups": [
"dd5954af-1d71-4abf-bb16-5729c7163886"
]
}
}
}
'{
"metadata": {
"id": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"name": "my-host",
"organizationId": "d4600d6e-e965-4b44-a808-84fb2fa36702",
"projectId": "cae219d7-10e5-4601-8c2c-ee7e066b93ce",
"creationTime": "2023-07-31T10:45:45Z",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
"imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31",
"networking": {
"publicIP": true,
"securityGroups": [
"dd5954af-1d71-4abf-bb16-5729c7163886"
]
}
},
"status": {
"regionId": "bb518c64-6856-4d67-a799-314ba668649f",
"networkId": "b059b3e6-9ae5-42b7-94b4-f42fb7a6baee",
"privateIP": "192.168.0.3",
"publicIP": "183.45.68.162",
"powerState": "Running"
}
}Operation requires OAuth 2.0 bearer token authentication.
The instance ID. A Kubernetes name. Must be a valid DNS containing only lower case characters, numbers or hyphens, start and end with a character or number, and be at most 63 characters in length.
1 - 63A compute instance update request.
A compute instance update request.
Metadata required for all API resource reads and writes.
Show child attributes
A valid Kubernetes label value, typically used for resource names that can be indexed in the database.
The resource description, this optionally augments the name with more context.
A compute instance.
Show child attributes
The flavor CPU/RAM of a compute instance.
The image of a compute instance.
A compute instance's network configuration.
Show child attributes
A list of security group IDs.
A security group ID.
Whether or not to provision a public IP.
A list of network prefixes that are allowed to egress from the server. By default, only packets from the server's network interface's IP address are allowed to enter the network. Use of this option allows the server to act as a router without SNAT rules.
An allowed source address prefix.
Contains base64-encoded configuration information or scripts to use upon launch. The format of the data is governed by the cloud-init standard, and may be a script, a MIME multipart archive, etc.
A compute instance.
A compute instance.
Metadata required by project scoped resource reads.
Show child attributes
A valid Kubernetes label value, typically used for resource names that can be indexed in the database.
The unique resource ID.
The time the resource was created.
The provisioning state of a resource.
unknown, provisioning, provisioned, deprovisioning, error The health state of a resource.
unknown, healthy, degraded, error The organization identifier the resource belongs to.
The project identifier the resource belongs to.
The resource description, this optionally augments the name with more context.
The user who created the resource.
The time a resource was updated.
The user who updated the resource.
The time the resource was deleted.
A compute instance.
Show child attributes
The flavor CPU/RAM of a compute instance.
The image of a compute instance.
A compute instance's network configuration.
Show child attributes
A list of security group IDs.
A security group ID.
Whether or not to provision a public IP.
A list of network prefixes that are allowed to egress from the server. By default, only packets from the server's network interface's IP address are allowed to enter the network. Use of this option allows the server to act as a router without SNAT rules.
An allowed source address prefix.
Contains base64-encoded configuration information or scripts to use upon launch. The format of the data is governed by the cloud-init standard, and may be a script, a MIME multipart archive, etc.
Read only status information about a compute instance.
Show child attributes
The region a security group belongs to.
The network a security group belongs to.
The lifecycle phase of an instance.
Pending, Running, Stopping, Stopped The private IP address of the server.
The public IP address of the server.