
software.amazon.awssdk.services.backup.DefaultBackupClient 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.backup;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
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.core.util.VersionInfo;
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.backup.model.AlreadyExistsException;
import software.amazon.awssdk.services.backup.model.BackupException;
import software.amazon.awssdk.services.backup.model.BackupRequest;
import software.amazon.awssdk.services.backup.model.CancelLegalHoldRequest;
import software.amazon.awssdk.services.backup.model.CancelLegalHoldResponse;
import software.amazon.awssdk.services.backup.model.ConflictException;
import software.amazon.awssdk.services.backup.model.CreateBackupPlanRequest;
import software.amazon.awssdk.services.backup.model.CreateBackupPlanResponse;
import software.amazon.awssdk.services.backup.model.CreateBackupSelectionRequest;
import software.amazon.awssdk.services.backup.model.CreateBackupSelectionResponse;
import software.amazon.awssdk.services.backup.model.CreateBackupVaultRequest;
import software.amazon.awssdk.services.backup.model.CreateBackupVaultResponse;
import software.amazon.awssdk.services.backup.model.CreateFrameworkRequest;
import software.amazon.awssdk.services.backup.model.CreateFrameworkResponse;
import software.amazon.awssdk.services.backup.model.CreateLegalHoldRequest;
import software.amazon.awssdk.services.backup.model.CreateLegalHoldResponse;
import software.amazon.awssdk.services.backup.model.CreateReportPlanRequest;
import software.amazon.awssdk.services.backup.model.CreateReportPlanResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupPlanRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupPlanResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupSelectionRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupSelectionResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultAccessPolicyRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultAccessPolicyResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultLockConfigurationRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultLockConfigurationResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultNotificationsRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultNotificationsResponse;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultRequest;
import software.amazon.awssdk.services.backup.model.DeleteBackupVaultResponse;
import software.amazon.awssdk.services.backup.model.DeleteFrameworkRequest;
import software.amazon.awssdk.services.backup.model.DeleteFrameworkResponse;
import software.amazon.awssdk.services.backup.model.DeleteRecoveryPointRequest;
import software.amazon.awssdk.services.backup.model.DeleteRecoveryPointResponse;
import software.amazon.awssdk.services.backup.model.DeleteReportPlanRequest;
import software.amazon.awssdk.services.backup.model.DeleteReportPlanResponse;
import software.amazon.awssdk.services.backup.model.DependencyFailureException;
import software.amazon.awssdk.services.backup.model.DescribeBackupJobRequest;
import software.amazon.awssdk.services.backup.model.DescribeBackupJobResponse;
import software.amazon.awssdk.services.backup.model.DescribeBackupVaultRequest;
import software.amazon.awssdk.services.backup.model.DescribeBackupVaultResponse;
import software.amazon.awssdk.services.backup.model.DescribeCopyJobRequest;
import software.amazon.awssdk.services.backup.model.DescribeCopyJobResponse;
import software.amazon.awssdk.services.backup.model.DescribeFrameworkRequest;
import software.amazon.awssdk.services.backup.model.DescribeFrameworkResponse;
import software.amazon.awssdk.services.backup.model.DescribeGlobalSettingsRequest;
import software.amazon.awssdk.services.backup.model.DescribeGlobalSettingsResponse;
import software.amazon.awssdk.services.backup.model.DescribeProtectedResourceRequest;
import software.amazon.awssdk.services.backup.model.DescribeProtectedResourceResponse;
import software.amazon.awssdk.services.backup.model.DescribeRecoveryPointRequest;
import software.amazon.awssdk.services.backup.model.DescribeRecoveryPointResponse;
import software.amazon.awssdk.services.backup.model.DescribeRegionSettingsRequest;
import software.amazon.awssdk.services.backup.model.DescribeRegionSettingsResponse;
import software.amazon.awssdk.services.backup.model.DescribeReportJobRequest;
import software.amazon.awssdk.services.backup.model.DescribeReportJobResponse;
import software.amazon.awssdk.services.backup.model.DescribeReportPlanRequest;
import software.amazon.awssdk.services.backup.model.DescribeReportPlanResponse;
import software.amazon.awssdk.services.backup.model.DescribeRestoreJobRequest;
import software.amazon.awssdk.services.backup.model.DescribeRestoreJobResponse;
import software.amazon.awssdk.services.backup.model.DisassociateRecoveryPointFromParentRequest;
import software.amazon.awssdk.services.backup.model.DisassociateRecoveryPointFromParentResponse;
import software.amazon.awssdk.services.backup.model.DisassociateRecoveryPointRequest;
import software.amazon.awssdk.services.backup.model.DisassociateRecoveryPointResponse;
import software.amazon.awssdk.services.backup.model.ExportBackupPlanTemplateRequest;
import software.amazon.awssdk.services.backup.model.ExportBackupPlanTemplateResponse;
import software.amazon.awssdk.services.backup.model.GetBackupPlanFromJsonRequest;
import software.amazon.awssdk.services.backup.model.GetBackupPlanFromJsonResponse;
import software.amazon.awssdk.services.backup.model.GetBackupPlanFromTemplateRequest;
import software.amazon.awssdk.services.backup.model.GetBackupPlanFromTemplateResponse;
import software.amazon.awssdk.services.backup.model.GetBackupPlanRequest;
import software.amazon.awssdk.services.backup.model.GetBackupPlanResponse;
import software.amazon.awssdk.services.backup.model.GetBackupSelectionRequest;
import software.amazon.awssdk.services.backup.model.GetBackupSelectionResponse;
import software.amazon.awssdk.services.backup.model.GetBackupVaultAccessPolicyRequest;
import software.amazon.awssdk.services.backup.model.GetBackupVaultAccessPolicyResponse;
import software.amazon.awssdk.services.backup.model.GetBackupVaultNotificationsRequest;
import software.amazon.awssdk.services.backup.model.GetBackupVaultNotificationsResponse;
import software.amazon.awssdk.services.backup.model.GetLegalHoldRequest;
import software.amazon.awssdk.services.backup.model.GetLegalHoldResponse;
import software.amazon.awssdk.services.backup.model.GetRecoveryPointRestoreMetadataRequest;
import software.amazon.awssdk.services.backup.model.GetRecoveryPointRestoreMetadataResponse;
import software.amazon.awssdk.services.backup.model.GetSupportedResourceTypesRequest;
import software.amazon.awssdk.services.backup.model.GetSupportedResourceTypesResponse;
import software.amazon.awssdk.services.backup.model.InvalidParameterValueException;
import software.amazon.awssdk.services.backup.model.InvalidRequestException;
import software.amazon.awssdk.services.backup.model.InvalidResourceStateException;
import software.amazon.awssdk.services.backup.model.LimitExceededException;
import software.amazon.awssdk.services.backup.model.ListBackupJobsRequest;
import software.amazon.awssdk.services.backup.model.ListBackupJobsResponse;
import software.amazon.awssdk.services.backup.model.ListBackupPlanTemplatesRequest;
import software.amazon.awssdk.services.backup.model.ListBackupPlanTemplatesResponse;
import software.amazon.awssdk.services.backup.model.ListBackupPlanVersionsRequest;
import software.amazon.awssdk.services.backup.model.ListBackupPlanVersionsResponse;
import software.amazon.awssdk.services.backup.model.ListBackupPlansRequest;
import software.amazon.awssdk.services.backup.model.ListBackupPlansResponse;
import software.amazon.awssdk.services.backup.model.ListBackupSelectionsRequest;
import software.amazon.awssdk.services.backup.model.ListBackupSelectionsResponse;
import software.amazon.awssdk.services.backup.model.ListBackupVaultsRequest;
import software.amazon.awssdk.services.backup.model.ListBackupVaultsResponse;
import software.amazon.awssdk.services.backup.model.ListCopyJobsRequest;
import software.amazon.awssdk.services.backup.model.ListCopyJobsResponse;
import software.amazon.awssdk.services.backup.model.ListFrameworksRequest;
import software.amazon.awssdk.services.backup.model.ListFrameworksResponse;
import software.amazon.awssdk.services.backup.model.ListLegalHoldsRequest;
import software.amazon.awssdk.services.backup.model.ListLegalHoldsResponse;
import software.amazon.awssdk.services.backup.model.ListProtectedResourcesRequest;
import software.amazon.awssdk.services.backup.model.ListProtectedResourcesResponse;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByBackupVaultRequest;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByBackupVaultResponse;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByLegalHoldRequest;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByLegalHoldResponse;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByResourceRequest;
import software.amazon.awssdk.services.backup.model.ListRecoveryPointsByResourceResponse;
import software.amazon.awssdk.services.backup.model.ListReportJobsRequest;
import software.amazon.awssdk.services.backup.model.ListReportJobsResponse;
import software.amazon.awssdk.services.backup.model.ListReportPlansRequest;
import software.amazon.awssdk.services.backup.model.ListReportPlansResponse;
import software.amazon.awssdk.services.backup.model.ListRestoreJobsRequest;
import software.amazon.awssdk.services.backup.model.ListRestoreJobsResponse;
import software.amazon.awssdk.services.backup.model.ListTagsRequest;
import software.amazon.awssdk.services.backup.model.ListTagsResponse;
import software.amazon.awssdk.services.backup.model.MissingParameterValueException;
import software.amazon.awssdk.services.backup.model.PutBackupVaultAccessPolicyRequest;
import software.amazon.awssdk.services.backup.model.PutBackupVaultAccessPolicyResponse;
import software.amazon.awssdk.services.backup.model.PutBackupVaultLockConfigurationRequest;
import software.amazon.awssdk.services.backup.model.PutBackupVaultLockConfigurationResponse;
import software.amazon.awssdk.services.backup.model.PutBackupVaultNotificationsRequest;
import software.amazon.awssdk.services.backup.model.PutBackupVaultNotificationsResponse;
import software.amazon.awssdk.services.backup.model.ResourceNotFoundException;
import software.amazon.awssdk.services.backup.model.ServiceUnavailableException;
import software.amazon.awssdk.services.backup.model.StartBackupJobRequest;
import software.amazon.awssdk.services.backup.model.StartBackupJobResponse;
import software.amazon.awssdk.services.backup.model.StartCopyJobRequest;
import software.amazon.awssdk.services.backup.model.StartCopyJobResponse;
import software.amazon.awssdk.services.backup.model.StartReportJobRequest;
import software.amazon.awssdk.services.backup.model.StartReportJobResponse;
import software.amazon.awssdk.services.backup.model.StartRestoreJobRequest;
import software.amazon.awssdk.services.backup.model.StartRestoreJobResponse;
import software.amazon.awssdk.services.backup.model.StopBackupJobRequest;
import software.amazon.awssdk.services.backup.model.StopBackupJobResponse;
import software.amazon.awssdk.services.backup.model.TagResourceRequest;
import software.amazon.awssdk.services.backup.model.TagResourceResponse;
import software.amazon.awssdk.services.backup.model.UntagResourceRequest;
import software.amazon.awssdk.services.backup.model.UntagResourceResponse;
import software.amazon.awssdk.services.backup.model.UpdateBackupPlanRequest;
import software.amazon.awssdk.services.backup.model.UpdateBackupPlanResponse;
import software.amazon.awssdk.services.backup.model.UpdateFrameworkRequest;
import software.amazon.awssdk.services.backup.model.UpdateFrameworkResponse;
import software.amazon.awssdk.services.backup.model.UpdateGlobalSettingsRequest;
import software.amazon.awssdk.services.backup.model.UpdateGlobalSettingsResponse;
import software.amazon.awssdk.services.backup.model.UpdateRecoveryPointLifecycleRequest;
import software.amazon.awssdk.services.backup.model.UpdateRecoveryPointLifecycleResponse;
import software.amazon.awssdk.services.backup.model.UpdateRegionSettingsRequest;
import software.amazon.awssdk.services.backup.model.UpdateRegionSettingsResponse;
import software.amazon.awssdk.services.backup.model.UpdateReportPlanRequest;
import software.amazon.awssdk.services.backup.model.UpdateReportPlanResponse;
import software.amazon.awssdk.services.backup.paginators.ListBackupJobsIterable;
import software.amazon.awssdk.services.backup.paginators.ListBackupPlanTemplatesIterable;
import software.amazon.awssdk.services.backup.paginators.ListBackupPlanVersionsIterable;
import software.amazon.awssdk.services.backup.paginators.ListBackupPlansIterable;
import software.amazon.awssdk.services.backup.paginators.ListBackupSelectionsIterable;
import software.amazon.awssdk.services.backup.paginators.ListBackupVaultsIterable;
import software.amazon.awssdk.services.backup.paginators.ListCopyJobsIterable;
import software.amazon.awssdk.services.backup.paginators.ListFrameworksIterable;
import software.amazon.awssdk.services.backup.paginators.ListLegalHoldsIterable;
import software.amazon.awssdk.services.backup.paginators.ListProtectedResourcesIterable;
import software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByBackupVaultIterable;
import software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByLegalHoldIterable;
import software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByResourceIterable;
import software.amazon.awssdk.services.backup.paginators.ListReportJobsIterable;
import software.amazon.awssdk.services.backup.paginators.ListReportPlansIterable;
import software.amazon.awssdk.services.backup.paginators.ListRestoreJobsIterable;
import software.amazon.awssdk.services.backup.paginators.ListTagsIterable;
import software.amazon.awssdk.services.backup.transform.CancelLegalHoldRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateBackupPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateBackupSelectionRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateBackupVaultRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateFrameworkRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateLegalHoldRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.CreateReportPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupSelectionRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupVaultAccessPolicyRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupVaultLockConfigurationRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupVaultNotificationsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteBackupVaultRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteFrameworkRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DeleteReportPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeBackupJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeBackupVaultRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeCopyJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeFrameworkRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeGlobalSettingsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeProtectedResourceRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeRegionSettingsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeReportJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeReportPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DescribeRestoreJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DisassociateRecoveryPointFromParentRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.DisassociateRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ExportBackupPlanTemplateRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupPlanFromJsonRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupPlanFromTemplateRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupSelectionRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupVaultAccessPolicyRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetBackupVaultNotificationsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetLegalHoldRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetRecoveryPointRestoreMetadataRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.GetSupportedResourceTypesRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupJobsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupPlanTemplatesRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupPlanVersionsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupPlansRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupSelectionsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListBackupVaultsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListCopyJobsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListFrameworksRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListLegalHoldsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListProtectedResourcesRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListRecoveryPointsByBackupVaultRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListRecoveryPointsByLegalHoldRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListRecoveryPointsByResourceRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListReportJobsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListReportPlansRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListRestoreJobsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.ListTagsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.PutBackupVaultAccessPolicyRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.PutBackupVaultLockConfigurationRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.PutBackupVaultNotificationsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.StartBackupJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.StartCopyJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.StartReportJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.StartRestoreJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.StopBackupJobRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateBackupPlanRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateFrameworkRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateGlobalSettingsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateRecoveryPointLifecycleRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateRegionSettingsRequestMarshaller;
import software.amazon.awssdk.services.backup.transform.UpdateReportPlanRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link BackupClient}.
*
* @see BackupClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultBackupClient implements BackupClient {
private static final Logger log = Logger.loggerFor(DefaultBackupClient.class);
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultBackupClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* This action removes the specified legal hold on a recovery point. This action can only be performed by a user
* with sufficient permissions.
*
*
* @param cancelLegalHoldRequest
* @return Result of the CancelLegalHold operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws InvalidResourceStateException
* Backup is already performing an action on this recovery point. It can't perform the action you requested
* until the first action finishes. Try again later.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CancelLegalHold
* @see AWS API
* Documentation
*/
@Override
public CancelLegalHoldResponse cancelLegalHold(CancelLegalHoldRequest cancelLegalHoldRequest)
throws InvalidParameterValueException, InvalidResourceStateException, MissingParameterValueException,
ServiceUnavailableException, ResourceNotFoundException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CancelLegalHoldResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelLegalHoldRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelLegalHold");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CancelLegalHold").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelLegalHoldRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelLegalHoldRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a backup plan using a backup plan name and backup rules. A backup plan is a document that contains
* information that Backup uses to schedule tasks that create recovery points for resources.
*
*
* If you call CreateBackupPlan
with a plan that already exists, you receive an
* AlreadyExistsException
exception.
*
*
* @param createBackupPlanRequest
* @return Result of the CreateBackupPlan operation returned by the service.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws AlreadyExistsException
* The required resource already exists.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateBackupPlan
* @see AWS API
* Documentation
*/
@Override
public CreateBackupPlanResponse createBackupPlan(CreateBackupPlanRequest createBackupPlanRequest)
throws LimitExceededException, AlreadyExistsException, InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateBackupPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createBackupPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBackupPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateBackupPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createBackupPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateBackupPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a JSON document that specifies a set of resources to assign to a backup plan. For examples, see Assigning resources programmatically.
*
*
* @param createBackupSelectionRequest
* @return Result of the CreateBackupSelection operation returned by the service.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws AlreadyExistsException
* The required resource already exists.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateBackupSelection
* @see AWS
* API Documentation
*/
@Override
public CreateBackupSelectionResponse createBackupSelection(CreateBackupSelectionRequest createBackupSelectionRequest)
throws LimitExceededException, AlreadyExistsException, InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateBackupSelectionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createBackupSelectionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBackupSelection");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateBackupSelection").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createBackupSelectionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateBackupSelectionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a logical container where backups are stored. A CreateBackupVault
request includes a name,
* optionally one or more resource tags, an encryption key, and a request ID.
*
*
*
* Do not include sensitive data, such as passport numbers, in the name of a backup vault.
*
*
*
* @param createBackupVaultRequest
* @return Result of the CreateBackupVault operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws AlreadyExistsException
* The required resource already exists.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateBackupVault
* @see AWS API
* Documentation
*/
@Override
public CreateBackupVaultResponse createBackupVault(CreateBackupVaultRequest createBackupVaultRequest)
throws InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException,
LimitExceededException, AlreadyExistsException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateBackupVaultResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createBackupVaultRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBackupVault");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateBackupVault").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createBackupVaultRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateBackupVaultRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a framework with one or more controls. A framework is a collection of controls that you can use to
* evaluate your backup practices. By using pre-built customizable controls to define your policies, you can
* evaluate whether your backup practices comply with your policies and which resources are not yet in compliance.
*
*
* @param createFrameworkRequest
* @return Result of the CreateFramework operation returned by the service.
* @throws AlreadyExistsException
* The required resource already exists.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateFramework
* @see AWS API
* Documentation
*/
@Override
public CreateFrameworkResponse createFramework(CreateFrameworkRequest createFrameworkRequest) throws AlreadyExistsException,
LimitExceededException, InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException,
AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateFrameworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createFrameworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateFramework");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateFramework").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createFrameworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateFrameworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* This action creates a legal hold on a recovery point (backup). A legal hold is a restraint on altering or
* deleting a backup until an authorized user cancels the legal hold. Any actions to delete or disassociate a
* recovery point will fail with an error if one or more active legal holds are on the recovery point.
*
*
* @param createLegalHoldRequest
* @return Result of the CreateLegalHold operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateLegalHold
* @see AWS API
* Documentation
*/
@Override
public CreateLegalHoldResponse createLegalHold(CreateLegalHoldRequest createLegalHoldRequest)
throws InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException,
LimitExceededException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateLegalHoldResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createLegalHoldRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateLegalHold");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateLegalHold").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createLegalHoldRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateLegalHoldRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a report plan. A report plan is a document that contains information about the contents of the report and
* where Backup will deliver it.
*
*
* If you call CreateReportPlan
with a plan that already exists, you receive an
* AlreadyExistsException
exception.
*
*
* @param createReportPlanRequest
* @return Result of the CreateReportPlan operation returned by the service.
* @throws AlreadyExistsException
* The required resource already exists.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.CreateReportPlan
* @see AWS API
* Documentation
*/
@Override
public CreateReportPlanResponse createReportPlan(CreateReportPlanRequest createReportPlanRequest)
throws AlreadyExistsException, LimitExceededException, InvalidParameterValueException, ServiceUnavailableException,
MissingParameterValueException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateReportPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createReportPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReportPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateReportPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createReportPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateReportPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been
* deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will
* still exist.
*
*
* @param deleteBackupPlanRequest
* @return Result of the DeleteBackupPlan operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupPlan
* @see AWS API
* Documentation
*/
@Override
public DeleteBackupPlanResponse deleteBackupPlan(DeleteBackupPlanRequest deleteBackupPlanRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteBackupPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBackupPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the resource selection associated with a backup plan that is specified by the SelectionId
.
*
*
* @param deleteBackupSelectionRequest
* @return Result of the DeleteBackupSelection operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupSelection
* @see AWS
* API Documentation
*/
@Override
public DeleteBackupSelectionResponse deleteBackupSelection(DeleteBackupSelectionRequest deleteBackupSelectionRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBackupSelectionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBackupSelectionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupSelection");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupSelection").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupSelectionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupSelectionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the backup vault identified by its name. A vault can be deleted only if it is empty.
*
*
* @param deleteBackupVaultRequest
* @return Result of the DeleteBackupVault operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupVault
* @see AWS API
* Documentation
*/
@Override
public DeleteBackupVaultResponse deleteBackupVault(DeleteBackupVaultRequest deleteBackupVaultRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteBackupVaultResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBackupVaultRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupVault");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupVault").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupVaultRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupVaultRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the policy document that manages permissions on a backup vault.
*
*
* @param deleteBackupVaultAccessPolicyRequest
* @return Result of the DeleteBackupVaultAccessPolicy operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupVaultAccessPolicy
* @see AWS API Documentation
*/
@Override
public DeleteBackupVaultAccessPolicyResponse deleteBackupVaultAccessPolicy(
DeleteBackupVaultAccessPolicyRequest deleteBackupVaultAccessPolicyRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBackupVaultAccessPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteBackupVaultAccessPolicyRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupVaultAccessPolicy");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupVaultAccessPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupVaultAccessPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupVaultAccessPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes Backup Vault Lock from a backup vault specified by a backup vault name.
*
*
* If the Vault Lock configuration is immutable, then you cannot delete Vault Lock using API operations, and you
* will receive an InvalidRequestException
if you attempt to do so. For more information, see Vault Lock in the Backup
* Developer Guide.
*
*
* @param deleteBackupVaultLockConfigurationRequest
* @return Result of the DeleteBackupVaultLockConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupVaultLockConfiguration
* @see AWS API Documentation
*/
@Override
public DeleteBackupVaultLockConfigurationResponse deleteBackupVaultLockConfiguration(
DeleteBackupVaultLockConfigurationRequest deleteBackupVaultLockConfigurationRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBackupVaultLockConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteBackupVaultLockConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupVaultLockConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupVaultLockConfiguration").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupVaultLockConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupVaultLockConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes event notifications for the specified backup vault.
*
*
* @param deleteBackupVaultNotificationsRequest
* @return Result of the DeleteBackupVaultNotifications operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteBackupVaultNotifications
* @see AWS API Documentation
*/
@Override
public DeleteBackupVaultNotificationsResponse deleteBackupVaultNotifications(
DeleteBackupVaultNotificationsRequest deleteBackupVaultNotificationsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBackupVaultNotificationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteBackupVaultNotificationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBackupVaultNotifications");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteBackupVaultNotifications").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBackupVaultNotificationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBackupVaultNotificationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the framework specified by a framework name.
*
*
* @param deleteFrameworkRequest
* @return Result of the DeleteFramework operation returned by the service.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ConflictException
* Backup can't perform the action that you requested until it finishes performing a previous action. Try
* again later.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteFramework
* @see AWS API
* Documentation
*/
@Override
public DeleteFrameworkResponse deleteFramework(DeleteFrameworkRequest deleteFrameworkRequest)
throws MissingParameterValueException, InvalidParameterValueException, ServiceUnavailableException,
ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteFrameworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFrameworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFramework");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteFramework").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteFrameworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteFrameworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the recovery point specified by a recovery point ID.
*
*
* If the recovery point ID belongs to a continuous backup, calling this endpoint deletes the existing continuous
* backup and stops future continuous backup.
*
*
* When an IAM role's permissions are insufficient to call this API, the service sends back an HTTP 200 response
* with an empty HTTP body, but the recovery point is not deleted. Instead, it enters an EXPIRED
state.
*
*
* EXPIRED
recovery points can be deleted with this API once the IAM role has the
* iam:CreateServiceLinkedRole
action. To learn more about adding this role, see
* Troubleshooting manual deletions.
*
*
* If the user or role is deleted or the permission within the role is removed, the deletion will not be successful
* and will enter an EXPIRED
state.
*
*
* @param deleteRecoveryPointRequest
* @return Result of the DeleteRecoveryPoint operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidResourceStateException
* Backup is already performing an action on this recovery point. It can't perform the action you requested
* until the first action finishes. Try again later.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteRecoveryPoint
* @see AWS
* API Documentation
*/
@Override
public DeleteRecoveryPointResponse deleteRecoveryPoint(DeleteRecoveryPointRequest deleteRecoveryPointRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
InvalidResourceStateException, ServiceUnavailableException, InvalidRequestException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteRecoveryPointResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRecoveryPointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRecoveryPoint");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteRecoveryPoint").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteRecoveryPointRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteRecoveryPointRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the report plan specified by a report plan name.
*
*
* @param deleteReportPlanRequest
* @return Result of the DeleteReportPlan operation returned by the service.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ConflictException
* Backup can't perform the action that you requested until it finishes performing a previous action. Try
* again later.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DeleteReportPlan
* @see AWS API
* Documentation
*/
@Override
public DeleteReportPlanResponse deleteReportPlan(DeleteReportPlanRequest deleteReportPlanRequest)
throws MissingParameterValueException, InvalidParameterValueException, ConflictException,
ServiceUnavailableException, ResourceNotFoundException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteReportPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReportPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReportPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteReportPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteReportPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteReportPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns backup job details for the specified BackupJobId
.
*
*
* @param describeBackupJobRequest
* @return Result of the DescribeBackupJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws DependencyFailureException
* A dependent Amazon Web Services service or resource returned an error to the Backup service, and the
* action cannot be completed.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeBackupJob
* @see AWS API
* Documentation
*/
@Override
public DescribeBackupJobResponse describeBackupJob(DescribeBackupJobRequest describeBackupJobRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, DependencyFailureException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeBackupJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeBackupJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeBackupJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeBackupJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeBackupJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeBackupJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata about a backup vault specified by its name.
*
*
* @param describeBackupVaultRequest
* @return Result of the DescribeBackupVault operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeBackupVault
* @see AWS
* API Documentation
*/
@Override
public DescribeBackupVaultResponse describeBackupVault(DescribeBackupVaultRequest describeBackupVaultRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeBackupVaultResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeBackupVaultRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeBackupVault");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeBackupVault").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeBackupVaultRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeBackupVaultRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata associated with creating a copy of a resource.
*
*
* @param describeCopyJobRequest
* @return Result of the DescribeCopyJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeCopyJob
* @see AWS API
* Documentation
*/
@Override
public DescribeCopyJobResponse describeCopyJob(DescribeCopyJobRequest describeCopyJobRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeCopyJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCopyJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCopyJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeCopyJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeCopyJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeCopyJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the framework details for the specified FrameworkName
.
*
*
* @param describeFrameworkRequest
* @return Result of the DescribeFramework operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeFramework
* @see AWS API
* Documentation
*/
@Override
public DescribeFrameworkResponse describeFramework(DescribeFrameworkRequest describeFrameworkRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeFrameworkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFrameworkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFramework");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeFramework").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeFrameworkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeFrameworkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes whether the Amazon Web Services account is opted in to cross-account backup. Returns an error if the
* account is not a member of an Organizations organization. Example:
* describe-global-settings --region us-west-2
*
*
* @param describeGlobalSettingsRequest
* @return Result of the DescribeGlobalSettings operation returned by the service.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeGlobalSettings
* @see AWS
* API Documentation
*/
@Override
public DescribeGlobalSettingsResponse describeGlobalSettings(DescribeGlobalSettingsRequest describeGlobalSettingsRequest)
throws InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeGlobalSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeGlobalSettingsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeGlobalSettings");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeGlobalSettings").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeGlobalSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeGlobalSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name
* (ARN), and the Amazon Web Services service type of the saved resource.
*
*
* @param describeProtectedResourceRequest
* @return Result of the DescribeProtectedResource operation returned by the service.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeProtectedResource
* @see AWS API Documentation
*/
@Override
public DescribeProtectedResourceResponse describeProtectedResource(
DescribeProtectedResourceRequest describeProtectedResourceRequest) throws MissingParameterValueException,
InvalidParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeProtectedResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeProtectedResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeProtectedResource");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeProtectedResource").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeProtectedResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeProtectedResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.
*
*
* @param describeRecoveryPointRequest
* @return Result of the DescribeRecoveryPoint operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeRecoveryPoint
* @see AWS
* API Documentation
*/
@Override
public DescribeRecoveryPointResponse describeRecoveryPoint(DescribeRecoveryPointRequest describeRecoveryPointRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeRecoveryPointResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRecoveryPointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRecoveryPoint");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeRecoveryPoint").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeRecoveryPointRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeRecoveryPointRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the current service opt-in settings for the Region. If service opt-in is enabled for a service, Backup
* tries to protect that service's resources in this Region, when the resource is included in an on-demand backup or
* scheduled backup plan. Otherwise, Backup does not try to protect that service's resources in this Region.
*
*
* @param describeRegionSettingsRequest
* @return Result of the DescribeRegionSettings operation returned by the service.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeRegionSettings
* @see AWS
* API Documentation
*/
@Override
public DescribeRegionSettingsResponse describeRegionSettings(DescribeRegionSettingsRequest describeRegionSettingsRequest)
throws ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeRegionSettingsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRegionSettingsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRegionSettings");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeRegionSettings").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeRegionSettingsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeRegionSettingsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the details associated with creating a report as specified by its ReportJobId
.
*
*
* @param describeReportJobRequest
* @return Result of the DescribeReportJob operation returned by the service.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeReportJob
* @see AWS API
* Documentation
*/
@Override
public DescribeReportJobResponse describeReportJob(DescribeReportJobRequest describeReportJobRequest)
throws ServiceUnavailableException, MissingParameterValueException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeReportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeReportJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeReportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeReportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of all report plans for an Amazon Web Services account and Amazon Web Services Region.
*
*
* @param describeReportPlanRequest
* @return Result of the DescribeReportPlan operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeReportPlan
* @see AWS API
* Documentation
*/
@Override
public DescribeReportPlanResponse describeReportPlan(DescribeReportPlanRequest describeReportPlanRequest)
throws InvalidParameterValueException, MissingParameterValueException, ResourceNotFoundException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeReportPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReportPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReportPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeReportPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeReportPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeReportPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata associated with a restore job that is specified by a job ID.
*
*
* @param describeRestoreJobRequest
* @return Result of the DescribeRestoreJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws DependencyFailureException
* A dependent Amazon Web Services service or resource returned an error to the Backup service, and the
* action cannot be completed.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DescribeRestoreJob
* @see AWS API
* Documentation
*/
@Override
public DescribeRestoreJobResponse describeRestoreJob(DescribeRestoreJobRequest describeRestoreJobRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, DependencyFailureException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeRestoreJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRestoreJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRestoreJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeRestoreJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeRestoreJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeRestoreJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified continuous backup recovery point from Backup and releases control of that continuous backup
* to the source service, such as Amazon RDS. The source service will continue to create and retain continuous
* backups using the lifecycle that you specified in your original backup plan.
*
*
* Does not support snapshot backup recovery points.
*
*
* @param disassociateRecoveryPointRequest
* @return Result of the DisassociateRecoveryPoint operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidResourceStateException
* Backup is already performing an action on this recovery point. It can't perform the action you requested
* until the first action finishes. Try again later.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DisassociateRecoveryPoint
* @see AWS API Documentation
*/
@Override
public DisassociateRecoveryPointResponse disassociateRecoveryPoint(
DisassociateRecoveryPointRequest disassociateRecoveryPointRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, InvalidResourceStateException,
ServiceUnavailableException, InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateRecoveryPointResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateRecoveryPointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateRecoveryPoint");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateRecoveryPoint").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(disassociateRecoveryPointRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateRecoveryPointRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* This action to a specific child (nested) recovery point removes the relationship between the specified recovery
* point and its parent (composite) recovery point.
*
*
* @param disassociateRecoveryPointFromParentRequest
* @return Result of the DisassociateRecoveryPointFromParent operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.DisassociateRecoveryPointFromParent
* @see AWS API Documentation
*/
@Override
public DisassociateRecoveryPointFromParentResponse disassociateRecoveryPointFromParent(
DisassociateRecoveryPointFromParentRequest disassociateRecoveryPointFromParentRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateRecoveryPointFromParentResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
disassociateRecoveryPointFromParentRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateRecoveryPointFromParent");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateRecoveryPointFromParent").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(disassociateRecoveryPointFromParentRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateRecoveryPointFromParentRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the backup plan that is specified by the plan ID as a backup template.
*
*
* @param exportBackupPlanTemplateRequest
* @return Result of the ExportBackupPlanTemplate operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ExportBackupPlanTemplate
* @see AWS API Documentation
*/
@Override
public ExportBackupPlanTemplateResponse exportBackupPlanTemplate(
ExportBackupPlanTemplateRequest exportBackupPlanTemplateRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ExportBackupPlanTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, exportBackupPlanTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ExportBackupPlanTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ExportBackupPlanTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(exportBackupPlanTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ExportBackupPlanTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns BackupPlan
details for the specified BackupPlanId
. The details are the body of
* a backup plan in JSON format, in addition to plan metadata.
*
*
* @param getBackupPlanRequest
* @return Result of the GetBackupPlan operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupPlan
* @see AWS API
* Documentation
*/
@Override
public GetBackupPlanResponse getBackupPlan(GetBackupPlanRequest getBackupPlanRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetBackupPlanResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupPlanRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupPlan");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetBackupPlan").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupPlanRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupPlanRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a valid JSON document specifying a backup plan or an error.
*
*
* @param getBackupPlanFromJsonRequest
* @return Result of the GetBackupPlanFromJSON operation returned by the service.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupPlanFromJSON
* @see AWS
* API Documentation
*/
@Override
public GetBackupPlanFromJsonResponse getBackupPlanFromJSON(GetBackupPlanFromJsonRequest getBackupPlanFromJsonRequest)
throws LimitExceededException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetBackupPlanFromJsonResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupPlanFromJsonRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupPlanFromJSON");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetBackupPlanFromJSON").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupPlanFromJsonRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupPlanFromJsonRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the template specified by its templateId
as a backup plan.
*
*
* @param getBackupPlanFromTemplateRequest
* @return Result of the GetBackupPlanFromTemplate operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupPlanFromTemplate
* @see AWS API Documentation
*/
@Override
public GetBackupPlanFromTemplateResponse getBackupPlanFromTemplate(
GetBackupPlanFromTemplateRequest getBackupPlanFromTemplateRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetBackupPlanFromTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupPlanFromTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupPlanFromTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetBackupPlanFromTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupPlanFromTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupPlanFromTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns selection metadata and a document in JSON format that specifies a list of resources that are associated
* with a backup plan.
*
*
* @param getBackupSelectionRequest
* @return Result of the GetBackupSelection operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupSelection
* @see AWS API
* Documentation
*/
@Override
public GetBackupSelectionResponse getBackupSelection(GetBackupSelectionRequest getBackupSelectionRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetBackupSelectionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupSelectionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupSelection");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetBackupSelection").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupSelectionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupSelectionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the access policy document that is associated with the named backup vault.
*
*
* @param getBackupVaultAccessPolicyRequest
* @return Result of the GetBackupVaultAccessPolicy operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupVaultAccessPolicy
* @see AWS API Documentation
*/
@Override
public GetBackupVaultAccessPolicyResponse getBackupVaultAccessPolicy(
GetBackupVaultAccessPolicyRequest getBackupVaultAccessPolicyRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetBackupVaultAccessPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupVaultAccessPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupVaultAccessPolicy");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetBackupVaultAccessPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupVaultAccessPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupVaultAccessPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns event notifications for the specified backup vault.
*
*
* @param getBackupVaultNotificationsRequest
* @return Result of the GetBackupVaultNotifications operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetBackupVaultNotifications
* @see AWS API Documentation
*/
@Override
public GetBackupVaultNotificationsResponse getBackupVaultNotifications(
GetBackupVaultNotificationsRequest getBackupVaultNotificationsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetBackupVaultNotificationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getBackupVaultNotificationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBackupVaultNotifications");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetBackupVaultNotifications").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getBackupVaultNotificationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetBackupVaultNotificationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* This action returns details for a specified legal hold. The details are the body of a legal hold in JSON format,
* in addition to metadata.
*
*
* @param getLegalHoldRequest
* @return Result of the GetLegalHold operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetLegalHold
* @see AWS API
* Documentation
*/
@Override
public GetLegalHoldResponse getLegalHold(GetLegalHoldRequest getLegalHoldRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetLegalHoldResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getLegalHoldRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLegalHold");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetLegalHold").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getLegalHoldRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetLegalHoldRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a set of metadata key-value pairs that were used to create the backup.
*
*
* @param getRecoveryPointRestoreMetadataRequest
* @return Result of the GetRecoveryPointRestoreMetadata operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetRecoveryPointRestoreMetadata
* @see AWS API Documentation
*/
@Override
public GetRecoveryPointRestoreMetadataResponse getRecoveryPointRestoreMetadata(
GetRecoveryPointRestoreMetadataRequest getRecoveryPointRestoreMetadataRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetRecoveryPointRestoreMetadataResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getRecoveryPointRestoreMetadataRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRecoveryPointRestoreMetadata");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetRecoveryPointRestoreMetadata").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getRecoveryPointRestoreMetadataRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetRecoveryPointRestoreMetadataRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns the Amazon Web Services resource types supported by Backup.
*
*
* @param getSupportedResourceTypesRequest
* @return Result of the GetSupportedResourceTypes operation returned by the service.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.GetSupportedResourceTypes
* @see AWS API Documentation
*/
@Override
public GetSupportedResourceTypesResponse getSupportedResourceTypes(
GetSupportedResourceTypesRequest getSupportedResourceTypesRequest) throws ServiceUnavailableException,
AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetSupportedResourceTypesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSupportedResourceTypesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSupportedResourceTypes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetSupportedResourceTypes").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getSupportedResourceTypesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSupportedResourceTypesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of existing backup jobs for an authenticated account for the last 30 days. For a longer period of
* time, consider using these monitoring tools.
*
*
* @param listBackupJobsRequest
* @return Result of the ListBackupJobs operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupJobs
* @see AWS API
* Documentation
*/
@Override
public ListBackupJobsResponse listBackupJobs(ListBackupJobsRequest listBackupJobsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListBackupJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListBackupJobs").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of existing backup jobs for an authenticated account for the last 30 days. For a longer period of
* time, consider using these monitoring tools.
*
*
*
* This is a variant of {@link #listBackupJobs(software.amazon.awssdk.services.backup.model.ListBackupJobsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupJobsIterable responses = client.listBackupJobsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupJobsIterable responses = client.listBackupJobsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupJobsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupJobsIterable responses = client.listBackupJobsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupJobs(software.amazon.awssdk.services.backup.model.ListBackupJobsRequest)} operation.
*
*
* @param listBackupJobsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupJobs
* @see AWS API
* Documentation
*/
@Override
public ListBackupJobsIterable listBackupJobsPaginator(ListBackupJobsRequest listBackupJobsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
return new ListBackupJobsIterable(this, applyPaginatorUserAgent(listBackupJobsRequest));
}
/**
*
* Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and
* deletion dates.
*
*
* @param listBackupPlanTemplatesRequest
* @return Result of the ListBackupPlanTemplates operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlanTemplates
* @see AWS API Documentation
*/
@Override
public ListBackupPlanTemplatesResponse listBackupPlanTemplates(ListBackupPlanTemplatesRequest listBackupPlanTemplatesRequest)
throws InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException,
ResourceNotFoundException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListBackupPlanTemplatesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupPlanTemplatesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupPlanTemplates");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListBackupPlanTemplates").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupPlanTemplatesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupPlanTemplatesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and
* deletion dates.
*
*
*
* This is a variant of
* {@link #listBackupPlanTemplates(software.amazon.awssdk.services.backup.model.ListBackupPlanTemplatesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanTemplatesIterable responses = client.listBackupPlanTemplatesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanTemplatesIterable responses = client
* .listBackupPlanTemplatesPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupPlanTemplatesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanTemplatesIterable responses = client.listBackupPlanTemplatesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupPlanTemplates(software.amazon.awssdk.services.backup.model.ListBackupPlanTemplatesRequest)}
* operation.
*
*
* @param listBackupPlanTemplatesRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlanTemplates
* @see AWS API Documentation
*/
@Override
public ListBackupPlanTemplatesIterable listBackupPlanTemplatesPaginator(
ListBackupPlanTemplatesRequest listBackupPlanTemplatesRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
return new ListBackupPlanTemplatesIterable(this, applyPaginatorUserAgent(listBackupPlanTemplatesRequest));
}
/**
*
* Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation
* and deletion dates, plan names, and version IDs.
*
*
* @param listBackupPlanVersionsRequest
* @return Result of the ListBackupPlanVersions operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlanVersions
* @see AWS
* API Documentation
*/
@Override
public ListBackupPlanVersionsResponse listBackupPlanVersions(ListBackupPlanVersionsRequest listBackupPlanVersionsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListBackupPlanVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupPlanVersionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupPlanVersions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListBackupPlanVersions").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupPlanVersionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupPlanVersionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation
* and deletion dates, plan names, and version IDs.
*
*
*
* This is a variant of
* {@link #listBackupPlanVersions(software.amazon.awssdk.services.backup.model.ListBackupPlanVersionsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanVersionsIterable responses = client.listBackupPlanVersionsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanVersionsIterable responses = client
* .listBackupPlanVersionsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupPlanVersionsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlanVersionsIterable responses = client.listBackupPlanVersionsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupPlanVersions(software.amazon.awssdk.services.backup.model.ListBackupPlanVersionsRequest)}
* operation.
*
*
* @param listBackupPlanVersionsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlanVersions
* @see AWS
* API Documentation
*/
@Override
public ListBackupPlanVersionsIterable listBackupPlanVersionsPaginator(
ListBackupPlanVersionsRequest listBackupPlanVersionsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
return new ListBackupPlanVersionsIterable(this, applyPaginatorUserAgent(listBackupPlanVersionsRequest));
}
/**
*
* Returns a list of all active backup plans for an authenticated account. The list contains information such as
* Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request
* IDs.
*
*
* @param listBackupPlansRequest
* @return Result of the ListBackupPlans operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlans
* @see AWS API
* Documentation
*/
@Override
public ListBackupPlansResponse listBackupPlans(ListBackupPlansRequest listBackupPlansRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListBackupPlansResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupPlansRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupPlans");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListBackupPlans").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupPlansRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupPlansRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of all active backup plans for an authenticated account. The list contains information such as
* Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request
* IDs.
*
*
*
* This is a variant of
* {@link #listBackupPlans(software.amazon.awssdk.services.backup.model.ListBackupPlansRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlansIterable responses = client.listBackupPlansPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlansIterable responses = client
* .listBackupPlansPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupPlansResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupPlansIterable responses = client.listBackupPlansPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupPlans(software.amazon.awssdk.services.backup.model.ListBackupPlansRequest)} operation.
*
*
* @param listBackupPlansRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupPlans
* @see AWS API
* Documentation
*/
@Override
public ListBackupPlansIterable listBackupPlansPaginator(ListBackupPlansRequest listBackupPlansRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListBackupPlansIterable(this, applyPaginatorUserAgent(listBackupPlansRequest));
}
/**
*
* Returns an array containing metadata of the resources associated with the target backup plan.
*
*
* @param listBackupSelectionsRequest
* @return Result of the ListBackupSelections operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupSelections
* @see AWS
* API Documentation
*/
@Override
public ListBackupSelectionsResponse listBackupSelections(ListBackupSelectionsRequest listBackupSelectionsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListBackupSelectionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupSelectionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupSelections");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListBackupSelections").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupSelectionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupSelectionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns an array containing metadata of the resources associated with the target backup plan.
*
*
*
* This is a variant of
* {@link #listBackupSelections(software.amazon.awssdk.services.backup.model.ListBackupSelectionsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupSelectionsIterable responses = client.listBackupSelectionsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupSelectionsIterable responses = client
* .listBackupSelectionsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupSelectionsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupSelectionsIterable responses = client.listBackupSelectionsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupSelections(software.amazon.awssdk.services.backup.model.ListBackupSelectionsRequest)}
* operation.
*
*
* @param listBackupSelectionsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupSelections
* @see AWS
* API Documentation
*/
@Override
public ListBackupSelectionsIterable listBackupSelectionsPaginator(ListBackupSelectionsRequest listBackupSelectionsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListBackupSelectionsIterable(this, applyPaginatorUserAgent(listBackupSelectionsRequest));
}
/**
*
* Returns a list of recovery point storage containers along with information about them.
*
*
* @param listBackupVaultsRequest
* @return Result of the ListBackupVaults operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupVaults
* @see AWS API
* Documentation
*/
@Override
public ListBackupVaultsResponse listBackupVaults(ListBackupVaultsRequest listBackupVaultsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListBackupVaultsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listBackupVaultsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBackupVaults");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListBackupVaults").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listBackupVaultsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListBackupVaultsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of recovery point storage containers along with information about them.
*
*
*
* This is a variant of
* {@link #listBackupVaults(software.amazon.awssdk.services.backup.model.ListBackupVaultsRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupVaultsIterable responses = client.listBackupVaultsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListBackupVaultsIterable responses = client
* .listBackupVaultsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListBackupVaultsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListBackupVaultsIterable responses = client.listBackupVaultsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listBackupVaults(software.amazon.awssdk.services.backup.model.ListBackupVaultsRequest)} operation.
*
*
* @param listBackupVaultsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListBackupVaults
* @see AWS API
* Documentation
*/
@Override
public ListBackupVaultsIterable listBackupVaultsPaginator(ListBackupVaultsRequest listBackupVaultsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListBackupVaultsIterable(this, applyPaginatorUserAgent(listBackupVaultsRequest));
}
/**
*
* Returns metadata about your copy jobs.
*
*
* @param listCopyJobsRequest
* @return Result of the ListCopyJobs operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListCopyJobs
* @see AWS API
* Documentation
*/
@Override
public ListCopyJobsResponse listCopyJobs(ListCopyJobsRequest listCopyJobsRequest) throws InvalidParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListCopyJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listCopyJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCopyJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListCopyJobs").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listCopyJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListCopyJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns metadata about your copy jobs.
*
*
*
* This is a variant of {@link #listCopyJobs(software.amazon.awssdk.services.backup.model.ListCopyJobsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListCopyJobsIterable responses = client.listCopyJobsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListCopyJobsIterable responses = client.listCopyJobsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListCopyJobsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListCopyJobsIterable responses = client.listCopyJobsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listCopyJobs(software.amazon.awssdk.services.backup.model.ListCopyJobsRequest)} operation.
*
*
* @param listCopyJobsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListCopyJobs
* @see AWS API
* Documentation
*/
@Override
public ListCopyJobsIterable listCopyJobsPaginator(ListCopyJobsRequest listCopyJobsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
return new ListCopyJobsIterable(this, applyPaginatorUserAgent(listCopyJobsRequest));
}
/**
*
* Returns a list of all frameworks for an Amazon Web Services account and Amazon Web Services Region.
*
*
* @param listFrameworksRequest
* @return Result of the ListFrameworks operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListFrameworks
* @see AWS API
* Documentation
*/
@Override
public ListFrameworksResponse listFrameworks(ListFrameworksRequest listFrameworksRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListFrameworksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listFrameworksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFrameworks");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListFrameworks").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listFrameworksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListFrameworksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of all frameworks for an Amazon Web Services account and Amazon Web Services Region.
*
*
*
* This is a variant of {@link #listFrameworks(software.amazon.awssdk.services.backup.model.ListFrameworksRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListFrameworksIterable responses = client.listFrameworksPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListFrameworksIterable responses = client.listFrameworksPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListFrameworksResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListFrameworksIterable responses = client.listFrameworksPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listFrameworks(software.amazon.awssdk.services.backup.model.ListFrameworksRequest)} operation.
*
*
* @param listFrameworksRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListFrameworks
* @see AWS API
* Documentation
*/
@Override
public ListFrameworksIterable listFrameworksPaginator(ListFrameworksRequest listFrameworksRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
return new ListFrameworksIterable(this, applyPaginatorUserAgent(listFrameworksRequest));
}
/**
*
* This action returns metadata about active and previous legal holds.
*
*
* @param listLegalHoldsRequest
* @return Result of the ListLegalHolds operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListLegalHolds
* @see AWS API
* Documentation
*/
@Override
public ListLegalHoldsResponse listLegalHolds(ListLegalHoldsRequest listLegalHoldsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListLegalHoldsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listLegalHoldsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListLegalHolds");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListLegalHolds").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listLegalHoldsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListLegalHoldsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* This action returns metadata about active and previous legal holds.
*
*
*
* This is a variant of {@link #listLegalHolds(software.amazon.awssdk.services.backup.model.ListLegalHoldsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListLegalHoldsIterable responses = client.listLegalHoldsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListLegalHoldsIterable responses = client.listLegalHoldsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListLegalHoldsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListLegalHoldsIterable responses = client.listLegalHoldsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listLegalHolds(software.amazon.awssdk.services.backup.model.ListLegalHoldsRequest)} operation.
*
*
* @param listLegalHoldsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListLegalHolds
* @see AWS API
* Documentation
*/
@Override
public ListLegalHoldsIterable listLegalHoldsPaginator(ListLegalHoldsRequest listLegalHoldsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
return new ListLegalHoldsIterable(this, applyPaginatorUserAgent(listLegalHoldsRequest));
}
/**
*
* Returns an array of resources successfully backed up by Backup, including the time the resource was saved, an
* Amazon Resource Name (ARN) of the resource, and a resource type.
*
*
* @param listProtectedResourcesRequest
* @return Result of the ListProtectedResources operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListProtectedResources
* @see AWS
* API Documentation
*/
@Override
public ListProtectedResourcesResponse listProtectedResources(ListProtectedResourcesRequest listProtectedResourcesRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListProtectedResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listProtectedResourcesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListProtectedResources");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListProtectedResources").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listProtectedResourcesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListProtectedResourcesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns an array of resources successfully backed up by Backup, including the time the resource was saved, an
* Amazon Resource Name (ARN) of the resource, and a resource type.
*
*
*
* This is a variant of
* {@link #listProtectedResources(software.amazon.awssdk.services.backup.model.ListProtectedResourcesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListProtectedResourcesIterable responses = client.listProtectedResourcesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListProtectedResourcesIterable responses = client
* .listProtectedResourcesPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListProtectedResourcesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListProtectedResourcesIterable responses = client.listProtectedResourcesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listProtectedResources(software.amazon.awssdk.services.backup.model.ListProtectedResourcesRequest)}
* operation.
*
*
* @param listProtectedResourcesRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListProtectedResources
* @see AWS
* API Documentation
*/
@Override
public ListProtectedResourcesIterable listProtectedResourcesPaginator(
ListProtectedResourcesRequest listProtectedResourcesRequest) throws InvalidParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListProtectedResourcesIterable(this, applyPaginatorUserAgent(listProtectedResourcesRequest));
}
/**
*
* Returns detailed information about the recovery points stored in a backup vault.
*
*
* @param listRecoveryPointsByBackupVaultRequest
* @return Result of the ListRecoveryPointsByBackupVault operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByBackupVault
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByBackupVaultResponse listRecoveryPointsByBackupVault(
ListRecoveryPointsByBackupVaultRequest listRecoveryPointsByBackupVaultRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListRecoveryPointsByBackupVaultResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
listRecoveryPointsByBackupVaultRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRecoveryPointsByBackupVault");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListRecoveryPointsByBackupVault").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listRecoveryPointsByBackupVaultRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRecoveryPointsByBackupVaultRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns detailed information about the recovery points stored in a backup vault.
*
*
*
* This is a variant of
* {@link #listRecoveryPointsByBackupVault(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByBackupVaultRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByBackupVaultIterable responses = client.listRecoveryPointsByBackupVaultPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByBackupVaultIterable responses = client
* .listRecoveryPointsByBackupVaultPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListRecoveryPointsByBackupVaultResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByBackupVaultIterable responses = client.listRecoveryPointsByBackupVaultPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listRecoveryPointsByBackupVault(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByBackupVaultRequest)}
* operation.
*
*
* @param listRecoveryPointsByBackupVaultRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByBackupVault
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByBackupVaultIterable listRecoveryPointsByBackupVaultPaginator(
ListRecoveryPointsByBackupVaultRequest listRecoveryPointsByBackupVaultRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
return new ListRecoveryPointsByBackupVaultIterable(this, applyPaginatorUserAgent(listRecoveryPointsByBackupVaultRequest));
}
/**
*
* This action returns recovery point ARNs (Amazon Resource Names) of the specified legal hold.
*
*
* @param listRecoveryPointsByLegalHoldRequest
* @return Result of the ListRecoveryPointsByLegalHold operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByLegalHold
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByLegalHoldResponse listRecoveryPointsByLegalHold(
ListRecoveryPointsByLegalHoldRequest listRecoveryPointsByLegalHoldRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListRecoveryPointsByLegalHoldResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
listRecoveryPointsByLegalHoldRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRecoveryPointsByLegalHold");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListRecoveryPointsByLegalHold").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listRecoveryPointsByLegalHoldRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRecoveryPointsByLegalHoldRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* This action returns recovery point ARNs (Amazon Resource Names) of the specified legal hold.
*
*
*
* This is a variant of
* {@link #listRecoveryPointsByLegalHold(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByLegalHoldRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByLegalHoldIterable responses = client.listRecoveryPointsByLegalHoldPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByLegalHoldIterable responses = client
* .listRecoveryPointsByLegalHoldPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListRecoveryPointsByLegalHoldResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByLegalHoldIterable responses = client.listRecoveryPointsByLegalHoldPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listRecoveryPointsByLegalHold(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByLegalHoldRequest)}
* operation.
*
*
* @param listRecoveryPointsByLegalHoldRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByLegalHold
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByLegalHoldIterable listRecoveryPointsByLegalHoldPaginator(
ListRecoveryPointsByLegalHoldRequest listRecoveryPointsByLegalHoldRequest) throws InvalidParameterValueException,
MissingParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListRecoveryPointsByLegalHoldIterable(this, applyPaginatorUserAgent(listRecoveryPointsByLegalHoldRequest));
}
/**
*
* Returns detailed information about all the recovery points of the type specified by a resource Amazon Resource
* Name (ARN).
*
*
*
* For Amazon EFS and Amazon EC2, this action only lists recovery points created by Backup.
*
*
*
* @param listRecoveryPointsByResourceRequest
* @return Result of the ListRecoveryPointsByResource operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByResource
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByResourceResponse listRecoveryPointsByResource(
ListRecoveryPointsByResourceRequest listRecoveryPointsByResourceRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListRecoveryPointsByResourceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listRecoveryPointsByResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRecoveryPointsByResource");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListRecoveryPointsByResource").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listRecoveryPointsByResourceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRecoveryPointsByResourceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns detailed information about all the recovery points of the type specified by a resource Amazon Resource
* Name (ARN).
*
*
*
* For Amazon EFS and Amazon EC2, this action only lists recovery points created by Backup.
*
*
*
* This is a variant of
* {@link #listRecoveryPointsByResource(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByResourceRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByResourceIterable responses = client.listRecoveryPointsByResourcePaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByResourceIterable responses = client
* .listRecoveryPointsByResourcePaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListRecoveryPointsByResourceResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRecoveryPointsByResourceIterable responses = client.listRecoveryPointsByResourcePaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listRecoveryPointsByResource(software.amazon.awssdk.services.backup.model.ListRecoveryPointsByResourceRequest)}
* operation.
*
*
* @param listRecoveryPointsByResourceRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRecoveryPointsByResource
* @see AWS API Documentation
*/
@Override
public ListRecoveryPointsByResourceIterable listRecoveryPointsByResourcePaginator(
ListRecoveryPointsByResourceRequest listRecoveryPointsByResourceRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
return new ListRecoveryPointsByResourceIterable(this, applyPaginatorUserAgent(listRecoveryPointsByResourceRequest));
}
/**
*
* Returns details about your report jobs.
*
*
* @param listReportJobsRequest
* @return Result of the ListReportJobs operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListReportJobs
* @see AWS API
* Documentation
*/
@Override
public ListReportJobsResponse listReportJobs(ListReportJobsRequest listReportJobsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListReportJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listReportJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReportJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListReportJobs").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listReportJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListReportJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns details about your report jobs.
*
*
*
* This is a variant of {@link #listReportJobs(software.amazon.awssdk.services.backup.model.ListReportJobsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListReportJobsIterable responses = client.listReportJobsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListReportJobsIterable responses = client.listReportJobsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListReportJobsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListReportJobsIterable responses = client.listReportJobsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listReportJobs(software.amazon.awssdk.services.backup.model.ListReportJobsRequest)} operation.
*
*
* @param listReportJobsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListReportJobs
* @see AWS API
* Documentation
*/
@Override
public ListReportJobsIterable listReportJobsPaginator(ListReportJobsRequest listReportJobsRequest)
throws InvalidParameterValueException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException,
SdkClientException, BackupException {
return new ListReportJobsIterable(this, applyPaginatorUserAgent(listReportJobsRequest));
}
/**
*
* Returns a list of your report plans. For detailed information about a single report plan, use
* DescribeReportPlan
.
*
*
* @param listReportPlansRequest
* @return Result of the ListReportPlans operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListReportPlans
* @see AWS API
* Documentation
*/
@Override
public ListReportPlansResponse listReportPlans(ListReportPlansRequest listReportPlansRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListReportPlansResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listReportPlansRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReportPlans");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListReportPlans").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listReportPlansRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListReportPlansRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of your report plans. For detailed information about a single report plan, use
* DescribeReportPlan
.
*
*
*
* This is a variant of
* {@link #listReportPlans(software.amazon.awssdk.services.backup.model.ListReportPlansRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListReportPlansIterable responses = client.listReportPlansPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListReportPlansIterable responses = client
* .listReportPlansPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListReportPlansResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListReportPlansIterable responses = client.listReportPlansPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listReportPlans(software.amazon.awssdk.services.backup.model.ListReportPlansRequest)} operation.
*
*
* @param listReportPlansRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListReportPlans
* @see AWS API
* Documentation
*/
@Override
public ListReportPlansIterable listReportPlansPaginator(ListReportPlansRequest listReportPlansRequest)
throws InvalidParameterValueException, ServiceUnavailableException, AwsServiceException, SdkClientException,
BackupException {
return new ListReportPlansIterable(this, applyPaginatorUserAgent(listReportPlansRequest));
}
/**
*
* Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery
* process.
*
*
* @param listRestoreJobsRequest
* @return Result of the ListRestoreJobs operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRestoreJobs
* @see AWS API
* Documentation
*/
@Override
public ListRestoreJobsResponse listRestoreJobs(ListRestoreJobsRequest listRestoreJobsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListRestoreJobsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listRestoreJobsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRestoreJobs");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListRestoreJobs").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listRestoreJobsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListRestoreJobsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery
* process.
*
*
*
* This is a variant of
* {@link #listRestoreJobs(software.amazon.awssdk.services.backup.model.ListRestoreJobsRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRestoreJobsIterable responses = client.listRestoreJobsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListRestoreJobsIterable responses = client
* .listRestoreJobsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListRestoreJobsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListRestoreJobsIterable responses = client.listRestoreJobsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listRestoreJobs(software.amazon.awssdk.services.backup.model.ListRestoreJobsRequest)} operation.
*
*
* @param listRestoreJobsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListRestoreJobs
* @see AWS API
* Documentation
*/
@Override
public ListRestoreJobsIterable listRestoreJobsPaginator(ListRestoreJobsRequest listRestoreJobsRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
return new ListRestoreJobsIterable(this, applyPaginatorUserAgent(listRestoreJobsRequest));
}
/**
*
* Returns a list of key-value pairs assigned to a target recovery point, backup plan, or backup vault.
*
*
* ListTags
only works for resource types that support full Backup management of their backups. Those
* resource types are listed in the "Full Backup management" section of the Feature
* availability by resource table.
*
*
* @param listTagsRequest
* @return Result of the ListTags operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListTags
* @see AWS API
* Documentation
*/
@Override
public ListTagsResponse listTags(ListTagsRequest listTagsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListTagsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTags");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTags").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listTagsRequest)
.withMetricCollector(apiCallMetricCollector).withMarshaller(new ListTagsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a list of key-value pairs assigned to a target recovery point, backup plan, or backup vault.
*
*
* ListTags
only works for resource types that support full Backup management of their backups. Those
* resource types are listed in the "Full Backup management" section of the Feature
* availability by resource table.
*
*
*
* This is a variant of {@link #listTags(software.amazon.awssdk.services.backup.model.ListTagsRequest)} operation.
* The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
* handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListTagsIterable responses = client.listTagsPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.backup.paginators.ListTagsIterable responses = client.listTagsPaginator(request);
* for (software.amazon.awssdk.services.backup.model.ListTagsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.backup.paginators.ListTagsIterable responses = client.listTagsPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTags(software.amazon.awssdk.services.backup.model.ListTagsRequest)} operation.
*
*
* @param listTagsRequest
* @return A custom iterable that can be used to iterate through all the response pages.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.ListTags
* @see AWS API
* Documentation
*/
@Override
public ListTagsIterable listTagsPaginator(ListTagsRequest listTagsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
return new ListTagsIterable(this, applyPaginatorUserAgent(listTagsRequest));
}
/**
*
* Sets a resource-based policy that is used to manage access permissions on the target backup vault. Requires a
* backup vault name and an access policy document in JSON format.
*
*
* @param putBackupVaultAccessPolicyRequest
* @return Result of the PutBackupVaultAccessPolicy operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.PutBackupVaultAccessPolicy
* @see AWS API Documentation
*/
@Override
public PutBackupVaultAccessPolicyResponse putBackupVaultAccessPolicy(
PutBackupVaultAccessPolicyRequest putBackupVaultAccessPolicyRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, PutBackupVaultAccessPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, putBackupVaultAccessPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBackupVaultAccessPolicy");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutBackupVaultAccessPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(putBackupVaultAccessPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutBackupVaultAccessPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Applies Backup Vault Lock to a backup vault, preventing attempts to delete any recovery point stored in or
* created in a backup vault. Vault Lock also prevents attempts to update the lifecycle policy that controls the
* retention period of any recovery point currently stored in a backup vault. If specified, Vault Lock enforces a
* minimum and maximum retention period for future backup and copy jobs that target a backup vault.
*
*
*
* Backup Vault Lock has yet to receive a third-party assessment for SEC 17a-4(f) and CFTC.
*
*
*
* @param putBackupVaultLockConfigurationRequest
* @return Result of the PutBackupVaultLockConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.PutBackupVaultLockConfiguration
* @see AWS API Documentation
*/
@Override
public PutBackupVaultLockConfigurationResponse putBackupVaultLockConfiguration(
PutBackupVaultLockConfigurationRequest putBackupVaultLockConfigurationRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, InvalidRequestException, ServiceUnavailableException,
AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, PutBackupVaultLockConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
putBackupVaultLockConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBackupVaultLockConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutBackupVaultLockConfiguration").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(putBackupVaultLockConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutBackupVaultLockConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Turns on notifications on a backup vault for the specified topic and events.
*
*
* @param putBackupVaultNotificationsRequest
* @return Result of the PutBackupVaultNotifications operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.PutBackupVaultNotifications
* @see AWS API Documentation
*/
@Override
public PutBackupVaultNotificationsResponse putBackupVaultNotifications(
PutBackupVaultNotificationsRequest putBackupVaultNotificationsRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, AwsServiceException,
SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, PutBackupVaultNotificationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, putBackupVaultNotificationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBackupVaultNotifications");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutBackupVaultNotifications").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(putBackupVaultNotificationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutBackupVaultNotificationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Starts an on-demand backup job for the specified resource.
*
*
* @param startBackupJobRequest
* @return Result of the StartBackupJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.StartBackupJob
* @see AWS API
* Documentation
*/
@Override
public StartBackupJobResponse startBackupJob(StartBackupJobRequest startBackupJobRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, InvalidRequestException, ServiceUnavailableException,
LimitExceededException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
StartBackupJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, startBackupJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartBackupJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("StartBackupJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(startBackupJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new StartBackupJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Starts a job to create a one-time copy of the specified resource.
*
*
* Does not support continuous backups.
*
*
* @param startCopyJobRequest
* @return Result of the StartCopyJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws LimitExceededException
* A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.
* @throws InvalidRequestException
* Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong
* type.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.StartCopyJob
* @see AWS API
* Documentation
*/
@Override
public StartCopyJobResponse startCopyJob(StartCopyJobRequest startCopyJobRequest) throws ResourceNotFoundException,
InvalidParameterValueException, MissingParameterValueException, ServiceUnavailableException, LimitExceededException,
InvalidRequestException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
StartCopyJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, startCopyJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartCopyJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("StartCopyJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(startCopyJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new StartCopyJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Starts an on-demand report job for the specified report plan.
*
*
* @param startReportJobRequest
* @return Result of the StartReportJob operation returned by the service.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.StartReportJob
* @see AWS API
* Documentation
*/
@Override
public StartReportJobResponse startReportJob(StartReportJobRequest startReportJobRequest)
throws InvalidParameterValueException, ServiceUnavailableException, MissingParameterValueException,
ResourceNotFoundException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
StartReportJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, startReportJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Backup");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartReportJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("StartReportJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(startReportJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new StartReportJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Recovers the saved resource identified by an Amazon Resource Name (ARN).
*
*
* @param startRestoreJobRequest
* @return Result of the StartRestoreJob operation returned by the service.
* @throws ResourceNotFoundException
* A resource that is required for the action doesn't exist.
* @throws InvalidParameterValueException
* Indicates that something is wrong with a parameter's value. For example, the value is out of range.
* @throws MissingParameterValueException
* Indicates that a required parameter is missing.
* @throws ServiceUnavailableException
* The request failed due to a temporary failure of the server.
* @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 BackupException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample BackupClient.StartRestoreJob
* @see AWS API
* Documentation
*/
@Override
public StartRestoreJobResponse startRestoreJob(StartRestoreJobRequest startRestoreJobRequest)
throws ResourceNotFoundException, InvalidParameterValueException, MissingParameterValueException,
ServiceUnavailableException, AwsServiceException, SdkClientException, BackupException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
StartRestoreJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List