describeStackResource method

Future<DescribeStackResourceOutput> describeStackResource({
  1. required String logicalResourceId,
  2. required String stackName,
})

Returns a description of the specified resource in the specified stack.

For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted.

Parameter logicalResourceId : The logical name of the resource as specified in the template.

Default: There is no default value.

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<DescribeStackResourceOutput> describeStackResource({
  required String logicalResourceId,
  required String stackName,
}) async {
  ArgumentError.checkNotNull(logicalResourceId, 'logicalResourceId');
  ArgumentError.checkNotNull(stackName, 'stackName');
  final $request = <String, dynamic>{};
  $request['LogicalResourceId'] = logicalResourceId;
  $request['StackName'] = stackName;
  final $result = await _protocol.send(
    $request,
    action: 'DescribeStackResource',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeStackResourceInput'],
    shapes: shapes,
    resultWrapper: 'DescribeStackResourceResult',
  );
  return DescribeStackResourceOutput.fromXml($result);
}