update_resource
async
¶
update_resource(
organization_id: OrganizationId,
resource_id: EntityIdentifier,
*,
config_overrides: Optional[AsyncWorkMailClientConfig] = None,
name: Optional[ResourceName] = None,
booking_options: Optional[BookingOptions] = None,
description: Optional[NewResourceDescription] = None,
type: Optional[ResourceType] = None,
hidden_from_global_address_list: Optional[BooleanObject] = None,
) -> UpdateResourceResponse
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.
Parameters:
-
organization_id(OrganizationId) –The identifier associated with the organization for which the resource is updated.
-
resource_id(EntityIdentifier) –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: [email protected]
-
Resource name: resource
-
-
name(Optional[ResourceName], default:None) –The name of the resource to be updated.
-
booking_options(Optional[BookingOptions], default:None) –The resource's booking options to be updated.
-
description(Optional[NewResourceDescription], default:None) –Updates the resource description.
-
type(Optional[ResourceType], default:None) –Updates the resource type.
-
hidden_from_global_address_list(Optional[BooleanObject], default:None) –If enabled, the resource is hidden from the global address list.
Raises:
-
DirectoryUnavailableException–The directory is unavailable. It might be located in another Region or deleted.
-
EmailAddressInUseException–The email address that you're trying to assign is already created for a different user, group, or resource.
-
EntityNotFoundException–The identifier supplied for the user, group, or resource does not exist in your organization.
-
EntityStateException–You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user.
-
InvalidConfigurationException–The configuration for a resource isn't valid. A resource must either be able to auto-respond to requests or have at least one delegate associated that can do so on its behalf.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
MailDomainNotFoundException–The domain specified is not found in your organization.
-
MailDomainStateException–After a domain has been added to the organization, it must be verified. The domain is not yet verified.
-
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.
-
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
6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 | |