associateSkillWithSkillGroup method

Future<void> associateSkillWithSkillGroup({
  1. required String skillId,
  2. String? skillGroupArn,
})

Associates a skill with a skill group.

May throw ConcurrentModificationException. May throw NotFoundException. May throw SkillNotLinkedException.

Parameter skillId : The unique identifier of the skill.

Parameter skillGroupArn : The ARN of the skill group to associate the skill to. Required.

Implementation

Future<void> associateSkillWithSkillGroup({
  required String skillId,
  String? skillGroupArn,
}) async {
  ArgumentError.checkNotNull(skillId, 'skillId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.AssociateSkillWithSkillGroup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SkillId': skillId,
      if (skillGroupArn != null) 'SkillGroupArn': skillGroupArn,
    },
  );
}