
software.amazon.awssdk.services.devicefarm.DefaultDeviceFarmClient Maven / Gradle / Ivy
/*
* 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.devicefarm;
import java.util.Collections;
import java.util.List;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.devicefarm.internal.DeviceFarmServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.devicefarm.model.ArgumentException;
import software.amazon.awssdk.services.devicefarm.model.CannotDeleteException;
import software.amazon.awssdk.services.devicefarm.model.CreateDevicePoolRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateDevicePoolResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateInstanceProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateInstanceProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateNetworkProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateNetworkProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateRemoteAccessSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateRemoteAccessSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateTestGridProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateTestGridProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateTestGridUrlRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateTestGridUrlResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateUploadRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateUploadResponse;
import software.amazon.awssdk.services.devicefarm.model.CreateVpceConfigurationRequest;
import software.amazon.awssdk.services.devicefarm.model.CreateVpceConfigurationResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteDevicePoolRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteDevicePoolResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteInstanceProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteInstanceProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteNetworkProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteNetworkProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteRemoteAccessSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteRemoteAccessSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteRunRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteRunResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteTestGridProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteTestGridProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteUploadRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteUploadResponse;
import software.amazon.awssdk.services.devicefarm.model.DeleteVpceConfigurationRequest;
import software.amazon.awssdk.services.devicefarm.model.DeleteVpceConfigurationResponse;
import software.amazon.awssdk.services.devicefarm.model.DeviceFarmException;
import software.amazon.awssdk.services.devicefarm.model.GetAccountSettingsRequest;
import software.amazon.awssdk.services.devicefarm.model.GetAccountSettingsResponse;
import software.amazon.awssdk.services.devicefarm.model.GetDeviceInstanceRequest;
import software.amazon.awssdk.services.devicefarm.model.GetDeviceInstanceResponse;
import software.amazon.awssdk.services.devicefarm.model.GetDevicePoolCompatibilityRequest;
import software.amazon.awssdk.services.devicefarm.model.GetDevicePoolCompatibilityResponse;
import software.amazon.awssdk.services.devicefarm.model.GetDevicePoolRequest;
import software.amazon.awssdk.services.devicefarm.model.GetDevicePoolResponse;
import software.amazon.awssdk.services.devicefarm.model.GetDeviceRequest;
import software.amazon.awssdk.services.devicefarm.model.GetDeviceResponse;
import software.amazon.awssdk.services.devicefarm.model.GetInstanceProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.GetInstanceProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.GetJobRequest;
import software.amazon.awssdk.services.devicefarm.model.GetJobResponse;
import software.amazon.awssdk.services.devicefarm.model.GetNetworkProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.GetNetworkProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.GetOfferingStatusRequest;
import software.amazon.awssdk.services.devicefarm.model.GetOfferingStatusResponse;
import software.amazon.awssdk.services.devicefarm.model.GetProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.GetProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.GetRemoteAccessSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.GetRemoteAccessSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.GetRunRequest;
import software.amazon.awssdk.services.devicefarm.model.GetRunResponse;
import software.amazon.awssdk.services.devicefarm.model.GetSuiteRequest;
import software.amazon.awssdk.services.devicefarm.model.GetSuiteResponse;
import software.amazon.awssdk.services.devicefarm.model.GetTestGridProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.GetTestGridProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.GetTestGridSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.GetTestGridSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.GetTestRequest;
import software.amazon.awssdk.services.devicefarm.model.GetTestResponse;
import software.amazon.awssdk.services.devicefarm.model.GetUploadRequest;
import software.amazon.awssdk.services.devicefarm.model.GetUploadResponse;
import software.amazon.awssdk.services.devicefarm.model.GetVpceConfigurationRequest;
import software.amazon.awssdk.services.devicefarm.model.GetVpceConfigurationResponse;
import software.amazon.awssdk.services.devicefarm.model.IdempotencyException;
import software.amazon.awssdk.services.devicefarm.model.InstallToRemoteAccessSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.InstallToRemoteAccessSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.InternalServiceException;
import software.amazon.awssdk.services.devicefarm.model.InvalidOperationException;
import software.amazon.awssdk.services.devicefarm.model.LimitExceededException;
import software.amazon.awssdk.services.devicefarm.model.ListArtifactsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListArtifactsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListDeviceInstancesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListDeviceInstancesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListDevicePoolsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListDevicePoolsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListDevicesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListDevicesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListInstanceProfilesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListInstanceProfilesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListJobsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListJobsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListNetworkProfilesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListNetworkProfilesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingPromotionsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingPromotionsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingTransactionsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingTransactionsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListOfferingsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListProjectsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListProjectsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListRemoteAccessSessionsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListRemoteAccessSessionsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListRunsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListRunsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListSamplesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListSamplesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListSuitesRequest;
import software.amazon.awssdk.services.devicefarm.model.ListSuitesResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridProjectsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridProjectsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionActionsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionActionsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionArtifactsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionArtifactsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTestGridSessionsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListTestsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListTestsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListUniqueProblemsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListUniqueProblemsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListUploadsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListUploadsResponse;
import software.amazon.awssdk.services.devicefarm.model.ListVpceConfigurationsRequest;
import software.amazon.awssdk.services.devicefarm.model.ListVpceConfigurationsResponse;
import software.amazon.awssdk.services.devicefarm.model.NotEligibleException;
import software.amazon.awssdk.services.devicefarm.model.NotFoundException;
import software.amazon.awssdk.services.devicefarm.model.PurchaseOfferingRequest;
import software.amazon.awssdk.services.devicefarm.model.PurchaseOfferingResponse;
import software.amazon.awssdk.services.devicefarm.model.RenewOfferingRequest;
import software.amazon.awssdk.services.devicefarm.model.RenewOfferingResponse;
import software.amazon.awssdk.services.devicefarm.model.ScheduleRunRequest;
import software.amazon.awssdk.services.devicefarm.model.ScheduleRunResponse;
import software.amazon.awssdk.services.devicefarm.model.ServiceAccountException;
import software.amazon.awssdk.services.devicefarm.model.StopJobRequest;
import software.amazon.awssdk.services.devicefarm.model.StopJobResponse;
import software.amazon.awssdk.services.devicefarm.model.StopRemoteAccessSessionRequest;
import software.amazon.awssdk.services.devicefarm.model.StopRemoteAccessSessionResponse;
import software.amazon.awssdk.services.devicefarm.model.StopRunRequest;
import software.amazon.awssdk.services.devicefarm.model.StopRunResponse;
import software.amazon.awssdk.services.devicefarm.model.TagOperationException;
import software.amazon.awssdk.services.devicefarm.model.TagPolicyException;
import software.amazon.awssdk.services.devicefarm.model.TagResourceRequest;
import software.amazon.awssdk.services.devicefarm.model.TagResourceResponse;
import software.amazon.awssdk.services.devicefarm.model.TooManyTagsException;
import software.amazon.awssdk.services.devicefarm.model.UntagResourceRequest;
import software.amazon.awssdk.services.devicefarm.model.UntagResourceResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateDeviceInstanceRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateDeviceInstanceResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateDevicePoolRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateDevicePoolResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateInstanceProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateInstanceProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateNetworkProfileRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateNetworkProfileResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateTestGridProjectRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateTestGridProjectResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateUploadRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateUploadResponse;
import software.amazon.awssdk.services.devicefarm.model.UpdateVpceConfigurationRequest;
import software.amazon.awssdk.services.devicefarm.model.UpdateVpceConfigurationResponse;
import software.amazon.awssdk.services.devicefarm.transform.CreateDevicePoolRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateRemoteAccessSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateTestGridProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateTestGridUrlRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateUploadRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.CreateVpceConfigurationRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteDevicePoolRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteRemoteAccessSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteRunRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteTestGridProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteUploadRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.DeleteVpceConfigurationRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetAccountSettingsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetDeviceInstanceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetDevicePoolCompatibilityRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetDevicePoolRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetDeviceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetJobRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetOfferingStatusRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetRemoteAccessSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetRunRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetSuiteRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetTestGridProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetTestGridSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetTestRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetUploadRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.GetVpceConfigurationRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.InstallToRemoteAccessSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListArtifactsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListDeviceInstancesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListDevicePoolsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListDevicesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListInstanceProfilesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListJobsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListNetworkProfilesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListOfferingPromotionsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListOfferingTransactionsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListOfferingsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListProjectsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListRemoteAccessSessionsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListRunsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListSamplesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListSuitesRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTestGridProjectsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTestGridSessionActionsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTestGridSessionArtifactsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTestGridSessionsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListTestsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListUniqueProblemsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListUploadsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ListVpceConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.PurchaseOfferingRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.RenewOfferingRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.ScheduleRunRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.StopJobRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.StopRemoteAccessSessionRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.StopRunRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateDeviceInstanceRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateDevicePoolRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateNetworkProfileRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateTestGridProjectRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateUploadRequestMarshaller;
import software.amazon.awssdk.services.devicefarm.transform.UpdateVpceConfigurationRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link DeviceFarmClient}.
*
* @see DeviceFarmClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultDeviceFarmClient implements DeviceFarmClient {
private static final Logger log = Logger.loggerFor(DefaultDeviceFarmClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.AWS_JSON).build();
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
private final DeviceFarmServiceClientConfiguration serviceClientConfiguration;
protected DefaultDeviceFarmClient(DeviceFarmServiceClientConfiguration serviceClientConfiguration,
SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.serviceClientConfiguration = serviceClientConfiguration;
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Creates a device pool.
*
*
* @param createDevicePoolRequest
* Represents a request to the create device pool operation.
* @return Result of the CreateDevicePool operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateDevicePool
* @see AWS
* API Documentation
*/
@Override
public CreateDevicePoolResponse createDevicePool(CreateDevicePoolRequest createDevicePoolRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateDevicePoolResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDevicePoolRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDevicePoolRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDevicePool");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateDevicePool").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createDevicePoolRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDevicePoolRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a profile that can be applied to one or more private fleet device instances.
*
*
* @param createInstanceProfileRequest
* @return Result of the CreateInstanceProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateInstanceProfile
* @see AWS API Documentation
*/
@Override
public CreateInstanceProfileResponse createInstanceProfile(CreateInstanceProfileRequest createInstanceProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateInstanceProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createInstanceProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createInstanceProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateInstanceProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateInstanceProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createInstanceProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateInstanceProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a network profile.
*
*
* @param createNetworkProfileRequest
* @return Result of the CreateNetworkProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateNetworkProfile
* @see AWS API Documentation
*/
@Override
public CreateNetworkProfileResponse createNetworkProfile(CreateNetworkProfileRequest createNetworkProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateNetworkProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createNetworkProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createNetworkProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateNetworkProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateNetworkProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createNetworkProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateNetworkProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a project.
*
*
* @param createProjectRequest
* Represents a request to the create project operation.
* @return Result of the CreateProject operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @throws TagOperationException
* The operation was not successful. Try again.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateProject
* @see AWS API
* Documentation
*/
@Override
public CreateProjectResponse createProject(CreateProjectRequest createProjectRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, TagOperationException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createProjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateProject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createProjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Specifies and starts a remote access session.
*
*
* @param createRemoteAccessSessionRequest
* Creates and submits a request to start a remote access session.
* @return Result of the CreateRemoteAccessSession operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateRemoteAccessSession
* @see AWS API Documentation
*/
@Override
public CreateRemoteAccessSessionResponse createRemoteAccessSession(
CreateRemoteAccessSessionRequest createRemoteAccessSessionRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateRemoteAccessSessionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRemoteAccessSessionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createRemoteAccessSessionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRemoteAccessSession");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateRemoteAccessSession").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createRemoteAccessSessionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateRemoteAccessSessionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a Selenium testing project. Projects are used to track TestGridSession instances.
*
*
* @param createTestGridProjectRequest
* @return Result of the CreateTestGridProject operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws LimitExceededException
* A limit was exceeded.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateTestGridProject
* @see AWS API Documentation
*/
@Override
public CreateTestGridProjectResponse createTestGridProject(CreateTestGridProjectRequest createTestGridProjectRequest)
throws ArgumentException, LimitExceededException, InternalServiceException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateTestGridProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTestGridProjectRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTestGridProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTestGridProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTestGridProject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createTestGridProjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTestGridProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a signed, short-term URL that can be passed to a Selenium RemoteWebDriver
constructor.
*
*
* @param createTestGridUrlRequest
* @return Result of the CreateTestGridUrl operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateTestGridUrl
* @see AWS
* API Documentation
*/
@Override
public CreateTestGridUrlResponse createTestGridUrl(CreateTestGridUrlRequest createTestGridUrlRequest)
throws NotFoundException, ArgumentException, InternalServiceException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateTestGridUrlResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTestGridUrlRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTestGridUrlRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTestGridUrl");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTestGridUrl").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createTestGridUrlRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTestGridUrlRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Uploads an app or test scripts.
*
*
* @param createUploadRequest
* Represents a request to the create upload operation.
* @return Result of the CreateUpload operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateUpload
* @see AWS API
* Documentation
*/
@Override
public CreateUploadResponse createUpload(CreateUploadRequest createUploadRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateUploadResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUploadRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createUploadRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUpload");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateUpload").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createUploadRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateUploadRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a configuration record in Device Farm for your Amazon Virtual Private Cloud (VPC) endpoint.
*
*
* @param createVpceConfigurationRequest
* @return Result of the CreateVPCEConfiguration operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.CreateVPCEConfiguration
* @see AWS API Documentation
*/
@Override
public CreateVpceConfigurationResponse createVPCEConfiguration(CreateVpceConfigurationRequest createVpceConfigurationRequest)
throws ArgumentException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateVpceConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createVpceConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createVpceConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVPCEConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateVPCEConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createVpceConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateVpceConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.
*
*
* @param deleteDevicePoolRequest
* Represents a request to the delete device pool operation.
* @return Result of the DeleteDevicePool operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteDevicePool
* @see AWS
* API Documentation
*/
@Override
public DeleteDevicePoolResponse deleteDevicePool(DeleteDevicePoolRequest deleteDevicePoolRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteDevicePoolResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDevicePoolRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDevicePoolRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDevicePool");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteDevicePool").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteDevicePoolRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDevicePoolRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a profile that can be applied to one or more private device instances.
*
*
* @param deleteInstanceProfileRequest
* @return Result of the DeleteInstanceProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteInstanceProfile
* @see AWS API Documentation
*/
@Override
public DeleteInstanceProfileResponse deleteInstanceProfile(DeleteInstanceProfileRequest deleteInstanceProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteInstanceProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteInstanceProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteInstanceProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteInstanceProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteInstanceProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteInstanceProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteInstanceProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a network profile.
*
*
* @param deleteNetworkProfileRequest
* @return Result of the DeleteNetworkProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteNetworkProfile
* @see AWS API Documentation
*/
@Override
public DeleteNetworkProfileResponse deleteNetworkProfile(DeleteNetworkProfileRequest deleteNetworkProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteNetworkProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteNetworkProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteNetworkProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteNetworkProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteNetworkProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteNetworkProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteNetworkProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an AWS Device Farm project, given the project ARN.
*
*
* Deleting this resource does not stop an in-progress run.
*
*
* @param deleteProjectRequest
* Represents a request to the delete project operation.
* @return Result of the DeleteProject operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteProject
* @see AWS API
* Documentation
*/
@Override
public DeleteProjectResponse deleteProject(DeleteProjectRequest deleteProjectRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteProjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteProject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteProjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a completed remote access session and its results.
*
*
* @param deleteRemoteAccessSessionRequest
* Represents the request to delete the specified remote access session.
* @return Result of the DeleteRemoteAccessSession operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteRemoteAccessSession
* @see AWS API Documentation
*/
@Override
public DeleteRemoteAccessSessionResponse deleteRemoteAccessSession(
DeleteRemoteAccessSessionRequest deleteRemoteAccessSessionRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRemoteAccessSessionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRemoteAccessSessionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRemoteAccessSessionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRemoteAccessSession");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteRemoteAccessSession").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteRemoteAccessSessionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteRemoteAccessSessionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the run, given the run ARN.
*
*
* Deleting this resource does not stop an in-progress run.
*
*
* @param deleteRunRequest
* Represents a request to the delete run operation.
* @return Result of the DeleteRun operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteRun
* @see AWS API
* Documentation
*/
@Override
public DeleteRunResponse deleteRun(DeleteRunRequest deleteRunRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteRunResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRunRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRunRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRun");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteRun").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteRunRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteRunRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a Selenium testing project and all content generated under it.
*
*
*
* You cannot undo this operation.
*
*
*
* You cannot delete a project if it has active sessions.
*
*
*
* @param deleteTestGridProjectRequest
* @return Result of the DeleteTestGridProject operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws CannotDeleteException
* The requested object could not be deleted.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteTestGridProject
* @see AWS API Documentation
*/
@Override
public DeleteTestGridProjectResponse deleteTestGridProject(DeleteTestGridProjectRequest deleteTestGridProjectRequest)
throws NotFoundException, ArgumentException, CannotDeleteException, InternalServiceException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteTestGridProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTestGridProjectRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTestGridProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTestGridProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteTestGridProject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteTestGridProjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteTestGridProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an upload given the upload ARN.
*
*
* @param deleteUploadRequest
* Represents a request to the delete upload operation.
* @return Result of the DeleteUpload operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteUpload
* @see AWS API
* Documentation
*/
@Override
public DeleteUploadResponse deleteUpload(DeleteUploadRequest deleteUploadRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteUploadResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUploadRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUploadRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUpload");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteUpload").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteUploadRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteUploadRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint.
*
*
* @param deleteVpceConfigurationRequest
* @return Result of the DeleteVPCEConfiguration operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws ServiceAccountException
* There was a problem with the service account.
* @throws InvalidOperationException
* There was an error with the update request, or you do not have sufficient permissions to update this VPC
* endpoint configuration.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.DeleteVPCEConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteVpceConfigurationResponse deleteVPCEConfiguration(DeleteVpceConfigurationRequest deleteVpceConfigurationRequest)
throws ArgumentException, NotFoundException, ServiceAccountException, InvalidOperationException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteVpceConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteVpceConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVpceConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVPCEConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteVPCEConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteVpceConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteVpceConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the number of unmetered iOS or unmetered Android devices that have been purchased by the account.
*
*
* @param getAccountSettingsRequest
* Represents the request sent to retrieve the account settings.
* @return Result of the GetAccountSettings operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetAccountSettings
* @see AWS
* API Documentation
*/
@Override
public GetAccountSettingsResponse getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetAccountSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccountSettingsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountSettingsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountSettings");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetAccountSettings").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getAccountSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAccountSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a unique device type.
*
*
* @param getDeviceRequest
* Represents a request to the get device request.
* @return Result of the GetDevice operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetDevice
* @see AWS API
* Documentation
*/
@Override
public GetDeviceResponse getDevice(GetDeviceRequest getDeviceRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetDeviceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDeviceRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDeviceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDevice");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDevice").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getDeviceRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDeviceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a device instance that belongs to a private device fleet.
*
*
* @param getDeviceInstanceRequest
* @return Result of the GetDeviceInstance operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetDeviceInstance
* @see AWS
* API Documentation
*/
@Override
public GetDeviceInstanceResponse getDeviceInstance(GetDeviceInstanceRequest getDeviceInstanceRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetDeviceInstanceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDeviceInstanceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDeviceInstanceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDeviceInstance");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDeviceInstance").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getDeviceInstanceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDeviceInstanceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a device pool.
*
*
* @param getDevicePoolRequest
* Represents a request to the get device pool operation.
* @return Result of the GetDevicePool operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetDevicePool
* @see AWS API
* Documentation
*/
@Override
public GetDevicePoolResponse getDevicePool(GetDevicePoolRequest getDevicePoolRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetDevicePoolResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDevicePoolRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDevicePoolRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDevicePool");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetDevicePool").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getDevicePoolRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDevicePoolRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about compatibility with a device pool.
*
*
* @param getDevicePoolCompatibilityRequest
* Represents a request to the get device pool compatibility operation.
* @return Result of the GetDevicePoolCompatibility operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetDevicePoolCompatibility
* @see AWS API Documentation
*/
@Override
public GetDevicePoolCompatibilityResponse getDevicePoolCompatibility(
GetDevicePoolCompatibilityRequest getDevicePoolCompatibilityRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetDevicePoolCompatibilityResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDevicePoolCompatibilityRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDevicePoolCompatibilityRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDevicePoolCompatibility");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetDevicePoolCompatibility").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getDevicePoolCompatibilityRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetDevicePoolCompatibilityRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about the specified instance profile.
*
*
* @param getInstanceProfileRequest
* @return Result of the GetInstanceProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetInstanceProfile
* @see AWS
* API Documentation
*/
@Override
public GetInstanceProfileResponse getInstanceProfile(GetInstanceProfileRequest getInstanceProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetInstanceProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getInstanceProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getInstanceProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetInstanceProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetInstanceProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getInstanceProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetInstanceProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a job.
*
*
* @param getJobRequest
* Represents a request to the get job operation.
* @return Result of the GetJob operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetJob
* @see AWS API
* Documentation
*/
@Override
public GetJobResponse getJob(GetJobRequest getJobRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getJobRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetJob");
return clientHandler.execute(new ClientExecutionParams().withOperationName("GetJob")
.withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getJobRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a network profile.
*
*
* @param getNetworkProfileRequest
* @return Result of the GetNetworkProfile operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetNetworkProfile
* @see AWS
* API Documentation
*/
@Override
public GetNetworkProfileResponse getNetworkProfile(GetNetworkProfileRequest getNetworkProfileRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetNetworkProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNetworkProfileRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getNetworkProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNetworkProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetNetworkProfile").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getNetworkProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetNetworkProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets the current status and future status of all offerings purchased by an AWS account. The response indicates
* how many offerings are currently available and the offerings that will be available in the next period. The API
* returns a NotEligible
error if the user is not permitted to invoke the operation. If you must be
* able to invoke this operation, contact [email protected].
*
*
* @param getOfferingStatusRequest
* Represents the request to retrieve the offering status for the specified customer or account.
* @return Result of the GetOfferingStatus operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws NotEligibleException
* Exception gets thrown when a user is not eligible to perform the specified transaction.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetOfferingStatus
* @see AWS
* API Documentation
*/
@Override
public GetOfferingStatusResponse getOfferingStatus(GetOfferingStatusRequest getOfferingStatusRequest)
throws ArgumentException, NotFoundException, NotEligibleException, LimitExceededException, ServiceAccountException,
AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetOfferingStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOfferingStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getOfferingStatusRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOfferingStatus");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetOfferingStatus").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getOfferingStatusRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetOfferingStatusRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a project.
*
*
* @param getProjectRequest
* Represents a request to the get project operation.
* @return Result of the GetProject operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetProject
* @see AWS API
* Documentation
*/
@Override
public GetProjectResponse getProject(GetProjectRequest getProjectRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getProjectRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetProject").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getProjectRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a link to a currently running remote access session.
*
*
* @param getRemoteAccessSessionRequest
* Represents the request to get information about the specified remote access session.
* @return Result of the GetRemoteAccessSession operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetRemoteAccessSession
* @see AWS API Documentation
*/
@Override
public GetRemoteAccessSessionResponse getRemoteAccessSession(GetRemoteAccessSessionRequest getRemoteAccessSessionRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetRemoteAccessSessionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRemoteAccessSessionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getRemoteAccessSessionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRemoteAccessSession");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetRemoteAccessSession").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getRemoteAccessSessionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetRemoteAccessSessionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a run.
*
*
* @param getRunRequest
* Represents a request to the get run operation.
* @return Result of the GetRun operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetRun
* @see AWS API
* Documentation
*/
@Override
public GetRunResponse getRun(GetRunRequest getRunRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetRunResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRunRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getRunRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRun");
return clientHandler.execute(new ClientExecutionParams().withOperationName("GetRun")
.withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getRunRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetRunRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a suite.
*
*
* @param getSuiteRequest
* Represents a request to the get suite operation.
* @return Result of the GetSuite operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetSuite
* @see AWS API
* Documentation
*/
@Override
public GetSuiteResponse getSuite(GetSuiteRequest getSuiteRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetSuiteResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSuiteRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSuiteRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSuite");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetSuite").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getSuiteRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSuiteRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about a test.
*
*
* @param getTestRequest
* Represents a request to the get test operation.
* @return Result of the GetTest operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetTest
* @see AWS API
* Documentation
*/
@Override
public GetTestResponse getTest(GetTestRequest getTestRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetTestResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTestRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTestRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTest");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetTest").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getTestRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTestRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves information about a Selenium testing project.
*
*
* @param getTestGridProjectRequest
* @return Result of the GetTestGridProject operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetTestGridProject
* @see AWS
* API Documentation
*/
@Override
public GetTestGridProjectResponse getTestGridProject(GetTestGridProjectRequest getTestGridProjectRequest)
throws NotFoundException, ArgumentException, InternalServiceException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetTestGridProjectResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTestGridProjectRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTestGridProjectRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTestGridProject");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetTestGridProject").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getTestGridProjectRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTestGridProjectRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* A session is an instance of a browser created through a RemoteWebDriver
with the URL from
* CreateTestGridUrlResult$url. You can use the following to look up sessions:
*
*
* -
*
* The session ARN (GetTestGridSessionRequest$sessionArn).
*
*
* -
*
* The project ARN and a session ID (GetTestGridSessionRequest$projectArn and
* GetTestGridSessionRequest$sessionId).
*
*
*
*
*
* @param getTestGridSessionRequest
* @return Result of the GetTestGridSession operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetTestGridSession
* @see AWS
* API Documentation
*/
@Override
public GetTestGridSessionResponse getTestGridSession(GetTestGridSessionRequest getTestGridSessionRequest)
throws NotFoundException, ArgumentException, InternalServiceException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetTestGridSessionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTestGridSessionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTestGridSessionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTestGridSession");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetTestGridSession").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getTestGridSessionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTestGridSessionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about an upload.
*
*
* @param getUploadRequest
* Represents a request to the get upload operation.
* @return Result of the GetUpload operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetUpload
* @see AWS API
* Documentation
*/
@Override
public GetUploadResponse getUpload(GetUploadRequest getUploadRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetUploadResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getUploadRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getUploadRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetUpload");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetUpload").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(getUploadRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetUploadRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about the configuration settings for your Amazon Virtual Private Cloud (VPC) endpoint.
*
*
* @param getVpceConfigurationRequest
* @return Result of the GetVPCEConfiguration operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.GetVPCEConfiguration
* @see AWS API Documentation
*/
@Override
public GetVpceConfigurationResponse getVPCEConfiguration(GetVpceConfigurationRequest getVpceConfigurationRequest)
throws ArgumentException, NotFoundException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetVpceConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getVpceConfigurationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getVpceConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetVPCEConfiguration");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetVPCEConfiguration").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getVpceConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetVpceConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Installs an application to the device in a remote access session. For Android applications, the file must be in
* .apk format. For iOS applications, the file must be in .ipa format.
*
*
* @param installToRemoteAccessSessionRequest
* Represents the request to install an Android application (in .apk format) or an iOS application (in .ipa
* format) as part of a remote access session.
* @return Result of the InstallToRemoteAccessSession operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.InstallToRemoteAccessSession
* @see AWS API Documentation
*/
@Override
public InstallToRemoteAccessSessionResponse installToRemoteAccessSession(
InstallToRemoteAccessSessionRequest installToRemoteAccessSessionRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, InstallToRemoteAccessSessionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(installToRemoteAccessSessionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, installToRemoteAccessSessionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "InstallToRemoteAccessSession");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("InstallToRemoteAccessSession").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(installToRemoteAccessSessionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new InstallToRemoteAccessSessionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about artifacts.
*
*
* @param listArtifactsRequest
* Represents a request to the list artifacts operation.
* @return Result of the ListArtifacts operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListArtifacts
* @see AWS API
* Documentation
*/
@Override
public ListArtifactsResponse listArtifacts(ListArtifactsRequest listArtifactsRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListArtifactsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listArtifactsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listArtifactsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListArtifacts");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListArtifacts").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listArtifactsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListArtifactsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about the private device instances associated with one or more AWS accounts.
*
*
* @param listDeviceInstancesRequest
* @return Result of the ListDeviceInstances operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListDeviceInstances
* @see AWS API Documentation
*/
@Override
public ListDeviceInstancesResponse listDeviceInstances(ListDeviceInstancesRequest listDeviceInstancesRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListDeviceInstancesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDeviceInstancesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDeviceInstancesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDeviceInstances");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListDeviceInstances").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listDeviceInstancesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListDeviceInstancesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about device pools.
*
*
* @param listDevicePoolsRequest
* Represents the result of a list device pools request.
* @return Result of the ListDevicePools operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListDevicePools
* @see AWS
* API Documentation
*/
@Override
public ListDevicePoolsResponse listDevicePools(ListDevicePoolsRequest listDevicePoolsRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListDevicePoolsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDevicePoolsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDevicePoolsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDevicePools");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListDevicePools").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listDevicePoolsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListDevicePoolsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about unique device types.
*
*
* @param listDevicesRequest
* Represents the result of a list devices request.
* @return Result of the ListDevices operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListDevices
* @see AWS API
* Documentation
*/
@Override
public ListDevicesResponse listDevices(ListDevicesRequest listDevicesRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListDevicesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDevicesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDevicesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDevices");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListDevices").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listDevicesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListDevicesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about all the instance profiles in an AWS account.
*
*
* @param listInstanceProfilesRequest
* @return Result of the ListInstanceProfiles operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListInstanceProfiles
* @see AWS API Documentation
*/
@Override
public ListInstanceProfilesResponse listInstanceProfiles(ListInstanceProfilesRequest listInstanceProfilesRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListInstanceProfilesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceProfilesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceProfilesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceProfiles");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListInstanceProfiles").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listInstanceProfilesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListInstanceProfilesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about jobs for a given test run.
*
*
* @param listJobsRequest
* Represents a request to the list jobs operation.
* @return Result of the ListJobs operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListJobs
* @see AWS API
* Documentation
*/
@Override
public ListJobsResponse listJobs(ListJobsRequest listJobsRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listJobsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListJobs").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listJobsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the list of available network profiles.
*
*
* @param listNetworkProfilesRequest
* @return Result of the ListNetworkProfiles operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListNetworkProfiles
* @see AWS API Documentation
*/
@Override
public ListNetworkProfilesResponse listNetworkProfiles(ListNetworkProfilesRequest listNetworkProfilesRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListNetworkProfilesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listNetworkProfilesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listNetworkProfilesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListNetworkProfiles");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListNetworkProfiles").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listNetworkProfilesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListNetworkProfilesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of offering promotions. Each offering promotion record contains the ID and description of the
* promotion. The API returns a NotEligible
error if the caller is not permitted to invoke the
* operation. Contact [email protected] if
* you must be able to invoke this operation.
*
*
* @param listOfferingPromotionsRequest
* @return Result of the ListOfferingPromotions operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws NotEligibleException
* Exception gets thrown when a user is not eligible to perform the specified transaction.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListOfferingPromotions
* @see AWS API Documentation
*/
@Override
public ListOfferingPromotionsResponse listOfferingPromotions(ListOfferingPromotionsRequest listOfferingPromotionsRequest)
throws ArgumentException, NotFoundException, NotEligibleException, LimitExceededException, ServiceAccountException,
AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListOfferingPromotionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOfferingPromotionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listOfferingPromotionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOfferingPromotions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListOfferingPromotions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listOfferingPromotionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListOfferingPromotionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of all historical purchases, renewals, and system renewal transactions for an AWS account. The
* list is paginated and ordered by a descending timestamp (most recent transactions are first). The API returns a
* NotEligible
error if the user is not permitted to invoke the operation. If you must be able to
* invoke this operation, contact [email protected].
*
*
* @param listOfferingTransactionsRequest
* Represents the request to list the offering transaction history.
* @return Result of the ListOfferingTransactions operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws NotEligibleException
* Exception gets thrown when a user is not eligible to perform the specified transaction.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListOfferingTransactions
* @see AWS API Documentation
*/
@Override
public ListOfferingTransactionsResponse listOfferingTransactions(
ListOfferingTransactionsRequest listOfferingTransactionsRequest) throws ArgumentException, NotFoundException,
NotEligibleException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListOfferingTransactionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOfferingTransactionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listOfferingTransactionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOfferingTransactions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListOfferingTransactions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listOfferingTransactionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListOfferingTransactionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of products or offerings that the user can manage through the API. Each offering record indicates
* the recurring price per unit and the frequency for that offering. The API returns a NotEligible
* error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact
* [email protected].
*
*
* @param listOfferingsRequest
* Represents the request to list all offerings.
* @return Result of the ListOfferings operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws NotEligibleException
* Exception gets thrown when a user is not eligible to perform the specified transaction.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListOfferings
* @see AWS API
* Documentation
*/
@Override
public ListOfferingsResponse listOfferings(ListOfferingsRequest listOfferingsRequest) throws ArgumentException,
NotFoundException, NotEligibleException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListOfferingsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOfferingsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listOfferingsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOfferings");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListOfferings").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listOfferingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListOfferingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about projects.
*
*
* @param listProjectsRequest
* Represents a request to the list projects operation.
* @return Result of the ListProjects operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListProjects
* @see AWS API
* Documentation
*/
@Override
public ListProjectsResponse listProjects(ListProjectsRequest listProjectsRequest) throws ArgumentException,
NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListProjectsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listProjectsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listProjectsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListProjects");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListProjects").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listProjectsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListProjectsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of all currently running remote access sessions.
*
*
* @param listRemoteAccessSessionsRequest
* Represents the request to return information about the remote access session.
* @return Result of the ListRemoteAccessSessions operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListRemoteAccessSessions
* @see AWS API Documentation
*/
@Override
public ListRemoteAccessSessionsResponse listRemoteAccessSessions(
ListRemoteAccessSessionsRequest listRemoteAccessSessionsRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListRemoteAccessSessionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRemoteAccessSessionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listRemoteAccessSessionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRemoteAccessSessions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListRemoteAccessSessions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listRemoteAccessSessionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRemoteAccessSessionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about runs, given an AWS Device Farm project ARN.
*
*
* @param listRunsRequest
* Represents a request to the list runs operation.
* @return Result of the ListRuns operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListRuns
* @see AWS API
* Documentation
*/
@Override
public ListRunsResponse listRuns(ListRunsRequest listRunsRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListRunsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRunsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listRunsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRuns");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListRuns").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listRunsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRunsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about samples, given an AWS Device Farm job ARN.
*
*
* @param listSamplesRequest
* Represents a request to the list samples operation.
* @return Result of the ListSamples operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListSamples
* @see AWS API
* Documentation
*/
@Override
public ListSamplesResponse listSamples(ListSamplesRequest listSamplesRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListSamplesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSamplesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listSamplesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSamples");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListSamples").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listSamplesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListSamplesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about test suites for a given job.
*
*
* @param listSuitesRequest
* Represents a request to the list suites operation.
* @return Result of the ListSuites operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListSuites
* @see AWS API
* Documentation
*/
@Override
public ListSuitesResponse listSuites(ListSuitesRequest listSuitesRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListSuitesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSuitesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listSuitesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSuites");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListSuites").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listSuitesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListSuitesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* List the tags for an AWS Device Farm resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws TagOperationException
* The operation was not successful. Try again.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws ArgumentException, NotFoundException, TagOperationException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTagsForResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets a list of all Selenium testing projects in your account.
*
*
* @param listTestGridProjectsRequest
* @return Result of the ListTestGridProjects operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTestGridProjects
* @see AWS API Documentation
*/
@Override
public ListTestGridProjectsResponse listTestGridProjects(ListTestGridProjectsRequest listTestGridProjectsRequest)
throws ArgumentException, InternalServiceException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTestGridProjectsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTestGridProjectsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTestGridProjectsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTestGridProjects");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTestGridProjects").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTestGridProjectsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTestGridProjectsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of the actions taken in a TestGridSession.
*
*
* @param listTestGridSessionActionsRequest
* @return Result of the ListTestGridSessionActions operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTestGridSessionActions
* @see AWS API Documentation
*/
@Override
public ListTestGridSessionActionsResponse listTestGridSessionActions(
ListTestGridSessionActionsRequest listTestGridSessionActionsRequest) throws NotFoundException, ArgumentException,
InternalServiceException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTestGridSessionActionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTestGridSessionActionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTestGridSessionActionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTestGridSessionActions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTestGridSessionActions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTestGridSessionActionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTestGridSessionActionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list of artifacts created during the session.
*
*
* @param listTestGridSessionArtifactsRequest
* @return Result of the ListTestGridSessionArtifacts operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTestGridSessionArtifacts
* @see AWS API Documentation
*/
@Override
public ListTestGridSessionArtifactsResponse listTestGridSessionArtifacts(
ListTestGridSessionArtifactsRequest listTestGridSessionArtifactsRequest) throws NotFoundException, ArgumentException,
InternalServiceException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTestGridSessionArtifactsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTestGridSessionArtifactsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTestGridSessionArtifactsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTestGridSessionArtifacts");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTestGridSessionArtifacts").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTestGridSessionArtifactsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTestGridSessionArtifactsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list of sessions for a TestGridProject.
*
*
* @param listTestGridSessionsRequest
* @return Result of the ListTestGridSessions operation returned by the service.
* @throws NotFoundException
* The specified entity was not found.
* @throws ArgumentException
* An invalid argument was specified.
* @throws InternalServiceException
* An internal exception was raised in the service. Contact [email protected] if you see this
* 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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTestGridSessions
* @see AWS API Documentation
*/
@Override
public ListTestGridSessionsResponse listTestGridSessions(ListTestGridSessionsRequest listTestGridSessionsRequest)
throws NotFoundException, ArgumentException, InternalServiceException, AwsServiceException, SdkClientException,
DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTestGridSessionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTestGridSessionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTestGridSessionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTestGridSessions");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTestGridSessions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listTestGridSessionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTestGridSessionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about tests in a given test suite.
*
*
* @param listTestsRequest
* Represents a request to the list tests operation.
* @return Result of the ListTests operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListTests
* @see AWS API
* Documentation
*/
@Override
public ListTestsResponse listTests(ListTestsRequest listTestsRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListTestsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTestsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTestsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTests");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTests").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listTestsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTestsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about unique problems, such as exceptions or crashes.
*
*
* Unique problems are defined as a single instance of an error across a run, job, or suite. For example, if a call
* in your application consistently raises an exception (OutOfBoundsException in MyActivity.java:386
),
* ListUniqueProblems
returns a single entry instead of many individual entries for that exception.
*
*
* @param listUniqueProblemsRequest
* Represents a request to the list unique problems operation.
* @return Result of the ListUniqueProblems operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListUniqueProblems
* @see AWS
* API Documentation
*/
@Override
public ListUniqueProblemsResponse listUniqueProblems(ListUniqueProblemsRequest listUniqueProblemsRequest)
throws ArgumentException, NotFoundException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListUniqueProblemsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUniqueProblemsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listUniqueProblemsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUniqueProblems");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListUniqueProblems").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listUniqueProblemsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListUniqueProblemsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Gets information about uploads, given an AWS Device Farm project ARN.
*
*
* @param listUploadsRequest
* Represents a request to the list uploads operation.
* @return Result of the ListUploads operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListUploads
* @see AWS API
* Documentation
*/
@Override
public ListUploadsResponse listUploads(ListUploadsRequest listUploadsRequest) throws ArgumentException, NotFoundException,
LimitExceededException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListUploadsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUploadsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listUploadsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUploads");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListUploads").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(listUploadsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListUploadsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about all Amazon Virtual Private Cloud (VPC) endpoint configurations in the AWS account.
*
*
* @param listVpceConfigurationsRequest
* @return Result of the ListVPCEConfigurations operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.ListVPCEConfigurations
* @see AWS API Documentation
*/
@Override
public ListVpceConfigurationsResponse listVPCEConfigurations(ListVpceConfigurationsRequest listVpceConfigurationsRequest)
throws ArgumentException, ServiceAccountException, AwsServiceException, SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListVpceConfigurationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listVpceConfigurationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listVpceConfigurationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListVPCEConfigurations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListVPCEConfigurations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listVpceConfigurationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListVpceConfigurationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Immediately purchases offerings for an AWS account. Offerings renew with the latest total purchased quantity for
* an offering, unless the renewal was overridden. The API returns a NotEligible
error if the user is
* not permitted to invoke the operation. If you must be able to invoke this operation, contact [email protected].
*
*
* @param purchaseOfferingRequest
* Represents a request for a purchase offering.
* @return Result of the PurchaseOffering operation returned by the service.
* @throws ArgumentException
* An invalid argument was specified.
* @throws NotFoundException
* The specified entity was not found.
* @throws NotEligibleException
* Exception gets thrown when a user is not eligible to perform the specified transaction.
* @throws LimitExceededException
* A limit was exceeded.
* @throws ServiceAccountException
* There was a problem with the service account.
* @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 DeviceFarmException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample DeviceFarmClient.PurchaseOffering
* @see AWS
* API Documentation
*/
@Override
public PurchaseOfferingResponse purchaseOffering(PurchaseOfferingRequest purchaseOfferingRequest) throws ArgumentException,
NotFoundException, NotEligibleException, LimitExceededException, ServiceAccountException, AwsServiceException,
SdkClientException, DeviceFarmException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
PurchaseOfferingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(purchaseOfferingRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, purchaseOfferingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Device Farm");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PurchaseOffering");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("PurchaseOffering").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(purchaseOfferingRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PurchaseOfferingRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Explicitly sets the quantity of devices to renew for an offering, starting from the effectiveDate
of
* the next period. The API returns a NotEligible
error if the user is not permitted to invoke the
* operation. If you must be able to invoke this operation, contact