describeLogPattern method

Future<DescribeLogPatternResponse> describeLogPattern({
  1. required String patternName,
  2. required String patternSetName,
  3. required String resourceGroupName,
  4. String? accountId,
})

Describe a specific log pattern from a LogPatternSet.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter patternName : The name of the log pattern.

Parameter patternSetName : The name of the log pattern set.

Parameter resourceGroupName : The name of the resource group.

Parameter accountId : The Amazon Web Services account ID for the resource group owner.

Implementation

Future<DescribeLogPatternResponse> describeLogPattern({
  required String patternName,
  required String patternSetName,
  required String resourceGroupName,
  String? accountId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'EC2WindowsBarleyService.DescribeLogPattern'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'PatternName': patternName,
      'PatternSetName': patternSetName,
      'ResourceGroupName': resourceGroupName,
      if (accountId != null) 'AccountId': accountId,
    },
  );

  return DescribeLogPatternResponse.fromJson(jsonResponse.body);
}