mobile_device_access_rules
Creates, updates, deletes, gets or lists a mobile_device_access_rules resource.
Overview
| Name | mobile_device_access_rules |
| Type | Resource |
| Id | aws.workmail.mobile_device_access_rules |
Fields
The following fields are returned by SELECT queries:
- list_mobile_device_access_rules
| Name | Datatype | Description |
|---|---|---|
rules | array | The list of mobile device access rules that exist under the specified WorkMail organization. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_mobile_device_access_rules | select | region | Lists the mobile device access rules for the specified WorkMail organization. | |
create_mobile_device_access_rule | insert | region, OrganizationId, Name, Effect | Creates a new mobile device access rule for the specified WorkMail organization. | |
update_mobile_device_access_rule | update | region, OrganizationId, MobileDeviceAccessRuleId, Name, Effect | Updates a mobile device access rule for the specified WorkMail organization. | |
delete_mobile_device_access_rule | delete | region | Deletes a mobile device access rule for the specified WorkMail organization. Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body. |
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
- list_mobile_device_access_rules
Lists the mobile device access rules for the specified WorkMail organization.
SELECT
rules
FROM aws.workmail.mobile_device_access_rules
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_mobile_device_access_rule
- Manifest
Creates a new mobile device access rule for the specified WorkMail organization.
INSERT INTO aws.workmail.mobile_device_access_rules (
OrganizationId,
ClientToken,
Name,
Description,
Effect,
DeviceTypes,
NotDeviceTypes,
DeviceModels,
NotDeviceModels,
DeviceOperatingSystems,
NotDeviceOperatingSystems,
DeviceUserAgents,
NotDeviceUserAgents,
region
)
SELECT
'{{ OrganizationId }}' /* required */,
'{{ ClientToken }}',
'{{ Name }}' /* required */,
'{{ Description }}',
'{{ Effect }}' /* required */,
'{{ DeviceTypes }}',
'{{ NotDeviceTypes }}',
'{{ DeviceModels }}',
'{{ NotDeviceModels }}',
'{{ DeviceOperatingSystems }}',
'{{ NotDeviceOperatingSystems }}',
'{{ DeviceUserAgents }}',
'{{ NotDeviceUserAgents }}',
'{{ region }}'
RETURNING
mobile_device_access_rule_id
;
# Description fields are for documentation purposes
- name: mobile_device_access_rules
props:
- name: region
value: "{{ region }}"
description: Required parameter for the mobile_device_access_rules resource.
- name: OrganizationId
value: "{{ OrganizationId }}"
description: |
The WorkMail organization under which the rule will be created.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
The idempotency token for the client request.
- name: Name
value: "{{ Name }}"
description: |
The rule name.
- name: Description
value: "{{ Description }}"
description: |
The rule description.
- name: Effect
value: "{{ Effect }}"
description: |
The effect of the rule when it matches. Allowed values are ALLOW or DENY.
valid_values: ['ALLOW', 'DENY']
- name: DeviceTypes
value:
- "{{ DeviceTypes }}"
description: |
Device types that the rule will match.
- name: NotDeviceTypes
value:
- "{{ NotDeviceTypes }}"
description: |
Device types that the rule will not match. All other device types will match.
- name: DeviceModels
value:
- "{{ DeviceModels }}"
description: |
Device models that the rule will match.
- name: NotDeviceModels
value:
- "{{ NotDeviceModels }}"
description: |
Device models that the rule will not match. All other device models will match.
- name: DeviceOperatingSystems
value:
- "{{ DeviceOperatingSystems }}"
description: |
Device operating systems that the rule will match.
- name: NotDeviceOperatingSystems
value:
- "{{ NotDeviceOperatingSystems }}"
description: |
Device operating systems that the rule will not match. All other device operating systems will match.
- name: DeviceUserAgents
value:
- "{{ DeviceUserAgents }}"
description: |
Device user agents that the rule will match.
- name: NotDeviceUserAgents
value:
- "{{ NotDeviceUserAgents }}"
description: |
Device user agents that the rule will not match. All other device user agents will match.
UPDATE examples
- update_mobile_device_access_rule
Updates a mobile device access rule for the specified WorkMail organization.
UPDATE aws.workmail.mobile_device_access_rules
SET
OrganizationId = '{{ OrganizationId }}',
MobileDeviceAccessRuleId = '{{ MobileDeviceAccessRuleId }}',
Name = '{{ Name }}',
Description = '{{ Description }}',
Effect = '{{ Effect }}',
DeviceTypes = '{{ DeviceTypes }}',
NotDeviceTypes = '{{ NotDeviceTypes }}',
DeviceModels = '{{ DeviceModels }}',
NotDeviceModels = '{{ NotDeviceModels }}',
DeviceOperatingSystems = '{{ DeviceOperatingSystems }}',
NotDeviceOperatingSystems = '{{ NotDeviceOperatingSystems }}',
DeviceUserAgents = '{{ DeviceUserAgents }}',
NotDeviceUserAgents = '{{ NotDeviceUserAgents }}'
WHERE
region = '{{ region }}' --required
AND OrganizationId = '{{ OrganizationId }}' --required
AND MobileDeviceAccessRuleId = '{{ MobileDeviceAccessRuleId }}' --required
AND Name = '{{ Name }}' --required
AND Effect = '{{ Effect }}' --required;
DELETE examples
- delete_mobile_device_access_rule
Deletes a mobile device access rule for the specified WorkMail organization. Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.
DELETE FROM aws.workmail.mobile_device_access_rules
WHERE region = '{{ region }}' --required
;