getLicense method

Future<GetLicenseResponse> getLicense({
  1. required String licenseArn,
  2. String? version,
})

Gets detailed information about the specified license.

May throw AccessDeniedException. May throw AuthorizationException. May throw InvalidParameterValueException. May throw RateLimitExceededException. May throw ServerInternalException. May throw ValidationException.

Parameter licenseArn : Amazon Resource Name (ARN) of the license.

Parameter version : License version.

Implementation

Future<GetLicenseResponse> getLicense({
  required String licenseArn,
  String? version,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLicenseManager.GetLicense'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LicenseArn': licenseArn,
      if (version != null) 'Version': version,
    },
  );

  return GetLicenseResponse.fromJson(jsonResponse.body);
}