/** * 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 #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 #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::NetworkManager; using namespace Aws::NetworkManager::Model; using namespace Aws::Http; using namespace Aws::Utils::Json; using namespace smithy::components::tracing; using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; const char* NetworkManagerClient::SERVICE_NAME = "networkmanager"; const char* NetworkManagerClient::ALLOCATION_TAG = "NetworkManagerClient"; NetworkManagerClient::NetworkManagerClient(const NetworkManager::NetworkManagerClientConfiguration& 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); } NetworkManagerClient::NetworkManagerClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const NetworkManager::NetworkManagerClientConfiguration& 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); } NetworkManagerClient::NetworkManagerClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const NetworkManager::NetworkManagerClientConfiguration& 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 */ NetworkManagerClient::NetworkManagerClient(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); } NetworkManagerClient::NetworkManagerClient(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); } NetworkManagerClient::NetworkManagerClient(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 */ NetworkManagerClient::~NetworkManagerClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& NetworkManagerClient::accessEndpointProvider() { return m_endpointProvider; } void NetworkManagerClient::init(const NetworkManager::NetworkManagerClientConfiguration& config) { AWSClient::SetServiceClientName("NetworkManager"); AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_endpointProvider->InitBuiltInParameters(config); } void NetworkManagerClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_endpointProvider->OverrideEndpoint(endpoint); } AcceptAttachmentOutcome NetworkManagerClient::AcceptAttachment(const AcceptAttachmentRequest& request) const { AWS_OPERATION_GUARD(AcceptAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AcceptAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("AcceptAttachment", "Required field: AttachmentId, is not set"); return AcceptAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AcceptAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AcceptAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AcceptAttachment", {{ 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( [&]()-> AcceptAttachmentOutcome { 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, AcceptAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); endpointResolutionOutcome.GetResult().AddPathSegments("/accept"); return AcceptAttachmentOutcome(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()}}); } AssociateConnectPeerOutcome NetworkManagerClient::AssociateConnectPeer(const AssociateConnectPeerRequest& request) const { AWS_OPERATION_GUARD(AssociateConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AssociateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("AssociateConnectPeer", "Required field: GlobalNetworkId, is not set"); return AssociateConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateConnectPeer", {{ 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( [&]()-> AssociateConnectPeerOutcome { 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, AssociateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peer-associations"); return AssociateConnectPeerOutcome(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()}}); } AssociateCustomerGatewayOutcome NetworkManagerClient::AssociateCustomerGateway(const AssociateCustomerGatewayRequest& request) const { AWS_OPERATION_GUARD(AssociateCustomerGateway); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AssociateCustomerGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("AssociateCustomerGateway", "Required field: GlobalNetworkId, is not set"); return AssociateCustomerGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateCustomerGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateCustomerGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateCustomerGateway", {{ 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( [&]()-> AssociateCustomerGatewayOutcome { 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, AssociateCustomerGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/customer-gateway-associations"); return AssociateCustomerGatewayOutcome(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()}}); } AssociateLinkOutcome NetworkManagerClient::AssociateLink(const AssociateLinkRequest& request) const { AWS_OPERATION_GUARD(AssociateLink); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AssociateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("AssociateLink", "Required field: GlobalNetworkId, is not set"); return AssociateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateLink", {{ 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( [&]()-> AssociateLinkOutcome { 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, AssociateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/link-associations"); return AssociateLinkOutcome(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()}}); } AssociateTransitGatewayConnectPeerOutcome NetworkManagerClient::AssociateTransitGatewayConnectPeer(const AssociateTransitGatewayConnectPeerRequest& request) const { AWS_OPERATION_GUARD(AssociateTransitGatewayConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AssociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("AssociateTransitGatewayConnectPeer", "Required field: GlobalNetworkId, is not set"); return AssociateTransitGatewayConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateTransitGatewayConnectPeer", {{ 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( [&]()-> AssociateTransitGatewayConnectPeerOutcome { 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, AssociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-connect-peer-associations"); return AssociateTransitGatewayConnectPeerOutcome(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()}}); } CreateConnectAttachmentOutcome NetworkManagerClient::CreateConnectAttachment(const CreateConnectAttachmentRequest& request) const { AWS_OPERATION_GUARD(CreateConnectAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateConnectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateConnectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateConnectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateConnectAttachment", {{ 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( [&]()-> CreateConnectAttachmentOutcome { 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, CreateConnectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-attachments"); return CreateConnectAttachmentOutcome(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()}}); } CreateConnectPeerOutcome NetworkManagerClient::CreateConnectPeer(const CreateConnectPeerRequest& request) const { AWS_OPERATION_GUARD(CreateConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateConnectPeer", {{ 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( [&]()-> CreateConnectPeerOutcome { 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, CreateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peers"); return CreateConnectPeerOutcome(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()}}); } CreateConnectionOutcome NetworkManagerClient::CreateConnection(const CreateConnectionRequest& request) const { AWS_OPERATION_GUARD(CreateConnection); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CreateConnection", "Required field: GlobalNetworkId, is not set"); return CreateConnectionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateConnection", {{ 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( [&]()-> CreateConnectionOutcome { 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, CreateConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connections"); return CreateConnectionOutcome(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()}}); } CreateCoreNetworkOutcome NetworkManagerClient::CreateCoreNetwork(const CreateCoreNetworkRequest& request) const { AWS_OPERATION_GUARD(CreateCoreNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateCoreNetwork", {{ 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( [&]()-> CreateCoreNetworkOutcome { 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, CreateCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks"); return CreateCoreNetworkOutcome(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()}}); } CreateDeviceOutcome NetworkManagerClient::CreateDevice(const CreateDeviceRequest& request) const { AWS_OPERATION_GUARD(CreateDevice); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CreateDevice", "Required field: GlobalNetworkId, is not set"); return CreateDeviceOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateDevice", {{ 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( [&]()-> CreateDeviceOutcome { 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, CreateDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/devices"); return CreateDeviceOutcome(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()}}); } CreateGlobalNetworkOutcome NetworkManagerClient::CreateGlobalNetwork(const CreateGlobalNetworkRequest& request) const { AWS_OPERATION_GUARD(CreateGlobalNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateGlobalNetwork", {{ 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( [&]()-> CreateGlobalNetworkOutcome { 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, CreateGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks"); return CreateGlobalNetworkOutcome(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()}}); } CreateLinkOutcome NetworkManagerClient::CreateLink(const CreateLinkRequest& request) const { AWS_OPERATION_GUARD(CreateLink); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CreateLink", "Required field: GlobalNetworkId, is not set"); return CreateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateLink", {{ 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( [&]()-> CreateLinkOutcome { 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, CreateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/links"); return CreateLinkOutcome(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()}}); } CreateSiteOutcome NetworkManagerClient::CreateSite(const CreateSiteRequest& request) const { AWS_OPERATION_GUARD(CreateSite); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("CreateSite", "Required field: GlobalNetworkId, is not set"); return CreateSiteOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateSite", {{ 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( [&]()-> CreateSiteOutcome { 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, CreateSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/sites"); return CreateSiteOutcome(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()}}); } CreateSiteToSiteVpnAttachmentOutcome NetworkManagerClient::CreateSiteToSiteVpnAttachment(const CreateSiteToSiteVpnAttachmentRequest& request) const { AWS_OPERATION_GUARD(CreateSiteToSiteVpnAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateSiteToSiteVpnAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateSiteToSiteVpnAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateSiteToSiteVpnAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateSiteToSiteVpnAttachment", {{ 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( [&]()-> CreateSiteToSiteVpnAttachmentOutcome { 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, CreateSiteToSiteVpnAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/site-to-site-vpn-attachments"); return CreateSiteToSiteVpnAttachmentOutcome(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()}}); } CreateTransitGatewayPeeringOutcome NetworkManagerClient::CreateTransitGatewayPeering(const CreateTransitGatewayPeeringRequest& request) const { AWS_OPERATION_GUARD(CreateTransitGatewayPeering); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateTransitGatewayPeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateTransitGatewayPeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateTransitGatewayPeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateTransitGatewayPeering", {{ 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( [&]()-> CreateTransitGatewayPeeringOutcome { 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, CreateTransitGatewayPeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-peerings"); return CreateTransitGatewayPeeringOutcome(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()}}); } CreateTransitGatewayRouteTableAttachmentOutcome NetworkManagerClient::CreateTransitGatewayRouteTableAttachment(const CreateTransitGatewayRouteTableAttachmentRequest& request) const { AWS_OPERATION_GUARD(CreateTransitGatewayRouteTableAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateTransitGatewayRouteTableAttachment", {{ 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( [&]()-> CreateTransitGatewayRouteTableAttachmentOutcome { 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, CreateTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-route-table-attachments"); return CreateTransitGatewayRouteTableAttachmentOutcome(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()}}); } CreateVpcAttachmentOutcome NetworkManagerClient::CreateVpcAttachment(const CreateVpcAttachmentRequest& request) const { AWS_OPERATION_GUARD(CreateVpcAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateVpcAttachment", {{ 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( [&]()-> CreateVpcAttachmentOutcome { 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, CreateVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/vpc-attachments"); return CreateVpcAttachmentOutcome(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()}}); } DeleteAttachmentOutcome NetworkManagerClient::DeleteAttachment(const DeleteAttachmentRequest& request) const { AWS_OPERATION_GUARD(DeleteAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteAttachment", "Required field: AttachmentId, is not set"); return DeleteAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAttachment", {{ 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( [&]()-> DeleteAttachmentOutcome { 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, DeleteAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return DeleteAttachmentOutcome(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()}}); } DeleteConnectPeerOutcome NetworkManagerClient::DeleteConnectPeer(const DeleteConnectPeerRequest& request) const { AWS_OPERATION_GUARD(DeleteConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ConnectPeerIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteConnectPeer", "Required field: ConnectPeerId, is not set"); return DeleteConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectPeerId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteConnectPeer", {{ 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( [&]()-> DeleteConnectPeerOutcome { 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, DeleteConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peers/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectPeerId()); return DeleteConnectPeerOutcome(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()}}); } DeleteConnectionOutcome NetworkManagerClient::DeleteConnection(const DeleteConnectionRequest& request) const { AWS_OPERATION_GUARD(DeleteConnection); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteConnection", "Required field: GlobalNetworkId, is not set"); return DeleteConnectionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.ConnectionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteConnection", "Required field: ConnectionId, is not set"); return DeleteConnectionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteConnection", {{ 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( [&]()-> DeleteConnectionOutcome { 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, DeleteConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connections/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectionId()); return DeleteConnectionOutcome(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()}}); } DeleteCoreNetworkOutcome NetworkManagerClient::DeleteCoreNetwork(const DeleteCoreNetworkRequest& request) const { AWS_OPERATION_GUARD(DeleteCoreNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteCoreNetwork", "Required field: CoreNetworkId, is not set"); return DeleteCoreNetworkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteCoreNetwork", {{ 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( [&]()-> DeleteCoreNetworkOutcome { 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, DeleteCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); return DeleteCoreNetworkOutcome(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()}}); } DeleteCoreNetworkPolicyVersionOutcome NetworkManagerClient::DeleteCoreNetworkPolicyVersion(const DeleteCoreNetworkPolicyVersionRequest& request) const { AWS_OPERATION_GUARD(DeleteCoreNetworkPolicyVersion); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteCoreNetworkPolicyVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteCoreNetworkPolicyVersion", "Required field: CoreNetworkId, is not set"); return DeleteCoreNetworkPolicyVersionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } if (!request.PolicyVersionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteCoreNetworkPolicyVersion", "Required field: PolicyVersionId, is not set"); return DeleteCoreNetworkPolicyVersionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyVersionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteCoreNetworkPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteCoreNetworkPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteCoreNetworkPolicyVersion", {{ 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( [&]()-> DeleteCoreNetworkPolicyVersionOutcome { 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, DeleteCoreNetworkPolicyVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-policy-versions/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyVersionId()); return DeleteCoreNetworkPolicyVersionOutcome(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()}}); } DeleteDeviceOutcome NetworkManagerClient::DeleteDevice(const DeleteDeviceRequest& request) const { AWS_OPERATION_GUARD(DeleteDevice); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteDevice", "Required field: GlobalNetworkId, is not set"); return DeleteDeviceOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.DeviceIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteDevice", "Required field: DeviceId, is not set"); return DeleteDeviceOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DeviceId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteDevice", {{ 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( [&]()-> DeleteDeviceOutcome { 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, DeleteDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/devices/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDeviceId()); return DeleteDeviceOutcome(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()}}); } DeleteGlobalNetworkOutcome NetworkManagerClient::DeleteGlobalNetwork(const DeleteGlobalNetworkRequest& request) const { AWS_OPERATION_GUARD(DeleteGlobalNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteGlobalNetwork", "Required field: GlobalNetworkId, is not set"); return DeleteGlobalNetworkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteGlobalNetwork", {{ 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( [&]()-> DeleteGlobalNetworkOutcome { 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, DeleteGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); return DeleteGlobalNetworkOutcome(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()}}); } DeleteLinkOutcome NetworkManagerClient::DeleteLink(const DeleteLinkRequest& request) const { AWS_OPERATION_GUARD(DeleteLink); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteLink", "Required field: GlobalNetworkId, is not set"); return DeleteLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.LinkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteLink", "Required field: LinkId, is not set"); return DeleteLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [LinkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteLink", {{ 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( [&]()-> DeleteLinkOutcome { 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, DeleteLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/links/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetLinkId()); return DeleteLinkOutcome(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()}}); } DeletePeeringOutcome NetworkManagerClient::DeletePeering(const DeletePeeringRequest& request) const { AWS_OPERATION_GUARD(DeletePeering); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeletePeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.PeeringIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeletePeering", "Required field: PeeringId, is not set"); return DeletePeeringOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PeeringId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeletePeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeletePeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeletePeering", {{ 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( [&]()-> DeletePeeringOutcome { 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, DeletePeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/peerings/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPeeringId()); return DeletePeeringOutcome(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()}}); } DeleteResourcePolicyOutcome NetworkManagerClient::DeleteResourcePolicy(const DeleteResourcePolicyRequest& request) const { AWS_OPERATION_GUARD(DeleteResourcePolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteResourcePolicy", "Required field: ResourceArn, is not set"); return DeleteResourcePolicyOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteResourcePolicy", {{ 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( [&]()-> DeleteResourcePolicyOutcome { 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, DeleteResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/resource-policy/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return DeleteResourcePolicyOutcome(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()}}); } DeleteSiteOutcome NetworkManagerClient::DeleteSite(const DeleteSiteRequest& request) const { AWS_OPERATION_GUARD(DeleteSite); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteSite", "Required field: GlobalNetworkId, is not set"); return DeleteSiteOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.SiteIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeleteSite", "Required field: SiteId, is not set"); return DeleteSiteOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SiteId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteSite", {{ 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( [&]()-> DeleteSiteOutcome { 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, DeleteSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/sites/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSiteId()); return DeleteSiteOutcome(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()}}); } DeregisterTransitGatewayOutcome NetworkManagerClient::DeregisterTransitGateway(const DeregisterTransitGatewayRequest& request) const { AWS_OPERATION_GUARD(DeregisterTransitGateway); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeregisterTransitGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeregisterTransitGateway", "Required field: GlobalNetworkId, is not set"); return DeregisterTransitGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.TransitGatewayArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("DeregisterTransitGateway", "Required field: TransitGatewayArn, is not set"); return DeregisterTransitGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TransitGatewayArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeregisterTransitGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeregisterTransitGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeregisterTransitGateway", {{ 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( [&]()-> DeregisterTransitGatewayOutcome { 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, DeregisterTransitGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-registrations/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTransitGatewayArn()); return DeregisterTransitGatewayOutcome(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()}}); } DescribeGlobalNetworksOutcome NetworkManagerClient::DescribeGlobalNetworks(const DescribeGlobalNetworksRequest& request) const { AWS_OPERATION_GUARD(DescribeGlobalNetworks); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DescribeGlobalNetworks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeGlobalNetworks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DescribeGlobalNetworks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeGlobalNetworks", {{ 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( [&]()-> DescribeGlobalNetworksOutcome { 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, DescribeGlobalNetworks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks"); return DescribeGlobalNetworksOutcome(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()}}); } DisassociateConnectPeerOutcome NetworkManagerClient::DisassociateConnectPeer(const DisassociateConnectPeerRequest& request) const { AWS_OPERATION_GUARD(DisassociateConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DisassociateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateConnectPeer", "Required field: GlobalNetworkId, is not set"); return DisassociateConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.ConnectPeerIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateConnectPeer", "Required field: ConnectPeerId, is not set"); return DisassociateConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectPeerId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateConnectPeer", {{ 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( [&]()-> DisassociateConnectPeerOutcome { 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, DisassociateConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peer-associations/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectPeerId()); return DisassociateConnectPeerOutcome(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()}}); } DisassociateCustomerGatewayOutcome NetworkManagerClient::DisassociateCustomerGateway(const DisassociateCustomerGatewayRequest& request) const { AWS_OPERATION_GUARD(DisassociateCustomerGateway); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DisassociateCustomerGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateCustomerGateway", "Required field: GlobalNetworkId, is not set"); return DisassociateCustomerGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.CustomerGatewayArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateCustomerGateway", "Required field: CustomerGatewayArn, is not set"); return DisassociateCustomerGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CustomerGatewayArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateCustomerGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateCustomerGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateCustomerGateway", {{ 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( [&]()-> DisassociateCustomerGatewayOutcome { 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, DisassociateCustomerGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/customer-gateway-associations/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCustomerGatewayArn()); return DisassociateCustomerGatewayOutcome(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()}}); } DisassociateLinkOutcome NetworkManagerClient::DisassociateLink(const DisassociateLinkRequest& request) const { AWS_OPERATION_GUARD(DisassociateLink); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DisassociateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateLink", "Required field: GlobalNetworkId, is not set"); return DisassociateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.DeviceIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateLink", "Required field: DeviceId, is not set"); return DisassociateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DeviceId]", false)); } if (!request.LinkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateLink", "Required field: LinkId, is not set"); return DisassociateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [LinkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateLink", {{ 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( [&]()-> DisassociateLinkOutcome { 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, DisassociateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/link-associations"); return DisassociateLinkOutcome(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()}}); } DisassociateTransitGatewayConnectPeerOutcome NetworkManagerClient::DisassociateTransitGatewayConnectPeer(const DisassociateTransitGatewayConnectPeerRequest& request) const { AWS_OPERATION_GUARD(DisassociateTransitGatewayConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DisassociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateTransitGatewayConnectPeer", "Required field: GlobalNetworkId, is not set"); return DisassociateTransitGatewayConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.TransitGatewayConnectPeerArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("DisassociateTransitGatewayConnectPeer", "Required field: TransitGatewayConnectPeerArn, is not set"); return DisassociateTransitGatewayConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TransitGatewayConnectPeerArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateTransitGatewayConnectPeer", {{ 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( [&]()-> DisassociateTransitGatewayConnectPeerOutcome { 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, DisassociateTransitGatewayConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-connect-peer-associations/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTransitGatewayConnectPeerArn()); return DisassociateTransitGatewayConnectPeerOutcome(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()}}); } ExecuteCoreNetworkChangeSetOutcome NetworkManagerClient::ExecuteCoreNetworkChangeSet(const ExecuteCoreNetworkChangeSetRequest& request) const { AWS_OPERATION_GUARD(ExecuteCoreNetworkChangeSet); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ExecuteCoreNetworkChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("ExecuteCoreNetworkChangeSet", "Required field: CoreNetworkId, is not set"); return ExecuteCoreNetworkChangeSetOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } if (!request.PolicyVersionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("ExecuteCoreNetworkChangeSet", "Required field: PolicyVersionId, is not set"); return ExecuteCoreNetworkChangeSetOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyVersionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ExecuteCoreNetworkChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ExecuteCoreNetworkChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ExecuteCoreNetworkChangeSet", {{ 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( [&]()-> ExecuteCoreNetworkChangeSetOutcome { 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, ExecuteCoreNetworkChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-change-sets/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyVersionId()); endpointResolutionOutcome.GetResult().AddPathSegments("/execute"); return ExecuteCoreNetworkChangeSetOutcome(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()}}); } GetConnectAttachmentOutcome NetworkManagerClient::GetConnectAttachment(const GetConnectAttachmentRequest& request) const { AWS_OPERATION_GUARD(GetConnectAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetConnectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetConnectAttachment", "Required field: AttachmentId, is not set"); return GetConnectAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetConnectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetConnectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetConnectAttachment", {{ 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( [&]()-> GetConnectAttachmentOutcome { 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, GetConnectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return GetConnectAttachmentOutcome(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()}}); } GetConnectPeerOutcome NetworkManagerClient::GetConnectPeer(const GetConnectPeerRequest& request) const { AWS_OPERATION_GUARD(GetConnectPeer); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ConnectPeerIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetConnectPeer", "Required field: ConnectPeerId, is not set"); return GetConnectPeerOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectPeerId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetConnectPeer, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetConnectPeer", {{ 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( [&]()-> GetConnectPeerOutcome { 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, GetConnectPeer, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peers/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectPeerId()); return GetConnectPeerOutcome(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()}}); } GetConnectPeerAssociationsOutcome NetworkManagerClient::GetConnectPeerAssociations(const GetConnectPeerAssociationsRequest& request) const { AWS_OPERATION_GUARD(GetConnectPeerAssociations); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetConnectPeerAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetConnectPeerAssociations", "Required field: GlobalNetworkId, is not set"); return GetConnectPeerAssociationsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetConnectPeerAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetConnectPeerAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetConnectPeerAssociations", {{ 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( [&]()-> GetConnectPeerAssociationsOutcome { 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, GetConnectPeerAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peer-associations"); return GetConnectPeerAssociationsOutcome(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()}}); } GetConnectionsOutcome NetworkManagerClient::GetConnections(const GetConnectionsRequest& request) const { AWS_OPERATION_GUARD(GetConnections); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetConnections, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetConnections", "Required field: GlobalNetworkId, is not set"); return GetConnectionsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetConnections, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetConnections, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetConnections", {{ 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( [&]()-> GetConnectionsOutcome { 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, GetConnections, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connections"); return GetConnectionsOutcome(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()}}); } GetCoreNetworkOutcome NetworkManagerClient::GetCoreNetwork(const GetCoreNetworkRequest& request) const { AWS_OPERATION_GUARD(GetCoreNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetwork", "Required field: CoreNetworkId, is not set"); return GetCoreNetworkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCoreNetwork", {{ 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( [&]()-> GetCoreNetworkOutcome { 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, GetCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); return GetCoreNetworkOutcome(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()}}); } GetCoreNetworkChangeEventsOutcome NetworkManagerClient::GetCoreNetworkChangeEvents(const GetCoreNetworkChangeEventsRequest& request) const { AWS_OPERATION_GUARD(GetCoreNetworkChangeEvents); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetCoreNetworkChangeEvents, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetworkChangeEvents", "Required field: CoreNetworkId, is not set"); return GetCoreNetworkChangeEventsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } if (!request.PolicyVersionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetworkChangeEvents", "Required field: PolicyVersionId, is not set"); return GetCoreNetworkChangeEventsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyVersionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCoreNetworkChangeEvents, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCoreNetworkChangeEvents, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCoreNetworkChangeEvents", {{ 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( [&]()-> GetCoreNetworkChangeEventsOutcome { 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, GetCoreNetworkChangeEvents, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-change-events/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyVersionId()); return GetCoreNetworkChangeEventsOutcome(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()}}); } GetCoreNetworkChangeSetOutcome NetworkManagerClient::GetCoreNetworkChangeSet(const GetCoreNetworkChangeSetRequest& request) const { AWS_OPERATION_GUARD(GetCoreNetworkChangeSet); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetCoreNetworkChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetworkChangeSet", "Required field: CoreNetworkId, is not set"); return GetCoreNetworkChangeSetOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } if (!request.PolicyVersionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetworkChangeSet", "Required field: PolicyVersionId, is not set"); return GetCoreNetworkChangeSetOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyVersionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCoreNetworkChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCoreNetworkChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCoreNetworkChangeSet", {{ 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( [&]()-> GetCoreNetworkChangeSetOutcome { 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, GetCoreNetworkChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-change-sets/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyVersionId()); return GetCoreNetworkChangeSetOutcome(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()}}); } GetCoreNetworkPolicyOutcome NetworkManagerClient::GetCoreNetworkPolicy(const GetCoreNetworkPolicyRequest& request) const { AWS_OPERATION_GUARD(GetCoreNetworkPolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetCoreNetworkPolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCoreNetworkPolicy", "Required field: CoreNetworkId, is not set"); return GetCoreNetworkPolicyOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCoreNetworkPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCoreNetworkPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCoreNetworkPolicy", {{ 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( [&]()-> GetCoreNetworkPolicyOutcome { 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, GetCoreNetworkPolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-policy"); return GetCoreNetworkPolicyOutcome(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()}}); } GetCustomerGatewayAssociationsOutcome NetworkManagerClient::GetCustomerGatewayAssociations(const GetCustomerGatewayAssociationsRequest& request) const { AWS_OPERATION_GUARD(GetCustomerGatewayAssociations); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetCustomerGatewayAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetCustomerGatewayAssociations", "Required field: GlobalNetworkId, is not set"); return GetCustomerGatewayAssociationsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCustomerGatewayAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCustomerGatewayAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCustomerGatewayAssociations", {{ 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( [&]()-> GetCustomerGatewayAssociationsOutcome { 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, GetCustomerGatewayAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/customer-gateway-associations"); return GetCustomerGatewayAssociationsOutcome(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()}}); } GetDevicesOutcome NetworkManagerClient::GetDevices(const GetDevicesRequest& request) const { AWS_OPERATION_GUARD(GetDevices); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetDevices, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetDevices", "Required field: GlobalNetworkId, is not set"); return GetDevicesOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetDevices, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetDevices, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetDevices", {{ 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( [&]()-> GetDevicesOutcome { 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, GetDevices, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/devices"); return GetDevicesOutcome(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()}}); } GetLinkAssociationsOutcome NetworkManagerClient::GetLinkAssociations(const GetLinkAssociationsRequest& request) const { AWS_OPERATION_GUARD(GetLinkAssociations); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetLinkAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetLinkAssociations", "Required field: GlobalNetworkId, is not set"); return GetLinkAssociationsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetLinkAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetLinkAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetLinkAssociations", {{ 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( [&]()-> GetLinkAssociationsOutcome { 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, GetLinkAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/link-associations"); return GetLinkAssociationsOutcome(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()}}); } GetLinksOutcome NetworkManagerClient::GetLinks(const GetLinksRequest& request) const { AWS_OPERATION_GUARD(GetLinks); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetLinks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetLinks", "Required field: GlobalNetworkId, is not set"); return GetLinksOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetLinks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetLinks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetLinks", {{ 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( [&]()-> GetLinksOutcome { 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, GetLinks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/links"); return GetLinksOutcome(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()}}); } GetNetworkResourceCountsOutcome NetworkManagerClient::GetNetworkResourceCounts(const GetNetworkResourceCountsRequest& request) const { AWS_OPERATION_GUARD(GetNetworkResourceCounts); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetNetworkResourceCounts, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetNetworkResourceCounts", "Required field: GlobalNetworkId, is not set"); return GetNetworkResourceCountsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetNetworkResourceCounts, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetNetworkResourceCounts, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetNetworkResourceCounts", {{ 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( [&]()-> GetNetworkResourceCountsOutcome { 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, GetNetworkResourceCounts, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-resource-count"); return GetNetworkResourceCountsOutcome(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()}}); } GetNetworkResourceRelationshipsOutcome NetworkManagerClient::GetNetworkResourceRelationships(const GetNetworkResourceRelationshipsRequest& request) const { AWS_OPERATION_GUARD(GetNetworkResourceRelationships); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetNetworkResourceRelationships, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetNetworkResourceRelationships", "Required field: GlobalNetworkId, is not set"); return GetNetworkResourceRelationshipsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetNetworkResourceRelationships, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetNetworkResourceRelationships, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetNetworkResourceRelationships", {{ 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( [&]()-> GetNetworkResourceRelationshipsOutcome { 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, GetNetworkResourceRelationships, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-resource-relationships"); return GetNetworkResourceRelationshipsOutcome(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()}}); } GetNetworkResourcesOutcome NetworkManagerClient::GetNetworkResources(const GetNetworkResourcesRequest& request) const { AWS_OPERATION_GUARD(GetNetworkResources); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetNetworkResources, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetNetworkResources", "Required field: GlobalNetworkId, is not set"); return GetNetworkResourcesOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetNetworkResources, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetNetworkResources, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetNetworkResources", {{ 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( [&]()-> GetNetworkResourcesOutcome { 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, GetNetworkResources, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-resources"); return GetNetworkResourcesOutcome(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()}}); } GetNetworkRoutesOutcome NetworkManagerClient::GetNetworkRoutes(const GetNetworkRoutesRequest& request) const { AWS_OPERATION_GUARD(GetNetworkRoutes); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetNetworkRoutes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetNetworkRoutes", "Required field: GlobalNetworkId, is not set"); return GetNetworkRoutesOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetNetworkRoutes, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetNetworkRoutes, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetNetworkRoutes", {{ 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( [&]()-> GetNetworkRoutesOutcome { 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, GetNetworkRoutes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-routes"); return GetNetworkRoutesOutcome(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()}}); } GetNetworkTelemetryOutcome NetworkManagerClient::GetNetworkTelemetry(const GetNetworkTelemetryRequest& request) const { AWS_OPERATION_GUARD(GetNetworkTelemetry); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetNetworkTelemetry, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetNetworkTelemetry", "Required field: GlobalNetworkId, is not set"); return GetNetworkTelemetryOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetNetworkTelemetry, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetNetworkTelemetry, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetNetworkTelemetry", {{ 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( [&]()-> GetNetworkTelemetryOutcome { 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, GetNetworkTelemetry, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-telemetry"); return GetNetworkTelemetryOutcome(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()}}); } GetResourcePolicyOutcome NetworkManagerClient::GetResourcePolicy(const GetResourcePolicyRequest& request) const { AWS_OPERATION_GUARD(GetResourcePolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetResourcePolicy", "Required field: ResourceArn, is not set"); return GetResourcePolicyOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetResourcePolicy", {{ 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( [&]()-> GetResourcePolicyOutcome { 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, GetResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/resource-policy/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return GetResourcePolicyOutcome(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()}}); } GetRouteAnalysisOutcome NetworkManagerClient::GetRouteAnalysis(const GetRouteAnalysisRequest& request) const { AWS_OPERATION_GUARD(GetRouteAnalysis); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetRouteAnalysis, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetRouteAnalysis", "Required field: GlobalNetworkId, is not set"); return GetRouteAnalysisOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.RouteAnalysisIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetRouteAnalysis", "Required field: RouteAnalysisId, is not set"); return GetRouteAnalysisOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RouteAnalysisId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetRouteAnalysis, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetRouteAnalysis, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetRouteAnalysis", {{ 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( [&]()-> GetRouteAnalysisOutcome { 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, GetRouteAnalysis, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/route-analyses/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetRouteAnalysisId()); return GetRouteAnalysisOutcome(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()}}); } GetSiteToSiteVpnAttachmentOutcome NetworkManagerClient::GetSiteToSiteVpnAttachment(const GetSiteToSiteVpnAttachmentRequest& request) const { AWS_OPERATION_GUARD(GetSiteToSiteVpnAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetSiteToSiteVpnAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetSiteToSiteVpnAttachment", "Required field: AttachmentId, is not set"); return GetSiteToSiteVpnAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetSiteToSiteVpnAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetSiteToSiteVpnAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetSiteToSiteVpnAttachment", {{ 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( [&]()-> GetSiteToSiteVpnAttachmentOutcome { 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, GetSiteToSiteVpnAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/site-to-site-vpn-attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return GetSiteToSiteVpnAttachmentOutcome(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()}}); } GetSitesOutcome NetworkManagerClient::GetSites(const GetSitesRequest& request) const { AWS_OPERATION_GUARD(GetSites); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetSites, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetSites", "Required field: GlobalNetworkId, is not set"); return GetSitesOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetSites, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetSites, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetSites", {{ 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( [&]()-> GetSitesOutcome { 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, GetSites, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/sites"); return GetSitesOutcome(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()}}); } GetTransitGatewayConnectPeerAssociationsOutcome NetworkManagerClient::GetTransitGatewayConnectPeerAssociations(const GetTransitGatewayConnectPeerAssociationsRequest& request) const { AWS_OPERATION_GUARD(GetTransitGatewayConnectPeerAssociations); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetTransitGatewayConnectPeerAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetTransitGatewayConnectPeerAssociations", "Required field: GlobalNetworkId, is not set"); return GetTransitGatewayConnectPeerAssociationsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetTransitGatewayConnectPeerAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetTransitGatewayConnectPeerAssociations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetTransitGatewayConnectPeerAssociations", {{ 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( [&]()-> GetTransitGatewayConnectPeerAssociationsOutcome { 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, GetTransitGatewayConnectPeerAssociations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-connect-peer-associations"); return GetTransitGatewayConnectPeerAssociationsOutcome(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()}}); } GetTransitGatewayPeeringOutcome NetworkManagerClient::GetTransitGatewayPeering(const GetTransitGatewayPeeringRequest& request) const { AWS_OPERATION_GUARD(GetTransitGatewayPeering); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetTransitGatewayPeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.PeeringIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetTransitGatewayPeering", "Required field: PeeringId, is not set"); return GetTransitGatewayPeeringOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PeeringId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetTransitGatewayPeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetTransitGatewayPeering, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetTransitGatewayPeering", {{ 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( [&]()-> GetTransitGatewayPeeringOutcome { 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, GetTransitGatewayPeering, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-peerings/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPeeringId()); return GetTransitGatewayPeeringOutcome(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()}}); } GetTransitGatewayRegistrationsOutcome NetworkManagerClient::GetTransitGatewayRegistrations(const GetTransitGatewayRegistrationsRequest& request) const { AWS_OPERATION_GUARD(GetTransitGatewayRegistrations); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetTransitGatewayRegistrations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetTransitGatewayRegistrations", "Required field: GlobalNetworkId, is not set"); return GetTransitGatewayRegistrationsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetTransitGatewayRegistrations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetTransitGatewayRegistrations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetTransitGatewayRegistrations", {{ 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( [&]()-> GetTransitGatewayRegistrationsOutcome { 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, GetTransitGatewayRegistrations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-registrations"); return GetTransitGatewayRegistrationsOutcome(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()}}); } GetTransitGatewayRouteTableAttachmentOutcome NetworkManagerClient::GetTransitGatewayRouteTableAttachment(const GetTransitGatewayRouteTableAttachmentRequest& request) const { AWS_OPERATION_GUARD(GetTransitGatewayRouteTableAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetTransitGatewayRouteTableAttachment", "Required field: AttachmentId, is not set"); return GetTransitGatewayRouteTableAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetTransitGatewayRouteTableAttachment", {{ 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( [&]()-> GetTransitGatewayRouteTableAttachmentOutcome { 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, GetTransitGatewayRouteTableAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-route-table-attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return GetTransitGatewayRouteTableAttachmentOutcome(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()}}); } GetVpcAttachmentOutcome NetworkManagerClient::GetVpcAttachment(const GetVpcAttachmentRequest& request) const { AWS_OPERATION_GUARD(GetVpcAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("GetVpcAttachment", "Required field: AttachmentId, is not set"); return GetVpcAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetVpcAttachment", {{ 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( [&]()-> GetVpcAttachmentOutcome { 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, GetVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/vpc-attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return GetVpcAttachmentOutcome(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()}}); } ListAttachmentsOutcome NetworkManagerClient::ListAttachments(const ListAttachmentsRequest& request) const { AWS_OPERATION_GUARD(ListAttachments); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListAttachments, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAttachments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAttachments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAttachments", {{ 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( [&]()-> ListAttachmentsOutcome { 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, ListAttachments, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/attachments"); return ListAttachmentsOutcome(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()}}); } ListConnectPeersOutcome NetworkManagerClient::ListConnectPeers(const ListConnectPeersRequest& request) const { AWS_OPERATION_GUARD(ListConnectPeers); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListConnectPeers, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListConnectPeers, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListConnectPeers, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListConnectPeers", {{ 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( [&]()-> ListConnectPeersOutcome { 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, ListConnectPeers, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/connect-peers"); return ListConnectPeersOutcome(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()}}); } ListCoreNetworkPolicyVersionsOutcome NetworkManagerClient::ListCoreNetworkPolicyVersions(const ListCoreNetworkPolicyVersionsRequest& request) const { AWS_OPERATION_GUARD(ListCoreNetworkPolicyVersions); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListCoreNetworkPolicyVersions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("ListCoreNetworkPolicyVersions", "Required field: CoreNetworkId, is not set"); return ListCoreNetworkPolicyVersionsOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListCoreNetworkPolicyVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListCoreNetworkPolicyVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListCoreNetworkPolicyVersions", {{ 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( [&]()-> ListCoreNetworkPolicyVersionsOutcome { 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, ListCoreNetworkPolicyVersions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-policy-versions"); return ListCoreNetworkPolicyVersionsOutcome(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()}}); } ListCoreNetworksOutcome NetworkManagerClient::ListCoreNetworks(const ListCoreNetworksRequest& request) const { AWS_OPERATION_GUARD(ListCoreNetworks); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListCoreNetworks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListCoreNetworks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListCoreNetworks, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListCoreNetworks", {{ 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( [&]()-> ListCoreNetworksOutcome { 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, ListCoreNetworks, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks"); return ListCoreNetworksOutcome(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()}}); } ListOrganizationServiceAccessStatusOutcome NetworkManagerClient::ListOrganizationServiceAccessStatus(const ListOrganizationServiceAccessStatusRequest& request) const { AWS_OPERATION_GUARD(ListOrganizationServiceAccessStatus); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListOrganizationServiceAccessStatus, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListOrganizationServiceAccessStatus, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListOrganizationServiceAccessStatus, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListOrganizationServiceAccessStatus", {{ 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( [&]()-> ListOrganizationServiceAccessStatusOutcome { 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, ListOrganizationServiceAccessStatus, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/organizations/service-access"); return ListOrganizationServiceAccessStatusOutcome(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()}}); } ListPeeringsOutcome NetworkManagerClient::ListPeerings(const ListPeeringsRequest& request) const { AWS_OPERATION_GUARD(ListPeerings); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListPeerings, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListPeerings, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListPeerings, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListPeerings", {{ 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( [&]()-> ListPeeringsOutcome { 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, ListPeerings, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/peerings"); return ListPeeringsOutcome(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 NetworkManagerClient::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(NetworkManagerErrors::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()}}); } PutCoreNetworkPolicyOutcome NetworkManagerClient::PutCoreNetworkPolicy(const PutCoreNetworkPolicyRequest& request) const { AWS_OPERATION_GUARD(PutCoreNetworkPolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutCoreNetworkPolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("PutCoreNetworkPolicy", "Required field: CoreNetworkId, is not set"); return PutCoreNetworkPolicyOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutCoreNetworkPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutCoreNetworkPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutCoreNetworkPolicy", {{ 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( [&]()-> PutCoreNetworkPolicyOutcome { 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, PutCoreNetworkPolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-policy"); return PutCoreNetworkPolicyOutcome(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()}}); } PutResourcePolicyOutcome NetworkManagerClient::PutResourcePolicy(const PutResourcePolicyRequest& request) const { AWS_OPERATION_GUARD(PutResourcePolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("PutResourcePolicy", "Required field: ResourceArn, is not set"); return PutResourcePolicyOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutResourcePolicy", {{ 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( [&]()-> PutResourcePolicyOutcome { 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, PutResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/resource-policy/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); return PutResourcePolicyOutcome(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()}}); } RegisterTransitGatewayOutcome NetworkManagerClient::RegisterTransitGateway(const RegisterTransitGatewayRequest& request) const { AWS_OPERATION_GUARD(RegisterTransitGateway); AWS_OPERATION_CHECK_PTR(m_endpointProvider, RegisterTransitGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("RegisterTransitGateway", "Required field: GlobalNetworkId, is not set"); return RegisterTransitGatewayOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RegisterTransitGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RegisterTransitGateway, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RegisterTransitGateway", {{ 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( [&]()-> RegisterTransitGatewayOutcome { 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, RegisterTransitGateway, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/transit-gateway-registrations"); return RegisterTransitGatewayOutcome(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()}}); } RejectAttachmentOutcome NetworkManagerClient::RejectAttachment(const RejectAttachmentRequest& request) const { AWS_OPERATION_GUARD(RejectAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, RejectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("RejectAttachment", "Required field: AttachmentId, is not set"); return RejectAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RejectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RejectAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RejectAttachment", {{ 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( [&]()-> RejectAttachmentOutcome { 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, RejectAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); endpointResolutionOutcome.GetResult().AddPathSegments("/reject"); return RejectAttachmentOutcome(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()}}); } RestoreCoreNetworkPolicyVersionOutcome NetworkManagerClient::RestoreCoreNetworkPolicyVersion(const RestoreCoreNetworkPolicyVersionRequest& request) const { AWS_OPERATION_GUARD(RestoreCoreNetworkPolicyVersion); AWS_OPERATION_CHECK_PTR(m_endpointProvider, RestoreCoreNetworkPolicyVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("RestoreCoreNetworkPolicyVersion", "Required field: CoreNetworkId, is not set"); return RestoreCoreNetworkPolicyVersionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } if (!request.PolicyVersionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("RestoreCoreNetworkPolicyVersion", "Required field: PolicyVersionId, is not set"); return RestoreCoreNetworkPolicyVersionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyVersionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RestoreCoreNetworkPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RestoreCoreNetworkPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RestoreCoreNetworkPolicyVersion", {{ 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( [&]()-> RestoreCoreNetworkPolicyVersionOutcome { 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, RestoreCoreNetworkPolicyVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-network-policy-versions/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyVersionId()); endpointResolutionOutcome.GetResult().AddPathSegments("/restore"); return RestoreCoreNetworkPolicyVersionOutcome(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()}}); } StartOrganizationServiceAccessUpdateOutcome NetworkManagerClient::StartOrganizationServiceAccessUpdate(const StartOrganizationServiceAccessUpdateRequest& request) const { AWS_OPERATION_GUARD(StartOrganizationServiceAccessUpdate); AWS_OPERATION_CHECK_PTR(m_endpointProvider, StartOrganizationServiceAccessUpdate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartOrganizationServiceAccessUpdate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartOrganizationServiceAccessUpdate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartOrganizationServiceAccessUpdate", {{ 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( [&]()-> StartOrganizationServiceAccessUpdateOutcome { 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, StartOrganizationServiceAccessUpdate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/organizations/service-access"); return StartOrganizationServiceAccessUpdateOutcome(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()}}); } StartRouteAnalysisOutcome NetworkManagerClient::StartRouteAnalysis(const StartRouteAnalysisRequest& request) const { AWS_OPERATION_GUARD(StartRouteAnalysis); AWS_OPERATION_CHECK_PTR(m_endpointProvider, StartRouteAnalysis, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("StartRouteAnalysis", "Required field: GlobalNetworkId, is not set"); return StartRouteAnalysisOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartRouteAnalysis, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartRouteAnalysis, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartRouteAnalysis", {{ 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( [&]()-> StartRouteAnalysisOutcome { 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, StartRouteAnalysis, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/route-analyses"); return StartRouteAnalysisOutcome(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 NetworkManagerClient::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(NetworkManagerErrors::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 NetworkManagerClient::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(NetworkManagerErrors::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(NetworkManagerErrors::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()}}); } UpdateConnectionOutcome NetworkManagerClient::UpdateConnection(const UpdateConnectionRequest& request) const { AWS_OPERATION_GUARD(UpdateConnection); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateConnection", "Required field: GlobalNetworkId, is not set"); return UpdateConnectionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.ConnectionIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateConnection", "Required field: ConnectionId, is not set"); return UpdateConnectionOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateConnection, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateConnection", {{ 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( [&]()-> UpdateConnectionOutcome { 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, UpdateConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/connections/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectionId()); return UpdateConnectionOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateCoreNetworkOutcome NetworkManagerClient::UpdateCoreNetwork(const UpdateCoreNetworkRequest& request) const { AWS_OPERATION_GUARD(UpdateCoreNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.CoreNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateCoreNetwork", "Required field: CoreNetworkId, is not set"); return UpdateCoreNetworkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CoreNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateCoreNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateCoreNetwork", {{ 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( [&]()-> UpdateCoreNetworkOutcome { 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, UpdateCoreNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/core-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCoreNetworkId()); return UpdateCoreNetworkOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateDeviceOutcome NetworkManagerClient::UpdateDevice(const UpdateDeviceRequest& request) const { AWS_OPERATION_GUARD(UpdateDevice); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateDevice", "Required field: GlobalNetworkId, is not set"); return UpdateDeviceOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.DeviceIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateDevice", "Required field: DeviceId, is not set"); return UpdateDeviceOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DeviceId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateDevice, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateDevice", {{ 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( [&]()-> UpdateDeviceOutcome { 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, UpdateDevice, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/devices/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDeviceId()); return UpdateDeviceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateGlobalNetworkOutcome NetworkManagerClient::UpdateGlobalNetwork(const UpdateGlobalNetworkRequest& request) const { AWS_OPERATION_GUARD(UpdateGlobalNetwork); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateGlobalNetwork", "Required field: GlobalNetworkId, is not set"); return UpdateGlobalNetworkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateGlobalNetwork, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateGlobalNetwork", {{ 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( [&]()-> UpdateGlobalNetworkOutcome { 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, UpdateGlobalNetwork, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); return UpdateGlobalNetworkOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateLinkOutcome NetworkManagerClient::UpdateLink(const UpdateLinkRequest& request) const { AWS_OPERATION_GUARD(UpdateLink); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateLink", "Required field: GlobalNetworkId, is not set"); return UpdateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.LinkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateLink", "Required field: LinkId, is not set"); return UpdateLinkOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [LinkId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateLink, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateLink", {{ 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( [&]()-> UpdateLinkOutcome { 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, UpdateLink, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/links/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetLinkId()); return UpdateLinkOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateNetworkResourceMetadataOutcome NetworkManagerClient::UpdateNetworkResourceMetadata(const UpdateNetworkResourceMetadataRequest& request) const { AWS_OPERATION_GUARD(UpdateNetworkResourceMetadata); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateNetworkResourceMetadata, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateNetworkResourceMetadata", "Required field: GlobalNetworkId, is not set"); return UpdateNetworkResourceMetadataOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.ResourceArnHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateNetworkResourceMetadata", "Required field: ResourceArn, is not set"); return UpdateNetworkResourceMetadataOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateNetworkResourceMetadata, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateNetworkResourceMetadata, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateNetworkResourceMetadata", {{ 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( [&]()-> UpdateNetworkResourceMetadataOutcome { 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, UpdateNetworkResourceMetadata, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/network-resources/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); endpointResolutionOutcome.GetResult().AddPathSegments("/metadata"); return UpdateNetworkResourceMetadataOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateSiteOutcome NetworkManagerClient::UpdateSite(const UpdateSiteRequest& request) const { AWS_OPERATION_GUARD(UpdateSite); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.GlobalNetworkIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateSite", "Required field: GlobalNetworkId, is not set"); return UpdateSiteOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GlobalNetworkId]", false)); } if (!request.SiteIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateSite", "Required field: SiteId, is not set"); return UpdateSiteOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SiteId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateSite, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateSite", {{ 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( [&]()-> UpdateSiteOutcome { 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, UpdateSite, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/global-networks/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGlobalNetworkId()); endpointResolutionOutcome.GetResult().AddPathSegments("/sites/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSiteId()); return UpdateSiteOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } UpdateVpcAttachmentOutcome NetworkManagerClient::UpdateVpcAttachment(const UpdateVpcAttachmentRequest& request) const { AWS_OPERATION_GUARD(UpdateVpcAttachment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); if (!request.AttachmentIdHasBeenSet()) { AWS_LOGSTREAM_ERROR("UpdateVpcAttachment", "Required field: AttachmentId, is not set"); return UpdateVpcAttachmentOutcome(Aws::Client::AWSError(NetworkManagerErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AttachmentId]", false)); } AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateVpcAttachment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateVpcAttachment", {{ 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( [&]()-> UpdateVpcAttachmentOutcome { 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, UpdateVpcAttachment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); endpointResolutionOutcome.GetResult().AddPathSegments("/vpc-attachments/"); endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAttachmentId()); return UpdateVpcAttachmentOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); }