resources
Creates, updates, deletes, gets or lists a resources resource.
Overview
| Name | resources |
| Type | Resource |
| Id | aws.workmail.resources |
Fields
The following fields are returned by SELECT queries:
- describe_resource
- list_resources
| Name | Datatype | Description |
|---|---|---|
booking_options | object | The booking options for the described resource. |
description | string | Description of the resource. |
disabled_date | string (date-time) | The date and time when a resource was disabled from WorkMail, in UNIX epoch time format. |
email | string | The email of the described resource. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>) |
enabled_date | string (date-time) | The date and time when a resource was enabled for WorkMail, in UNIX epoch time format. |
hidden_from_global_address_list | boolean | If enabled, the resource is hidden from the global address list. |
name | string | The name of the described resource. (pattern: <code>[\w-.]+(@[a-zA-Z0-9.-]+.[a-zA-Z0-9-]{2,})?</code>) |
resource_id | string | The identifier of the described resource. (pattern: <code>^r-[0-9a-f]{32}$</code>) |
state | string | The state of the resource: enabled (registered to WorkMail), disabled (deregistered or never registered to WorkMail), or deleted. (ENABLED, DISABLED, DELETED) |
type | string | The type of the described resource. (ROOM, EQUIPMENT) |
| Name | Datatype | Description |
|---|---|---|
description | string | Resource description. |
disabled_date | string (date-time) | The date indicating when the resource was disabled from WorkMail use. |
email | string | The email of the resource. (pattern: <code>[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]+.[a-zA-Z-]{2,}</code>) |
enabled_date | string (date-time) | The date indicating when the resource was enabled for WorkMail use. |
id | string | The identifier of the resource. |
name | string | The name of the resource. (pattern: <code>[\w-.]+(@[a-zA-Z0-9.-]+.[a-zA-Z0-9-]{2,})?</code>) |
state | string | The state of the resource, which can be ENABLED, DISABLED, or DELETED. (ENABLED, DISABLED, DELETED) |
type | string | The type of the resource: equipment or room. (ROOM, EQUIPMENT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resource | select | region | Returns the data available for the resource. | |
list_resources | select | region | Returns summaries of the organization's resources. | |
create_resource | insert | region, OrganizationId | Creates a new WorkMail resource. | |
associate_delegate_to_resource | update | region, OrganizationId, ResourceId, EntityId | Adds a member (user or group) to the resource's set of delegates. | |
update_resource | update | region, OrganizationId, ResourceId | Updates 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_resource | delete | region | Deletes the specified resource. | |
disassociate_delegate_from_resource | exec | region, OrganizationId, ResourceId, EntityId | Removes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_resource
- list_resources
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
;
Returns summaries of the organization's resources.
SELECT
description,
disabled_date,
email,
enabled_date,
id,
name,
state,
type
FROM aws.workmail.resources
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resource
- Manifest
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
;
# Description fields are for documentation purposes
- name: resources
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resources resource.
- name: OrganizationId
value: "{{ OrganizationId }}"
description: |
The identifier associated with the organization for which the resource is created.
- name: Name
value: "{{ Name }}"
description: |
The name of the new resource.
- name: Type
value: "{{ Type }}"
description: |
The type of the new resource. The available types are equipment and room.
valid_values: ['ROOM', 'EQUIPMENT']
- name: Description
value: "{{ Description }}"
description: |
Resource description.
- name: HiddenFromGlobalAddressList
value: {{ HiddenFromGlobalAddressList }}
description: |
If this parameter is enabled, the resource will be hidden from the address book.
UPDATE examples
- associate_delegate_to_resource
- update_resource
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;
Updates 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.
UPDATE aws.workmail.resources
SET
OrganizationId = '{{ OrganizationId }}',
ResourceId = '{{ ResourceId }}',
Name = '{{ Name }}',
BookingOptions = '{{ BookingOptions }}',
Description = '{{ Description }}',
Type = '{{ Type }}',
HiddenFromGlobalAddressList = {{ HiddenFromGlobalAddressList }}
WHERE
region = '{{ region }}' --required
AND OrganizationId = '{{ OrganizationId }}' --required
AND ResourceId = '{{ ResourceId }}' --required;
DELETE examples
- delete_resource
Deletes the specified resource.
DELETE FROM aws.workmail.resources
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disassociate_delegate_from_resource
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 }}"
}'
;