describeScript method

Future<DescribeScriptOutput> describeScript({
  1. required String scriptId,
})

Retrieves properties for a Realtime script.

To request a script record, specify the script ID. If successful, an object containing the script properties is returned.

Learn more

Amazon GameLift Realtime Servers

Related operations

May throw UnauthorizedException. May throw InvalidRequestException. May throw InternalServiceException. May throw NotFoundException.

Parameter scriptId : A unique identifier for a Realtime script to retrieve properties for. You can use either the script ID or ARN value.

Implementation

Future<DescribeScriptOutput> describeScript({
  required String scriptId,
}) async {
  ArgumentError.checkNotNull(scriptId, 'scriptId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DescribeScript'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ScriptId': scriptId,
    },
  );

  return DescribeScriptOutput.fromJson(jsonResponse.body);
}