Instances
Last updated
Last updated
OK
Resource Id, example: 123
Snapshot Id, example: 123-snap-42
OK
Code of action performed
Status label of action
Human readable message of status
Resource Id, example: 123
OK
Code of action performed
Status label of action
Human readable message of status
Resource Id, example: 123
OK
total size of all disks
fileSystems of an Instance
total size of all file systems
Resource Id, example: 123
OK
Ignored at creation. Indicates the snapshot identifiant
Ignored at creation. Indicates the label
Ignored at creation. User full-name who created snapshot
Ignored at creation. Creation date of snapshot
Ignored at creation. Recovery date of snapshot
Ignored at creation. Expiration date of snapshot
Snapshot description
Optional change reference
Ignored at creation. Size in Gb of snapshot
This method allows to delete an instance.
Instance has to be in INACTIVE
status, meaning that you have to stop it before deleting it. Use Update Instance
PATCH method with stop
operation prior to this deletion.
This operation cannot be undone afterwards.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
Example (no body required) :
DELETE /instances/1233
With additional change reference :
DELETE /instances/1233
{
"changeReference": "RFC_123"
}
id, example: 123
Optional reference for change
OK
Code of action performed
Status label of action
Human readable message of status
Resource Id, example: 123
OK
Resource Id, example: 123
Snapshot description
Optional change reference
OK
Code of action performed
Status label of action
Human readable message of status
This method allows to update an instance.
Structure of payload is generic and describes :
operation
you want to be performedoptions
to pass to operation to have the operation performed.Below are different operations currently implemented.
Stop an Instance
Use the stop
operation to perform the stop of instance.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
Use this method only if instance is running and is in the ACTIVE
state. Otherwise a 400
status error code will be returned.
PATCH /instances/1234
{
"operation": "stop"
}
You can also put an optional changeReference
if you want ITCare keep a reference to external change management system :
PATCH /instances/1234
{
"operation": "stop",
"options": {
"changeReference": "RFC_123"
}
}
Start an Instance
Use the start
operation to perform the start of instance.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
Use this method only if instance is not running and is in the INACTIVE
state. Otherwise a 400
status error code will be returned.
PATCH /instances/1234
{
"operation": "start"
}
You can also put an optional changeReference
if you want ITCare keep a reference to external change management system :
PATCH /instances/1234
{
"operation": "start",
"options": {
"changeReference": "RFC_123"
}
}
Reset an Instance
Use the reset
operation to perform the reset of instance.
Reset operation will perform a hard reset of instance, like power off/power on.
This operation may result in data loss, your applications and services will not be stopped gracefully.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
Use this method only if instance is running and is in the ACTIVE
state. Otherwise a 400
status error code will be returned.
PATCH /instances/1234
{
"operation": "reset"
}
You can also put an optional comment
that will be display in monitoring system :
PATCH /instances/1234
{
"operation": "reset",
"options": {
"comment": "Reset instance because OS is freezed"
}
}
Resize an Instance
Use the resize
operation to perform the resize of instance.
This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
Use this method only if instance is not running and is in the INACTIVE
or ACTIVE
state. Otherwise a 400
status error code will be returned.
PATCH /instances/1234
{
"operation": "resize",
"options": {
"sizing": "2cpu4gb",
"changeReference": ""
}
}
Update Monitoring
Use the update_monitoring
operation to update the monitoring state of the instance.
Use the state
option to turn on/off monitoring.
Use the alerting
option to turn on/off alerting. When alerting is desactivated, no incident will be handled when the ressource is has alerts.
This method is asynchronous (status code 202
).
PATCH /instances/1234
{
"operation": "update_monitoring",
"options": {
"state": true,
"alerting": false
}
}
Update Patch Party Statuses
Use the operation update_patch_party
to manage the patch party settings of your instances.
2 options are available :
PATCH /instances/1234
{
"operation": "update_patch_party",
"options": {
"patchParty": {
"excluded": true,
"exclusionReason": "I want to handle this App. by myself"
}
}
}
There are 3 groups available defining the sequence on which the instance should be updated: 1 (First Group), 2 (Second Group) or 3 (Third Group).
If no group is set, it means that you have no preference while defining the sequences.
PATCH /instances/1234
{
"operation": "update_patch_party",
"options": {
"patchParty": {
"excluded": false,
"patchGroup": 3
}
}
}
Replication management
Use the operation update_storage_replication
to manage the replication settings of your instances.
2 options are available :
PATCH /instances/1234
{
"operation": "update_storage_replication",
"options": {
"state": false
}
}
PATCH /instances/1234
{
"operation": "update_storage_replication",
"options": {
"state": true
}
}
PATCH /instances/1234
{
"operation": "update_storage_replication",
"options": {
"state": true,
"deactivationReason": "I want it ..."
}
}
Instance Backup Management
Use the update_backup
operation to enable/disable instance backup.
Requirements to update manage backup are :
2 options are available:
PATCH /instances/1234
{
"operation": "update_backup",
"options": {
"state": true
}
}
PATCH /instances/1234
{
"operation": "update_backup",
"options": {
"state": false,
"deactivationReason": "Because.."
}
}
id, example: 123
OK
Code of action performed
Status label of action
Human readable message of status
This method allows to create an instance.
You will have to know at the minimum :
region
attribute)platform
attribute)name
attribute)resourceId
attribute)serviceId
attribute)This method is asynchronous (status code 202
) and you'll have to wait for async action to be completed by checking its status.
POST /instances
{
"name": "PINSTANCE01",
"region": "EB4",
"serviceId": 13,
"platform": "deb8",
"resourceId": "1cpu2gb"
}
This will create a Debian 8 machine (1cpu 2gb RAM) in EB4 region, named PINSTANCE01, and put it into service of ID 13.
By setting only these parameters, ITCare will use default profile of image (disk configuration) and choose most appropriate Availability Zone and network to host your instance. If you want to specify those parameters take a look at other examples in this documentation.
Response :
{
"id": "1333",
"status": "IN_PROGRESS"
}
With some python code, you can create instance and wait for completion like this:
instance = {
"name": "PINSTANCE01",
"region": "EB4",
"serviceId": 13,
"platform": "deb8",
"resourceId": "1cpu2gb"
}
action = itcare.post('/api/instances', payload=instance)
while action['status']=='IN_PROGRESS':
time.sleep(1)
action = itcare.get('/api/actions/{}'.format(action['id']))
print action['status']
Choose target Platform and properties
You'll have to know which platform you want to create, and so use Platforms methods to properly fill in relevant attributes (disks / custom properties / allocated resources...).
Choose Availability Zone and Network
You may want to choose your availability zone and network, you can do this by adding availabilityZone
and networkId
parameters to your request.
To discover both availability zones and networks, you can use methods Regions, AZ, and Networks.
id of service to put instance in.
Regulation. Refer to the regulation of the Area (HDS|STANDARD). If absent, default 'STANDARD' will be used.
Region. that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.
Indicates if monitoring will be setup. If absent, it will be automatically be setup if this is an production environment, or if backup is enabled.
Indicates why a production resource is not under monitoring.
Indicates if on call teams will be called on non business hours if an incident occurs on instance. If absent, set to false.
Indicates if alerting should be activated. If absent, set to false.
Indicates if backup has to be setup on instance. If absent, backup will be setup automatically if instance is in a production service.
Indicates why a production resource is not under backup.
Indicates if replication will be setup. If absent, it will be automatically be setup if this is an production environment
Indicates why a production resource is not replicated.
BackupPolicy id. Refers to desired backup policy to be applied for the virtual machine, must be set when backup is enabled.
BackupPolicy id. Refers to desired backup policy to be applied for the database, must be set when backup is enabled.
hostname of instance. Must be unique, and fit naming rules convention., example: PEB4MYAPP01
Area. Refer to an Area of a Region, that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.
id of platform (image) of instance. To discover available platforms, use ListPlatforms method, example: deb8 for Debian 8
code of product., example: rmq11 for RabbitMQ 11
identifier of resources (cpu/ram) that will be allocated to the instance. Use List Platforms method to see resources available for each of them., example: 1cpu2gb
authentication domain id, if not set, will take default, example: CGDM-EMEA
specific request to be done by an administrator. Can differ delivery of instance up to 24h., example: Could you please install .NET framework 4.5 on instance ? Thanks.
Volumes to setup on instance. If absent, will be set to defaults.
Custom properties to set up on instance such as security enforcement ... . Depends on which platform you choose to create (for some of them, properties are mandatory). Refer to platform specification to find out.
Availability zone id. Refer to AZ available in List Availability Zones method. If absent, default AZ of region will be used.
Network id. Refer to networks available in List Networks method. If absent, a default network of AZ will be used.
Indicates if backup off site (data replicated to another region) has to be setup on instance. If absent, backup off site will be setup automatically if instance is in a production service.
OK
Code of action performed
Status label of action
Human readable message of status
Resource Id, example: 123
OK
Representation of a resource patch party
Information about a Storage of an Instance
Backup information on an instance
Replication information on an instance
Snapshot of an instance
Region pretty name
DataCenter pretty name
Area pretty name
Availability Zone pretty name
Total Disk size of the resource
CPU of the resource
RAM of the resource
Storage after disks format in GB of the resource
Instance is member of load balancer
Internal Image linked to this instance
OS name of this instance
OS type of this instance
This instance is ingress external node
This instance is ingress internal node
Information about storage replication in Progress