Skip to main content

acls

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

Overview​

Nameacls
TypeResource
Idovh.cloud.acls

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
account_idstringOVH customer unique identifier (wire: accountId)
typestringACL type (readOnly, readWrite)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, service_nameGet a project ACL. Returns the access type of one OVHcloud account on the project: read-only or read-write.
listselectservice_nametype, x_pagination_modeList project ACLs. Returns the OVHcloud accounts that have access to the project. Filter by access type with the type parameter.
createinsertservice_name, account_id, typeGrant access to the project. Gives another OVHcloud account read-only or read-write access to the project.
deletedeleteaccount_id, service_nameRevoke access to the project

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_idstringOVH customer unique identifier (wire: accountId)
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"}})
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
typestringFilter the value of type property (=)
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 project ACL. Returns the access type of one OVHcloud account on the project: read-only or read-write.

SELECT
account_id,
type
FROM ovh.cloud.acls
WHERE account_id = '{{ account_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Grant access to the project. Gives another OVHcloud account read-only or read-write access to the project.

INSERT INTO ovh.cloud.acls (
account_id,
type,
service_name
)
SELECT
'{{ account_id }}' /* required */,
'{{ type }}' /* required */,
'{{ service_name }}'
RETURNING
account_id,
type
;

DELETE examples​

Revoke access to the project

DELETE FROM ovh.cloud.acls
WHERE account_id = '{{ account_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;