Skip to main content

fastly_services

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

Overview

Namefastly_services
TypeResource
Iddatadog.integrations.fastly_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the Fastly service. (example: abc123)
attributesobjectAttributes object for Fastly service requests.
typestringThe JSON:API type for this API. Should always be fastly-services. (fastly-services) (default: fastly-services, example: fastly-services)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_fastly_serviceselectaccount_id, service_idGet a Fastly service for an account.
list_fastly_servicesselectaccount_idList Fastly services for an account.
create_fastly_serviceinsertaccount_id, dataCreate a Fastly service for an account.
update_fastly_serviceupdateaccount_id, service_id, dataUpdate a Fastly service for an account.
delete_fastly_servicedeleteaccount_id, service_idDelete a Fastly service for an account.

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
account_idstringFastly Account id.
service_idstringFastly Service ID.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Get a Fastly service for an account.

SELECT
id,
attributes,
type
FROM datadog.integrations.fastly_services
WHERE account_id = '{{ account_id }}' -- required
AND service_id = '{{ service_id }}' -- required
;

INSERT examples

Create a Fastly service for an account.

INSERT INTO datadog.integrations.fastly_services (
data,
account_id
)
SELECT
'{{ data }}' /* required */,
'{{ account_id }}'
RETURNING
data
;

UPDATE examples

Update a Fastly service for an account.

UPDATE datadog.integrations.fastly_services
SET
data = '{{ data }}'
WHERE
account_id = '{{ account_id }}' --required
AND service_id = '{{ service_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a Fastly service for an account.

DELETE FROM datadog.integrations.fastly_services
WHERE account_id = '{{ account_id }}' --required
AND service_id = '{{ service_id }}' --required
;