Skip to main content

data_smds

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

Overview​

Namedata_smds
TypeResource
Idovh.domain.data_smds

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)UUID of SMD file
smd_idstringTMCH Internal identifier (wire: smdId)
datastringSMD file content
not_afterstring (date-time)Date when information about SMD file aren't valid anymore (wire: notAfter)
not_beforestring (date-time)Date before when information about SMD file aren't valid yet (wire: notBefore)
protected_labelsarrayList of the labels that are protect with that SMD file (wire: protectedLabels)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsmd_idGet details about a SMD file
listselectList all SMD files
createinsertdataCreate a SMD file
updateupdatesmd_id, dataUpdate a SMD file
deletedeletesmd_idDelete a SMD file

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
smd_idstring (uuid)Smd ID (wire: smdId)

SELECT examples​

Get details about a SMD file

SELECT
id,
smd_id,
data,
not_after,
not_before,
protected_labels
FROM ovh.domain.data_smds
WHERE smd_id = '{{ smd_id }}' -- required
;

INSERT examples​

Create a SMD file

INSERT INTO ovh.domain.data_smds (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
id,
smd_id,
data,
not_after,
not_before,
protected_labels
;

UPDATE examples​

Update a SMD file

UPDATE ovh.domain.data_smds
SET
data = '{{ data }}'
WHERE
smd_id = '{{ smd_id }}' --required
AND data = '{{ data }}' --required
RETURNING
id,
smd_id,
data,
not_after,
not_before,
protected_labels;

DELETE examples​

Delete a SMD file

DELETE FROM ovh.domain.data_smds
WHERE smd_id = '{{ smd_id }}' --required
;