software.amazon.awssdk.services.cloudformation.DefaultCloudFormationAsyncClient Maven / Gradle / Ivy
Show all versions of cloudformation Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.cloudformation;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.services.cloudformation.model.AlreadyExistsException;
import software.amazon.awssdk.services.cloudformation.model.CancelUpdateStackRequest;
import software.amazon.awssdk.services.cloudformation.model.CancelUpdateStackResponse;
import software.amazon.awssdk.services.cloudformation.model.CfnRegistryException;
import software.amazon.awssdk.services.cloudformation.model.ChangeSetNotFoundException;
import software.amazon.awssdk.services.cloudformation.model.CloudFormationException;
import software.amazon.awssdk.services.cloudformation.model.CloudFormationRequest;
import software.amazon.awssdk.services.cloudformation.model.ContinueUpdateRollbackRequest;
import software.amazon.awssdk.services.cloudformation.model.ContinueUpdateRollbackResponse;
import software.amazon.awssdk.services.cloudformation.model.CreateChangeSetRequest;
import software.amazon.awssdk.services.cloudformation.model.CreateChangeSetResponse;
import software.amazon.awssdk.services.cloudformation.model.CreateStackInstancesRequest;
import software.amazon.awssdk.services.cloudformation.model.CreateStackInstancesResponse;
import software.amazon.awssdk.services.cloudformation.model.CreateStackRequest;
import software.amazon.awssdk.services.cloudformation.model.CreateStackResponse;
import software.amazon.awssdk.services.cloudformation.model.CreateStackSetRequest;
import software.amazon.awssdk.services.cloudformation.model.CreateStackSetResponse;
import software.amazon.awssdk.services.cloudformation.model.CreatedButModifiedException;
import software.amazon.awssdk.services.cloudformation.model.DeleteChangeSetRequest;
import software.amazon.awssdk.services.cloudformation.model.DeleteChangeSetResponse;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackInstancesRequest;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackInstancesResponse;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackRequest;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackResponse;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackSetRequest;
import software.amazon.awssdk.services.cloudformation.model.DeleteStackSetResponse;
import software.amazon.awssdk.services.cloudformation.model.DeregisterTypeRequest;
import software.amazon.awssdk.services.cloudformation.model.DeregisterTypeResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeAccountLimitsRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeAccountLimitsResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeChangeSetRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeChangeSetResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackDriftDetectionStatusRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackDriftDetectionStatusResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackEventsRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackEventsResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackInstanceRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackInstanceResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceDriftsRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceDriftsResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourcesRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackResourcesResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackSetOperationRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackSetOperationResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackSetRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStackSetResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeStacksRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeStacksResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeTypeRegistrationRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeTypeRegistrationResponse;
import software.amazon.awssdk.services.cloudformation.model.DescribeTypeRequest;
import software.amazon.awssdk.services.cloudformation.model.DescribeTypeResponse;
import software.amazon.awssdk.services.cloudformation.model.DetectStackDriftRequest;
import software.amazon.awssdk.services.cloudformation.model.DetectStackDriftResponse;
import software.amazon.awssdk.services.cloudformation.model.DetectStackResourceDriftRequest;
import software.amazon.awssdk.services.cloudformation.model.DetectStackResourceDriftResponse;
import software.amazon.awssdk.services.cloudformation.model.DetectStackSetDriftRequest;
import software.amazon.awssdk.services.cloudformation.model.DetectStackSetDriftResponse;
import software.amazon.awssdk.services.cloudformation.model.EstimateTemplateCostRequest;
import software.amazon.awssdk.services.cloudformation.model.EstimateTemplateCostResponse;
import software.amazon.awssdk.services.cloudformation.model.ExecuteChangeSetRequest;
import software.amazon.awssdk.services.cloudformation.model.ExecuteChangeSetResponse;
import software.amazon.awssdk.services.cloudformation.model.GetStackPolicyRequest;
import software.amazon.awssdk.services.cloudformation.model.GetStackPolicyResponse;
import software.amazon.awssdk.services.cloudformation.model.GetTemplateRequest;
import software.amazon.awssdk.services.cloudformation.model.GetTemplateResponse;
import software.amazon.awssdk.services.cloudformation.model.GetTemplateSummaryRequest;
import software.amazon.awssdk.services.cloudformation.model.GetTemplateSummaryResponse;
import software.amazon.awssdk.services.cloudformation.model.InsufficientCapabilitiesException;
import software.amazon.awssdk.services.cloudformation.model.InvalidChangeSetStatusException;
import software.amazon.awssdk.services.cloudformation.model.InvalidOperationException;
import software.amazon.awssdk.services.cloudformation.model.InvalidStateTransitionException;
import software.amazon.awssdk.services.cloudformation.model.LimitExceededException;
import software.amazon.awssdk.services.cloudformation.model.ListChangeSetsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListChangeSetsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListExportsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListExportsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListImportsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListImportsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStackInstancesRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStackInstancesResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStackResourcesRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStackResourcesResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationResultsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationResultsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStackSetsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListStacksRequest;
import software.amazon.awssdk.services.cloudformation.model.ListStacksResponse;
import software.amazon.awssdk.services.cloudformation.model.ListTypeRegistrationsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListTypeRegistrationsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListTypeVersionsRequest;
import software.amazon.awssdk.services.cloudformation.model.ListTypeVersionsResponse;
import software.amazon.awssdk.services.cloudformation.model.ListTypesRequest;
import software.amazon.awssdk.services.cloudformation.model.ListTypesResponse;
import software.amazon.awssdk.services.cloudformation.model.NameAlreadyExistsException;
import software.amazon.awssdk.services.cloudformation.model.OperationIdAlreadyExistsException;
import software.amazon.awssdk.services.cloudformation.model.OperationInProgressException;
import software.amazon.awssdk.services.cloudformation.model.OperationNotFoundException;
import software.amazon.awssdk.services.cloudformation.model.OperationStatusCheckFailedException;
import software.amazon.awssdk.services.cloudformation.model.RecordHandlerProgressRequest;
import software.amazon.awssdk.services.cloudformation.model.RecordHandlerProgressResponse;
import software.amazon.awssdk.services.cloudformation.model.RegisterTypeRequest;
import software.amazon.awssdk.services.cloudformation.model.RegisterTypeResponse;
import software.amazon.awssdk.services.cloudformation.model.SetStackPolicyRequest;
import software.amazon.awssdk.services.cloudformation.model.SetStackPolicyResponse;
import software.amazon.awssdk.services.cloudformation.model.SetTypeDefaultVersionRequest;
import software.amazon.awssdk.services.cloudformation.model.SetTypeDefaultVersionResponse;
import software.amazon.awssdk.services.cloudformation.model.SignalResourceRequest;
import software.amazon.awssdk.services.cloudformation.model.SignalResourceResponse;
import software.amazon.awssdk.services.cloudformation.model.StackInstanceNotFoundException;
import software.amazon.awssdk.services.cloudformation.model.StackSetNotEmptyException;
import software.amazon.awssdk.services.cloudformation.model.StackSetNotFoundException;
import software.amazon.awssdk.services.cloudformation.model.StaleRequestException;
import software.amazon.awssdk.services.cloudformation.model.StopStackSetOperationRequest;
import software.amazon.awssdk.services.cloudformation.model.StopStackSetOperationResponse;
import software.amazon.awssdk.services.cloudformation.model.TokenAlreadyExistsException;
import software.amazon.awssdk.services.cloudformation.model.TypeNotFoundException;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackInstancesRequest;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackInstancesResponse;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackRequest;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackResponse;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackSetRequest;
import software.amazon.awssdk.services.cloudformation.model.UpdateStackSetResponse;
import software.amazon.awssdk.services.cloudformation.model.UpdateTerminationProtectionRequest;
import software.amazon.awssdk.services.cloudformation.model.UpdateTerminationProtectionResponse;
import software.amazon.awssdk.services.cloudformation.model.ValidateTemplateRequest;
import software.amazon.awssdk.services.cloudformation.model.ValidateTemplateResponse;
import software.amazon.awssdk.services.cloudformation.paginators.DescribeAccountLimitsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.DescribeStackEventsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.DescribeStackResourceDriftsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.DescribeStacksPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListChangeSetsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListExportsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListImportsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStackInstancesPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStackResourcesPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationResultsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStackSetsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListStacksPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListTypeRegistrationsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListTypeVersionsPublisher;
import software.amazon.awssdk.services.cloudformation.paginators.ListTypesPublisher;
import software.amazon.awssdk.services.cloudformation.transform.CancelUpdateStackRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ContinueUpdateRollbackRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.CreateChangeSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.CreateStackInstancesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.CreateStackRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.CreateStackSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DeleteChangeSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DeleteStackInstancesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DeleteStackRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DeleteStackSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DeregisterTypeRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeAccountLimitsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeChangeSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackDriftDetectionStatusRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackEventsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackInstanceRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackResourceDriftsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackResourceRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackResourcesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackSetOperationRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStackSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeStacksRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeTypeRegistrationRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DescribeTypeRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DetectStackDriftRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DetectStackResourceDriftRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.DetectStackSetDriftRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.EstimateTemplateCostRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ExecuteChangeSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.GetStackPolicyRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.GetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.GetTemplateSummaryRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListChangeSetsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListExportsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListImportsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStackInstancesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStackResourcesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStackSetOperationResultsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStackSetOperationsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStackSetsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListStacksRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListTypeRegistrationsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListTypeVersionsRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ListTypesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.RecordHandlerProgressRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.RegisterTypeRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.SetStackPolicyRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.SetTypeDefaultVersionRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.SignalResourceRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.StopStackSetOperationRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.UpdateStackInstancesRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.UpdateStackRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.UpdateStackSetRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.UpdateTerminationProtectionRequestMarshaller;
import software.amazon.awssdk.services.cloudformation.transform.ValidateTemplateRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link CloudFormationAsyncClient}.
*
* @see CloudFormationAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultCloudFormationAsyncClient implements CloudFormationAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultCloudFormationAsyncClient.class);
private final AsyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultCloudFormationAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and
* reverts to the previous stack configuration.
*
*
*
* You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.
*
*
*
* @param cancelUpdateStackRequest
* The input for the CancelUpdateStack action.
* @return A Java Future containing the result of the CancelUpdateStack operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TokenAlreadyExistsException A client request token already exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.CancelUpdateStack
* @see AWS API Documentation
*/
@Override
public CompletableFuture cancelUpdateStack(CancelUpdateStackRequest cancelUpdateStackRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CancelUpdateStackResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CancelUpdateStack")
.withMarshaller(new CancelUpdateStackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(cancelUpdateStackRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* For a specified stack that is in the UPDATE_ROLLBACK_FAILED
state, continues rolling it back to the
* UPDATE_ROLLBACK_COMPLETE
state. Depending on the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can return your stack to a working
* state (the UPDATE_ROLLBACK_COMPLETE
state), and then try to update the stack again.
*
*
* A stack goes into the UPDATE_ROLLBACK_FAILED
state when AWS CloudFormation cannot roll back all
* changes after a failed stack update. For example, you might have a stack that is rolling back to an old database
* instance that was deleted outside of AWS CloudFormation. Because AWS CloudFormation doesn't know the database was
* deleted, it assumes that the database instance still exists and attempts to roll back to it, causing the update
* rollback to fail.
*
*
* @param continueUpdateRollbackRequest
* The input for the ContinueUpdateRollback action.
* @return A Java Future containing the result of the ContinueUpdateRollback operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TokenAlreadyExistsException A client request token already exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ContinueUpdateRollback
* @see AWS API Documentation
*/
@Override
public CompletableFuture continueUpdateRollback(
ContinueUpdateRollbackRequest continueUpdateRollbackRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ContinueUpdateRollbackResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ContinueUpdateRollback")
.withMarshaller(new ContinueUpdateRollbackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(continueUpdateRollbackRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a list of changes that will be applied to a stack so that you can review the changes before executing
* them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set
* for a stack that doesn't exist, the change set shows all of the resources that AWS CloudFormation will create. If
* you create a change set for an existing stack, AWS CloudFormation compares the stack's information with the
* information that you submit in the change set and lists the differences. Use change sets to understand which
* resources AWS CloudFormation will create or change, and how it will change resources in an existing stack, before
* you create or update a stack.
*
*
* To create a change set for a stack that doesn't exist, for the ChangeSetType
parameter, specify
* CREATE
. To create a change set for an existing stack, specify UPDATE
for the
* ChangeSetType
parameter. To create a change set for an import operation, specify IMPORT
* for the ChangeSetType
parameter. After the CreateChangeSet
call successfully completes,
* AWS CloudFormation starts creating the change set. To check the status of the change set or to review it, use the
* DescribeChangeSet action.
*
*
* When you are satisfied with the changes the change set will make, execute the change set by using the
* ExecuteChangeSet action. AWS CloudFormation doesn't make changes until you execute the change set.
*
*
* @param createChangeSetRequest
* The input for the CreateChangeSet action.
* @return A Java Future containing the result of the CreateChangeSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - AlreadyExistsException The resource with the name requested already exists.
* - InsufficientCapabilitiesException The template contains resources with capabilities that weren't
* specified in the Capabilities parameter.
* - LimitExceededException The quota for the resource has already been reached.
*
* For information on resource and stack limitations, see Limits in the AWS CloudFormation User Guide.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.CreateChangeSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createChangeSet(CreateChangeSetRequest createChangeSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateChangeSet")
.withMarshaller(new CreateChangeSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createChangeSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a stack as specified in the template. After the call completes successfully, the stack creation starts.
* You can check the status of the stack via the DescribeStacks API.
*
*
* @param createStackRequest
* The input for CreateStack action.
* @return A Java Future containing the result of the CreateStack operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - LimitExceededException The quota for the resource has already been reached.
*
* For information on resource and stack limitations, see Limits in the AWS CloudFormation User Guide.
* - AlreadyExistsException The resource with the name requested already exists.
* - TokenAlreadyExistsException A client request token already exists.
* - InsufficientCapabilitiesException The template contains resources with capabilities that weren't
* specified in the Capabilities parameter.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.CreateStack
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createStack(CreateStackRequest createStackRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateStackResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateStack").withMarshaller(new CreateStackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStackRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates stack instances for the specified accounts, within the specified Regions. A stack instance refers to a
* stack in a specific account and Region. You must specify at least one value for either Accounts
or
* DeploymentTargets
, and you must specify at least one value for Regions
.
*
*
* @param createStackInstancesRequest
* @return A Java Future containing the result of the CreateStackInstances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationInProgressException Another operation is currently in progress for this stack set. Only one
* operation can be performed for a stack set at a given time.
* - OperationIdAlreadyExistsException The specified operation ID already exists.
* - StaleRequestException Another operation has been performed on this stack set since the specified
* operation was performed.
* - InvalidOperationException The specified operation isn't valid.
* - LimitExceededException The quota for the resource has already been reached.
*
* For information on resource and stack limitations, see Limits in the AWS CloudFormation User Guide.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.CreateStackInstances
* @see AWS API Documentation
*/
@Override
public CompletableFuture createStackInstances(
CreateStackInstancesRequest createStackInstancesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateStackInstancesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateStackInstances")
.withMarshaller(new CreateStackInstancesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStackInstancesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a stack set.
*
*
* @param createStackSetRequest
* @return A Java Future containing the result of the CreateStackSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - NameAlreadyExistsException The specified name is already in use.
* - CreatedButModifiedException The specified resource exists, but has been changed.
* - LimitExceededException The quota for the resource has already been reached.
*
* For information on resource and stack limitations, see Limits in the AWS CloudFormation User Guide.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.CreateStackSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createStackSet(CreateStackSetRequest createStackSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateStackSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateStackSet")
.withMarshaller(new CreateStackSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStackSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified change set. Deleting change sets ensures that no one executes the wrong change set.
*
*
* If the call successfully completes, AWS CloudFormation successfully deleted the change set.
*
*
* @param deleteChangeSetRequest
* The input for the DeleteChangeSet action.
* @return A Java Future containing the result of the DeleteChangeSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidChangeSetStatusException The specified change set can't be used to update the stack. For
* example, the change set status might be
CREATE_IN_PROGRESS
, or the stack status might be
* UPDATE_IN_PROGRESS
.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DeleteChangeSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteChangeSet(DeleteChangeSetRequest deleteChangeSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteChangeSet")
.withMarshaller(new DeleteChangeSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteChangeSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not
* show up in the DescribeStacks API if the deletion has been completed successfully.
*
*
* @param deleteStackRequest
* The input for DeleteStack action.
* @return A Java Future containing the result of the DeleteStack operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TokenAlreadyExistsException A client request token already exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DeleteStack
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteStack(DeleteStackRequest deleteStackRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteStackResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteStack").withMarshaller(new DeleteStackRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteStackRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes stack instances for the specified accounts, in the specified Regions.
*
*
* @param deleteStackInstancesRequest
* @return A Java Future containing the result of the DeleteStackInstances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationInProgressException Another operation is currently in progress for this stack set. Only one
* operation can be performed for a stack set at a given time.
* - OperationIdAlreadyExistsException The specified operation ID already exists.
* - StaleRequestException Another operation has been performed on this stack set since the specified
* operation was performed.
* - InvalidOperationException The specified operation isn't valid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DeleteStackInstances
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteStackInstances(
DeleteStackInstancesRequest deleteStackInstancesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteStackInstancesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteStackInstances")
.withMarshaller(new DeleteStackInstancesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteStackInstancesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a stack set. Before you can delete a stack set, all of its member stack instances must be deleted. For
* more information about how to do this, see DeleteStackInstances.
*
*
* @param deleteStackSetRequest
* @return A Java Future containing the result of the DeleteStackSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotEmptyException You can't yet delete this stack set, because it still contains one or more
* stack instances. Delete all stack instances from the stack set before deleting the stack set.
* - OperationInProgressException Another operation is currently in progress for this stack set. Only one
* operation can be performed for a stack set at a given time.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DeleteStackSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteStackSet(DeleteStackSetRequest deleteStackSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteStackSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteStackSet")
.withMarshaller(new DeleteStackSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteStackSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Removes a type or type version from active use in the CloudFormation registry. If a type or type version is
* deregistered, it cannot be used in CloudFormation operations.
*
*
* To deregister a type, you must individually deregister all registered versions of that type. If a type has only a
* single registered version, deregistering that version results in the type itself being deregistered.
*
*
* You cannot deregister the default version of a type, unless it is the only registered version of that type, in
* which case the type itself is deregistered as well.
*
*
* @param deregisterTypeRequest
* @return A Java Future containing the result of the DeregisterType operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - TypeNotFoundException The specified type does not exist in the CloudFormation registry.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DeregisterType
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deregisterType(DeregisterTypeRequest deregisterTypeRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeregisterTypeResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeregisterType")
.withMarshaller(new DeregisterTypeRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deregisterTypeRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves your account's AWS CloudFormation limits, such as the maximum number of stacks that you can create in
* your account. For more information about account limits, see AWS
* CloudFormation Limits in the AWS CloudFormation User Guide.
*
*
* @param describeAccountLimitsRequest
* The input for the DescribeAccountLimits action.
* @return A Java Future containing the result of the DescribeAccountLimits operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeAccountLimits
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeAccountLimits(
DescribeAccountLimitsRequest describeAccountLimitsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeAccountLimitsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAccountLimits")
.withMarshaller(new DescribeAccountLimitsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeAccountLimitsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves your account's AWS CloudFormation limits, such as the maximum number of stacks that you can create in
* your account. For more information about account limits, see AWS
* CloudFormation Limits in the AWS CloudFormation User Guide.
*
*
*
* This is a variant of
* {@link #describeAccountLimits(software.amazon.awssdk.services.cloudformation.model.DescribeAccountLimitsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeAccountLimitsPublisher publisher = client.describeAccountLimitsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeAccountLimitsPublisher publisher = client.describeAccountLimitsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.DescribeAccountLimitsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #describeAccountLimits(software.amazon.awssdk.services.cloudformation.model.DescribeAccountLimitsRequest)}
* operation.
*
*
* @param describeAccountLimitsRequest
* The input for the DescribeAccountLimits action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeAccountLimits
* @see AWS API Documentation
*/
public DescribeAccountLimitsPublisher describeAccountLimitsPaginator(DescribeAccountLimitsRequest describeAccountLimitsRequest) {
return new DescribeAccountLimitsPublisher(this, applyPaginatorUserAgent(describeAccountLimitsRequest));
}
/**
*
* Returns the inputs for the change set and a list of changes that AWS CloudFormation will make if you execute the
* change set. For more information, see Updating Stacks Using Change Sets in the AWS CloudFormation User Guide.
*
*
* @param describeChangeSetRequest
* The input for the DescribeChangeSet action.
* @return A Java Future containing the result of the DescribeChangeSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ChangeSetNotFoundException The specified change set name or ID doesn't exit. To view valid change
* sets for a stack, use the
ListChangeSets
action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeChangeSet
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeChangeSet(DescribeChangeSetRequest describeChangeSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeChangeSet")
.withMarshaller(new DescribeChangeSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeChangeSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about a stack drift detection operation. A stack drift detection operation detects whether a
* stack's actual configuration differs, or has drifted, from it's expected configuration, as defined in the
* stack template and any values specified as template parameters. A stack is considered to have drifted if one or
* more of its resources have drifted. For more information on stack and resource drift, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* Use DetectStackDrift to initiate a stack drift detection operation. DetectStackDrift
returns
* a StackDriftDetectionId
you can use to monitor the progress of the operation using
* DescribeStackDriftDetectionStatus
. Once the drift detection operation has completed, use
* DescribeStackResourceDrifts to return drift information about the stack and its resources.
*
*
* @param describeStackDriftDetectionStatusRequest
* @return A Java Future containing the result of the DescribeStackDriftDetectionStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackDriftDetectionStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackDriftDetectionStatus(
DescribeStackDriftDetectionStatusRequest describeStackDriftDetectionStatusRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackDriftDetectionStatusResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackDriftDetectionStatus")
.withMarshaller(new DescribeStackDriftDetectionStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackDriftDetectionStatusRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns all stack related events for a specified stack in reverse chronological order. For more information about
* a stack's event history, go to Stacks in the AWS
* CloudFormation User Guide.
*
*
*
* You can list events for stacks that have failed to create or have been deleted by specifying the unique stack
* identifier (stack ID).
*
*
*
* @param describeStackEventsRequest
* The input for DescribeStackEvents action.
* @return A Java Future containing the result of the DescribeStackEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackEvents
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackEvents(
DescribeStackEventsRequest describeStackEventsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackEventsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackEvents")
.withMarshaller(new DescribeStackEventsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackEventsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns all stack related events for a specified stack in reverse chronological order. For more information about
* a stack's event history, go to Stacks in the AWS
* CloudFormation User Guide.
*
*
*
* You can list events for stacks that have failed to create or have been deleted by specifying the unique stack
* identifier (stack ID).
*
*
*
* This is a variant of
* {@link #describeStackEvents(software.amazon.awssdk.services.cloudformation.model.DescribeStackEventsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStackEventsPublisher publisher = client.describeStackEventsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStackEventsPublisher publisher = client.describeStackEventsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.DescribeStackEventsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #describeStackEvents(software.amazon.awssdk.services.cloudformation.model.DescribeStackEventsRequest)}
* operation.
*
*
* @param describeStackEventsRequest
* The input for DescribeStackEvents action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackEvents
* @see AWS API Documentation
*/
public DescribeStackEventsPublisher describeStackEventsPaginator(DescribeStackEventsRequest describeStackEventsRequest) {
return new DescribeStackEventsPublisher(this, applyPaginatorUserAgent(describeStackEventsRequest));
}
/**
*
* Returns the stack instance that's associated with the specified stack set, AWS account, and Region.
*
*
* For a list of stack instances that are associated with a specific stack set, use ListStackInstances.
*
*
* @param describeStackInstanceRequest
* @return A Java Future containing the result of the DescribeStackInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - StackInstanceNotFoundException The specified stack instance doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackInstance
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackInstance(
DescribeStackInstanceRequest describeStackInstanceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackInstanceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackInstance")
.withMarshaller(new DescribeStackInstanceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackInstanceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a description of the specified resource in the specified stack.
*
*
* For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been
* deleted.
*
*
* @param describeStackResourceRequest
* The input for DescribeStackResource action.
* @return A Java Future containing the result of the DescribeStackResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackResource(
DescribeStackResourceRequest describeStackResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackResource")
.withMarshaller(new DescribeStackResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackResourceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns drift information for the resources that have been checked for drift in the specified stack. This
* includes actual and expected configuration values for resources where AWS CloudFormation detects configuration
* drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that have not yet been checked for drift are not included. Resources that do not
* currently support drift detection are not checked, and so not included. For a list of resources that support
* drift detection, see Resources that Support Drift Detection.
*
*
* Use DetectStackResourceDrift to detect drift on individual resources, or DetectStackDrift to detect
* drift on all supported resources for a given stack.
*
*
* @param describeStackResourceDriftsRequest
* @return A Java Future containing the result of the DescribeStackResourceDrifts operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackResourceDrifts
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackResourceDrifts(
DescribeStackResourceDriftsRequest describeStackResourceDriftsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackResourceDriftsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackResourceDrifts")
.withMarshaller(new DescribeStackResourceDriftsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackResourceDriftsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns drift information for the resources that have been checked for drift in the specified stack. This
* includes actual and expected configuration values for resources where AWS CloudFormation detects configuration
* drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that have not yet been checked for drift are not included. Resources that do not
* currently support drift detection are not checked, and so not included. For a list of resources that support
* drift detection, see Resources that Support Drift Detection.
*
*
* Use DetectStackResourceDrift to detect drift on individual resources, or DetectStackDrift to detect
* drift on all supported resources for a given stack.
*
*
*
* This is a variant of
* {@link #describeStackResourceDrifts(software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceDriftsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStackResourceDriftsPublisher publisher = client.describeStackResourceDriftsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStackResourceDriftsPublisher publisher = client.describeStackResourceDriftsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceDriftsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #describeStackResourceDrifts(software.amazon.awssdk.services.cloudformation.model.DescribeStackResourceDriftsRequest)}
* operation.
*
*
* @param describeStackResourceDriftsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackResourceDrifts
* @see AWS API Documentation
*/
public DescribeStackResourceDriftsPublisher describeStackResourceDriftsPaginator(
DescribeStackResourceDriftsRequest describeStackResourceDriftsRequest) {
return new DescribeStackResourceDriftsPublisher(this, applyPaginatorUserAgent(describeStackResourceDriftsRequest));
}
/**
*
* Returns AWS resource descriptions for running and deleted stacks. If StackName
is specified, all the
* associated resources that are part of the stack are returned. If PhysicalResourceId
is specified,
* the associated resources of the stack that the resource belongs to are returned.
*
*
*
* Only the first 100 resources will be returned. If your stack has more resources than this, you should use
* ListStackResources
instead.
*
*
*
* For deleted stacks, DescribeStackResources
returns resource information for up to 90 days after the
* stack has been deleted.
*
*
* You must specify either StackName
or PhysicalResourceId
, but not both. In addition, you
* can specify LogicalResourceId
to filter the returned result. For more information about resources,
* the LogicalResourceId
and PhysicalResourceId
, go to the AWS CloudFormation User Guide.
*
*
*
* A ValidationError
is returned if you specify both StackName
and
* PhysicalResourceId
in the same request.
*
*
*
* @param describeStackResourcesRequest
* The input for DescribeStackResources action.
* @return A Java Future containing the result of the DescribeStackResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackResources
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackResources(
DescribeStackResourcesRequest describeStackResourcesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackResources")
.withMarshaller(new DescribeStackResourcesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackResourcesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the description of the specified stack set.
*
*
* @param describeStackSetRequest
* @return A Java Future containing the result of the DescribeStackSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackSet
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackSet(DescribeStackSetRequest describeStackSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackSet")
.withMarshaller(new DescribeStackSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the description of the specified stack set operation.
*
*
* @param describeStackSetOperationRequest
* @return A Java Future containing the result of the DescribeStackSetOperation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationNotFoundException The specified ID refers to an operation that doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStackSetOperation
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeStackSetOperation(
DescribeStackSetOperationRequest describeStackSetOperationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStackSetOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStackSetOperation")
.withMarshaller(new DescribeStackSetOperationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStackSetOperationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the description for the specified stack; if no stack name was specified, then it returns the description
* for all the stacks created.
*
*
*
* If the stack does not exist, an AmazonCloudFormationException
is returned.
*
*
*
* @param describeStacksRequest
* The input for DescribeStacks action.
* @return A Java Future containing the result of the DescribeStacks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStacks
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeStacks(DescribeStacksRequest describeStacksRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeStacksResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeStacks")
.withMarshaller(new DescribeStacksRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStacksRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the description for the specified stack; if no stack name was specified, then it returns the description
* for all the stacks created.
*
*
*
* If the stack does not exist, an AmazonCloudFormationException
is returned.
*
*
*
* This is a variant of
* {@link #describeStacks(software.amazon.awssdk.services.cloudformation.model.DescribeStacksRequest)} operation.
* The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStacksPublisher publisher = client.describeStacksPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.DescribeStacksPublisher publisher = client.describeStacksPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.DescribeStacksResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #describeStacks(software.amazon.awssdk.services.cloudformation.model.DescribeStacksRequest)}
* operation.
*
*
* @param describeStacksRequest
* The input for DescribeStacks action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeStacks
* @see AWS
* API Documentation
*/
public DescribeStacksPublisher describeStacksPaginator(DescribeStacksRequest describeStacksRequest) {
return new DescribeStacksPublisher(this, applyPaginatorUserAgent(describeStacksRequest));
}
/**
*
* Returns detailed information about a type that has been registered.
*
*
* If you specify a VersionId
, DescribeType
returns information about that specific type
* version. Otherwise, it returns information about the default type version.
*
*
* @param describeTypeRequest
* @return A Java Future containing the result of the DescribeType operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - TypeNotFoundException The specified type does not exist in the CloudFormation registry.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeType
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeType(DescribeTypeRequest describeTypeRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeTypeResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeType").withMarshaller(new DescribeTypeRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeTypeRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about a type's registration, including its current status and type and version identifiers.
*
*
* When you initiate a registration request using RegisterType
, you can then use
* DescribeTypeRegistration
to monitor the progress of that registration request.
*
*
* Once the registration request has completed, use DescribeType
to return detailed
* informaiton about a type.
*
*
* @param describeTypeRegistrationRequest
* @return A Java Future containing the result of the DescribeTypeRegistration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DescribeTypeRegistration
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeTypeRegistration(
DescribeTypeRegistrationRequest describeTypeRegistrationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeTypeRegistrationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeTypeRegistration")
.withMarshaller(new DescribeTypeRegistrationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeTypeRegistrationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Detects whether a stack's actual configuration differs, or has drifted, from it's expected configuration,
* as defined in the stack template and any values specified as template parameters. For each resource in the stack
* that supports drift detection, AWS CloudFormation compares the actual configuration of the resource with its
* expected template configuration. Only resource properties explicitly defined in the stack template are checked
* for drift. A stack is considered to have drifted if one or more of its resources differ from their expected
* template configurations. For more information, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* Use DetectStackDrift
to detect drift on all supported resources for a given stack, or
* DetectStackResourceDrift to detect drift on individual resources.
*
*
* For a list of stack resources that currently support drift detection, see Resources that Support Drift Detection.
*
*
* DetectStackDrift
can take up to several minutes, depending on the number of resources contained
* within the stack. Use DescribeStackDriftDetectionStatus to monitor the progress of a detect stack drift
* operation. Once the drift detection operation has completed, use DescribeStackResourceDrifts to return
* drift information about the stack and its resources.
*
*
* When detecting drift on a stack, AWS CloudFormation does not detect drift on any nested stacks belonging to that
* stack. Perform DetectStackDrift
directly on the nested stack itself.
*
*
* @param detectStackDriftRequest
* @return A Java Future containing the result of the DetectStackDrift operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DetectStackDrift
* @see AWS API Documentation
*/
@Override
public CompletableFuture detectStackDrift(DetectStackDriftRequest detectStackDriftRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DetectStackDriftResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DetectStackDrift")
.withMarshaller(new DetectStackDriftRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(detectStackDriftRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about whether a resource's actual configuration differs, or has drifted, from it's
* expected configuration, as defined in the stack template and any values specified as template parameters. This
* information includes actual and expected property values for resources in which AWS CloudFormation detects drift.
* Only resource properties explicitly defined in the stack template are checked for drift. For more information
* about stack and resource drift, see Detecting
* Unregulated Configuration Changes to Stacks and Resources.
*
*
* Use DetectStackResourceDrift
to detect drift on individual resources, or DetectStackDrift to
* detect drift on all resources in a given stack that support drift detection.
*
*
* Resources that do not currently support drift detection cannot be checked. For a list of resources that support
* drift detection, see Resources that Support Drift Detection.
*
*
* @param detectStackResourceDriftRequest
* @return A Java Future containing the result of the DetectStackResourceDrift operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DetectStackResourceDrift
* @see AWS API Documentation
*/
@Override
public CompletableFuture detectStackResourceDrift(
DetectStackResourceDriftRequest detectStackResourceDriftRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DetectStackResourceDriftResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DetectStackResourceDrift")
.withMarshaller(new DetectStackResourceDriftRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(detectStackResourceDriftRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Detect drift on a stack set. When CloudFormation performs drift detection on a stack set, it performs drift
* detection on the stack associated with each stack instance in the stack set. For more information, see How CloudFormation
* Performs Drift Detection on a Stack Set.
*
*
* DetectStackSetDrift
returns the OperationId
of the stack set drift detection operation.
* Use this operation id with DescribeStackSetOperation
to monitor the progress of the drift
* detection operation. The drift detection operation may take some time, depending on the number of stack instances
* included in the stack set, as well as the number of resources included in each stack.
*
*
* Once the operation has completed, use the following actions to return drift information:
*
*
* -
*
* Use DescribeStackSet
to return detailed informaiton about the stack set, including detailed
* information about the last completed drift operation performed on the stack set. (Information about drift
* operations that are in progress is not included.)
*
*
* -
*
* Use ListStackInstances
to return a list of stack instances belonging to the stack set,
* including the drift status and last drift time checked of each instance.
*
*
* -
*
* Use DescribeStackInstance
to return detailed information about a specific stack instance,
* including its drift status and last drift time checked.
*
*
*
*
* For more information on performing a drift detection operation on a stack set, see Detecting Unmanaged
* Changes in Stack Sets.
*
*
* You can only run a single drift detection operation on a given stack set at one time.
*
*
* To stop a drift detection stack set operation, use StopStackSetOperation
.
*
*
* @param detectStackSetDriftRequest
* @return A Java Future containing the result of the DetectStackSetDrift operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidOperationException The specified operation isn't valid.
* - OperationInProgressException Another operation is currently in progress for this stack set. Only one
* operation can be performed for a stack set at a given time.
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.DetectStackSetDrift
* @see AWS API Documentation
*/
@Override
public CompletableFuture detectStackSetDrift(
DetectStackSetDriftRequest detectStackSetDriftRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DetectStackSetDriftResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DetectStackSetDrift")
.withMarshaller(new DetectStackSetDriftRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(detectStackSetDriftRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a
* query string that describes the resources required to run the template.
*
*
* @param estimateTemplateCostRequest
* The input for an EstimateTemplateCost action.
* @return A Java Future containing the result of the EstimateTemplateCost operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.EstimateTemplateCost
* @see AWS API Documentation
*/
@Override
public CompletableFuture estimateTemplateCost(
EstimateTemplateCostRequest estimateTemplateCostRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(EstimateTemplateCostResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("EstimateTemplateCost")
.withMarshaller(new EstimateTemplateCostRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(estimateTemplateCostRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Updates a stack using the input information that was provided when the specified change set was created. After
* the call successfully completes, AWS CloudFormation starts updating the stack. Use the DescribeStacks
* action to view the status of the update.
*
*
* When you execute a change set, AWS CloudFormation deletes all other change sets associated with the stack because
* they aren't valid for the updated stack.
*
*
* If a stack policy is associated with the stack, AWS CloudFormation enforces the policy during the update. You
* can't specify a temporary stack policy that overrides the current policy.
*
*
* @param executeChangeSetRequest
* The input for the ExecuteChangeSet action.
* @return A Java Future containing the result of the ExecuteChangeSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidChangeSetStatusException The specified change set can't be used to update the stack. For
* example, the change set status might be
CREATE_IN_PROGRESS
, or the stack status might be
* UPDATE_IN_PROGRESS
.
* - ChangeSetNotFoundException The specified change set name or ID doesn't exit. To view valid change
* sets for a stack, use the
ListChangeSets
action.
* - InsufficientCapabilitiesException The template contains resources with capabilities that weren't
* specified in the Capabilities parameter.
* - TokenAlreadyExistsException A client request token already exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ExecuteChangeSet
* @see AWS API Documentation
*/
@Override
public CompletableFuture executeChangeSet(ExecuteChangeSetRequest executeChangeSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ExecuteChangeSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ExecuteChangeSet")
.withMarshaller(new ExecuteChangeSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(executeChangeSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
*
*
* @param getStackPolicyRequest
* The input for the GetStackPolicy action.
* @return A Java Future containing the result of the GetStackPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.GetStackPolicy
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture getStackPolicy(GetStackPolicyRequest getStackPolicyRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetStackPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetStackPolicy")
.withMarshaller(new GetStackPolicyRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getStackPolicyRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the template body for a specified stack. You can get the template for running or deleted stacks.
*
*
* For deleted stacks, GetTemplate returns the template for up to 90 days after the stack has been deleted.
*
*
*
* If the template does not exist, a ValidationError
is returned.
*
*
*
* @param getTemplateRequest
* The input for a GetTemplate action.
* @return A Java Future containing the result of the GetTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ChangeSetNotFoundException The specified change set name or ID doesn't exit. To view valid change
* sets for a stack, use the
ListChangeSets
action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.GetTemplate
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture getTemplate(GetTemplateRequest getTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTemplate").withMarshaller(new GetTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about a new or existing template. The GetTemplateSummary
action is useful for
* viewing parameter information, such as default parameter values and parameter types, before you create or update
* a stack or stack set.
*
*
* You can use the GetTemplateSummary
action when you submit a template, or you can get template
* information for a stack set, or a running or deleted stack.
*
*
* For deleted stacks, GetTemplateSummary
returns the template information for up to 90 days after the
* stack has been deleted. If the template does not exist, a ValidationError
is returned.
*
*
* @param getTemplateSummaryRequest
* The input for the GetTemplateSummary action.
* @return A Java Future containing the result of the GetTemplateSummary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.GetTemplateSummary
* @see AWS API Documentation
*/
@Override
public CompletableFuture getTemplateSummary(GetTemplateSummaryRequest getTemplateSummaryRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetTemplateSummaryResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTemplateSummary")
.withMarshaller(new GetTemplateSummaryRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getTemplateSummaryRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the ID and status of each active change set for a stack. For example, AWS CloudFormation lists change
* sets that are in the CREATE_IN_PROGRESS
or CREATE_PENDING
state.
*
*
* @param listChangeSetsRequest
* The input for the ListChangeSets action.
* @return A Java Future containing the result of the ListChangeSets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListChangeSets
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture listChangeSets(ListChangeSetsRequest listChangeSetsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListChangeSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListChangeSets")
.withMarshaller(new ListChangeSetsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listChangeSetsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the ID and status of each active change set for a stack. For example, AWS CloudFormation lists change
* sets that are in the CREATE_IN_PROGRESS
or CREATE_PENDING
state.
*
*
*
* This is a variant of
* {@link #listChangeSets(software.amazon.awssdk.services.cloudformation.model.ListChangeSetsRequest)} operation.
* The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListChangeSetsPublisher publisher = client.listChangeSetsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListChangeSetsPublisher publisher = client.listChangeSetsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListChangeSetsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #listChangeSets(software.amazon.awssdk.services.cloudformation.model.ListChangeSetsRequest)}
* operation.
*
*
* @param listChangeSetsRequest
* The input for the ListChangeSets action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListChangeSets
* @see AWS
* API Documentation
*/
public ListChangeSetsPublisher listChangeSetsPaginator(ListChangeSetsRequest listChangeSetsRequest) {
return new ListChangeSetsPublisher(this, applyPaginatorUserAgent(listChangeSetsRequest));
}
/**
*
* Lists all exported output values in the account and Region in which you call this action. Use this action to see
* the exported output values that you can import into other stacks. To import values, use the
* Fn::ImportValue
function.
*
*
* For more information, see AWS
* CloudFormation Export Stack Output Values.
*
*
* @param listExportsRequest
* @return A Java Future containing the result of the ListExports operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListExports
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listExports(ListExportsRequest listExportsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListExportsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListExports").withMarshaller(new ListExportsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listExportsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists all exported output values in the account and Region in which you call this action. Use this action to see
* the exported output values that you can import into other stacks. To import values, use the
* Fn::ImportValue
function.
*
*
* For more information, see AWS
* CloudFormation Export Stack Output Values.
*
*
*
* This is a variant of
* {@link #listExports(software.amazon.awssdk.services.cloudformation.model.ListExportsRequest)} operation. The
* return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListExportsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #listExports(software.amazon.awssdk.services.cloudformation.model.ListExportsRequest)} operation.
*
*
* @param listExportsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListExports
* @see AWS API
* Documentation
*/
public ListExportsPublisher listExportsPaginator(ListExportsRequest listExportsRequest) {
return new ListExportsPublisher(this, applyPaginatorUserAgent(listExportsRequest));
}
/**
*
* Lists all stacks that are importing an exported output value. To modify or remove an exported output value, first
* use this action to see which stacks are using it. To see the exported output values in your account, see
* ListExports.
*
*
* For more information about importing an exported output value, see the
* Fn::ImportValue
function.
*
*
* @param listImportsRequest
* @return A Java Future containing the result of the ListImports operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListImports
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listImports(ListImportsRequest listImportsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListImportsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListImports").withMarshaller(new ListImportsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listImportsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists all stacks that are importing an exported output value. To modify or remove an exported output value, first
* use this action to see which stacks are using it. To see the exported output values in your account, see
* ListExports.
*
*
* For more information about importing an exported output value, see the
* Fn::ImportValue
function.
*
*
*
* This is a variant of
* {@link #listImports(software.amazon.awssdk.services.cloudformation.model.ListImportsRequest)} operation. The
* return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListImportsPublisher publisher = client.listImportsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListImportsPublisher publisher = client.listImportsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListImportsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #listImports(software.amazon.awssdk.services.cloudformation.model.ListImportsRequest)} operation.
*
*
* @param listImportsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListImports
* @see AWS API
* Documentation
*/
public ListImportsPublisher listImportsPaginator(ListImportsRequest listImportsRequest) {
return new ListImportsPublisher(this, applyPaginatorUserAgent(listImportsRequest));
}
/**
*
* Returns summary information about stack instances that are associated with the specified stack set. You can
* filter for stack instances that are associated with a specific AWS account name or Region.
*
*
* @param listStackInstancesRequest
* @return A Java Future containing the result of the ListStackInstances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackInstances
* @see AWS API Documentation
*/
@Override
public CompletableFuture listStackInstances(ListStackInstancesRequest listStackInstancesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStackInstancesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListStackInstances")
.withMarshaller(new ListStackInstancesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStackInstancesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about stack instances that are associated with the specified stack set. You can
* filter for stack instances that are associated with a specific AWS account name or Region.
*
*
*
* This is a variant of
* {@link #listStackInstances(software.amazon.awssdk.services.cloudformation.model.ListStackInstancesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackInstancesPublisher publisher = client.listStackInstancesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackInstancesPublisher publisher = client.listStackInstancesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStackInstancesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listStackInstances(software.amazon.awssdk.services.cloudformation.model.ListStackInstancesRequest)}
* operation.
*
*
* @param listStackInstancesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackInstances
* @see AWS API Documentation
*/
public ListStackInstancesPublisher listStackInstancesPaginator(ListStackInstancesRequest listStackInstancesRequest) {
return new ListStackInstancesPublisher(this, applyPaginatorUserAgent(listStackInstancesRequest));
}
/**
*
* Returns descriptions of all resources of the specified stack.
*
*
* For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been
* deleted.
*
*
* @param listStackResourcesRequest
* The input for the ListStackResource action.
* @return A Java Future containing the result of the ListStackResources operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackResources
* @see AWS API Documentation
*/
@Override
public CompletableFuture listStackResources(ListStackResourcesRequest listStackResourcesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStackResourcesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListStackResources")
.withMarshaller(new ListStackResourcesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStackResourcesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns descriptions of all resources of the specified stack.
*
*
* For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been
* deleted.
*
*
*
* This is a variant of
* {@link #listStackResources(software.amazon.awssdk.services.cloudformation.model.ListStackResourcesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackResourcesPublisher publisher = client.listStackResourcesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackResourcesPublisher publisher = client.listStackResourcesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStackResourcesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #listStackResources(software.amazon.awssdk.services.cloudformation.model.ListStackResourcesRequest)}
* operation.
*
*
* @param listStackResourcesRequest
* The input for the ListStackResource action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackResources
* @see AWS API Documentation
*/
public ListStackResourcesPublisher listStackResourcesPaginator(ListStackResourcesRequest listStackResourcesRequest) {
return new ListStackResourcesPublisher(this, applyPaginatorUserAgent(listStackResourcesRequest));
}
/**
*
* Returns summary information about the results of a stack set operation.
*
*
* @param listStackSetOperationResultsRequest
* @return A Java Future containing the result of the ListStackSetOperationResults operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationNotFoundException The specified ID refers to an operation that doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSetOperationResults
* @see AWS API Documentation
*/
@Override
public CompletableFuture listStackSetOperationResults(
ListStackSetOperationResultsRequest listStackSetOperationResultsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStackSetOperationResultsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListStackSetOperationResults")
.withMarshaller(new ListStackSetOperationResultsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStackSetOperationResultsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about the results of a stack set operation.
*
*
*
* This is a variant of
* {@link #listStackSetOperationResults(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationResultsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationResultsPublisher publisher = client.listStackSetOperationResultsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationResultsPublisher publisher = client.listStackSetOperationResultsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationResultsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listStackSetOperationResults(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationResultsRequest)}
* operation.
*
*
* @param listStackSetOperationResultsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationNotFoundException The specified ID refers to an operation that doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSetOperationResults
* @see AWS API Documentation
*/
public ListStackSetOperationResultsPublisher listStackSetOperationResultsPaginator(
ListStackSetOperationResultsRequest listStackSetOperationResultsRequest) {
return new ListStackSetOperationResultsPublisher(this, applyPaginatorUserAgent(listStackSetOperationResultsRequest));
}
/**
*
* Returns summary information about operations performed on a stack set.
*
*
* @param listStackSetOperationsRequest
* @return A Java Future containing the result of the ListStackSetOperations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSetOperations
* @see AWS API Documentation
*/
@Override
public CompletableFuture listStackSetOperations(
ListStackSetOperationsRequest listStackSetOperationsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStackSetOperationsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListStackSetOperations")
.withMarshaller(new ListStackSetOperationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStackSetOperationsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about operations performed on a stack set.
*
*
*
* This is a variant of
* {@link #listStackSetOperations(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationsPublisher publisher = client.listStackSetOperationsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetOperationsPublisher publisher = client.listStackSetOperationsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listStackSetOperations(software.amazon.awssdk.services.cloudformation.model.ListStackSetOperationsRequest)}
* operation.
*
*
* @param listStackSetOperationsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSetOperations
* @see AWS API Documentation
*/
public ListStackSetOperationsPublisher listStackSetOperationsPaginator(
ListStackSetOperationsRequest listStackSetOperationsRequest) {
return new ListStackSetOperationsPublisher(this, applyPaginatorUserAgent(listStackSetOperationsRequest));
}
/**
*
* Returns summary information about stack sets that are associated with the user.
*
*
* @param listStackSetsRequest
* @return A Java Future containing the result of the ListStackSets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSets
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture listStackSets(ListStackSetsRequest listStackSetsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStackSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListStackSets")
.withMarshaller(new ListStackSetsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStackSetsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about stack sets that are associated with the user.
*
*
*
* This is a variant of
* {@link #listStackSets(software.amazon.awssdk.services.cloudformation.model.ListStackSetsRequest)} operation. The
* return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetsPublisher publisher = client.listStackSetsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStackSetsPublisher publisher = client.listStackSetsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStackSetsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listStackSets(software.amazon.awssdk.services.cloudformation.model.ListStackSetsRequest)} operation.
*
*
* @param listStackSetsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStackSets
* @see AWS
* API Documentation
*/
public ListStackSetsPublisher listStackSetsPaginator(ListStackSetsRequest listStackSetsRequest) {
return new ListStackSetsPublisher(this, applyPaginatorUserAgent(listStackSetsRequest));
}
/**
*
* Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary
* information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no
* StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and
* stacks that have been deleted).
*
*
* @param listStacksRequest
* The input for ListStacks action.
* @return A Java Future containing the result of the ListStacks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStacks
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listStacks(ListStacksRequest listStacksRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListStacksResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("ListStacks")
.withMarshaller(new ListStacksRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listStacksRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary
* information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no
* StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and
* stacks that have been deleted).
*
*
*
* This is a variant of {@link #listStacks(software.amazon.awssdk.services.cloudformation.model.ListStacksRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStacksPublisher publisher = client.listStacksPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListStacksPublisher publisher = client.listStacksPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListStacksResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of null 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 #listStacks(software.amazon.awssdk.services.cloudformation.model.ListStacksRequest)} operation.
*
*
* @param listStacksRequest
* The input for ListStacks action.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListStacks
* @see AWS API
* Documentation
*/
public ListStacksPublisher listStacksPaginator(ListStacksRequest listStacksRequest) {
return new ListStacksPublisher(this, applyPaginatorUserAgent(listStacksRequest));
}
/**
*
* Returns a list of registration tokens for the specified type(s).
*
*
* @param listTypeRegistrationsRequest
* @return A Java Future containing the result of the ListTypeRegistrations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypeRegistrations
* @see AWS API Documentation
*/
@Override
public CompletableFuture listTypeRegistrations(
ListTypeRegistrationsRequest listTypeRegistrationsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTypeRegistrationsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTypeRegistrations")
.withMarshaller(new ListTypeRegistrationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTypeRegistrationsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of registration tokens for the specified type(s).
*
*
*
* This is a variant of
* {@link #listTypeRegistrations(software.amazon.awssdk.services.cloudformation.model.ListTypeRegistrationsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypeRegistrationsPublisher publisher = client.listTypeRegistrationsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypeRegistrationsPublisher publisher = client.listTypeRegistrationsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListTypeRegistrationsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listTypeRegistrations(software.amazon.awssdk.services.cloudformation.model.ListTypeRegistrationsRequest)}
* operation.
*
*
* @param listTypeRegistrationsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypeRegistrations
* @see AWS API Documentation
*/
public ListTypeRegistrationsPublisher listTypeRegistrationsPaginator(ListTypeRegistrationsRequest listTypeRegistrationsRequest) {
return new ListTypeRegistrationsPublisher(this, applyPaginatorUserAgent(listTypeRegistrationsRequest));
}
/**
*
* Returns summary information about the versions of a type.
*
*
* @param listTypeVersionsRequest
* @return A Java Future containing the result of the ListTypeVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypeVersions
* @see AWS API Documentation
*/
@Override
public CompletableFuture listTypeVersions(ListTypeVersionsRequest listTypeVersionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTypeVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTypeVersions")
.withMarshaller(new ListTypeVersionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTypeVersionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about the versions of a type.
*
*
*
* This is a variant of
* {@link #listTypeVersions(software.amazon.awssdk.services.cloudformation.model.ListTypeVersionsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypeVersionsPublisher publisher = client.listTypeVersionsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypeVersionsPublisher publisher = client.listTypeVersionsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListTypeVersionsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listTypeVersions(software.amazon.awssdk.services.cloudformation.model.ListTypeVersionsRequest)}
* operation.
*
*
* @param listTypeVersionsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypeVersions
* @see AWS API Documentation
*/
public ListTypeVersionsPublisher listTypeVersionsPaginator(ListTypeVersionsRequest listTypeVersionsRequest) {
return new ListTypeVersionsPublisher(this, applyPaginatorUserAgent(listTypeVersionsRequest));
}
/**
*
* Returns summary information about types that have been registered with CloudFormation.
*
*
* @param listTypesRequest
* @return A Java Future containing the result of the ListTypes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypes
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listTypes(ListTypesRequest listTypesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTypesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("ListTypes")
.withMarshaller(new ListTypesRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listTypesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns summary information about types that have been registered with CloudFormation.
*
*
*
* This is a variant of {@link #listTypes(software.amazon.awssdk.services.cloudformation.model.ListTypesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypesPublisher publisher = client.listTypesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.cloudformation.paginators.ListTypesPublisher publisher = client.listTypesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.cloudformation.model.ListTypesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* 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 #listTypes(software.amazon.awssdk.services.cloudformation.model.ListTypesRequest)} operation.
*
*
* @param listTypesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.ListTypes
* @see AWS API
* Documentation
*/
public ListTypesPublisher listTypesPaginator(ListTypesRequest listTypesRequest) {
return new ListTypesPublisher(this, applyPaginatorUserAgent(listTypesRequest));
}
/**
*
* Reports progress of a resource handler to CloudFormation.
*
*
* Reserved for use by the CloudFormation CLI. Do not use this API in your code.
*
*
* @param recordHandlerProgressRequest
* @return A Java Future containing the result of the RecordHandlerProgress operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidStateTransitionException Error reserved for use by the CloudFormation CLI. CloudFormation does not return this error to users.
* - OperationStatusCheckFailedException Error reserved for use by the CloudFormation CLI. CloudFormation does not return this error to users.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.RecordHandlerProgress
* @see AWS API Documentation
*/
@Override
public CompletableFuture recordHandlerProgress(
RecordHandlerProgressRequest recordHandlerProgressRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RecordHandlerProgressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RecordHandlerProgress")
.withMarshaller(new RecordHandlerProgressRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(recordHandlerProgressRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Registers a type with the CloudFormation service. Registering a type makes it available for use in CloudFormation
* templates in your AWS account, and includes:
*
*
* -
*
* Validating the resource schema
*
*
* -
*
* Determining which handlers have been specified for the resource
*
*
* -
*
* Making the resource type available for use in your account
*
*
*
*
* For more information on how to develop types and ready them for registeration, see Creating Resource
* Providers in the CloudFormation CLI User Guide.
*
*
* You can have a maximum of 50 resource type versions registered at a time. This maximum is per account and per
* region. Use DeregisterType to
* deregister specific resource type versions if necessary.
*
*
* Once you have initiated a registration request using RegisterType
, you can use
* DescribeTypeRegistration
to monitor the progress of the registration request.
*
*
* @param registerTypeRequest
* @return A Java Future containing the result of the RegisterType operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.RegisterType
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture registerType(RegisterTypeRequest registerTypeRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RegisterTypeResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RegisterType").withMarshaller(new RegisterTypeRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(registerTypeRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Sets a stack policy for a specified stack.
*
*
* @param setStackPolicyRequest
* The input for the SetStackPolicy action.
* @return A Java Future containing the result of the SetStackPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.SetStackPolicy
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture setStackPolicy(SetStackPolicyRequest setStackPolicyRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetStackPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetStackPolicy")
.withMarshaller(new SetStackPolicyRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(setStackPolicyRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Specify the default version of a type. The default version of a type will be used in CloudFormation operations.
*
*
* @param setTypeDefaultVersionRequest
* @return A Java Future containing the result of the SetTypeDefaultVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CfnRegistryException An error occurred during a CloudFormation registry operation.
* - TypeNotFoundException The specified type does not exist in the CloudFormation registry.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.SetTypeDefaultVersion
* @see AWS API Documentation
*/
@Override
public CompletableFuture setTypeDefaultVersion(
SetTypeDefaultVersionRequest setTypeDefaultVersionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetTypeDefaultVersionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetTypeDefaultVersion")
.withMarshaller(new SetTypeDefaultVersionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(setTypeDefaultVersionRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Sends a signal to the specified resource with a success or failure status. You can use the SignalResource API in
* conjunction with a creation policy or update policy. AWS CloudFormation doesn't proceed with a stack creation or
* update until resources receive the required number of signals or the timeout period is exceeded. The
* SignalResource API is useful in cases where you want to send signals from anywhere other than an Amazon EC2
* instance.
*
*
* @param signalResourceRequest
* The input for the SignalResource action.
* @return A Java Future containing the result of the SignalResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.SignalResource
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture signalResource(SignalResourceRequest signalResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SignalResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SignalResource")
.withMarshaller(new SignalResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(signalResourceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Stops an in-progress operation on a stack set and its associated stack instances.
*
*
* @param stopStackSetOperationRequest
* @return A Java Future containing the result of the StopStackSetOperation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - StackSetNotFoundException The specified stack set doesn't exist.
* - OperationNotFoundException The specified ID refers to an operation that doesn't exist.
* - InvalidOperationException The specified operation isn't valid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CloudFormationException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample CloudFormationAsyncClient.StopStackSetOperation
* @see AWS API Documentation
*/
@Override
public CompletableFuture stopStackSetOperation(
StopStackSetOperationRequest stopStackSetOperationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(StopStackSetOperationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("StopStackSetOperation")
.withMarshaller(new StopStackSetOperationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(stopStackSetOperationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*