updateResource method
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.
May throw DirectoryUnavailableException.
May throw EmailAddressInUseException.
May throw EntityNotFoundException.
May throw EntityStateException.
May throw InvalidConfigurationException.
May throw InvalidParameterException.
May throw MailDomainNotFoundException.
May throw MailDomainStateException.
May throw NameAvailabilityException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
May throw UnsupportedOperationException.
Parameter organizationId :
The identifier associated with the organization for which the resource is
updated.
Parameter resourceId :
The identifier of the resource to be updated.
The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:
- Resource ID: r-0123456789a0123456789b0123456789
- Email address: resource@domain.tld
- Resource name: resource
Parameter bookingOptions :
The resource's booking options to be updated.
Parameter description :
Updates the resource description.
Parameter hiddenFromGlobalAddressList :
If enabled, the resource is hidden from the global address list.
Parameter name :
The name of the resource to be updated.
Parameter type :
Updates the resource type.
Implementation
Future<void> updateResource({
required String organizationId,
required String resourceId,
BookingOptions? bookingOptions,
String? description,
bool? hiddenFromGlobalAddressList,
String? name,
ResourceType? type,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.UpdateResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationId': organizationId,
'ResourceId': resourceId,
if (bookingOptions != null) 'BookingOptions': bookingOptions,
if (description != null) 'Description': description,
if (hiddenFromGlobalAddressList != null)
'HiddenFromGlobalAddressList': hiddenFromGlobalAddressList,
if (name != null) 'Name': name,
if (type != null) 'Type': type.value,
},
);
}