describeOrganizationalUnit method
- required String organizationalUnitId,
Retrieves information about an organizational unit (OU).
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an AWS service.
May throw AccessDeniedException. May throw AWSOrganizationsNotInUseException. May throw InvalidInputException. May throw OrganizationalUnitNotFoundException. May throw ServiceException. May throw TooManyRequestsException.
Parameter organizationalUnitId
:
The unique identifier (ID) of the organizational unit that you want
details about. You can get the ID from the
ListOrganizationalUnitsForParent operation.
The regex pattern for an organizational unit ID string requires "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
Implementation
Future<DescribeOrganizationalUnitResponse> describeOrganizationalUnit({
required String organizationalUnitId,
}) async {
ArgumentError.checkNotNull(organizationalUnitId, 'organizationalUnitId');
_s.validateStringLength(
'organizationalUnitId',
organizationalUnitId,
0,
68,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSOrganizationsV20161128.DescribeOrganizationalUnit'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationalUnitId': organizationalUnitId,
},
);
return DescribeOrganizationalUnitResponse.fromJson(jsonResponse.body);
}