Skip to main content

project_service_accounts

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

Overview

Nameproject_service_accounts
TypeResource
Idopenai.projects.project_service_accounts

Fields

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints
namestringThe name of the service account
created_atintegerThe Unix timestamp (in seconds) of when the service account was created
objectstringThe object type, which is always organization.project.service_account
rolestringowner or member

Methods

NameAccessible byRequired ParamsDescription
list_project_service_accountsSELECTproject_id
retrieve_project_service_accountSELECTproject_id, service_account_id
create_project_service_accountINSERTproject_id, data__name
delete_project_service_accountDELETEproject_id, service_account_id

SELECT examples

SELECT
id,
name,
created_at,
object,
role
FROM openai.projects.project_service_accounts
WHERE project_id = '{{ project_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new project_service_accounts resource.

/*+ create */
INSERT INTO openai.projects.project_service_accounts (
data__name,
project_id
)
SELECT
'{{ name }}',
'{{ project_id }}'
;

DELETE example

Deletes the specified project_service_accounts resource.

/*+ delete */
DELETE FROM openai.projects.project_service_accounts
WHERE project_id = '{{ project_id }}'
AND service_account_id = '{{ service_account_id }}';