getDeploymentTarget method
Returns information about a deployment target.
May throw DeploymentDoesNotExistException.
May throw DeploymentIdRequiredException.
May throw DeploymentNotStartedException.
May throw DeploymentTargetDoesNotExistException.
May throw DeploymentTargetIdRequiredException.
May throw InvalidDeploymentIdException.
May throw InvalidDeploymentTargetIdException.
May throw InvalidInstanceNameException.
Parameter deploymentId :
The unique ID of a deployment.
Parameter targetId :
The unique ID of a deployment target.
Implementation
Future<GetDeploymentTargetOutput> getDeploymentTarget({
required String deploymentId,
required String targetId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeDeploy_20141006.GetDeploymentTarget'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'deploymentId': deploymentId,
'targetId': targetId,
},
);
return GetDeploymentTargetOutput.fromJson(jsonResponse.body);
}