describePermissionSetProvisioningStatus method

Future<DescribePermissionSetProvisioningStatusResponse> describePermissionSetProvisioningStatus({
  1. required String instanceArn,
  2. required String provisionPermissionSetRequestId,
})

Describes the status for the given permission set provisioning request.

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

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

Parameter provisionPermissionSetRequestId : The identifier that is provided by the ProvisionPermissionSet call to retrieve the current status of the provisioning workflow.

Implementation

Future<DescribePermissionSetProvisioningStatusResponse>
    describePermissionSetProvisioningStatus({
  required String instanceArn,
  required String provisionPermissionSetRequestId,
}) async {
  ArgumentError.checkNotNull(instanceArn, 'instanceArn');
  _s.validateStringLength(
    'instanceArn',
    instanceArn,
    10,
    1224,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      provisionPermissionSetRequestId, 'provisionPermissionSetRequestId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'SWBExternalService.DescribePermissionSetProvisioningStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InstanceArn': instanceArn,
      'ProvisionPermissionSetRequestId': provisionPermissionSetRequestId,
    },
  );

  return DescribePermissionSetProvisioningStatusResponse.fromJson(
      jsonResponse.body);
}