recipients
Creates, updates, deletes, gets or lists a recipients resource.
Overview
| Name | recipients |
| Type | Resource |
| Id | cloudflare.resource_sharing.recipients |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get account share recipient response.
| Name | Datatype | Description |
|---|---|---|
id | string | Share Recipient identifier tag. (example: 3fd85f74b32742f1bff64a85009dda07) |
account_id | string | Account identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
association_status | string | Share Recipient association status. (associating, associated, disassociating, disassociated) |
created | string (date-time) | When the share was created. (example: 2023-09-21T18:56:32.624632Z) |
modified | string (date-time) | When the share was modified. (example: 2023-09-21T18:56:32.624632Z) |
resources | array |
List account share recipients response.
| Name | Datatype | Description |
|---|---|---|
id | string | Share Recipient identifier tag. (example: 3fd85f74b32742f1bff64a85009dda07) |
account_id | string | Account identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
association_status | string | Share Recipient association status. (associating, associated, disassociating, disassociated) |
created | string (date-time) | When the share was created. (example: 2023-09-21T18:56:32.624632Z) |
modified | string (date-time) | When the share was modified. (example: 2023-09-21T18:56:32.624632Z) |
resources | array |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, share_id, recipient_id | include_resources | Get share recipient by ID. |
list | select | account_id, share_id | include_resources, page, per_page | List share recipients by share ID. |
share_recipient_create | insert | account_id, share_id | Adds a recipient to a resource share, granting them access to the shared resources. | |
share_recipients_update | replace | account_id, share_id | Changes a share's recipients to match the given list. Returns an error if the share targets an organization. | |
delete | delete | account_id, share_id, recipient_id | Deletion is not immediate, an updated share recipient object with a new status will be returned. |
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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
recipient_id | string | |
share_id | string | |
include_resources | boolean | Include resources in the response. |
page | integer | Page number. |
per_page | integer | Number of objects to return per page. |
SELECT examples
- get
- list
Get share recipient by ID.
SELECT
id,
account_id,
association_status,
created,
modified,
resources
FROM cloudflare.resource_sharing.recipients
WHERE account_id = '{{ account_id }}' -- required
AND share_id = '{{ share_id }}' -- required
AND recipient_id = '{{ recipient_id }}' -- required
AND include_resources = '{{ include_resources }}'
;
List share recipients by share ID.
SELECT
id,
account_id,
association_status,
created,
modified,
resources
FROM cloudflare.resource_sharing.recipients
WHERE account_id = '{{ account_id }}' -- required
AND share_id = '{{ share_id }}' -- required
AND include_resources = '{{ include_resources }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;
INSERT examples
- share_recipient_create
- Manifest
Adds a recipient to a resource share, granting them access to the shared resources.
INSERT INTO cloudflare.resource_sharing.recipients (
account_id,
organization_id,
account_id,
share_id
)
SELECT
'{{ account_id }}',
'{{ organization_id }}',
'{{ account_id }}',
'{{ share_id }}'
RETURNING
errors,
result,
success
;
# Description fields are for documentation purposes
- name: recipients
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the recipients resource.
- name: share_id
value: "{{ share_id }}"
description: Required parameter for the recipients resource.
- name: account_id
value: "{{ account_id }}"
description: |
Account identifier.
- name: organization_id
value: "{{ organization_id }}"
description: |
Organization identifier.
REPLACE examples
- share_recipients_update
Changes a share's recipients to match the given list. Returns an error if the share targets an organization.
REPLACE cloudflare.resource_sharing.recipients
SET
-- No updatable properties
WHERE
account_id = '{{ account_id }}' --required
AND share_id = '{{ share_id }}' --required;
DELETE examples
- delete
Deletion is not immediate, an updated share recipient object with a new status will be returned.
DELETE FROM cloudflare.resource_sharing.recipients
WHERE account_id = '{{ account_id }}' --required
AND share_id = '{{ share_id }}' --required
AND recipient_id = '{{ recipient_id }}' --required
;