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.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
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.util.VersionInfo;
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.model.AccessDeniedException;
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.ConflictException;
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.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.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.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.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.GetSitesRequest;
import software.amazon.awssdk.services.networkmanager.model.GetSitesResponse;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsRequest;
import software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsResponse;
import software.amazon.awssdk.services.networkmanager.model.InternalServerException;
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.NetworkManagerRequest;
import software.amazon.awssdk.services.networkmanager.model.RegisterTransitGatewayRequest;
import software.amazon.awssdk.services.networkmanager.model.RegisterTransitGatewayResponse;
import software.amazon.awssdk.services.networkmanager.model.ResourceNotFoundException;
import software.amazon.awssdk.services.networkmanager.model.ServiceQuotaExceededException;
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.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.UpdateSiteRequest;
import software.amazon.awssdk.services.networkmanager.model.UpdateSiteResponse;
import software.amazon.awssdk.services.networkmanager.model.ValidationException;
import software.amazon.awssdk.services.networkmanager.paginators.DescribeGlobalNetworksIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetCustomerGatewayAssociationsIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetDevicesIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetLinkAssociationsIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetLinksIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetSitesIterable;
import software.amazon.awssdk.services.networkmanager.paginators.GetTransitGatewayRegistrationsIterable;
import software.amazon.awssdk.services.networkmanager.transform.AssociateCustomerGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.AssociateLinkRequestMarshaller;
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.DeleteDeviceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteGlobalNetworkRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DeleteLinkRequestMarshaller;
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.DisassociateCustomerGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.DisassociateLinkRequestMarshaller;
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.GetSitesRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.GetTransitGatewayRegistrationsRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.RegisterTransitGatewayRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.networkmanager.transform.UntagResourceRequestMarshaller;
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.UpdateSiteRequestMarshaller;
/**
* Internal implementation of {@link NetworkManagerClient}.
*
* @see NetworkManagerClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultNetworkManagerClient implements NetworkManagerClient {
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();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* 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. The transit
* gateway must be registered in your global network. When you register a transit gateway, 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);
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateCustomerGateway").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(associateCustomerGatewayRequest)
.withMarshaller(new AssociateCustomerGatewayRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AssociateLink").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(associateLinkRequest)
.withMarshaller(new AssociateLinkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateDevice").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createDeviceRequest)
.withMarshaller(new CreateDeviceRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateGlobalNetwork").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createGlobalNetworkRequest)
.withMarshaller(new CreateGlobalNetworkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateLink").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createLinkRequest)
.withMarshaller(new CreateLinkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSite").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createSiteRequest)
.withMarshaller(new CreateSiteRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteDevice").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteDeviceRequest)
.withMarshaller(new DeleteDeviceRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes an existing global network. You must first delete all global network objects (devices, links, and sites)
* and deregister all transit gateways.
*
*
* @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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteGlobalNetwork").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteGlobalNetworkRequest)
.withMarshaller(new DeleteGlobalNetworkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteLink").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteLinkRequest)
.withMarshaller(new DeleteLinkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSite").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteSiteRequest)
.withMarshaller(new DeleteSiteRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeregisterTransitGateway").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deregisterTransitGatewayRequest)
.withMarshaller(new DeregisterTransitGatewayRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeGlobalNetworks").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeGlobalNetworksRequest)
.withMarshaller(new DescribeGlobalNetworksRequestMarshaller(protocolFactory)));
}
/**
*
* 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.
*
*
*
* This is a variant of
* {@link #describeGlobalNetworks(software.amazon.awssdk.services.networkmanager.model.DescribeGlobalNetworksRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.DescribeGlobalNetworksIterable responses = client.describeGlobalNetworksPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.DescribeGlobalNetworksIterable responses = client
* .describeGlobalNetworksPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.DescribeGlobalNetworksResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.DescribeGlobalNetworksIterable responses = client.describeGlobalNetworksPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeGlobalNetworks(software.amazon.awssdk.services.networkmanager.model.DescribeGlobalNetworksRequest)}
* operation.
*
*
* @param describeGlobalNetworksRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 DescribeGlobalNetworksIterable describeGlobalNetworksPaginator(
DescribeGlobalNetworksRequest describeGlobalNetworksRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
return new DescribeGlobalNetworksIterable(this, applyPaginatorUserAgent(describeGlobalNetworksRequest));
}
/**
*
* 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);
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateCustomerGateway").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(disassociateCustomerGatewayRequest)
.withMarshaller(new DisassociateCustomerGatewayRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DisassociateLink").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(disassociateLinkRequest)
.withMarshaller(new DisassociateLinkRequestMarshaller(protocolFactory)));
}
/**
*
* 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);
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCustomerGatewayAssociations").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getCustomerGatewayAssociationsRequest)
.withMarshaller(new GetCustomerGatewayAssociationsRequestMarshaller(protocolFactory)));
}
/**
*
* Gets the association information for customer gateways that are associated with devices and links in your global
* network.
*
*
*
* This is a variant of
* {@link #getCustomerGatewayAssociations(software.amazon.awssdk.services.networkmanager.model.GetCustomerGatewayAssociationsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetCustomerGatewayAssociationsIterable responses = client.getCustomerGatewayAssociationsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetCustomerGatewayAssociationsIterable responses = client
* .getCustomerGatewayAssociationsPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetCustomerGatewayAssociationsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetCustomerGatewayAssociationsIterable responses = client.getCustomerGatewayAssociationsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getCustomerGatewayAssociations(software.amazon.awssdk.services.networkmanager.model.GetCustomerGatewayAssociationsRequest)}
* operation.
*
*
* @param getCustomerGatewayAssociationsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetCustomerGatewayAssociationsIterable getCustomerGatewayAssociationsPaginator(
GetCustomerGatewayAssociationsRequest getCustomerGatewayAssociationsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
return new GetCustomerGatewayAssociationsIterable(this, applyPaginatorUserAgent(getCustomerGatewayAssociationsRequest));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDevices").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getDevicesRequest)
.withMarshaller(new GetDevicesRequestMarshaller(protocolFactory)));
}
/**
*
* Gets information about one or more of your devices in a global network.
*
*
*
* This is a variant of {@link #getDevices(software.amazon.awssdk.services.networkmanager.model.GetDevicesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetDevicesIterable responses = client.getDevicesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetDevicesIterable responses = client.getDevicesPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetDevicesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetDevicesIterable responses = client.getDevicesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getDevices(software.amazon.awssdk.services.networkmanager.model.GetDevicesRequest)} operation.
*
*
* @param getDevicesRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetDevicesIterable getDevicesPaginator(GetDevicesRequest getDevicesRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
return new GetDevicesIterable(this, applyPaginatorUserAgent(getDevicesRequest));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetLinkAssociations").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getLinkAssociationsRequest)
.withMarshaller(new GetLinkAssociationsRequestMarshaller(protocolFactory)));
}
/**
*
* Gets the link associations for a device or a link. Either the device ID or the link ID must be specified.
*
*
*
* This is a variant of
* {@link #getLinkAssociations(software.amazon.awssdk.services.networkmanager.model.GetLinkAssociationsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinkAssociationsIterable responses = client.getLinkAssociationsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinkAssociationsIterable responses = client
* .getLinkAssociationsPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetLinkAssociationsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinkAssociationsIterable responses = client.getLinkAssociationsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getLinkAssociations(software.amazon.awssdk.services.networkmanager.model.GetLinkAssociationsRequest)}
* operation.
*
*
* @param getLinkAssociationsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetLinkAssociationsIterable getLinkAssociationsPaginator(GetLinkAssociationsRequest getLinkAssociationsRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
return new GetLinkAssociationsIterable(this, applyPaginatorUserAgent(getLinkAssociationsRequest));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams().withOperationName("GetLinks")
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler).withInput(getLinksRequest)
.withMarshaller(new GetLinksRequestMarshaller(protocolFactory)));
}
/**
*
* 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.
*
*
*
* This is a variant of {@link #getLinks(software.amazon.awssdk.services.networkmanager.model.GetLinksRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinksIterable responses = client.getLinksPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinksIterable responses = client.getLinksPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetLinksResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetLinksIterable responses = client.getLinksPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getLinks(software.amazon.awssdk.services.networkmanager.model.GetLinksRequest)} operation.
*
*
* @param getLinksRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetLinksIterable getLinksPaginator(GetLinksRequest getLinksRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
return new GetLinksIterable(this, applyPaginatorUserAgent(getLinksRequest));
}
/**
*
* 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);
return clientHandler.execute(new ClientExecutionParams().withOperationName("GetSites")
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler).withInput(getSitesRequest)
.withMarshaller(new GetSitesRequestMarshaller(protocolFactory)));
}
/**
*
* Gets information about one or more of your sites in a global network.
*
*
*
* This is a variant of {@link #getSites(software.amazon.awssdk.services.networkmanager.model.GetSitesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetSitesIterable responses = client.getSitesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetSitesIterable responses = client.getSitesPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetSitesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetSitesIterable responses = client.getSitesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getSites(software.amazon.awssdk.services.networkmanager.model.GetSitesRequest)} operation.
*
*
* @param getSitesRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetSitesIterable getSitesPaginator(GetSitesRequest getSitesRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException,
NetworkManagerException {
return new GetSitesIterable(this, applyPaginatorUserAgent(getSitesRequest));
}
/**
*
* 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);
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTransitGatewayRegistrations").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getTransitGatewayRegistrationsRequest)
.withMarshaller(new GetTransitGatewayRegistrationsRequestMarshaller(protocolFactory)));
}
/**
*
* Gets information about the transit gateway registrations in a specified global network.
*
*
*
* This is a variant of
* {@link #getTransitGatewayRegistrations(software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetTransitGatewayRegistrationsIterable responses = client.getTransitGatewayRegistrationsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.networkmanager.paginators.GetTransitGatewayRegistrationsIterable responses = client
* .getTransitGatewayRegistrationsPaginator(request);
* for (software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.networkmanager.paginators.GetTransitGatewayRegistrationsIterable responses = client.getTransitGatewayRegistrationsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getTransitGatewayRegistrations(software.amazon.awssdk.services.networkmanager.model.GetTransitGatewayRegistrationsRequest)}
* operation.
*
*
* @param getTransitGatewayRegistrationsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @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 GetTransitGatewayRegistrationsIterable getTransitGatewayRegistrationsPaginator(
GetTransitGatewayRegistrationsRequest getTransitGatewayRegistrationsRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
return new GetTransitGatewayRegistrationsIterable(this, applyPaginatorUserAgent(getTransitGatewayRegistrationsRequest));
}
/**
*
* Lists the tags for a specified resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource 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.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listTagsForResourceRequest)
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Registers a transit gateway in your global network. The transit gateway can be in any AWS Region, but it must be
* owned by the same AWS account that owns the global network. You cannot register a transit gateway in more than
* one global network.
*
*
* @param registerTransitGatewayRequest
* @return Result of the RegisterTransitGateway 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.RegisterTransitGateway
* @see AWS API Documentation
*/
@Override
public RegisterTransitGatewayResponse registerTransitGateway(RegisterTransitGatewayRequest registerTransitGatewayRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, RegisterTransitGatewayResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("RegisterTransitGateway").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(registerTransitGatewayRequest)
.withMarshaller(new RegisterTransitGatewayRequestMarshaller(protocolFactory)));
}
/**
*
* Tags a specified resource.
*
*
* @param tagResourceRequest
* @return Result of the TagResource 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.TagResource
* @see AWS API
* Documentation
*/
@Override
public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) 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,
TagResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("TagResource").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(tagResourceRequest)
.withMarshaller(new TagResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Removes tags from a specified resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource 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.UntagResource
* @see AWS
* API Documentation
*/
@Override
public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UntagResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UntagResource").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(untagResourceRequest)
.withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the details for an existing device. To remove information for any of the parameters, specify an empty
* string.
*
*
* @param updateDeviceRequest
* @return Result of the UpdateDevice 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.UpdateDevice
* @see AWS
* API Documentation
*/
@Override
public UpdateDeviceResponse updateDevice(UpdateDeviceRequest updateDeviceRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException,
AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UpdateDeviceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateDevice").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateDeviceRequest)
.withMarshaller(new UpdateDeviceRequestMarshaller(protocolFactory)));
}
/**
*
* Updates an existing global network. To remove information for any of the parameters, specify an empty string.
*
*
* @param updateGlobalNetworkRequest
* @return Result of the UpdateGlobalNetwork 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.UpdateGlobalNetwork
* @see AWS API Documentation
*/
@Override
public UpdateGlobalNetworkResponse updateGlobalNetwork(UpdateGlobalNetworkRequest updateGlobalNetworkRequest)
throws ValidationException, AccessDeniedException, ResourceNotFoundException, ConflictException, ThrottlingException,
InternalServerException, AwsServiceException, SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateGlobalNetworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateGlobalNetwork").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateGlobalNetworkRequest)
.withMarshaller(new UpdateGlobalNetworkRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the details for an existing link. To remove information for any of the parameters, specify an empty
* string.
*
*
* @param updateLinkRequest
* @return Result of the UpdateLink 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.UpdateLink
* @see AWS API
* Documentation
*/
@Override
public UpdateLinkResponse updateLink(UpdateLinkRequest updateLinkRequest) 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,
UpdateLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateLink").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateLinkRequest)
.withMarshaller(new UpdateLinkRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the information for an existing site. To remove information for any of the parameters, specify an empty
* string.
*
*
* @param updateSiteRequest
* @return Result of the UpdateSite 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.UpdateSite
* @see AWS API
* Documentation
*/
@Override
public UpdateSiteResponse updateSite(UpdateSiteRequest updateSiteRequest) throws ValidationException, AccessDeniedException,
ResourceNotFoundException, ConflictException, ThrottlingException, InternalServerException, AwsServiceException,
SdkClientException, NetworkManagerException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
UpdateSiteResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateSite").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateSiteRequest)
.withMarshaller(new UpdateSiteRequestMarshaller(protocolFactory)));
}
private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory,
JsonOperationMetadata operationMetadata) {
return protocolFactory.createErrorResponseHandler(operationMetadata);
}
private > T init(T builder) {
return builder
.clientConfiguration(clientConfiguration)
.defaultServiceExceptionSupplier(NetworkManagerException::builder)
.protocol(AwsJsonProtocol.REST_JSON)
.protocolVersion("1.1")
.registerModeledException(
ExceptionMetadata.builder().errorCode("AccessDeniedException")
.exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(403).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ConflictException")
.exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ResourceNotFoundException")
.exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ThrottlingException")
.exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ValidationException")
.exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ServiceQuotaExceededException")
.exceptionBuilderSupplier(ServiceQuotaExceededException::builder).httpStatusCode(402).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InternalServerException")
.exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build());
}
@Override
public void close() {
clientHandler.close();
}
private T applyPaginatorUserAgent(T request) {
Consumer userAgentApplier = b -> b.addApiName(ApiName.builder()
.version(VersionInfo.SDK_VERSION).name("PAGINATED").build());
AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration()
.map(c -> c.toBuilder().applyMutation(userAgentApplier).build())
.orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build()));
return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build();
}
}