describeResource method

Future<DescribeResourceResponse> describeResource({
  1. required String organizationId,
  2. required String resourceId,
})

Returns the data available for the resource.

May throw EntityNotFoundException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.

Parameter organizationId : The identifier associated with the organization for which the resource is described.

Parameter resourceId : The identifier of the resource to be described.

Implementation

Future<DescribeResourceResponse> describeResource({
  required String organizationId,
  required String resourceId,
}) async {
  ArgumentError.checkNotNull(organizationId, 'organizationId');
  _s.validateStringLength(
    'organizationId',
    organizationId,
    34,
    34,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceId, 'resourceId');
  _s.validateStringLength(
    'resourceId',
    resourceId,
    34,
    34,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.DescribeResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OrganizationId': organizationId,
      'ResourceId': resourceId,
    },
  );

  return DescribeResourceResponse.fromJson(jsonResponse.body);
}