createTenantResourceAssociation method
Associate a resource with a tenant.
Resources can be email identities, configuration sets, or email templates. When you associate a resource with a tenant, you can use that resource when sending emails on behalf of that tenant.
A single resource can be associated with multiple tenants, allowing for resource sharing across different tenants while maintaining isolation in email sending operations.
May throw AlreadyExistsException.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the resource to associate with the
tenant.
Parameter tenantName :
The name of the tenant to associate the resource with.
Implementation
Future<void> createTenantResourceAssociation({
required String resourceArn,
required String tenantName,
}) async {
final $payload = <String, dynamic>{
'ResourceArn': resourceArn,
'TenantName': tenantName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/email/tenants/resources',
exceptionFnMap: _exceptionFns,
);
}