data_smds
Creates, updates, deletes, gets or lists a data_smds resource.
Overview​
| Name | data_smds |
| Type | Resource |
| Id | ovh.domain.data_smds |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | UUID of SMD file |
smd_id | string | TMCH Internal identifier (wire: smdId) |
data | string | SMD file content |
not_after | string (date-time) | Date when information about SMD file aren't valid anymore (wire: notAfter) |
not_before | string (date-time) | Date before when information about SMD file aren't valid yet (wire: notBefore) |
protected_labels | array | List of the labels that are protect with that SMD file (wire: protectedLabels) |
Representation of a SMD file
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | UUID of SMD file |
smd_id | string | TMCH Internal identifier (wire: smdId) |
data | string | SMD file content |
not_after | string (date-time) | Date when information about SMD file aren't valid anymore (wire: notAfter) |
not_before | string (date-time) | Date before when information about SMD file aren't valid yet (wire: notBefore) |
protected_labels | array | List of the labels that are protect with that SMD file (wire: protectedLabels) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | smd_id | Get details about a SMD file | |
list | select | List all SMD files | ||
create | insert | data | Create a SMD file | |
update | update | smd_id, data | Update a SMD file | |
delete | delete | smd_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_id | string (uuid) | Smd ID (wire: smdId) |
SELECT examples​
- get
- list
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
;
List all SMD files
SELECT
id,
smd_id,
data,
not_after,
not_before,
protected_labels
FROM ovh.domain.data_smds
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: data_smds
props:
- name: data
value: "{{ data }}"
description: |
SMD file content in base64
UPDATE examples​
- update
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
Delete a SMD file
DELETE FROM ovh.domain.data_smds
WHERE smd_id = '{{ smd_id }}' --required
;