Skip to main content

cas

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

Overview

Namecas
TypeResource
Idcloudflare.zero_trust.cas

Fields

The following fields are returned by SELECT queries:

Get a short-lived certificate CA response

NameDatatypeDescription
idstringThe ID of the CA. (example: 7eddae4619b50ab1361ba8ae9bd72269a432fea041529ed9)
audstringThe Application Audience (AUD) tag. Identifies the application associated with the CA. (example: 737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893)
public_keystringThe public key to add to your SSH server configuration. (example: ecdsa-sha2-nistp256 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= open-ssh-ca@cloudflareaccess.org)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_accountselectapp_id, account_idFetches a short-lived certificate CA and its public key.
get_by_zoneselectapp_id, zone_idFetches a short-lived certificate CA and its public key.
list_by_accountselectaccount_idpage, per_pageLists short-lived certificate CAs and their public keys.
list_by_zoneselectzone_idpage, per_pageLists short-lived certificate CAs and their public keys.
create_by_accountinsertapp_id, account_idGenerates a new short-lived certificate CA and public key.
create_by_zoneinsertapp_id, zone_idGenerates a new short-lived certificate CA and public key.
delete_by_accountdeleteapp_id, account_idDeletes a short-lived certificate CA.
delete_by_zonedeleteapp_id, zone_idDeletes a short-lived certificate CA.

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_idstringThe Cloudflare account ID.
app_idstringThe Access application ID.
zone_idstringThe Cloudflare zone ID.
pageinteger
per_pageinteger

SELECT examples

Fetches a short-lived certificate CA and its public key.

SELECT
id,
aud,
public_key
FROM cloudflare.zero_trust.cas
WHERE app_id = '{{ app_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Generates a new short-lived certificate CA and public key.

INSERT INTO cloudflare.zero_trust.cas (
app_id,
account_id
)
SELECT
'{{ app_id }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

DELETE examples

Deletes a short-lived certificate CA.

DELETE FROM cloudflare.zero_trust.cas
WHERE app_id = '{{ app_id }}' --required
AND account_id = '{{ account_id }}' --required
;