Skip to main content

authorizations

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

Overview​

Nameauthorizations
TypeResource
Idnvidia.nvcf_functions.authorizations

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)Function id
nca_idstring (UTF-8)NVIDIA Cloud Account Id (wire: ncaId)
version_idstring (uuid)Function version id (wire: versionId)
authorized_partiesarrayAuthorized parties allowed to invoke the function (wire: authorizedParties)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_versionselectfunction_id, function_version_idGets NVIDIA Cloud Account IDs that are authorized to invoke specified function version. Response includes authorized accounts that were added specifically at the version level and the authorized accounts that were inherited from function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
listselectfunction_idLists function versions of the specified function and their corresponding authorized accounts allowed to invoke the function version. Individual versions of a function can have their own authorized accounts. So, each object in the array can have different authorized accounts listed. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
list_allselectLists all the function versions in an account that have been shared/authorized with/to other accounts. Response includes the nca-ids of the authorized accounts. If a function version is not shared/authorized, then it is not included in the response. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
add_versioninsertfunction_id, function_version_id, authorized_partyAdds the specified NVIDIA Cloud Account to the set of authorized accounts that can invoke the specified function version. If the specified function version does not have any existing inheritable authorized accounts, it results in a response with status 404. If the specified account is already in the set of existing authorized accounts that are directly associated with the function version, it results in a response wit status code 409. If a function is public, then Account Admin cannot perform this operation. Note that the response does not include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
addinsertfunction_id, authorized_partyAdds the specified NVIDIA Cloud Account to the set of authorized accounts that are can invoke all the versions of the specified function. If the specified function does not have any existing inheritable authorized accounts, it results in a response with status 404. If the specified account is already in the set of existing inheritable authorized accounts, it results in a response with status code 409. If a function is public, then Account Admin cannot perform this operation. Note that response only includes authz accounts at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
set_versionreplacefunction_id, function_version_id, authorized_partiesAuthorizes additional NVIDIA Cloud Accounts to invoke a specific function version. By default, a function belongs to the NVIDIA Cloud Account that created it, and the credentials used for function invocation must reference the same NVIDIA Cloud Account. Upon invocation of this endpoint, any existing authorized accounts will be overwritten by the newly specified authorized accounts. Note that the response does NOT include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
setreplacefunction_id, authorized_partiesAuthorizes additional NVIDIA Cloud Accounts to invoke any version of the specified function. By default, a function belongs to the NVIDIA Cloud Account that created it, and the credentials used for function invocation must reference the same NVIDIA Cloud Account. Upon invocation of this endpoint, any existing authorized accounts will be overwritten by the newly specified authorized accounts. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
remove_versiondeletefunction_id, function_version_idRemoves the specified NVIDIA Cloud Account from the set of authorized accounts that are directly associated with specified function version. If the specified function version does not have any of its own(not inherited) authorized accounts, it results in a response with status 404. Also, if the specified authorized account is not in the set of existing authorized parties that are directly associated with the specified function version, it results in a response with status code 404. If the specified function version is public, then Account Admin cannot perform this operation. Note that the response does not include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
removedeletefunction_idRemoves the specified NVIDIA Cloud Account from the set of authorized accounts that can invoke all the versions of the specified function. If the specified function does not have any existing inheritable authorized parties, it results in a response with status 404. Also, if the specified account is not in the existing set of inheritable authorized accounts, it results in a response with status 404. If the specified function is public, then Account Admin cannot perform this operation. Note that response only includes the remaining authorized accounts at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
delete_allexecfunction_idDeletes authorizations at the function level. This impacts all versions of the function. If a function versions has its own set of authorizations, those are not deleted. If the specified function is public, then Account Admin cannot perform this operation. Note that the response does not include any authz accounts at version level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header
delete_all_versionexecfunction_id, function_version_idDeletes all the authorized accounts that are directly associated with the specified function version. Authorized parties that are inherited by the function version are not deleted. If the specified function version is public, then Account Admin cannot perform this operation. Note that the response does not include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

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
function_idstring (uuid)Function id
function_version_idstring (uuid)Function version

SELECT examples​

Gets NVIDIA Cloud Account IDs that are authorized to invoke specified function version. Response includes authorized accounts that were added specifically at the version level and the authorized accounts that were inherited from function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

SELECT
id,
nca_id,
version_id,
authorized_parties
FROM nvidia.nvcf_functions.authorizations
WHERE function_id = '{{ function_id }}' -- required
AND function_version_id = '{{ function_version_id }}' -- required
;

INSERT examples​

Adds the specified NVIDIA Cloud Account to the set of authorized accounts that can invoke the specified function version. If the specified function version does not have any existing inheritable authorized accounts, it results in a response with status 404. If the specified account is already in the set of existing authorized accounts that are directly associated with the function version, it results in a response wit status code 409. If a function is public, then Account Admin cannot perform this operation. Note that the response does not include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

INSERT INTO nvidia.nvcf_functions.authorizations (
authorized_party,
function_id,
function_version_id
)
SELECT
'{{ authorized_party }}' /* required */,
'{{ function_id }}',
'{{ function_version_id }}'
RETURNING
function
;

REPLACE examples​

Authorizes additional NVIDIA Cloud Accounts to invoke a specific function version. By default, a function belongs to the NVIDIA Cloud Account that created it, and the credentials used for function invocation must reference the same NVIDIA Cloud Account. Upon invocation of this endpoint, any existing authorized accounts will be overwritten by the newly specified authorized accounts. Note that the response does NOT include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

REPLACE nvidia.nvcf_functions.authorizations
SET
authorized_parties = '{{ authorized_parties }}'
WHERE
function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
AND authorized_parties = '{{ authorized_parties }}' --required
RETURNING
function;

DELETE examples​

Removes the specified NVIDIA Cloud Account from the set of authorized accounts that are directly associated with specified function version. If the specified function version does not have any of its own(not inherited) authorized accounts, it results in a response with status 404. Also, if the specified authorized account is not in the set of existing authorized parties that are directly associated with the specified function version, it results in a response with status code 404. If the specified function version is public, then Account Admin cannot perform this operation. Note that the response does not include inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

DELETE FROM nvidia.nvcf_functions.authorizations
WHERE function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Deletes authorizations at the function level. This impacts all versions of the function. If a function versions has its own set of authorizations, those are not deleted. If the specified function is public, then Account Admin cannot perform this operation. Note that the response does not include any authz accounts at version level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

EXEC nvidia.nvcf_functions.authorizations.delete_all
@function_id='{{ function_id }}' --required
;