updateResource method
- required String organizationId,
- required String resourceId,
- BookingOptions? bookingOptions,
- String? name,
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 EntityNotFoundException. May throw EntityStateException. May throw InvalidConfigurationException. May throw EmailAddressInUseException. May throw MailDomainNotFoundException. May throw MailDomainStateException. May throw NameAvailabilityException. May throw OrganizationNotFoundException. May throw OrganizationStateException.
Parameter organizationId
:
The identifier associated with the organization for which the resource is
updated.
Parameter resourceId
:
The identifier of the resource to be updated.
Parameter bookingOptions
:
The resource's booking options to be updated.
Parameter name
:
The name of the resource to be updated.
Implementation
Future<void> updateResource({
required String organizationId,
required String resourceId,
BookingOptions? bookingOptions,
String? name,
}) async {
ArgumentError.checkNotNull(organizationId, 'organizationId');
_s.validateStringLength(
'organizationId',
organizationId,
34,
34,
isRequired: true,
);
ArgumentError.checkNotNull(resourceId, 'resourceId');
_s.validateStringLength(
'resourceId',
resourceId,
34,
34,
isRequired: true,
);
_s.validateStringLength(
'name',
name,
1,
20,
);
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 (name != null) 'Name': name,
},
);
}