describeActivity method

Future<DescribeActivityOutput> describeActivity({
  1. required String activityArn,
})

Describes an activity.

May throw ActivityDoesNotExist. May throw InvalidArn.

Parameter activityArn : The Amazon Resource Name (ARN) of the activity to describe.

Implementation

Future<DescribeActivityOutput> describeActivity({
  required String activityArn,
}) async {
  ArgumentError.checkNotNull(activityArn, 'activityArn');
  _s.validateStringLength(
    'activityArn',
    activityArn,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSStepFunctions.DescribeActivity'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'activityArn': activityArn,
    },
  );

  return DescribeActivityOutput.fromJson(jsonResponse.body);
}