1use crate::{
8 AwsHttpClient, Result,
9 ops::emr::EmrOps,
10 types::emr::{
11 DescribeClusterInput, DescribeClusterOutput, ListClustersInput, ListClustersOutput,
12 TerminateJobFlowsInput,
13 },
14};
15
16pub struct EmrClient<'a> {
18 ops: EmrOps<'a>,
19}
20
21impl<'a> EmrClient<'a> {
22 pub(crate) fn new(client: &'a AwsHttpClient) -> Self {
24 Self {
25 ops: EmrOps::new(client),
26 }
27 }
28
29 pub async fn list_clusters(&self, body: &ListClustersInput) -> Result<ListClustersOutput> {
31 self.ops.list_clusters(body).await
32 }
33
34 pub async fn describe_cluster(
36 &self,
37 body: &DescribeClusterInput,
38 ) -> Result<DescribeClusterOutput> {
39 self.ops.describe_cluster(body).await
40 }
41
42 pub async fn terminate_job_flows(&self, body: &TerminateJobFlowsInput) -> Result<()> {
44 self.ops.terminate_job_flows(body).await
45 }
46}