Skip to main content

resources

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

Overview​

Nameresources
TypeResource
Idaws.workmail.resources

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
booking_optionsobjectThe booking options for the described resource.
descriptionstringDescription of the resource.
disabled_datestring (date-time)The date and time when a resource was disabled from WorkMail, in UNIX epoch time format.
emailstringThe email of the described resource. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>)
enabled_datestring (date-time)The date and time when a resource was enabled for WorkMail, in UNIX epoch time format.
hidden_from_global_address_listbooleanIf enabled, the resource is hidden from the global address list.
namestringThe name of the described resource. (pattern: <code>[\w-.]+(@[a-zA-Z0-9.-]+.[a-zA-Z0-9-]{2,})?</code>)
resource_idstringThe identifier of the described resource. (pattern: <code>^r-[0-9a-f]{32}$</code>)
statestringThe state of the resource: enabled (registered to WorkMail), disabled (deregistered or never registered to WorkMail), or deleted. (ENABLED, DISABLED, DELETED)
typestringThe type of the described resource. (ROOM, EQUIPMENT)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_resourceselectregionReturns the data available for the resource.
list_resourcesselectregionReturns summaries of the organization's resources.
create_resourceinsertregion, OrganizationIdCreates a new WorkMail resource.
associate_delegate_to_resourceupdateregion, OrganizationId, ResourceId, EntityIdAdds a member (user or group) to the resource's set of delegates.
update_resourceupdateregion, OrganizationId, ResourceIdUpdates data for the resource. To have the latest information, it must be preceded by a DescribeResource call. The dataset in the request should be the one expected when performing another DescribeResource call.
delete_resourcedeleteregionDeletes the specified resource.
disassociate_delegate_from_resourceexecregion, OrganizationId, ResourceId, EntityIdRemoves a member from the resource's set of delegates.

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
regionstringAWS region (default: us-east-1)

SELECT examples​

Returns the data available for the resource.

SELECT
booking_options,
description,
disabled_date,
email,
enabled_date,
hidden_from_global_address_list,
name,
resource_id,
state,
type
FROM aws.workmail.resources
WHERE region = '{{ region }}' -- required
;

INSERT examples​

Creates a new WorkMail resource.

INSERT INTO aws.workmail.resources (
OrganizationId,
Name,
Type,
Description,
HiddenFromGlobalAddressList,
region
)
SELECT
'{{ OrganizationId }}' /* required */,
'{{ Name }}',
'{{ Type }}',
'{{ Description }}',
{{ HiddenFromGlobalAddressList }},
'{{ region }}'
RETURNING
resource_id
;

UPDATE examples​

Adds a member (user or group) to the resource's set of delegates.

UPDATE aws.workmail.resources
SET
OrganizationId = '{{ OrganizationId }}',
ResourceId = '{{ ResourceId }}',
EntityId = '{{ EntityId }}'
WHERE
region = '{{ region }}' --required
AND OrganizationId = '{{ OrganizationId }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND EntityId = '{{ EntityId }}' --required;

DELETE examples​

Deletes the specified resource.

DELETE FROM aws.workmail.resources
WHERE region = '{{ region }}' --required
;

Lifecycle Methods​

Removes a member from the resource's set of delegates.

EXEC aws.workmail.resources.disassociate_delegate_from_resource
@region='{{ region }}' --required
@@json=
'{
"OrganizationId": "{{ OrganizationId }}",
"ResourceId": "{{ ResourceId }}",
"EntityId": "{{ EntityId }}"
}'
;