UpdateMobileDeviceAccessRuleCommand

Updates a mobile device access rule for the specified WorkMail organization.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkMailClient, UpdateMobileDeviceAccessRuleCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, UpdateMobileDeviceAccessRuleCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // UpdateMobileDeviceAccessRuleRequest
  OrganizationId: "STRING_VALUE", // required
  MobileDeviceAccessRuleId: "STRING_VALUE", // required
  Name: "STRING_VALUE", // required
  Description: "STRING_VALUE",
  Effect: "ALLOW" || "DENY", // required
  DeviceTypes: [ // DeviceTypeList
    "STRING_VALUE",
  ],
  NotDeviceTypes: [
    "STRING_VALUE",
  ],
  DeviceModels: [ // DeviceModelList
    "STRING_VALUE",
  ],
  NotDeviceModels: [
    "STRING_VALUE",
  ],
  DeviceOperatingSystems: [ // DeviceOperatingSystemList
    "STRING_VALUE",
  ],
  NotDeviceOperatingSystems: [
    "STRING_VALUE",
  ],
  DeviceUserAgents: [ // DeviceUserAgentList
    "STRING_VALUE",
  ],
  NotDeviceUserAgents: [
    "STRING_VALUE",
  ],
};
const command = new UpdateMobileDeviceAccessRuleCommand(input);
const response = await client.send(command);
// {};

UpdateMobileDeviceAccessRuleCommand Input

Parameter
Type
Description
Effect
Required
MobileDeviceAccessRuleEffect | undefined

The effect of the rule when it matches. Allowed values are ALLOW or DENY.

MobileDeviceAccessRuleId
Required
string | undefined

The identifier of the rule to be updated.

Name
Required
string | undefined

The updated rule name.

OrganizationId
Required
string | undefined

The WorkMail organization under which the rule will be updated.

Description
string | undefined

The updated rule description.

DeviceModels
string[] | undefined

Device models that the updated rule will match.

DeviceOperatingSystems
string[] | undefined

Device operating systems that the updated rule will match.

DeviceTypes
string[] | undefined

Device types that the updated rule will match.

DeviceUserAgents
string[] | undefined

User agents that the updated rule will match.

NotDeviceModels
string[] | undefined

Device models that the updated rule will not match. All other device models will match.

NotDeviceOperatingSystems
string[] | undefined

Device operating systems that the updated rule will not match. All other device operating systems will match.

NotDeviceTypes
string[] | undefined

Device types that the updated rule will not match. All other device types will match.

NotDeviceUserAgents
string[] | undefined

User agents that the updated rule will not match. All other user agents will match.

UpdateMobileDeviceAccessRuleCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
EntityNotFoundException
client

The identifier supplied for the user, group, or resource does not exist in your organization.

InvalidParameterException
client

One or more of the input parameters don't match the service's restrictions.

OrganizationNotFoundException
client

An operation received a valid organization identifier that either doesn't belong or exist in the system.

OrganizationStateException
client

The organization must have a valid state to perform certain operations on the organization or its members.

WorkMailServiceException
Base exception class for all service exceptions from WorkMail service.