getDeployment method

Future<GetDeploymentOutput> getDeployment({
  1. required String id,
  2. String? componentName,
  3. String? environmentName,
  4. String? serviceInstanceName,
  5. String? serviceName,
})

Get detailed data for a deployment.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter id : The ID of the deployment that you want to get the detailed data for.

Parameter componentName : The name of a component that you want to get the detailed data for.

Parameter environmentName : The name of a environment that you want to get the detailed data for.

Parameter serviceInstanceName : The name of the service instance associated with the given deployment ID. serviceName must be specified to identify the service instance.

Parameter serviceName : The name of the service associated with the given deployment ID.

Implementation

Future<GetDeploymentOutput> getDeployment({
  required String id,
  String? componentName,
  String? environmentName,
  String? serviceInstanceName,
  String? serviceName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.GetDeployment'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'id': id,
      if (componentName != null) 'componentName': componentName,
      if (environmentName != null) 'environmentName': environmentName,
      if (serviceInstanceName != null)
        'serviceInstanceName': serviceInstanceName,
      if (serviceName != null) 'serviceName': serviceName,
    },
  );

  return GetDeploymentOutput.fromJson(jsonResponse.body);
}