software.amazon.awssdk.services.networkmanager.DefaultNetworkManagerClient Maven / Gradle / Ivy
Show all versions of networkmanager Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.networkmanager;
import java.util.Collections;
import java.util.List;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.networkmanager.internal.NetworkManagerServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.networkmanager.model.AcceptAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.AcceptAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.AccessDeniedException;
import software.amazon.awssdk.services.networkmanager.model.AssociateConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.AssociateConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.AssociateCustomerGatewayRequest;
import software.amazon.awssdk.services.networkmanager.model.AssociateCustomerGatewayResponse;
import software.amazon.awssdk.services.networkmanager.model.AssociateLinkRequest;
import software.amazon.awssdk.services.networkmanager.model.AssociateLinkResponse;
import software.amazon.awssdk.services.networkmanager.model.AssociateTransitGatewayConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.AssociateTransitGatewayConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.ConflictException;
import software.amazon.awssdk.services.networkmanager.model.CoreNetworkPolicyException;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectionRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateConnectionResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateCoreNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateCoreNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateDeviceRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateDeviceResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateGlobalNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateGlobalNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateLinkRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateLinkResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateSiteRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateSiteResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateSiteToSiteVpnAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateSiteToSiteVpnAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateTransitGatewayPeeringRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateTransitGatewayPeeringResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateTransitGatewayRouteTableAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateTransitGatewayRouteTableAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.CreateVpcAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.CreateVpcAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteConnectionRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteConnectionResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteCoreNetworkPolicyVersionRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteCoreNetworkPolicyVersionResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteCoreNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteCoreNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteDeviceRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteDeviceResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteGlobalNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteGlobalNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteLinkRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteLinkResponse;
import software.amazon.awssdk.services.networkmanager.model.DeletePeeringRequest;
import software.amazon.awssdk.services.networkmanager.model.DeletePeeringResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteResourcePolicyRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteResourcePolicyResponse;
import software.amazon.awssdk.services.networkmanager.model.DeleteSiteRequest;
import software.amazon.awssdk.services.networkmanager.model.DeleteSiteResponse;
import software.amazon.awssdk.services.networkmanager.model.DeregisterTransitGatewayRequest;
import software.amazon.awssdk.services.networkmanager.model.DeregisterTransitGatewayResponse;
import software.amazon.awssdk.services.networkmanager.model.DescribeGlobalNetworksRequest;
import software.amazon.awssdk.services.networkmanager.model.DescribeGlobalNetworksResponse;
import software.amazon.awssdk.services.networkmanager.model.DisassociateConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.DisassociateConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.DisassociateCustomerGatewayRequest;
import software.amazon.awssdk.services.networkmanager.model.DisassociateCustomerGatewayResponse;
import software.amazon.awssdk.services.networkmanager.model.DisassociateLinkRequest;
import software.amazon.awssdk.services.networkmanager.model.DisassociateLinkResponse;
import software.amazon.awssdk.services.networkmanager.model.DisassociateTransitGatewayConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.DisassociateTransitGatewayConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.ExecuteCoreNetworkChangeSetRequest;
import software.amazon.awssdk.services.networkmanager.model.ExecuteCoreNetworkChangeSetResponse;
import software.amazon.awssdk.services.networkmanager.model.GetConnectAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.GetConnectAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.GetConnectPeerAssociationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetConnectPeerAssociationsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetConnectPeerRequest;
import software.amazon.awssdk.services.networkmanager.model.GetConnectPeerResponse;
import software.amazon.awssdk.services.networkmanager.model.GetConnectionsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetConnectionsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkChangeEventsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkChangeEventsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkChangeSetRequest;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkChangeSetResponse;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkPolicyRequest;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkPolicyResponse;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.GetCoreNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.GetCustomerGatewayAssociationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetCustomerGatewayAssociationsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetDevicesRequest;
import software.amazon.awssdk.services.networkmanager.model.GetDevicesResponse;
import software.amazon.awssdk.services.networkmanager.model.GetLinkAssociationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetLinkAssociationsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetLinksRequest;
import software.amazon.awssdk.services.networkmanager.model.GetLinksResponse;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourceCountsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourceCountsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourceRelationshipsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourceRelationshipsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourcesRequest;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkResourcesResponse;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkRoutesRequest;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkRoutesResponse;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkTelemetryRequest;
import software.amazon.awssdk.services.networkmanager.model.GetNetworkTelemetryResponse;
import software.amazon.awssdk.services.networkmanager.model.GetResourcePolicyRequest;
import software.amazon.awssdk.services.networkmanager.model.GetResourcePolicyResponse;
import software.amazon.awssdk.services.networkmanager.model.GetRouteAnalysisRequest;
import software.amazon.awssdk.services.networkmanager.model.GetRouteAnalysisResponse;
import software.amazon.awssdk.services.networkmanager.model.GetSiteToSiteVpnAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.GetSiteToSiteVpnAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.GetSitesRequest;
import software.amazon.awssdk.services.networkmanager.model.GetSitesResponse;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayConnectPeerAssociationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayConnectPeerAssociationsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayPeeringRequest;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayPeeringResponse;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsResponse;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRouteTableAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRouteTableAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.GetVpcAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.GetVpcAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.InternalServerException;
import software.amazon.awssdk.services.networkmanager.model.ListAttachmentsRequest;
import software.amazon.awssdk.services.networkmanager.model.ListAttachmentsResponse;
import software.amazon.awssdk.services.networkmanager.model.ListConnectPeersRequest;
import software.amazon.awssdk.services.networkmanager.model.ListConnectPeersResponse;
import software.amazon.awssdk.services.networkmanager.model.ListCoreNetworkPolicyVersionsRequest;
import software.amazon.awssdk.services.networkmanager.model.ListCoreNetworkPolicyVersionsResponse;
import software.amazon.awssdk.services.networkmanager.model.ListCoreNetworksRequest;
import software.amazon.awssdk.services.networkmanager.model.ListCoreNetworksResponse;
import software.amazon.awssdk.services.networkmanager.model.ListOrganizationServiceAccessStatusRequest;
import software.amazon.awssdk.services.networkmanager.model.ListOrganizationServiceAccessStatusResponse;
import software.amazon.awssdk.services.networkmanager.model.ListPeeringsRequest;
import software.amazon.awssdk.services.networkmanager.model.ListPeeringsResponse;
import software.amazon.awssdk.services.networkmanager.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.networkmanager.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.networkmanager.model.NetworkManagerException;
import software.amazon.awssdk.services.networkmanager.model.PutCoreNetworkPolicyRequest;
import software.amazon.awssdk.services.networkmanager.model.PutCoreNetworkPolicyResponse;
import software.amazon.awssdk.services.networkmanager.model.PutResourcePolicyRequest;
import software.amazon.awssdk.services.networkmanager.model.PutResourcePolicyResponse;
import software.amazon.awssdk.services.networkmanager.model.RegisterTransitGatewayRequest;
import software.amazon.awssdk.services.networkmanager.model.RegisterTransitGatewayResponse;
import software.amazon.awssdk.services.networkmanager.model.RejectAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.RejectAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.ResourceNotFoundException;
import software.amazon.awssdk.services.networkmanager.model.RestoreCoreNetworkPolicyVersionRequest;
import software.amazon.awssdk.services.networkmanager.model.RestoreCoreNetworkPolicyVersionResponse;
import software.amazon.awssdk.services.networkmanager.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.networkmanager.model.StartOrganizationServiceAccessUpdateRequest;
import software.amazon.awssdk.services.networkmanager.model.StartOrganizationServiceAccessUpdateResponse;
import software.amazon.awssdk.services.networkmanager.model.StartRouteAnalysisRequest;
import software.amazon.awssdk.services.networkmanager.model.StartRouteAnalysisResponse;
import software.amazon.awssdk.services.networkmanager.model.TagResourceRequest;
import software.amazon.awssdk.services.networkmanager.model.TagResourceResponse;
import software.amazon.awssdk.services.networkmanager.model.ThrottlingException;
import software.amazon.awssdk.services.networkmanager.model.UntagResourceRequest;
import software.amazon.awssdk.services.networkmanager.model.UntagResourceResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateConnectionRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateConnectionResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateCoreNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateCoreNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateDeviceRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateDeviceResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateGlobalNetworkRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateGlobalNetworkResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateLinkRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateLinkResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateNetworkResourceMetadataRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateNetworkResourceMetadataResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateSiteRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateSiteResponse;
import software.amazon.awssdk.services.networkmanager.model.UpdateVpcAttachmentRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateVpcAttachmentResponse;
import software.amazon.awssdk.services.networkmanager.model.ValidationException;
import software.amazon.awssdk.services.networkmanager.transform.AcceptAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.AssociateConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.AssociateCustomerGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.AssociateLinkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.AssociateTransitGatewayConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateConnectAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateConnectionRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateCoreNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateDeviceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateGlobalNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateLinkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateSiteRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateSiteToSiteVpnAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateTransitGatewayPeeringRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateTransitGatewayRouteTableAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.CreateVpcAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteConnectionRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteCoreNetworkPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteCoreNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteDeviceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteGlobalNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteLinkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeletePeeringRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteSiteRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeregisterTransitGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DescribeGlobalNetworksRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DisassociateConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DisassociateCustomerGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DisassociateLinkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DisassociateTransitGatewayConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ExecuteCoreNetworkChangeSetRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetConnectAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetConnectPeerAssociationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetConnectPeerRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetConnectionsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetCoreNetworkChangeEventsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetCoreNetworkChangeSetRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetCoreNetworkPolicyRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetCoreNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetCustomerGatewayAssociationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetDevicesRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetLinkAssociationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetLinksRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetNetworkResourceCountsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetNetworkResourceRelationshipsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetNetworkResourcesRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetNetworkRoutesRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetNetworkTelemetryRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetRouteAnalysisRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetSiteToSiteVpnAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetSitesRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetTransitGatewayConnectPeerAssociationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetTransitGatewayPeeringRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetTransitGatewayRegistrationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetTransitGatewayRouteTableAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetVpcAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListAttachmentsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListConnectPeersRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListCoreNetworkPolicyVersionsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListCoreNetworksRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListOrganizationServiceAccessStatusRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListPeeringsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.PutCoreNetworkPolicyRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.PutResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.RegisterTransitGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.RejectAttachmentRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.RestoreCoreNetworkPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.StartOrganizationServiceAccessUpdateRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.StartRouteAnalysisRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateConnectionRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateCoreNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateDeviceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateGlobalNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateLinkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateNetworkResourceMetadataRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateSiteRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UpdateVpcAttachmentRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link NetworkManagerClient}.
*
* @see NetworkManagerClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultNetworkManagerClient implements NetworkManagerClient {
private static final Logger log = Logger.loggerFor(DefaultNetworkManagerClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.REST_JSON).build();
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultNetworkManagerClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Accepts a core network attachment request.
*
*
* Once the attachment request is accepted by a core network owner, the attachment is created and connected to a
* core network.
*
*
* @param acceptAttachmentRequest
* @return Result of the AcceptAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.AcceptAttachment
* @see AWS API Documentation
*/
@Override
public AcceptAttachmentResponse acceptAttachment(AcceptAttachmentRequest acceptAttachmentRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AcceptAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(acceptAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, acceptAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptAttachment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AcceptAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(acceptAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AcceptAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates a core network Connect peer with a device and optionally, with a link.
*
*
* If you specify a link, it must be associated with the specified device. You can only associate core network
* Connect peers that have been created on a core network Connect attachment on a core network.
*
*
* @param associateConnectPeerRequest
* @return Result of the AssociateConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.AssociateConnectPeer
* @see AWS API Documentation
*/
@Override
public AssociateConnectPeerResponse associateConnectPeer(AssociateConnectPeerRequest associateConnectPeerRequest)
throws ValidationException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException,
ConflictException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateConnectPeerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateConnectPeer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AssociateConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates a customer gateway with a device and optionally, with a link. If you specify a link, it must be
* associated with the specified device.
*
*
* You can only associate customer gateways that are connected to a VPN attachment on a transit gateway or core
* network registered in your global network. When you register a transit gateway or core network, customer gateways
* that are connected to the transit gateway are automatically included in the global network. To list customer
* gateways that are connected to a transit gateway, use the DescribeVpnConnections EC2 API and filter by transit-gateway-id
.
*
*
* You cannot associate a customer gateway with more than one device and link.
*
*
* @param associateCustomerGatewayRequest
* @return Result of the AssociateCustomerGateway operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.AssociateCustomerGateway
* @see AWS API Documentation
*/
@Override
public AssociateCustomerGatewayResponse associateCustomerGateway(
AssociateCustomerGatewayRequest associateCustomerGatewayRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateCustomerGatewayResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateCustomerGatewayRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateCustomerGatewayRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateCustomerGateway");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateCustomerGateway").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateCustomerGatewayRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateCustomerGatewayRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates a link to a device. A device can be associated to multiple links and a link can be associated to
* multiple devices. The device and link must be in the same global network and the same site.
*
*
* @param associateLinkRequest
* @return Result of the AssociateLink operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.AssociateLink
* @see AWS
* API Documentation
*/
@Override
public AssociateLinkResponse associateLink(AssociateLinkRequest associateLinkRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AssociateLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateLinkRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AssociateLink").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateLinkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates a transit gateway Connect peer with a device, and optionally, with a link. If you specify a link, it
* must be associated with the specified device.
*
*
* You can only associate transit gateway Connect peers that have been created on a transit gateway that's
* registered in your global network.
*
*
* You cannot associate a transit gateway Connect peer with more than one device and link.
*
*
* @param associateTransitGatewayConnectPeerRequest
* @return Result of the AssociateTransitGatewayConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.AssociateTransitGatewayConnectPeer
* @see AWS API Documentation
*/
@Override
public AssociateTransitGatewayConnectPeerResponse associateTransitGatewayConnectPeer(
AssociateTransitGatewayConnectPeerRequest associateTransitGatewayConnectPeerRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateTransitGatewayConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateTransitGatewayConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
associateTransitGatewayConnectPeerRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateTransitGatewayConnectPeer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateTransitGatewayConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateTransitGatewayConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateTransitGatewayConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a core network Connect attachment from a specified core network attachment.
*
*
* A core network Connect attachment is a GRE-based tunnel attachment that you can use to establish a connection
* between a core network and an appliance. A core network Connect attachment uses an existing VPC attachment as the
* underlying transport mechanism.
*
*
* @param createConnectAttachmentRequest
* @return Result of the CreateConnectAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateConnectAttachment
* @see AWS API Documentation
*/
@Override
public CreateConnectAttachmentResponse createConnectAttachment(CreateConnectAttachmentRequest createConnectAttachmentRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateConnectAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConnectAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConnectAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConnectAttachment");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConnectAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConnectAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConnectAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a core network Connect peer for a specified core network connect attachment between a core network and an
* appliance. The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).
*
*
* @param createConnectPeerRequest
* @return Result of the CreateConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateConnectPeer
* @see AWS API Documentation
*/
@Override
public CreateConnectPeerResponse createConnectPeer(CreateConnectPeerRequest createConnectPeerRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConnectPeerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConnectPeer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a
* third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an
* on-premises network.
*
*
* @param createConnectionRequest
* @return Result of the CreateConnection operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateConnection
* @see AWS API Documentation
*/
@Override
public CreateConnectionResponse createConnection(CreateConnectionRequest createConnectionRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateConnectionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConnectionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConnectionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConnection");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateConnection").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConnectionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConnectionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a core network as part of your global network, and optionally, with a core network policy.
*
*
* @param createCoreNetworkRequest
* @return Result of the CreateCoreNetwork operation returned by the service.
* @throws CoreNetworkPolicyException
* Describes a core network policy exception.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateCoreNetwork
* @see AWS API Documentation
*/
@Override
public CreateCoreNetworkResponse createCoreNetwork(CreateCoreNetworkRequest createCoreNetworkRequest)
throws CoreNetworkPolicyException, ValidationException, ServiceQuotaExceededException, AccessDeniedException,
ConflictException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateCoreNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createCoreNetworkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createCoreNetworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCoreNetwork");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateCoreNetwork").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createCoreNetworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateCoreNetworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new device in a global network. If you specify both a site ID and a location, the location of the site
* is used for visualization in the Network Manager console.
*
*
* @param createDeviceRequest
* @return Result of the CreateDevice operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateDevice
* @see AWS
* API Documentation
*/
@Override
public CreateDeviceResponse createDevice(CreateDeviceRequest createDeviceRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateDeviceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDeviceRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDeviceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDevice");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateDevice").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createDeviceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDeviceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new, empty global network.
*
*
* @param createGlobalNetworkRequest
* @return Result of the CreateGlobalNetwork operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateGlobalNetwork
* @see AWS API Documentation
*/
@Override
public CreateGlobalNetworkResponse createGlobalNetwork(CreateGlobalNetworkRequest createGlobalNetworkRequest)
throws ValidationException, ServiceQuotaExceededException, AccessDeniedException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateGlobalNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createGlobalNetworkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createGlobalNetworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateGlobalNetwork");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateGlobalNetwork").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createGlobalNetworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateGlobalNetworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new link for a specified site.
*
*
* @param createLinkRequest
* @return Result of the CreateLink operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateLink
* @see AWS API
* Documentation
*/
@Override
public CreateLinkResponse createLink(CreateLinkRequest createLinkRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createLinkRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateLink").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createLinkRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new site in a global network.
*
*
* @param createSiteRequest
* @return Result of the CreateSite operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws ServiceQuotaExceededException
* A service limit was exceeded.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateSite
* @see AWS API
* Documentation
*/
@Override
public CreateSiteResponse createSite(CreateSiteRequest createSiteRequest) throws ValidationException,
ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ConflictException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateSiteResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSiteRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createSiteRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSite");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSite").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createSiteRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSiteRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an Amazon Web Services site-to-site VPN attachment on an edge location of a core network.
*
*
* @param createSiteToSiteVpnAttachmentRequest
* @return Result of the CreateSiteToSiteVpnAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateSiteToSiteVpnAttachment
* @see AWS API Documentation
*/
@Override
public CreateSiteToSiteVpnAttachmentResponse createSiteToSiteVpnAttachment(
CreateSiteToSiteVpnAttachmentRequest createSiteToSiteVpnAttachmentRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateSiteToSiteVpnAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSiteToSiteVpnAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createSiteToSiteVpnAttachmentRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSiteToSiteVpnAttachment");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateSiteToSiteVpnAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createSiteToSiteVpnAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSiteToSiteVpnAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a transit gateway peering connection.
*
*
* @param createTransitGatewayPeeringRequest
* @return Result of the CreateTransitGatewayPeering operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateTransitGatewayPeering
* @see AWS API Documentation
*/
@Override
public CreateTransitGatewayPeeringResponse createTransitGatewayPeering(
CreateTransitGatewayPeeringRequest createTransitGatewayPeeringRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateTransitGatewayPeeringResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTransitGatewayPeeringRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTransitGatewayPeeringRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTransitGatewayPeering");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateTransitGatewayPeering").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createTransitGatewayPeeringRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTransitGatewayPeeringRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a transit gateway route table attachment.
*
*
* @param createTransitGatewayRouteTableAttachmentRequest
* @return Result of the CreateTransitGatewayRouteTableAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateTransitGatewayRouteTableAttachment
* @see AWS API Documentation
*/
@Override
public CreateTransitGatewayRouteTableAttachmentResponse createTransitGatewayRouteTableAttachment(
CreateTransitGatewayRouteTableAttachmentRequest createTransitGatewayRouteTableAttachmentRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CreateTransitGatewayRouteTableAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
createTransitGatewayRouteTableAttachmentRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createTransitGatewayRouteTableAttachmentRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTransitGatewayRouteTableAttachment");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateTransitGatewayRouteTableAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(createTransitGatewayRouteTableAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTransitGatewayRouteTableAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a VPC attachment on an edge location of a core network.
*
*
* @param createVpcAttachmentRequest
* @return Result of the CreateVpcAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.CreateVpcAttachment
* @see AWS API Documentation
*/
@Override
public CreateVpcAttachmentResponse createVpcAttachment(CreateVpcAttachmentRequest createVpcAttachmentRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateVpcAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createVpcAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createVpcAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVpcAttachment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateVpcAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createVpcAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateVpcAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an attachment. Supports all attachment types.
*
*
* @param deleteAttachmentRequest
* @return Result of the DeleteAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteAttachment
* @see AWS API Documentation
*/
@Override
public DeleteAttachmentResponse deleteAttachment(DeleteAttachmentRequest deleteAttachmentRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAttachment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a Connect peer.
*
*
* @param deleteConnectPeerRequest
* @return Result of the DeleteConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteConnectPeer
* @see AWS API Documentation
*/
@Override
public DeleteConnectPeerResponse deleteConnectPeer(DeleteConnectPeerRequest deleteConnectPeerRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConnectPeerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConnectPeer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified connection in your global network.
*
*
* @param deleteConnectionRequest
* @return Result of the DeleteConnection operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteConnection
* @see AWS API Documentation
*/
@Override
public DeleteConnectionResponse deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteConnectionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConnectionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConnectionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConnection");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteConnection").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteConnectionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConnectionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a core network along with all core network policies. This can only be done if there are no attachments on
* a core network.
*
*
* @param deleteCoreNetworkRequest
* @return Result of the DeleteCoreNetwork operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteCoreNetwork
* @see AWS API Documentation
*/
@Override
public DeleteCoreNetworkResponse deleteCoreNetwork(DeleteCoreNetworkRequest deleteCoreNetworkRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteCoreNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCoreNetworkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCoreNetworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCoreNetwork");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCoreNetwork").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteCoreNetworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCoreNetworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a policy version from a core network. You can't delete the current LIVE policy.
*
*
* @param deleteCoreNetworkPolicyVersionRequest
* @return Result of the DeleteCoreNetworkPolicyVersion operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteCoreNetworkPolicyVersion
* @see AWS API Documentation
*/
@Override
public DeleteCoreNetworkPolicyVersionResponse deleteCoreNetworkPolicyVersion(
DeleteCoreNetworkPolicyVersionRequest deleteCoreNetworkPolicyVersionRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, ConflictException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteCoreNetworkPolicyVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCoreNetworkPolicyVersionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteCoreNetworkPolicyVersionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCoreNetworkPolicyVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCoreNetworkPolicyVersion").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteCoreNetworkPolicyVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCoreNetworkPolicyVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an existing device. You must first disassociate the device from any links and customer gateways.
*
*
* @param deleteDeviceRequest
* @return Result of the DeleteDevice operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteDevice
* @see AWS
* API Documentation
*/
@Override
public DeleteDeviceResponse deleteDevice(DeleteDeviceRequest deleteDeviceRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteDeviceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDeviceRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDeviceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDevice");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteDevice").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteDeviceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDeviceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an existing global network. You must first delete all global network objects (devices, links, and sites),
* deregister all transit gateways, and delete any core networks.
*
*
* @param deleteGlobalNetworkRequest
* @return Result of the DeleteGlobalNetwork operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteGlobalNetwork
* @see AWS API Documentation
*/
@Override
public DeleteGlobalNetworkResponse deleteGlobalNetwork(DeleteGlobalNetworkRequest deleteGlobalNetworkRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteGlobalNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGlobalNetworkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGlobalNetworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGlobalNetwork");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteGlobalNetwork").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteGlobalNetworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteGlobalNetworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an existing link. You must first disassociate the link from any devices and customer gateways.
*
*
* @param deleteLinkRequest
* @return Result of the DeleteLink operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteLink
* @see AWS API
* Documentation
*/
@Override
public DeleteLinkResponse deleteLink(DeleteLinkRequest deleteLinkRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteLinkRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteLink").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteLinkRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an existing peering connection.
*
*
* @param deletePeeringRequest
* @return Result of the DeletePeering operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeletePeering
* @see AWS
* API Documentation
*/
@Override
public DeletePeeringResponse deletePeering(DeletePeeringRequest deletePeeringRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeletePeeringResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePeeringRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePeeringRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePeering");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeletePeering").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deletePeeringRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeletePeeringRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a resource policy for the specified resource. This revokes the access of the principals specified in the
* resource policy.
*
*
* @param deleteResourcePolicyRequest
* @return Result of the DeleteResourcePolicy operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteResourcePolicy
* @see AWS API Documentation
*/
@Override
public DeleteResourcePolicyResponse deleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest)
throws ValidationException, AccessDeniedException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteResourcePolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteResourcePolicyRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteResourcePolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteResourcePolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteResourcePolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteResourcePolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteResourcePolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an existing site. The site cannot be associated with any device or link.
*
*
* @param deleteSiteRequest
* @return Result of the DeleteSite operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeleteSite
* @see AWS API
* Documentation
*/
@Override
public DeleteSiteResponse deleteSite(DeleteSiteRequest deleteSiteRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteSiteResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSiteRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSiteRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSite");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSite").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteSiteRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteSiteRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deregisters a transit gateway from your global network. This action does not delete your transit gateway, or
* modify any of its attachments. This action removes any customer gateway associations.
*
*
* @param deregisterTransitGatewayRequest
* @return Result of the DeregisterTransitGateway operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DeregisterTransitGateway
* @see AWS API Documentation
*/
@Override
public DeregisterTransitGatewayResponse deregisterTransitGateway(
DeregisterTransitGatewayRequest deregisterTransitGatewayRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeregisterTransitGatewayResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deregisterTransitGatewayRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deregisterTransitGatewayRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeregisterTransitGateway");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeregisterTransitGateway").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deregisterTransitGatewayRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeregisterTransitGatewayRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes one or more global networks. By default, all global networks are described. To describe the objects in
* your global network, you must use the appropriate Get*
action. For example, to list the transit
* gateways in your global network, use GetTransitGatewayRegistrations.
*
*
* @param describeGlobalNetworksRequest
* @return Result of the DescribeGlobalNetworks operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DescribeGlobalNetworks
* @see AWS API Documentation
*/
@Override
public DescribeGlobalNetworksResponse describeGlobalNetworks(DescribeGlobalNetworksRequest describeGlobalNetworksRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeGlobalNetworksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeGlobalNetworksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeGlobalNetworksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeGlobalNetworks");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeGlobalNetworks").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeGlobalNetworksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeGlobalNetworksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates a core network Connect peer from a device and a link.
*
*
* @param disassociateConnectPeerRequest
* @return Result of the DisassociateConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DisassociateConnectPeer
* @see AWS API Documentation
*/
@Override
public DisassociateConnectPeerResponse disassociateConnectPeer(DisassociateConnectPeerRequest disassociateConnectPeerRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateConnectPeerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateConnectPeer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates a customer gateway from a device and a link.
*
*
* @param disassociateCustomerGatewayRequest
* @return Result of the DisassociateCustomerGateway operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DisassociateCustomerGateway
* @see AWS API Documentation
*/
@Override
public DisassociateCustomerGatewayResponse disassociateCustomerGateway(
DisassociateCustomerGatewayRequest disassociateCustomerGatewayRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateCustomerGatewayResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateCustomerGatewayRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateCustomerGatewayRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateCustomerGateway");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateCustomerGateway").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateCustomerGatewayRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateCustomerGatewayRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates an existing device from a link. You must first disassociate any customer gateways that are
* associated with the link.
*
*
* @param disassociateLinkRequest
* @return Result of the DisassociateLink operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DisassociateLink
* @see AWS API Documentation
*/
@Override
public DisassociateLinkResponse disassociateLink(DisassociateLinkRequest disassociateLinkRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DisassociateLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateLinkRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DisassociateLink").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateLinkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates a transit gateway Connect peer from a device and link.
*
*
* @param disassociateTransitGatewayConnectPeerRequest
* @return Result of the DisassociateTransitGatewayConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.DisassociateTransitGatewayConnectPeer
* @see AWS API Documentation
*/
@Override
public DisassociateTransitGatewayConnectPeerResponse disassociateTransitGatewayConnectPeer(
DisassociateTransitGatewayConnectPeerRequest disassociateTransitGatewayConnectPeerRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DisassociateTransitGatewayConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateTransitGatewayConnectPeerRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
disassociateTransitGatewayConnectPeerRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateTransitGatewayConnectPeer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateTransitGatewayConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(disassociateTransitGatewayConnectPeerRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateTransitGatewayConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Executes a change set on your core network. Deploys changes globally based on the policy submitted..
*
*
* @param executeCoreNetworkChangeSetRequest
* @return Result of the ExecuteCoreNetworkChangeSet operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.ExecuteCoreNetworkChangeSet
* @see AWS API Documentation
*/
@Override
public ExecuteCoreNetworkChangeSetResponse executeCoreNetworkChangeSet(
ExecuteCoreNetworkChangeSetRequest executeCoreNetworkChangeSetRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, ConflictException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ExecuteCoreNetworkChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(executeCoreNetworkChangeSetRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, executeCoreNetworkChangeSetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ExecuteCoreNetworkChangeSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ExecuteCoreNetworkChangeSet").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(executeCoreNetworkChangeSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ExecuteCoreNetworkChangeSetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a core network Connect attachment.
*
*
* @param getConnectAttachmentRequest
* @return Result of the GetConnectAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetConnectAttachment
* @see AWS API Documentation
*/
@Override
public GetConnectAttachmentResponse getConnectAttachment(GetConnectAttachmentRequest getConnectAttachmentRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetConnectAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConnectAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getConnectAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConnectAttachment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetConnectAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getConnectAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetConnectAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a core network Connect peer.
*
*
* @param getConnectPeerRequest
* @return Result of the GetConnectPeer operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetConnectPeer
* @see AWS
* API Documentation
*/
@Override
public GetConnectPeerResponse getConnectPeer(GetConnectPeerRequest getConnectPeerRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetConnectPeerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConnectPeerRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getConnectPeerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConnectPeer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetConnectPeer").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getConnectPeerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetConnectPeerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a core network Connect peer associations.
*
*
* @param getConnectPeerAssociationsRequest
* @return Result of the GetConnectPeerAssociations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetConnectPeerAssociations
* @see AWS API Documentation
*/
@Override
public GetConnectPeerAssociationsResponse getConnectPeerAssociations(
GetConnectPeerAssociationsRequest getConnectPeerAssociationsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetConnectPeerAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConnectPeerAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getConnectPeerAssociationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConnectPeerAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetConnectPeerAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getConnectPeerAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetConnectPeerAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about one or more of your connections in a global network.
*
*
* @param getConnectionsRequest
* @return Result of the GetConnections operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetConnections
* @see AWS
* API Documentation
*/
@Override
public GetConnectionsResponse getConnections(GetConnectionsRequest getConnectionsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetConnectionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConnectionsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getConnectionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConnections");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetConnections").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getConnectionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetConnectionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about the LIVE policy for a core network.
*
*
* @param getCoreNetworkRequest
* @return Result of the GetCoreNetwork operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetCoreNetwork
* @see AWS
* API Documentation
*/
@Override
public GetCoreNetworkResponse getCoreNetwork(GetCoreNetworkRequest getCoreNetworkRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetCoreNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCoreNetworkRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCoreNetworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCoreNetwork");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCoreNetwork").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCoreNetworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCoreNetworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a core network change event.
*
*
* @param getCoreNetworkChangeEventsRequest
* @return Result of the GetCoreNetworkChangeEvents operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetCoreNetworkChangeEvents
* @see AWS API Documentation
*/
@Override
public GetCoreNetworkChangeEventsResponse getCoreNetworkChangeEvents(
GetCoreNetworkChangeEventsRequest getCoreNetworkChangeEventsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCoreNetworkChangeEventsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCoreNetworkChangeEventsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCoreNetworkChangeEventsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCoreNetworkChangeEvents");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCoreNetworkChangeEvents").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCoreNetworkChangeEventsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCoreNetworkChangeEventsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a change set between the LIVE core network policy and a submitted policy.
*
*
* @param getCoreNetworkChangeSetRequest
* @return Result of the GetCoreNetworkChangeSet operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetCoreNetworkChangeSet
* @see AWS API Documentation
*/
@Override
public GetCoreNetworkChangeSetResponse getCoreNetworkChangeSet(GetCoreNetworkChangeSetRequest getCoreNetworkChangeSetRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCoreNetworkChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCoreNetworkChangeSetRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCoreNetworkChangeSetRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCoreNetworkChangeSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCoreNetworkChangeSet").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCoreNetworkChangeSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCoreNetworkChangeSetRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns details about a core network policy. You can get details about your current live policy or any previous
* policy version.
*
*
* @param getCoreNetworkPolicyRequest
* @return Result of the GetCoreNetworkPolicy operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetCoreNetworkPolicy
* @see AWS API Documentation
*/
@Override
public GetCoreNetworkPolicyResponse getCoreNetworkPolicy(GetCoreNetworkPolicyRequest getCoreNetworkPolicyRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCoreNetworkPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCoreNetworkPolicyRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCoreNetworkPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCoreNetworkPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetCoreNetworkPolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCoreNetworkPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCoreNetworkPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the association information for customer gateways that are associated with devices and links in your global
* network.
*
*
* @param getCustomerGatewayAssociationsRequest
* @return Result of the GetCustomerGatewayAssociations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetCustomerGatewayAssociations
* @see AWS API Documentation
*/
@Override
public GetCustomerGatewayAssociationsResponse getCustomerGatewayAssociations(
GetCustomerGatewayAssociationsRequest getCustomerGatewayAssociationsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCustomerGatewayAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCustomerGatewayAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCustomerGatewayAssociationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCustomerGatewayAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCustomerGatewayAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getCustomerGatewayAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCustomerGatewayAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about one or more of your devices in a global network.
*
*
* @param getDevicesRequest
* @return Result of the GetDevices operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetDevices
* @see AWS API
* Documentation
*/
@Override
public GetDevicesResponse getDevices(GetDevicesRequest getDevicesRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetDevicesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDevicesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDevicesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDevices");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDevices").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getDevicesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDevicesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the link associations for a device or a link. Either the device ID or the link ID must be specified.
*
*
* @param getLinkAssociationsRequest
* @return Result of the GetLinkAssociations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetLinkAssociations
* @see AWS API Documentation
*/
@Override
public GetLinkAssociationsResponse getLinkAssociations(GetLinkAssociationsRequest getLinkAssociationsRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetLinkAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getLinkAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getLinkAssociationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLinkAssociations");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetLinkAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getLinkAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetLinkAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about one or more links in a specified global network.
*
*
* If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type
* and provider in the same request.
*
*
* @param getLinksRequest
* @return Result of the GetLinks operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetLinks
* @see AWS API
* Documentation
*/
@Override
public GetLinksResponse getLinks(GetLinksRequest getLinksRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetLinksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getLinksRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getLinksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLinks");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetLinks").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getLinksRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetLinksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the count of network resources, by resource type, for the specified global network.
*
*
* @param getNetworkResourceCountsRequest
* @return Result of the GetNetworkResourceCounts operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetNetworkResourceCounts
* @see AWS API Documentation
*/
@Override
public GetNetworkResourceCountsResponse getNetworkResourceCounts(
GetNetworkResourceCountsRequest getNetworkResourceCountsRequest) throws ValidationException, AccessDeniedException,
ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetNetworkResourceCountsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkResourceCountsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkResourceCountsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkResourceCounts");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetNetworkResourceCounts").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkResourceCountsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkResourceCountsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the network resource relationships for the specified global network.
*
*
* @param getNetworkResourceRelationshipsRequest
* @return Result of the GetNetworkResourceRelationships operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetNetworkResourceRelationships
* @see AWS API Documentation
*/
@Override
public GetNetworkResourceRelationshipsResponse getNetworkResourceRelationships(
GetNetworkResourceRelationshipsRequest getNetworkResourceRelationshipsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetNetworkResourceRelationshipsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkResourceRelationshipsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getNetworkResourceRelationshipsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkResourceRelationships");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetNetworkResourceRelationships").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkResourceRelationshipsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkResourceRelationshipsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the network resources for the specified global network.
*
*
* The results include information from the corresponding Describe call for the resource, minus any sensitive
* information such as pre-shared keys.
*
*
* @param getNetworkResourcesRequest
* @return Result of the GetNetworkResources operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetNetworkResources
* @see AWS API Documentation
*/
@Override
public GetNetworkResourcesResponse getNetworkResources(GetNetworkResourcesRequest getNetworkResourcesRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetNetworkResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkResourcesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkResourcesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkResources");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetNetworkResources").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkResourcesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkResourcesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the network routes of the specified global network.
*
*
* @param getNetworkRoutesRequest
* @return Result of the GetNetworkRoutes operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetNetworkRoutes
* @see AWS API Documentation
*/
@Override
public GetNetworkRoutesResponse getNetworkRoutes(GetNetworkRoutesRequest getNetworkRoutesRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetNetworkRoutesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkRoutesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkRoutesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkRoutes");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetNetworkRoutes").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkRoutesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkRoutesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the network telemetry of the specified global network.
*
*
* @param getNetworkTelemetryRequest
* @return Result of the GetNetworkTelemetry operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetNetworkTelemetry
* @see AWS API Documentation
*/
@Override
public GetNetworkTelemetryResponse getNetworkTelemetry(GetNetworkTelemetryRequest getNetworkTelemetryRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetNetworkTelemetryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkTelemetryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkTelemetryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkTelemetry");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetNetworkTelemetry").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkTelemetryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkTelemetryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a resource policy.
*
*
* @param getResourcePolicyRequest
* @return Result of the GetResourcePolicy operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetResourcePolicy
* @see AWS API Documentation
*/
@Override
public GetResourcePolicyResponse getResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest)
throws ValidationException, AccessDeniedException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetResourcePolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getResourcePolicyRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getResourcePolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetResourcePolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetResourcePolicy").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getResourcePolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetResourcePolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about the specified route analysis.
*
*
* @param getRouteAnalysisRequest
* @return Result of the GetRouteAnalysis operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetRouteAnalysis
* @see AWS API Documentation
*/
@Override
public GetRouteAnalysisResponse getRouteAnalysis(GetRouteAnalysisRequest getRouteAnalysisRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetRouteAnalysisResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRouteAnalysisRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getRouteAnalysisRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRouteAnalysis");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetRouteAnalysis").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getRouteAnalysisRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetRouteAnalysisRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a site-to-site VPN attachment.
*
*
* @param getSiteToSiteVpnAttachmentRequest
* @return Result of the GetSiteToSiteVpnAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetSiteToSiteVpnAttachment
* @see AWS API Documentation
*/
@Override
public GetSiteToSiteVpnAttachmentResponse getSiteToSiteVpnAttachment(
GetSiteToSiteVpnAttachmentRequest getSiteToSiteVpnAttachmentRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetSiteToSiteVpnAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSiteToSiteVpnAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSiteToSiteVpnAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSiteToSiteVpnAttachment");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetSiteToSiteVpnAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getSiteToSiteVpnAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSiteToSiteVpnAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about one or more of your sites in a global network.
*
*
* @param getSitesRequest
* @return Result of the GetSites operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetSites
* @see AWS API
* Documentation
*/
@Override
public GetSitesResponse getSites(GetSitesRequest getSitesRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetSitesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSitesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSitesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSites");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetSites").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getSitesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSitesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about one or more of your transit gateway Connect peer associations in a global network.
*
*
* @param getTransitGatewayConnectPeerAssociationsRequest
* @return Result of the GetTransitGatewayConnectPeerAssociations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ConflictException
* There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent
* state.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetTransitGatewayConnectPeerAssociations
* @see AWS API Documentation
*/
@Override
public GetTransitGatewayConnectPeerAssociationsResponse getTransitGatewayConnectPeerAssociations(
GetTransitGatewayConnectPeerAssociationsRequest getTransitGatewayConnectPeerAssociationsRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetTransitGatewayConnectPeerAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
getTransitGatewayConnectPeerAssociationsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getTransitGatewayConnectPeerAssociationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTransitGatewayConnectPeerAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTransitGatewayConnectPeerAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(getTransitGatewayConnectPeerAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTransitGatewayConnectPeerAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a transit gateway peer.
*
*
* @param getTransitGatewayPeeringRequest
* @return Result of the GetTransitGatewayPeering operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetTransitGatewayPeering
* @see AWS API Documentation
*/
@Override
public GetTransitGatewayPeeringResponse getTransitGatewayPeering(
GetTransitGatewayPeeringRequest getTransitGatewayPeeringRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetTransitGatewayPeeringResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTransitGatewayPeeringRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTransitGatewayPeeringRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTransitGatewayPeering");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTransitGatewayPeering").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getTransitGatewayPeeringRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTransitGatewayPeeringRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about the transit gateway registrations in a specified global network.
*
*
* @param getTransitGatewayRegistrationsRequest
* @return Result of the GetTransitGatewayRegistrations operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetTransitGatewayRegistrations
* @see AWS API Documentation
*/
@Override
public GetTransitGatewayRegistrationsResponse getTransitGatewayRegistrations(
GetTransitGatewayRegistrationsRequest getTransitGatewayRegistrationsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetTransitGatewayRegistrationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTransitGatewayRegistrationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getTransitGatewayRegistrationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTransitGatewayRegistrations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTransitGatewayRegistrations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getTransitGatewayRegistrationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTransitGatewayRegistrationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a transit gateway route table attachment.
*
*
* @param getTransitGatewayRouteTableAttachmentRequest
* @return Result of the GetTransitGatewayRouteTableAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetTransitGatewayRouteTableAttachment
* @see AWS API Documentation
*/
@Override
public GetTransitGatewayRouteTableAttachmentResponse getTransitGatewayRouteTableAttachment(
GetTransitGatewayRouteTableAttachmentRequest getTransitGatewayRouteTableAttachmentRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetTransitGatewayRouteTableAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTransitGatewayRouteTableAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getTransitGatewayRouteTableAttachmentRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTransitGatewayRouteTableAttachment");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTransitGatewayRouteTableAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration)
.withInput(getTransitGatewayRouteTableAttachmentRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTransitGatewayRouteTableAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a VPC attachment.
*
*
* @param getVpcAttachmentRequest
* @return Result of the GetVpcAttachment operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The specified resource could not be found.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.GetVpcAttachment
* @see AWS API Documentation
*/
@Override
public GetVpcAttachmentResponse getVpcAttachment(GetVpcAttachmentRequest getVpcAttachmentRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetVpcAttachmentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getVpcAttachmentRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getVpcAttachmentRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetVpcAttachment");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetVpcAttachment").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getVpcAttachmentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetVpcAttachmentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of core network attachments.
*
*
* @param listAttachmentsRequest
* @return Result of the ListAttachments operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.ListAttachments
* @see AWS API Documentation
*/
@Override
public ListAttachmentsResponse listAttachments(ListAttachmentsRequest listAttachmentsRequest) throws ValidationException,
AccessDeniedException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListAttachmentsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAttachmentsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachmentsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "NetworkManager");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachments");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListAttachments").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAttachmentsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAttachmentsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of core network Connect peers.
*
*
* @param listConnectPeersRequest
* @return Result of the ListConnectPeers operation returned by the service.
* @throws ValidationException
* The input fails to satisfy the constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request has failed due to an internal error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws NetworkManagerException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample NetworkManagerClient.ListConnectPeers
* @see AWS API Documentation
*/
@Override
public ListConnectPeersResponse listConnectPeers(ListConnectPeersRequest listConnectPeersRequest) throws ValidationException,
AccessDeniedException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListConnectPeersResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listConnectPeersRequest,
this.clientConfiguration);
List