Skip to main content

shares

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

Overview

Nameshares
TypeResource
Idcloudflare.organizations.shares

Fields

The following fields are returned by SELECT queries:

List organization shares response.

NameDatatypeDescription
idstringShare identifier tag. (example: 3fd85f74b32742f1bff64a85009dda07)
namestringThe name of the share. (example: My Shared WAF Managed Rule)
account_idstringAccount identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353)
organization_idstringOrganization identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353)
account_namestringThe display name of an account. (example: Account A)
associated_recipient_countintegerThe number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter.
associating_recipient_countintegerThe number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter.
createdstring (date-time)When the share was created. (example: 2023-09-21T18:56:32.624632Z)
disassociated_recipient_countintegerThe number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter.
disassociating_recipient_countintegerThe number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter.
kindstring (sent, received)
modifiedstring (date-time)When the share was modified. (example: 2023-09-21T18:56:32.624632Z)
resourcesarrayA list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter.
statusstring (active, deleting, deleted)
target_typestring (account, organization)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectorganization_idstatus, kind, target_type, resource_types, order, direction, page, per_pageLists 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.

NameDatatypeDescription
organization_idstringThe organization ID.
directionstringDirection to sort objects.
kindstringFilter shares by kind.
orderstringOrder shares by values in the given field.
pageintegerPage number.
per_pageintegerNumber of objects to return per page.
resource_typesarrayFilter share resources by resource_types.
statusstringFilter shares by status.
target_typestringFilter shares by target_type.

SELECT examples

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 }}'
;