describeStackResourceDrifts method
- required String stackName,
- int? maxResults,
- String? nextToken,
- List<
StackResourceDriftStatus> ? stackResourceDriftStatusFilters,
Returns drift information for the resources that have been checked for drift in the specified stack. This includes actual and expected configuration values for resources where AWS CloudFormation detects configuration drift.
For a given stack, there will be one StackResourceDrift
for
each stack resource that has been checked for drift. Resources that have
not yet been checked for drift are not included. Resources that do not
currently support drift detection are not checked, and so not included.
For a list of resources that support drift detection, see Resources
that Support Drift Detection.
Use DetectStackResourceDrift to detect drift on individual resources, or DetectStackDrift to detect drift on all supported resources for a given stack.
Parameter stackName
:
The name of the stack for which you want drift information.
Parameter maxResults
:
The maximum number of results to be returned with a single call. If the
number of available results exceeds this maximum, the response includes a
NextToken
value that you can assign to the
NextToken
request parameter to get the next set of results.
Parameter nextToken
:
A string that identifies the next page of stack resource drift results.
Parameter stackResourceDriftStatusFilters
:
The resource drift status values to use as filters for the resource drift
results returned.
-
DELETED
: The resource differs from its expected template configuration in that the resource has been deleted. -
MODIFIED
: One or more resource properties differ from their expected template values. -
IN_SYNC
: The resources's actual configuration matches its expected template configuration. -
NOT_CHECKED
: AWS CloudFormation does not currently return this value.
Implementation
Future<DescribeStackResourceDriftsOutput> describeStackResourceDrifts({
required String stackName,
int? maxResults,
String? nextToken,
List<StackResourceDriftStatus>? stackResourceDriftStatusFilters,
}) async {
ArgumentError.checkNotNull(stackName, 'stackName');
_s.validateStringLength(
'stackName',
stackName,
1,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
final $request = <String, dynamic>{};
$request['StackName'] = stackName;
maxResults?.also((arg) => $request['MaxResults'] = arg);
nextToken?.also((arg) => $request['NextToken'] = arg);
stackResourceDriftStatusFilters?.also((arg) =>
$request['StackResourceDriftStatusFilters'] =
arg.map((e) => e.toValue()).toList());
final $result = await _protocol.send(
$request,
action: 'DescribeStackResourceDrifts',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeStackResourceDriftsInput'],
shapes: shapes,
resultWrapper: 'DescribeStackResourceDriftsResult',
);
return DescribeStackResourceDriftsOutput.fromXml($result);
}