/* * Copyright 2018-2023 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 com.amazonaws.services.codedeploy; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.codedeploy.model.*; import com.amazonaws.services.codedeploy.waiters.AmazonCodeDeployWaiters; /** * Interface for accessing CodeDeploy. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.codedeploy.AbstractAmazonCodeDeploy} instead. *

*

*

* CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises * instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service. *

*

* You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated * applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia * files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or * Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy. *

*

* CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application * deployment, and handles the complexity of updating your applications, without many of the risks associated with * error-prone manual deployments. *

*

* CodeDeploy Components *

*

* Use the information in this guide to help you work with the following CodeDeploy components: *

* *

* This guide also contains information to help you get details about the instances in your deployments, to make * on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to * get details about Amazon ECS service deployments. *

*

* CodeDeploy Information Resources *

* */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonCodeDeploy { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "codedeploy"; /** * Overrides the default endpoint for this client ("https://codedeploy.us-east-1.amazonaws.com"). Callers can use * this method to control which AWS region they want to work with. *

* Callers can pass in just the endpoint (ex: "codedeploy.us-east-1.amazonaws.com") or a full URL, including the * protocol (ex: "https://codedeploy.us-east-1.amazonaws.com"). If the protocol is not specified here, the default * protocol from this client's {@link ClientConfiguration} will be used, which by default is HTTPS. *

* For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available * endpoints for all AWS services, see: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-region-selection.html#region-selection- * choose-endpoint *

* This method is not threadsafe. An endpoint should be configured when the client is created and before any * service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in * transit or retrying. * * @param endpoint * The endpoint (ex: "codedeploy.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: * "https://codedeploy.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will * communicate with. * @deprecated use {@link AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration)} for * example: * {@code builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));} */ @Deprecated void setEndpoint(String endpoint); /** * An alternative to {@link AmazonCodeDeploy#setEndpoint(String)}, sets the regional endpoint for this client's * service calls. Callers can use this method to control which AWS region they want to work with. *

* By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the * {@link ClientConfiguration} supplied at construction. *

* This method is not threadsafe. A region should be configured when the client is created and before any service * requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit * or retrying. * * @param region * The region this client will communicate with. See {@link Region#getRegion(com.amazonaws.regions.Regions)} * for accessing a given region. Must not be null and must be a region where the service is available. * * @see Region#getRegion(com.amazonaws.regions.Regions) * @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration) * @see Region#isServiceSupported(String) * @deprecated use {@link AwsClientBuilder#setRegion(String)} */ @Deprecated void setRegion(Region region); /** *

* Adds tags to on-premises instances. *

* * @param addTagsToOnPremisesInstancesRequest * Represents the input of, and adds tags to, an on-premises instance operation. * @return Result of the AddTagsToOnPremisesInstances operation returned by the service. * @throws InstanceNameRequiredException * An on-premises instance name was not specified. * @throws InvalidInstanceNameException * The on-premises instance name was specified in an invalid format. * @throws TagRequiredException * A tag was not specified. * @throws InvalidTagException * The tag was specified in an invalid format. * @throws TagLimitExceededException * The maximum allowed number of tags was exceeded. * @throws InstanceLimitExceededException * The maximum number of allowed on-premises instances in a single call was exceeded. * @throws InstanceNotRegisteredException * The specified on-premises instance is not registered. * @sample AmazonCodeDeploy.AddTagsToOnPremisesInstances * @see AWS API Documentation */ AddTagsToOnPremisesInstancesResult addTagsToOnPremisesInstances(AddTagsToOnPremisesInstancesRequest addTagsToOnPremisesInstancesRequest); /** *

* Gets information about one or more application revisions. The maximum number of application revisions that can be * returned is 25. *

* * @param batchGetApplicationRevisionsRequest * Represents the input of a BatchGetApplicationRevisions operation. * @return Result of the BatchGetApplicationRevisions operation returned by the service. * @throws ApplicationDoesNotExistException * The application does not exist with the IAM user or Amazon Web Services account. * @throws ApplicationNameRequiredException * The minimum number of required application names was not specified. * @throws InvalidApplicationNameException * The application name was specified in an invalid format. * @throws RevisionRequiredException * The revision ID was not specified. * @throws InvalidRevisionException * The revision was specified in an invalid format. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @sample AmazonCodeDeploy.BatchGetApplicationRevisions * @see AWS API Documentation */ BatchGetApplicationRevisionsResult batchGetApplicationRevisions(BatchGetApplicationRevisionsRequest batchGetApplicationRevisionsRequest); /** *

* Gets information about one or more applications. The maximum number of applications that can be returned is 100. *

* * @param batchGetApplicationsRequest * Represents the input of a BatchGetApplications operation. * @return Result of the BatchGetApplications operation returned by the service. * @throws ApplicationNameRequiredException * The minimum number of required application names was not specified. * @throws InvalidApplicationNameException * The application name was specified in an invalid format. * @throws ApplicationDoesNotExistException * The application does not exist with the IAM user or Amazon Web Services account. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @sample AmazonCodeDeploy.BatchGetApplications * @see AWS API Documentation */ BatchGetApplicationsResult batchGetApplications(BatchGetApplicationsRequest batchGetApplicationsRequest); /** * Simplified method form for invoking the BatchGetApplications operation. * * @see #batchGetApplications(BatchGetApplicationsRequest) */ BatchGetApplicationsResult batchGetApplications(); /** *

* Gets information about one or more deployment groups. *

* * @param batchGetDeploymentGroupsRequest * Represents the input of a BatchGetDeploymentGroups operation. * @return Result of the BatchGetDeploymentGroups operation returned by the service. * @throws ApplicationNameRequiredException * The minimum number of required application names was not specified. * @throws InvalidApplicationNameException * The application name was specified in an invalid format. * @throws ApplicationDoesNotExistException * The application does not exist with the IAM user or Amazon Web Services account. * @throws DeploymentGroupNameRequiredException * The deployment group name was not specified. * @throws InvalidDeploymentGroupNameException * The deployment group name was specified in an invalid format. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @throws DeploymentConfigDoesNotExistException * The deployment configuration does not exist with the IAM user or Amazon Web Services account. * @sample AmazonCodeDeploy.BatchGetDeploymentGroups * @see AWS API Documentation */ BatchGetDeploymentGroupsResult batchGetDeploymentGroups(BatchGetDeploymentGroupsRequest batchGetDeploymentGroupsRequest); /** * *

* This method works, but is deprecated. Use BatchGetDeploymentTargets instead. *

*
*

* Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises * and Lambda compute platforms. The newer BatchGetDeploymentTargets works with all compute platforms. * The maximum number of instances that can be returned is 25. *

* * @param batchGetDeploymentInstancesRequest * Represents the input of a BatchGetDeploymentInstances operation. * @return Result of the BatchGetDeploymentInstances operation returned by the service. * @throws DeploymentIdRequiredException * At least one deployment ID must be specified. * @throws DeploymentDoesNotExistException * The deployment with the IAM user or Amazon Web Services account does not exist. * @throws InstanceIdRequiredException * The instance ID was not specified. * @throws InvalidDeploymentIdException * At least one of the deployment IDs was specified in an invalid format. * @throws InvalidInstanceNameException * The on-premises instance name was specified in an invalid format. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @throws InvalidComputePlatformException * The computePlatform is invalid. The computePlatform should be Lambda, Server, * or ECS. * @sample AmazonCodeDeploy.BatchGetDeploymentInstances * @see AWS API Documentation */ @Deprecated BatchGetDeploymentInstancesResult batchGetDeploymentInstances(BatchGetDeploymentInstancesRequest batchGetDeploymentInstancesRequest); /** *

* Returns an array of one or more targets associated with a deployment. This method works with all compute types * and should be used instead of the deprecated BatchGetDeploymentInstances. The maximum number of * targets that can be returned is 25. *

*

* The type of targets returned depends on the deployment's compute platform or deployment method: *

* * * @param batchGetDeploymentTargetsRequest * @return Result of the BatchGetDeploymentTargets operation returned by the service. * @throws InvalidDeploymentIdException * At least one of the deployment IDs was specified in an invalid format. * @throws DeploymentIdRequiredException * At least one deployment ID must be specified. * @throws DeploymentDoesNotExistException * The deployment with the IAM user or Amazon Web Services account does not exist. * @throws DeploymentNotStartedException * The specified deployment has not started. * @throws DeploymentTargetIdRequiredException * A deployment target ID was not provided. * @throws InvalidDeploymentTargetIdException * The target ID provided was not valid. * @throws DeploymentTargetDoesNotExistException * The provided target ID does not belong to the attempted deployment. * @throws DeploymentTargetListSizeExceededException * The maximum number of targets that can be associated with an Amazon ECS or Lambda deployment was * exceeded. The target list of both types of deployments must have exactly one item. This exception does * not apply to EC2/On-premises deployments. * @throws InstanceDoesNotExistException * The specified instance does not exist in the deployment group. * @sample AmazonCodeDeploy.BatchGetDeploymentTargets * @see AWS API Documentation */ BatchGetDeploymentTargetsResult batchGetDeploymentTargets(BatchGetDeploymentTargetsRequest batchGetDeploymentTargetsRequest); /** *

* Gets information about one or more deployments. The maximum number of deployments that can be returned is 25. *

* * @param batchGetDeploymentsRequest * Represents the input of a BatchGetDeployments operation. * @return Result of the BatchGetDeployments operation returned by the service. * @throws DeploymentIdRequiredException * At least one deployment ID must be specified. * @throws InvalidDeploymentIdException * At least one of the deployment IDs was specified in an invalid format. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @sample AmazonCodeDeploy.BatchGetDeployments * @see AWS * API Documentation */ BatchGetDeploymentsResult batchGetDeployments(BatchGetDeploymentsRequest batchGetDeploymentsRequest); /** * Simplified method form for invoking the BatchGetDeployments operation. * * @see #batchGetDeployments(BatchGetDeploymentsRequest) */ BatchGetDeploymentsResult batchGetDeployments(); /** *

* Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be * returned is 25. *

* * @param batchGetOnPremisesInstancesRequest * Represents the input of a BatchGetOnPremisesInstances operation. * @return Result of the BatchGetOnPremisesInstances operation returned by the service. * @throws InstanceNameRequiredException * An on-premises instance name was not specified. * @throws InvalidInstanceNameException * The on-premises instance name was specified in an invalid format. * @throws BatchLimitExceededException * The maximum number of names or IDs allowed for this request (100) was exceeded. * @sample AmazonCodeDeploy.BatchGetOnPremisesInstances * @see AWS API Documentation */ BatchGetOnPremisesInstancesResult batchGetOnPremisesInstances(BatchGetOnPremisesInstancesRequest batchGetOnPremisesInstancesRequest); /** * Simplified method form for invoking the BatchGetOnPremisesInstances operation. * * @see #batchGetOnPremisesInstances(BatchGetOnPremisesInstancesRequest) */ BatchGetOnPremisesInstancesResult batchGetOnPremisesInstances(); /** *

* For a blue/green deployment, starts the process of rerouting traffic from instances in the original environment * to instances in the replacement environment without waiting for a specified wait time to elapse. (Traffic * rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can * start as soon as all instances have a status of Ready.) *

* * @param continueDeploymentRequest * @return Result of the ContinueDeployment operation returned by the service. * @throws DeploymentIdRequiredException * At least one deployment ID must be specified. * @throws DeploymentDoesNotExistException * The deployment with the IAM user or Amazon Web Services account does not exist. * @throws DeploymentAlreadyCompletedException * The deployment is already complete. * @throws InvalidDeploymentIdException * At least one of the deployment IDs was specified in an invalid format. * @throws DeploymentIsNotInReadyStateException * The deployment does not have a status of Ready and can't continue yet. * @throws UnsupportedActionForDeploymentTypeException * A call was submitted that is not supported for the specified deployment type. * @throws InvalidDeploymentWaitTypeException * The wait type is invalid. * @throws InvalidDeploymentStatusException * The specified deployment status doesn't exist or cannot be determined. * @sample AmazonCodeDeploy.ContinueDeployment * @see AWS * API Documentation */ ContinueDeploymentResult continueDeployment(ContinueDeploymentRequest continueDeploymentRequest); /** *

* Creates an application. *

* * @param createApplicationRequest * Represents the input of a CreateApplication operation. * @return Result of the CreateApplication operation returned by the service. * @throws ApplicationNameRequiredException * The minimum number of required application names was not specified. * @throws InvalidApplicationNameException * The application name was specified in an invalid format. * @throws ApplicationAlreadyExistsException * An application with the specified name with the IAM user or Amazon Web Services account already exists. * @throws ApplicationLimitExceededException * More applications were attempted to be created than are allowed. * @throws InvalidComputePlatformException * The computePlatform is invalid. The computePlatform should be Lambda, Server, * or ECS. * @throws InvalidTagsToAddException * The specified tags are not valid. * @sample AmazonCodeDeploy.CreateApplication * @see AWS * API Documentation */ CreateApplicationResult createApplication(CreateApplicationRequest createApplicationRequest); /** *

* Deploys an application revision through the specified deployment group. *

* * @param createDeploymentRequest * Represents the input of a CreateDeployment operation. * @return Result of the CreateDeployment operation returned by the service. * @throws ApplicationNameRequiredException * The minimum number of required application names was not specified. * @throws InvalidApplicationNameException * The application name was specified in an invalid format. * @throws ApplicationDoesNotExistException * The application does not exist with the IAM user or Amazon Web Services account. * @throws DeploymentGroupNameRequiredException * The deployment group name was not specified. * @throws InvalidDeploymentGroupNameException * The deployment group name was specified in an invalid format. * @throws DeploymentGroupDoesNotExistException * The named deployment group with the IAM user or Amazon Web Services account does not exist. * @throws RevisionRequiredException * The revision ID was not specified. * @throws RevisionDoesNotExistException * The named revision does not exist with the IAM user or Amazon Web Services account. * @throws InvalidRevisionException * The revision was specified in an invalid format. * @throws InvalidDeploymentConfigNameException * The deployment configuration name was specified in an invalid format. * @throws DeploymentConfigDoesNotExistException * The deployment configuration does not exist with the IAM user or Amazon Web Services account. * @throws DescriptionTooLongException * The description is too long. * @throws DeploymentLimitExceededException * The number of allowed deployments was exceeded. * @throws InvalidTargetInstancesException * The target instance configuration is invalid. Possible causes include:

*