Skip to main content

own_logs_user_logs

Creates, updates, deletes, gets or lists an own_logs_user_logs resource.

Overview​

Nameown_logs_user_logs
TypeResource
Idovh.hosting_web.own_logs_user_logs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
own_logs_idintegerOwnLogs where this userLogs will be enable. Default : main domain ownlogs (wire: ownLogsId)
task_idintegerThe task ID working on this userLogs (wire: taskId)
creation_datestring (date-time)Date of the user creation (wire: creationDate)
descriptionstringDescription field for you
loginstringThe userLogs login used to connect to logs.ovh.net
statusstringStatus of this userLogs (created, creating, deleting, updating)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, login, service_nameGet a log user. Returns the login, description, status and creation date of the log user, and the own logs it can access.
listselectid, service_namelogin, x_pagination_modeList log users. Returns the logins of the users allowed to access the logs interface. Filter them by login.
createinsertid, service_name, description, login, passwordCreate a log user. Creates a user allowed to access the logs interface. Without ownLogsId, the user accesses the logs of the main domain.
updateupdateid, login, service_nameUpdate a log user. Updates the description of the log user. The login and the own logs it can access cannot be changed.
deletedeleteid, login, service_nameDelete a log user. Deletes the log user, who can no longer access the logs interface at logs.ovh.net with its login.
change_passwordexecid, login, serviceName, passwordChange a log user password. Changes the password the log user enters to access the logs interface at logs.ovh.net.

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"}})
idintegerId of the object
loginstringThe userLogs login used to connect to logs.ovh.net
serviceNamestringThe internal name of your hosting
service_namestringThe internal name of your hosting (wire: serviceName)
loginstringFilter the value of login property (like)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a log user. Returns the login, description, status and creation date of the log user, and the own logs it can access.

SELECT
own_logs_id,
task_id,
creation_date,
description,
login,
status
FROM ovh.hosting_web.own_logs_user_logs
WHERE id = '{{ id }}' -- required
AND login = '{{ login }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a log user. Creates a user allowed to access the logs interface. Without ownLogsId, the user accesses the logs of the main domain.

INSERT INTO ovh.hosting_web.own_logs_user_logs (
description,
login,
own_logs_id,
password,
id,
service_name
)
SELECT
'{{ description }}' /* required */,
'{{ login }}' /* required */,
{{ own_logs_id }},
'{{ password }}' /* required */,
'{{ id }}',
'{{ service_name }}'
;

UPDATE examples​

Update a log user. Updates the description of the log user. The login and the own logs it can access cannot be changed.

UPDATE ovh.hosting_web.own_logs_user_logs
SET
description = '{{ description }}'
WHERE
id = '{{ id }}' --required
AND login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete a log user. Deletes the log user, who can no longer access the logs interface at logs.ovh.net with its login.

DELETE FROM ovh.hosting_web.own_logs_user_logs
WHERE id = '{{ id }}' --required
AND login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change a log user password. Changes the password the log user enters to access the logs interface at logs.ovh.net.

EXEC ovh.hosting_web.own_logs_user_logs.change_password
@id='{{ id }}' --required,
@login='{{ login }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;