describeStackEvents method

Future<DescribeStackEventsOutput> describeStackEvents({
  1. String? nextToken,
  2. String? stackName,
})

Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, go to Stacks in the AWS CloudFormation User Guide.

Parameter nextToken : A string that identifies the next page of events that you want to retrieve.

Parameter stackName : The name or the unique stack ID that is associated with the stack, which are not always interchangeable:

  • Running stacks: You can specify either the stack's name or its unique stack ID.
  • Deleted stacks: You must specify the unique stack ID.
Default: There is no default value.

Implementation

Future<DescribeStackEventsOutput> describeStackEvents({
  String? nextToken,
  String? stackName,
}) async {
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  final $request = <String, dynamic>{};
  nextToken?.also((arg) => $request['NextToken'] = arg);
  stackName?.also((arg) => $request['StackName'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeStackEvents',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeStackEventsInput'],
    shapes: shapes,
    resultWrapper: 'DescribeStackEventsResult',
  );
  return DescribeStackEventsOutput.fromXml($result);
}