Skip to main content

services

Creates, updates, deletes, gets or lists a services resource.

Overview

Nameservices
TypeResource
Idlinode.managed.services

Fields

The following fields are returned by SELECT queries:

The requested Managed Service.

NameDatatypeDescription
idintegerRead-only This Service's unique ID.
addressstring (url)The URL at which this Service is monitored. URL parameters such as ?no-cache=1 are preserved. URL fragments/anchors such as #monitor are not preserved. (example: https://example.org)
bodystringWhat to expect to find in the response body for the Service to be considered up. (example: it worked)
consultation_groupstringThe group of ManagedContacts who should be notified or consulted with when an Issue is detected. (example: on-call)
createdstring (date-time)Read-only When this Managed Service was created. (example: 2018-01-01T00:01:01)
credentialsarrayAn array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service.
labelstringThe label for this Service. This is for display purposes only. (example: prod-1, pattern: [a-zA-Z0-9-_ .]{3,64})
notesstringAny information relevant to the Service that Linode special forces should know when attempting to resolve Issues. (example: The service name is my-cool-application)
regionstringThe Region in which this Service is located. This is required if address is a private IP, and may not be set otherwise.
service_typestringHow this Service is monitored. (example: url)
statusstringRead-only The current status of this Service. (example: ok)
timeoutintegerHow long to wait, in seconds, for a response before considering the Service to be down.
updatedstring (date-time)Read-only When this Managed Service was last updated. (example: 2018-03-01T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_managed_serviceselectReturns information about a single Managed Service on your Account.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
get_managed_servicesselectReturns a paginated list of Managed Services on your Account. These are the services Linode Managed is monitoring and will report and attempt to resolve issues with.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
post_managed_serviceinsertdata__label, data__service_type, data__address, data__timeoutCreates a Managed Service. Linode Managed will begin monitoring this service and reporting and attempting to resolve any Issues.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
put_managed_servicereplaceUpdates information about a Managed Service.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
delete_managed_servicedeleteDeletes a Managed Service. This service will no longer be monitored by Linode Managed.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
post_disable_managed_serviceexecTemporarily disables monitoring of a Managed Service.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
post_enable_managed_serviceexecEnables monitoring of a Managed Service.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Returns information about a single Managed Service on your Account.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

SELECT
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated
FROM linode.managed.services;

INSERT examples

Creates a Managed Service. Linode Managed will begin monitoring this service and reporting and attempting to resolve any Issues.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

INSERT INTO linode.managed.services (
data__address,
data__body,
data__consultation_group,
data__credentials,
data__label,
data__notes,
data__region,
data__service_type,
data__timeout
)
SELECT
'{{ address }}' --required,
'{{ body }}',
'{{ consultation_group }}',
'{{ credentials }}',
'{{ label }}' --required,
'{{ notes }}',
'{{ region }}',
'{{ service_type }}' --required,
{{ timeout }} --required
RETURNING
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated
;

REPLACE examples

Updates information about a Managed Service.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

REPLACE linode.managed.services
SET
data__address = '{{ address }}',
data__body = '{{ body }}',
data__consultation_group = '{{ consultation_group }}',
data__credentials = '{{ credentials }}',
data__label = '{{ label }}',
data__notes = '{{ notes }}',
data__region = '{{ region }}',
data__service_type = '{{ service_type }}',
data__timeout = {{ timeout }}
WHERE

RETURNING
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated;

DELETE examples

Deletes a Managed Service. This service will no longer be monitored by Linode Managed.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

DELETE FROM linode.managed.services;

Lifecycle Methods

Temporarily disables monitoring of a Managed Service.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

EXEC linode.managed.services.post_disable_managed_service 
;