describeAssociationExecutionTargets method

Future<DescribeAssociationExecutionTargetsResult> describeAssociationExecutionTargets({
  1. required String associationId,
  2. required String executionId,
  3. List<AssociationExecutionTargetsFilter>? filters,
  4. int? maxResults,
  5. String? nextToken,
})

Use this API action to view information about a specific execution of a specific association.

May throw InternalServerError. May throw AssociationDoesNotExist. May throw InvalidNextToken. May throw AssociationExecutionDoesNotExist.

Parameter associationId : The association ID that includes the execution for which you want to view details.

Parameter executionId : The execution ID for which you want to view details.

Parameter filters : Filters for the request. You can specify the following filters and values.

Status (EQUAL)

ResourceId (EQUAL)

ResourceType (EQUAL)

Parameter maxResults : The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Parameter nextToken : A token to start the list. Use this token to get the next set of results.

Implementation

Future<DescribeAssociationExecutionTargetsResult>
    describeAssociationExecutionTargets({
  required String associationId,
  required String executionId,
  List<AssociationExecutionTargetsFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(associationId, 'associationId');
  ArgumentError.checkNotNull(executionId, 'executionId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.DescribeAssociationExecutionTargets'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AssociationId': associationId,
      'ExecutionId': executionId,
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeAssociationExecutionTargetsResult.fromJson(
      jsonResponse.body);
}