createGroupProfile method

Future<CreateGroupProfileOutput> createGroupProfile({
  1. required String domainIdentifier,
  2. String? clientToken,
  3. String? groupIdentifier,
  4. String? rolePrincipalArn,
})

Creates a group profile in Amazon DataZone.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which the group profile is created.

Parameter clientToken : A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Parameter groupIdentifier : The identifier of the group for which the group profile is created.

Parameter rolePrincipalArn : The ARN of the IAM role that will be associated with the group profile. This role defines the permissions that group members will assume when accessing Amazon DataZone resources.

Implementation

Future<CreateGroupProfileOutput> createGroupProfile({
  required String domainIdentifier,
  String? clientToken,
  String? groupIdentifier,
  String? rolePrincipalArn,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (groupIdentifier != null) 'groupIdentifier': groupIdentifier,
    if (rolePrincipalArn != null) 'rolePrincipalArn': rolePrincipalArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/group-profiles',
    exceptionFnMap: _exceptionFns,
  );
  return CreateGroupProfileOutput.fromJson(response);
}