shares
Creates, updates, deletes, gets or lists a shares resource.
Overview
| Name | shares |
| Type | Resource |
| Id | cloudflare.organizations.shares |
Fields
The following fields are returned by SELECT queries:
- list
List organization shares response.
| Name | Datatype | Description |
|---|---|---|
id | string | Share identifier tag. (example: 3fd85f74b32742f1bff64a85009dda07) |
name | string | The name of the share. (example: My Shared WAF Managed Rule) |
account_id | string | Account identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
organization_id | string | Organization identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
account_name | string | The display name of an account. (example: Account A) |
associated_recipient_count | integer | The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. |
associating_recipient_count | integer | The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. |
created | string (date-time) | When the share was created. (example: 2023-09-21T18:56:32.624632Z) |
disassociated_recipient_count | integer | The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. |
disassociating_recipient_count | integer | The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. |
kind | string | (sent, received) |
modified | string (date-time) | When the share was modified. (example: 2023-09-21T18:56:32.624632Z) |
resources | array | A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. |
status | string | (active, deleting, deleted) |
target_type | string | (account, organization) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | organization_id | status, kind, target_type, resource_types, order, direction, page, per_page | Lists all organization shares. |
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 |
|---|---|---|
organization_id | string | The organization ID. |
direction | string | Direction to sort objects. |
kind | string | Filter shares by kind. |
order | string | Order shares by values in the given field. |
page | integer | Page number. |
per_page | integer | Number of objects to return per page. |
resource_types | array | Filter share resources by resource_types. |
status | string | Filter shares by status. |
target_type | string | Filter shares by target_type. |
SELECT examples
- list
Lists all organization shares.
SELECT
id,
name,
account_id,
organization_id,
account_name,
associated_recipient_count,
associating_recipient_count,
created,
disassociated_recipient_count,
disassociating_recipient_count,
kind,
modified,
resources,
status,
target_type
FROM cloudflare.organizations.shares
WHERE organization_id = '{{ organization_id }}' -- required
AND status = '{{ status }}'
AND kind = '{{ kind }}'
AND target_type = '{{ target_type }}'
AND resource_types = '{{ resource_types }}'
AND order = '{{ order }}'
AND direction = '{{ direction }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;