describeInstance method

Future<DescribeInstanceResponse> describeInstance({
  1. required String instanceArn,
})

Returns the details of an instance of IAM Identity Center. The status can be one of the following:

  • CREATE_IN_PROGRESS - The instance is in the process of being created. When the instance is ready for use, DescribeInstance returns the status of ACTIVE. While the instance is in the CREATE_IN_PROGRESS state, you can call only DescribeInstance and DeleteInstance operations.
  • DELETE_IN_PROGRESS - The instance is being deleted. Returns AccessDeniedException after the delete operation completes.
  • ACTIVE - The instance is active.

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

Parameter instanceArn : The ARN of the instance of IAM Identity Center under which the operation will run.

Implementation

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

  return DescribeInstanceResponse.fromJson(jsonResponse.body);
}