describeInstance method
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 ofACTIVE. While the instance is in theCREATE_IN_PROGRESSstate, you can call only DescribeInstance and DeleteInstance operations. -
DELETE_IN_PROGRESS- The instance is being deleted. ReturnsAccessDeniedExceptionafter 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);
}