putInlinePolicyToPermissionSet method

Future<void> putInlinePolicyToPermissionSet({
  1. required String inlinePolicy,
  2. required String instanceArn,
  3. required String permissionSetArn,
})

Attaches an inline policy to a permission set.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter inlinePolicy : The inline policy to attach to a PermissionSet.

Parameter instanceArn : The ARN of the IAM Identity Center instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

Parameter permissionSetArn : The ARN of the permission set.

Implementation

Future<void> putInlinePolicyToPermissionSet({
  required String inlinePolicy,
  required String instanceArn,
  required String permissionSetArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SWBExternalService.PutInlinePolicyToPermissionSet'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InlinePolicy': inlinePolicy,
      'InstanceArn': instanceArn,
      'PermissionSetArn': permissionSetArn,
    },
  );
}