/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace Aws; using namespace Aws::Auth; using namespace Aws::Client; using namespace Aws::EMRContainers; using namespace Aws::EMRContainers::Model; using namespace Aws::Http; using namespace Aws::Utils::Json; using namespace smithy::components::tracing; using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; const char* EMRContainersClient::SERVICE_NAME = "emr-containers"; const char* EMRContainersClient::ALLOCATION_TAG = "EMRContainersClient"; EMRContainersClient::EMRContainersClient(const EMRContainers::EMRContainersClientConfiguration& clientConfiguration, std::shared_ptr endpointProvider) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(std::move(endpointProvider)) { init(m_clientConfiguration); } EMRContainersClient::EMRContainersClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const EMRContainers::EMRContainersClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(std::move(endpointProvider)) { init(m_clientConfiguration); } EMRContainersClient::EMRContainersClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const EMRContainers::EMRContainersClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(std::move(endpointProvider)) { init(m_clientConfiguration); } /* Legacy constructors due deprecation */ EMRContainersClient::EMRContainersClient(const Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { init(m_clientConfiguration); } EMRContainersClient::EMRContainersClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { init(m_clientConfiguration); } EMRContainersClient::EMRContainersClient(const std::shared_ptr& credentialsProvider, const Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), Aws::MakeShared(ALLOCATION_TAG)), m_clientConfiguration(clientConfiguration), m_executor(clientConfiguration.executor), m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { init(m_clientConfiguration); } /* End of legacy constructors due deprecation */ EMRContainersClient::~EMRContainersClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& EMRContainersClient::accessEndpointProvider() { return m_endpointProvider; } void EMRContainersClient::init(const EMRContainers::EMRContainersClientConfiguration& config) { AWSClient::SetServiceClientName("EMR containers"); AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_endpointProvider->InitBuiltInParameters(config); } void EMRContainersClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_endpointProvider->OverrideEndpoint(endpoint); } CancelJobRunOutcome EMRContainersClient::CancelJobRun(const CancelJobRunRequest& request) const { AWS_OPERATION_GUARD(CancelJobRun); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CancelJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CancelJobRun", "Required field: Id, is not set"); return CancelJobRunOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CancelJobRun", "Required field: VirtualClusterId, is not set"); return CancelJobRunOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CancelJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CancelJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CancelJobRun", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CancelJobRunOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CancelJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobruns/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return CancelJobRunOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } CreateJobTemplateOutcome EMRContainersClient::CreateJobTemplate(const CreateJobTemplateRequest& request) const { AWS_OPERATION_GUARD(CreateJobTemplate); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateJobTemplate", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateJobTemplateOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobtemplates"); return CreateJobTemplateOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } CreateManagedEndpointOutcome EMRContainersClient::CreateManagedEndpoint(const CreateManagedEndpointRequest& request) const { AWS_OPERATION_GUARD(CreateManagedEndpoint); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CreateManagedEndpoint", "Required field: VirtualClusterId, is not set"); return CreateManagedEndpointOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateManagedEndpoint", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateManagedEndpointOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/endpoints"); return CreateManagedEndpointOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } CreateVirtualClusterOutcome EMRContainersClient::CreateVirtualCluster(const CreateVirtualClusterRequest& request) const { AWS_OPERATION_GUARD(CreateVirtualCluster); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateVirtualCluster", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateVirtualClusterOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters"); return CreateVirtualClusterOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DeleteJobTemplateOutcome EMRContainersClient::DeleteJobTemplate(const DeleteJobTemplateRequest& request) const { AWS_OPERATION_GUARD(DeleteJobTemplate); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteJobTemplate", "Required field: Id, is not set"); return DeleteJobTemplateOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteJobTemplate", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteJobTemplateOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobtemplates/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DeleteJobTemplateOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DeleteManagedEndpointOutcome EMRContainersClient::DeleteManagedEndpoint(const DeleteManagedEndpointRequest& request) const { AWS_OPERATION_GUARD(DeleteManagedEndpoint); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteManagedEndpoint", "Required field: Id, is not set"); return DeleteManagedEndpointOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteManagedEndpoint", "Required field: VirtualClusterId, is not set"); return DeleteManagedEndpointOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteManagedEndpoint", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteManagedEndpointOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/endpoints/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DeleteManagedEndpointOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DeleteVirtualClusterOutcome EMRContainersClient::DeleteVirtualCluster(const DeleteVirtualClusterRequest& request) const { AWS_OPERATION_GUARD(DeleteVirtualCluster); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteVirtualCluster", "Required field: Id, is not set"); return DeleteVirtualClusterOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteVirtualCluster", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteVirtualClusterOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DeleteVirtualClusterOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DescribeJobRunOutcome EMRContainersClient::DescribeJobRun(const DescribeJobRunRequest& request) const { AWS_OPERATION_GUARD(DescribeJobRun); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DescribeJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeJobRun", "Required field: Id, is not set"); return DescribeJobRunOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeJobRun", "Required field: VirtualClusterId, is not set"); return DescribeJobRunOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DescribeJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeJobRun", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeJobRunOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DescribeJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobruns/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DescribeJobRunOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DescribeJobTemplateOutcome EMRContainersClient::DescribeJobTemplate(const DescribeJobTemplateRequest& request) const { AWS_OPERATION_GUARD(DescribeJobTemplate); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DescribeJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeJobTemplate", "Required field: Id, is not set"); return DescribeJobTemplateOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DescribeJobTemplate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeJobTemplate", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeJobTemplateOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DescribeJobTemplate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobtemplates/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DescribeJobTemplateOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DescribeManagedEndpointOutcome EMRContainersClient::DescribeManagedEndpoint(const DescribeManagedEndpointRequest& request) const { AWS_OPERATION_GUARD(DescribeManagedEndpoint); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DescribeManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeManagedEndpoint", "Required field: Id, is not set"); return DescribeManagedEndpointOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeManagedEndpoint", "Required field: VirtualClusterId, is not set"); return DescribeManagedEndpointOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DescribeManagedEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeManagedEndpoint", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeManagedEndpointOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DescribeManagedEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/endpoints/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DescribeManagedEndpointOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } DescribeVirtualClusterOutcome EMRContainersClient::DescribeVirtualCluster(const DescribeVirtualClusterRequest& request) const { AWS_OPERATION_GUARD(DescribeVirtualCluster); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DescribeVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.IdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DescribeVirtualCluster", "Required field: Id, is not set"); return DescribeVirtualClusterOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DescribeVirtualCluster, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeVirtualCluster", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeVirtualClusterOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DescribeVirtualCluster, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetId()); return DescribeVirtualClusterOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } GetManagedEndpointSessionCredentialsOutcome EMRContainersClient::GetManagedEndpointSessionCredentials(const GetManagedEndpointSessionCredentialsRequest& request) const { AWS_OPERATION_GUARD(GetManagedEndpointSessionCredentials); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetManagedEndpointSessionCredentials, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.EndpointIdentifierHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetManagedEndpointSessionCredentials", "Required field: EndpointIdentifier, is not set"); return GetManagedEndpointSessionCredentialsOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointIdentifier]", false)); } if (!request.VirtualClusterIdentifierHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetManagedEndpointSessionCredentials", "Required field: VirtualClusterIdentifier, is not set"); return GetManagedEndpointSessionCredentialsOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterIdentifier]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetManagedEndpointSessionCredentials, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetManagedEndpointSessionCredentials, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetManagedEndpointSessionCredentials", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetManagedEndpointSessionCredentialsOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetManagedEndpointSessionCredentials, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterIdentifier()); endpointResolutionOutcome.GetResult().AddPathSegments("/endpoints/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointIdentifier()); endpointResolutionOutcome.GetResult().AddPathSegments("/credentials"); return GetManagedEndpointSessionCredentialsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } ListJobRunsOutcome EMRContainersClient::ListJobRuns(const ListJobRunsRequest& request) const { AWS_OPERATION_GUARD(ListJobRuns); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListJobRuns, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("ListJobRuns", "Required field: VirtualClusterId, is not set"); return ListJobRunsOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListJobRuns, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListJobRuns, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListJobRuns", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListJobRunsOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListJobRuns, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobruns"); return ListJobRunsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } ListJobTemplatesOutcome EMRContainersClient::ListJobTemplates(const ListJobTemplatesRequest& request) const { AWS_OPERATION_GUARD(ListJobTemplates); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListJobTemplates, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListJobTemplates, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListJobTemplates, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListJobTemplates", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListJobTemplatesOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListJobTemplates, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobtemplates"); return ListJobTemplatesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } ListManagedEndpointsOutcome EMRContainersClient::ListManagedEndpoints(const ListManagedEndpointsRequest& request) const { AWS_OPERATION_GUARD(ListManagedEndpoints); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListManagedEndpoints, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("ListManagedEndpoints", "Required field: VirtualClusterId, is not set"); return ListManagedEndpointsOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListManagedEndpoints, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListManagedEndpoints, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListManagedEndpoints", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListManagedEndpointsOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListManagedEndpoints, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/endpoints"); return ListManagedEndpointsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } ListTagsForResourceOutcome EMRContainersClient::ListTagsForResource(const ListTagsForResourceRequest& request) const { AWS_OPERATION_GUARD(ListTagsForResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set"); return ListTagsForResourceOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListTagsForResource", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListTagsForResourceOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return ListTagsForResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } ListVirtualClustersOutcome EMRContainersClient::ListVirtualClusters(const ListVirtualClustersRequest& request) const { AWS_OPERATION_GUARD(ListVirtualClusters); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListVirtualClusters, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListVirtualClusters, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListVirtualClusters, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListVirtualClusters", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListVirtualClustersOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListVirtualClusters, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters"); return ListVirtualClustersOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } StartJobRunOutcome EMRContainersClient::StartJobRun(const StartJobRunRequest& request) const { AWS_OPERATION_GUARD(StartJobRun); AWS_OPERATION_CHECK_PTR(m_endpointProvider, StartJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.VirtualClusterIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("StartJobRun", "Required field: VirtualClusterId, is not set"); return StartJobRunOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [VirtualClusterId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartJobRun, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartJobRun", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> StartJobRunOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartJobRun, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/virtualclusters/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetVirtualClusterId()); endpointResolutionOutcome.GetResult().AddPathSegments("/jobruns"); return StartJobRunOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } TagResourceOutcome EMRContainersClient::TagResource(const TagResourceRequest& request) const { AWS_OPERATION_GUARD(TagResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set"); return TagResourceOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".TagResource", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> TagResourceOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return TagResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UntagResourceOutcome EMRContainersClient::UntagResource(const UntagResourceRequest& request) const { AWS_OPERATION_GUARD(UntagResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set"); return UntagResourceOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } if (!request.TagKeysHasBeenSet()) { AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set"); return UntagResourceOutcome(Aws::Client::AWSError(EMRContainersErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UntagResource", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UntagResourceOutcome { auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return UntagResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); }