Skip to content

ShareRecipient

Source: src/Cloudflare/ResourceSharing/ShareRecipient.ts

A recipient on an existing Cloudflare share — grants another account or organization access to the share’s resources.

This is an existence-only resource: there is no update API, so every prop change triggers a replacement. Association is eventually consistent (associating → associated). Do not manage the same recipient both inline on Share.recipients and through this resource.

Share with another account

const recipient = yield* Cloudflare.ShareRecipient("Partner", {
shareId: share.shareId,
accountId: "<recipient-account-id>",
});

Share with an organization

const recipient = yield* Cloudflare.ShareRecipient("Org", {
shareId: share.shareId,
organizationId: "<recipient-organization-id>",
});