getDeploymentTarget method

Future<GetDeploymentTargetOutput> getDeploymentTarget({
  1. String? deploymentId,
  2. String? targetId,
})

Returns information about a deployment target.

May throw InvalidDeploymentIdException. May throw DeploymentIdRequiredException. May throw DeploymentDoesNotExistException. May throw DeploymentNotStartedException. May throw DeploymentTargetIdRequiredException. May throw InvalidDeploymentTargetIdException. May throw DeploymentTargetDoesNotExistException. May throw InvalidInstanceNameException.

Parameter deploymentId : The unique ID of a deployment.

Parameter targetId : The unique ID of a deployment target.

Implementation

Future<GetDeploymentTargetOutput> getDeploymentTarget({
  String? deploymentId,
  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: {
      if (deploymentId != null) 'deploymentId': deploymentId,
      if (targetId != null) 'targetId': targetId,
    },
  );

  return GetDeploymentTargetOutput.fromJson(jsonResponse.body);
}