This method works, but is deprecated. Use BatchGetDeploymentTargets instead.
Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises and Lambda compute platforms. The newer BatchGetDeploymentTargets works with all compute platforms. The maximum number of instances that can be returned is 25.
Parameters:
-
deployment_id
(DeploymentId)
–
The unique ID of a deployment.
-
instance_ids
(InstancesList)
–
The unique IDs of instances used in the deployment. The maximum number of instance IDs you can specify is 25.
Raises:
Source code in docs_src/capo_codedeploy/_services/async_code_deploy.py
| async def batch_get_deployment_instances(
self,
deployment_id: "capo_codedeploy.types.deployment_id.DeploymentId",
instance_ids: "capo_codedeploy.types.instances_list.InstancesList",
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = None,
) -> "capo_codedeploy.types.batch_get_deployment_instances_output.BatchGetDeploymentInstancesOutput":
"""<note> <p> This method works, but is deprecated. Use <code>BatchGetDeploymentTargets</code> instead. </p> </note> <p> Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises and Lambda compute platforms. The newer <code>BatchGetDeploymentTargets</code> works with all compute platforms. The maximum number of instances that can be returned is 25.</p>
Args:
deployment_id: <p> The unique ID of a deployment. </p>
instance_ids: <p>The unique IDs of instances used in the deployment. The maximum number of instance IDs you can specify is 25.</p>
Raises:
capo_codedeploy.errors.batch_limit_exceeded_exception.BatchLimitExceededException: <p>The maximum number of names or IDs allowed for this request (100) was exceeded.</p>
capo_codedeploy.errors.deployment_does_not_exist_exception.DeploymentDoesNotExistException: <p>The deployment with the user or Amazon Web Services account does not exist.</p>
capo_codedeploy.errors.deployment_id_required_exception.DeploymentIdRequiredException: <p>At least one deployment ID must be specified.</p>
capo_codedeploy.errors.instance_id_required_exception.InstanceIdRequiredException: <p>The instance ID was not specified.</p>
capo_codedeploy.errors.invalid_compute_platform_exception.InvalidComputePlatformException: <p>The computePlatform is invalid. The computePlatform should be <code>Lambda</code>, <code>Server</code>, or <code>ECS</code>.</p>
capo_codedeploy.errors.invalid_deployment_id_exception.InvalidDeploymentIdException: <p>At least one of the deployment IDs was specified in an invalid format.</p>
capo_codedeploy.errors.invalid_instance_name_exception.InvalidInstanceNameException: <p>The on-premises instance name was specified in an invalid format.</p>
capo_codedeploy.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codedeploy.types.batch_get_deployment_instances_input.BatchGetDeploymentInstancesInput]",
) -> AsyncOperationResponse[
"capo_codedeploy.types.batch_get_deployment_instances_output.BatchGetDeploymentInstancesOutput"
]:
import capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_instances
(
output,
http_response,
) = await capo_codedeploy._operations.code_deploy_20141006.batch_get_deployment_instances.async_batch_get_deployment_instances(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchGetDeploymentInstances")
)
input_: capo_codedeploy.types.batch_get_deployment_instances_input.BatchGetDeploymentInstancesInput = {
"deployment_id": deployment_id,
"instance_ids": instance_ids,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|