create_resource
async
¶
create_resource(
organization_id: OrganizationId,
name: ResourceName,
type: ResourceType,
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
description: Optional[ResourceDescription] = None,
hidden_from_global_address_list: Optional[Boolean] = None,
) -> CreateResourceResponse
Creates a new WorkMail resource.
Parameters:
-
organization_id(OrganizationId) –The identifier associated with the organization for which the resource is created.
-
name(ResourceName) –The name of the new resource.
-
type(ResourceType) –The type of the new resource. The available types are
equipmentandroom. -
description(Optional[ResourceDescription], default:None) –Resource description.
-
hidden_from_global_address_list(Optional[Boolean], default:None) –If this parameter is enabled, the resource will be hidden from the address book.
Raises:
-
DirectoryServiceAuthenticationFailedException–The directory service doesn't recognize the credentials supplied by WorkMail.
-
DirectoryUnavailableException–The directory is unavailable. It might be located in another Region or deleted.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
NameAvailabilityException–The user, group, or resource name isn't unique in WorkMail.
-
OrganizationNotFoundException–An operation received a valid organization identifier that either doesn't belong or exist in the system.
-
OrganizationStateException–The organization must have a valid state to perform certain operations on the organization or its members.
-
ReservedNameException–This user, group, or resource name is not allowed in WorkMail.
-
UnsupportedOperationException–You can't perform a write operation against a read-only directory.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workmail/_services/async_work_mail.py
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 | |