Skip to main content

invitations

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

Overview

Nameinvitations
TypeResource
Idazure.data_share.invitations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe resource id of the azure resource.
namestringName of the azure resource.
expirationDatestring (date-time)The expiration date for the invitation and share subscription.
invitationIdstringunique invitation id.
invitationStatusstringThe status of the invitation. Known values are: "Pending", "Accepted", "Rejected", and "Withdrawn".
respondedAtstring (date-time)The time the recipient responded to the invitation.
sentAtstring (date-time)Gets the time at which the invitation was sent.
systemDataobjectSystem Data of the Azure resource.
targetActiveDirectoryIdstringThe target Azure AD Id. Can't be combined with email.
targetEmailstringThe email the invitation is directed to.
targetObjectIdstringThe target user or application Id that invitation is being sent to. Must be specified along TargetActiveDirectoryId. This enables sending invitations to specific users or applications in an AD tenant.
typestringType of the azure resource.
userEmailstringEmail of the user who created the resource.
userNamestringName of the user who created the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, share_name, invitation_name, subscription_idGet Invitation in a share. Get an invitation in a share.
list_by_shareselectresource_group_name, account_name, share_name, subscription_id$skipToken, $filter, $orderbyList all Invitations in a share. List invitations in a share.
createinsertresource_group_name, account_name, share_name, invitation_name, subscription_idSends a new invitation to a recipient to access a share. Create an invitation.
deletedeleteresource_group_name, account_name, share_name, invitation_name, subscription_idDelete Invitation in a share. Delete an invitation in a share.

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_namestringThe name of the share account. Required.
invitation_namestringThe name of the invitation. Required.
resource_group_namestringThe resource group name. Required.
share_namestringThe name of the share. Required.
subscription_idstring
$filterstringFilters the results using OData syntax. Default value is None.
$orderbystringSorts the results using OData syntax. Default value is None.
$skipTokenstringThe continuation token. Default value is None.

SELECT examples

Get Invitation in a share. Get an invitation in a share.

SELECT
id,
name,
expirationDate,
invitationId,
invitationStatus,
respondedAt,
sentAt,
systemData,
targetActiveDirectoryId,
targetEmail,
targetObjectId,
type,
userEmail,
userName
FROM azure.data_share.invitations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND share_name = '{{ share_name }}' -- required
AND invitation_name = '{{ invitation_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Sends a new invitation to a recipient to access a share. Create an invitation.

INSERT INTO azure.data_share.invitations (
properties,
resource_group_name,
account_name,
share_name,
invitation_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ share_name }}',
'{{ invitation_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete Invitation in a share. Delete an invitation in a share.

DELETE FROM azure.data_share.invitations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND share_name = '{{ share_name }}' --required
AND invitation_name = '{{ invitation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;