listStackInstanceResourceDrifts method
Returns drift information for resources in a stack instance.
May throw OperationNotFoundException.
May throw StackInstanceNotFoundException.
May throw StackSetNotFoundException.
Parameter operationId :
The unique ID of the drift operation.
Parameter stackInstanceAccount :
The name of the Amazon Web Services account that you want to list resource
drifts for.
Parameter stackInstanceRegion :
The name of the Region where you want to list resource drifts.
Parameter stackSetName :
The name or unique ID of the StackSet that you want to list drifted
resources for.
Parameter callAs :
[Service-managed permissions] Specifies whether you are acting as an
account administrator in the organization's management account or as a
delegated administrator in a member account.
By default, SELF is specified. Use SELF for
StackSets with self-managed permissions.
-
If you are signed in to the management account, specify
SELF. -
If you are signed in to a delegated administrator account, specify
DELEGATED_ADMIN.Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.
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 :
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter stackInstanceResourceDriftStatuses :
The resource drift status of the stack instance.
-
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 resource's actual configuration matches its expected template configuration. -
NOT_CHECKED: CloudFormation doesn't currently return this value.
Implementation
Future<ListStackInstanceResourceDriftsOutput>
listStackInstanceResourceDrifts({
required String operationId,
required String stackInstanceAccount,
required String stackInstanceRegion,
required String stackSetName,
CallAs? callAs,
int? maxResults,
String? nextToken,
List<StackResourceDriftStatus>? stackInstanceResourceDriftStatuses,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $request = <String, String>{
'OperationId': operationId,
'StackInstanceAccount': stackInstanceAccount,
'StackInstanceRegion': stackInstanceRegion,
'StackSetName': stackSetName,
if (callAs != null) 'CallAs': callAs.value,
if (maxResults != null) 'MaxResults': maxResults.toString(),
if (nextToken != null) 'NextToken': nextToken,
if (stackInstanceResourceDriftStatuses != null)
if (stackInstanceResourceDriftStatuses.isEmpty)
'StackInstanceResourceDriftStatuses': ''
else
for (var i1 = 0; i1 < stackInstanceResourceDriftStatuses.length; i1++)
'StackInstanceResourceDriftStatuses.member.${i1 + 1}':
stackInstanceResourceDriftStatuses[i1].value,
};
final $result = await _protocol.send(
$request,
action: 'ListStackInstanceResourceDrifts',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ListStackInstanceResourceDriftsResult',
);
return ListStackInstanceResourceDriftsOutput.fromXml($result);
}