Skip to main content

ownership

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

Overview

Nameownership
TypeResource
Idcloudflare.magic_transit.ownership

Fields

The following fields are returned by SELECT queries:

List PCAPs Bucket Ownership response.

NameDatatypeDescription
idstringThe bucket ID associated with the packet captures API. (example: 9883874ecac311ec8475433579a6bf5f)
destination_confstringThe full URI for the bucket. This field only applies to full packet captures. (example: s3://pcaps-bucket?region=us-east-1)
filenamestringThe ownership challenge filename stored in the bucket. (example: ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt)
statusstringThe status of the ownership challenge. Can be pending, success or failed. (pending, success, failed) (example: success)
submittedstringThe RFC 3339 timestamp when the bucket was added to packet captures API. (example: 2020-01-01T08:00:00Z)
validatedstringThe RFC 3339 timestamp when the bucket was validated. (example: 2020-01-01T08:00:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idList all buckets configured for use with PCAPs API.
deletedeleteownership_id, account_idDeletes buckets added to the packet captures API.
validateexecaccount_id, destination_conf, ownership_challengeValidates buckets added to the packet captures API.

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.
ownership_idstring

SELECT examples

List all buckets configured for use with PCAPs API.

SELECT
id,
destination_conf,
filename,
status,
submitted,
validated
FROM cloudflare.magic_transit.ownership
WHERE account_id = '{{ account_id }}' -- required
;

DELETE examples

Deletes buckets added to the packet captures API.

DELETE FROM cloudflare.magic_transit.ownership
WHERE ownership_id = '{{ ownership_id }}' --required
AND account_id = '{{ account_id }}' --required
;

Lifecycle Methods

Validates buckets added to the packet captures API.

EXEC cloudflare.magic_transit.ownership.validate
@account_id='{{ account_id }}' --required
@@json=
'{
"destination_conf": "{{ destination_conf }}",
"ownership_challenge": "{{ ownership_challenge }}"
}'
;