createConfiguredAudienceModelAssociation method
Provides the details necessary to create a configured audience model association.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter configuredAudienceModelArn :
A unique identifier for the configured audience model that you want to
associate.
Parameter configuredAudienceModelAssociationName :
The name of the configured audience model association.
Parameter manageResourcePolicies :
When TRUE, indicates that the resource policy for the
configured audience model resource being associated is configured for
Clean Rooms to manage permissions related to the given collaboration. When
FALSE, indicates that the configured audience model resource
owner will manage permissions related to the given collaboration.
Setting this to TRUE requires you to have permissions to
create, update, and delete the resource policy for the
cleanrooms-ml resource when you call the
DeleteConfiguredAudienceModelAssociation resource. In addition, if
you are the collaboration creator and specify TRUE, you must
have the same permissions when you call the DeleteMember and
DeleteCollaboration APIs.
Parameter membershipIdentifier :
A unique identifier for one of your memberships for a collaboration. The
configured audience model is associated to the collaboration that this
membership belongs to. Accepts a membership ID.
Parameter description :
A description of the configured audience model association.
Parameter tags :
An optional label that you can assign to a resource when you create it.
Each tag consists of a key and an optional value, both of which you
define. When you use tagging, you can also use tag-based access control in
IAM policies to control access to this resource.
Implementation
Future<CreateConfiguredAudienceModelAssociationOutput>
createConfiguredAudienceModelAssociation({
required String configuredAudienceModelArn,
required String configuredAudienceModelAssociationName,
required bool manageResourcePolicies,
required String membershipIdentifier,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'configuredAudienceModelArn': configuredAudienceModelArn,
'configuredAudienceModelAssociationName':
configuredAudienceModelAssociationName,
'manageResourcePolicies': manageResourcePolicies,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/memberships/${Uri.encodeComponent(membershipIdentifier)}/configuredaudiencemodelassociations',
exceptionFnMap: _exceptionFns,
);
return CreateConfiguredAudienceModelAssociationOutput.fromJson(response);
}