Skip to content

Commit 8ba8f99

Browse files
Add support to roll back an In_Progress ECS Service Deployment
Add support for custom instance type for reserved capacity fleets Documentation-only update for CreateView option correction
1 parent 11c8818 commit 8ba8f99

28 files changed

+1402
-874
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.552
1+
1.11.553

generated/src/aws-cpp-sdk-codebuild/include/aws/codebuild/model/ComputeConfiguration.h

+18-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma once
77
#include <aws/codebuild/CodeBuild_EXPORTS.h>
88
#include <aws/codebuild/model/MachineType.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
910
#include <utility>
1011

1112
namespace Aws
@@ -26,7 +27,8 @@ namespace Model
2627
/**
2728
* <p>Contains compute attributes. These attributes only need be specified when
2829
* your project's or fleet's <code>computeType</code> is set to
29-
* <code>ATTRIBUTE_BASED_COMPUTE</code>.</p><p><h3>See Also:</h3> <a
30+
* <code>ATTRIBUTE_BASED_COMPUTE</code> or
31+
* <code>CUSTOM_INSTANCE_TYPE</code>.</p><p><h3>See Also:</h3> <a
3032
* href="http://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ComputeConfiguration">AWS
3133
* API Reference</a></p>
3234
*/
@@ -78,6 +80,18 @@ namespace Model
7880
inline void SetMachineType(MachineType value) { m_machineTypeHasBeenSet = true; m_machineType = value; }
7981
inline ComputeConfiguration& WithMachineType(MachineType value) { SetMachineType(value); return *this;}
8082
///@}
83+
84+
///@{
85+
/**
86+
* <p>The EC2 instance type to be launched in your fleet.</p>
87+
*/
88+
inline const Aws::String& GetInstanceType() const { return m_instanceType; }
89+
inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
90+
template<typename InstanceTypeT = Aws::String>
91+
void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
92+
template<typename InstanceTypeT = Aws::String>
93+
ComputeConfiguration& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
94+
///@}
8195
private:
8296

8397
long long m_vCpu{0};
@@ -91,6 +105,9 @@ namespace Model
91105

92106
MachineType m_machineType{MachineType::NOT_SET};
93107
bool m_machineTypeHasBeenSet = false;
108+
109+
Aws::String m_instanceType;
110+
bool m_instanceTypeHasBeenSet = false;
94111
};
95112

96113
} // namespace Model

generated/src/aws-cpp-sdk-codebuild/include/aws/codebuild/model/ComputeType.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ namespace Model
2626
BUILD_LAMBDA_4GB,
2727
BUILD_LAMBDA_8GB,
2828
BUILD_LAMBDA_10GB,
29-
ATTRIBUTE_BASED_COMPUTE
29+
ATTRIBUTE_BASED_COMPUTE,
30+
CUSTOM_INSTANCE_TYPE
3031
};
3132

3233
namespace ComputeTypeMapper

generated/src/aws-cpp-sdk-codebuild/include/aws/codebuild/model/Fleet.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ namespace Model
138138
* type <code>ARM_CONTAINER</code> is available only in regions US East (N.
139139
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific
140140
* (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney),
141-
* EU (Frankfurt), and South America (S��o Paulo).</p> </li> <li> <p>The
142-
* environment type <code>ARM_EC2</code> is available only in regions US East (N.
143-
* Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia
144-
* Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America
145-
* (São Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type
141+
* EU (Frankfurt), and South America (São Paulo).</p> </li> <li> <p>The environment
142+
* type <code>ARM_EC2</code> is available only in regions US East (N. Virginia), US
143+
* East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific
144+
* (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São
145+
* Paulo), and Asia Pacific (Mumbai).</p> </li> <li> <p>The environment type
146146
* <code>LINUX_CONTAINER</code> is available only in regions US East (N. Virginia),
147147
* US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific
148148
* (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São

generated/src/aws-cpp-sdk-codebuild/include/aws/codebuild/model/ScopeConfiguration.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ namespace Model
6868

6969
///@{
7070
/**
71-
* <p>The type of scope for a GitHub or GitLab webhook.</p>
71+
* <p>The type of scope for a GitHub or GitLab webhook. The scope default is
72+
* GITHUB_ORGANIZATION.</p>
7273
*/
7374
inline WebhookScopeType GetScope() const { return m_scope; }
7475
inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }

generated/src/aws-cpp-sdk-codebuild/source/model/ComputeConfiguration.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ ComputeConfiguration& ComputeConfiguration::operator =(JsonView jsonValue)
4545
m_machineType = MachineTypeMapper::GetMachineTypeForName(jsonValue.GetString("machineType"));
4646
m_machineTypeHasBeenSet = true;
4747
}
48+
if(jsonValue.ValueExists("instanceType"))
49+
{
50+
m_instanceType = jsonValue.GetString("instanceType");
51+
m_instanceTypeHasBeenSet = true;
52+
}
4853
return *this;
4954
}
5055

@@ -75,6 +80,12 @@ JsonValue ComputeConfiguration::Jsonize() const
7580
payload.WithString("machineType", MachineTypeMapper::GetNameForMachineType(m_machineType));
7681
}
7782

83+
if(m_instanceTypeHasBeenSet)
84+
{
85+
payload.WithString("instanceType", m_instanceType);
86+
87+
}
88+
7889
return payload;
7990
}
8091

generated/src/aws-cpp-sdk-codebuild/source/model/ComputeType.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace Aws
3131
static const int BUILD_LAMBDA_8GB_HASH = HashingUtils::HashString("BUILD_LAMBDA_8GB");
3232
static const int BUILD_LAMBDA_10GB_HASH = HashingUtils::HashString("BUILD_LAMBDA_10GB");
3333
static const int ATTRIBUTE_BASED_COMPUTE_HASH = HashingUtils::HashString("ATTRIBUTE_BASED_COMPUTE");
34+
static const int CUSTOM_INSTANCE_TYPE_HASH = HashingUtils::HashString("CUSTOM_INSTANCE_TYPE");
3435

3536

3637
ComputeType GetComputeTypeForName(const Aws::String& name)
@@ -80,6 +81,10 @@ namespace Aws
8081
{
8182
return ComputeType::ATTRIBUTE_BASED_COMPUTE;
8283
}
84+
else if (hashCode == CUSTOM_INSTANCE_TYPE_HASH)
85+
{
86+
return ComputeType::CUSTOM_INSTANCE_TYPE;
87+
}
8388
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
8489
if(overflowContainer)
8590
{
@@ -118,6 +123,8 @@ namespace Aws
118123
return "BUILD_LAMBDA_10GB";
119124
case ComputeType::ATTRIBUTE_BASED_COMPUTE:
120125
return "ATTRIBUTE_BASED_COMPUTE";
126+
case ComputeType::CUSTOM_INSTANCE_TYPE:
127+
return "CUSTOM_INSTANCE_TYPE";
121128
default:
122129
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
123130
if(overflowContainer)

generated/src/aws-cpp-sdk-ecs/include/aws/ecs/ECSClient.h

+32
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,38 @@ namespace ECS
16041604
return SubmitAsync(&ECSClient::StartTask, request, handler, context);
16051605
}
16061606

1607+
/**
1608+
* <p>Stops an ongoing service deployment.</p> <p>The following stop types are
1609+
* avaiable:</p> <ul> <li> <p>ROLLBACK - This option rolls back the service
1610+
* deployment to the previous service revision. </p> <p>You can use this option
1611+
* even if you didn't configure the service deployment for the rollback option.
1612+
* </p> </li> </ul> <p>For more information, see <a
1613+
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stop-service-deployment.html">Stopping
1614+
* Amazon ECS service deployments</a> in the <i>Amazon Elastic Container Service
1615+
* Developer Guide</i>.</p><p><h3>See Also:</h3> <a
1616+
* href="http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopServiceDeployment">AWS
1617+
* API Reference</a></p>
1618+
*/
1619+
virtual Model::StopServiceDeploymentOutcome StopServiceDeployment(const Model::StopServiceDeploymentRequest& request) const;
1620+
1621+
/**
1622+
* A Callable wrapper for StopServiceDeployment that returns a future to the operation so that it can be executed in parallel to other requests.
1623+
*/
1624+
template<typename StopServiceDeploymentRequestT = Model::StopServiceDeploymentRequest>
1625+
Model::StopServiceDeploymentOutcomeCallable StopServiceDeploymentCallable(const StopServiceDeploymentRequestT& request) const
1626+
{
1627+
return SubmitCallable(&ECSClient::StopServiceDeployment, request);
1628+
}
1629+
1630+
/**
1631+
* An Async wrapper for StopServiceDeployment that queues the request into a thread executor and triggers associated callback when operation has finished.
1632+
*/
1633+
template<typename StopServiceDeploymentRequestT = Model::StopServiceDeploymentRequest>
1634+
void StopServiceDeploymentAsync(const StopServiceDeploymentRequestT& request, const StopServiceDeploymentResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
1635+
{
1636+
return SubmitAsync(&ECSClient::StopServiceDeployment, request, handler, context);
1637+
}
1638+
16071639
/**
16081640
* <p>Stops a running task. Any tags associated with the task will be deleted.</p>
16091641
* <p>When you call <code>StopTask</code> on a task, the equivalent of <code>docker

generated/src/aws-cpp-sdk-ecs/include/aws/ecs/ECSErrors.h

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ enum class ECSErrors
6464
PLATFORM_UNKNOWN,
6565
RESOURCE_IN_USE,
6666
SERVER,
67+
SERVICE_DEPLOYMENT_NOT_FOUND,
6768
SERVICE_NOT_ACTIVE,
6869
SERVICE_NOT_FOUND,
6970
TARGET_NOT_CONNECTED,

generated/src/aws-cpp-sdk-ecs/include/aws/ecs/ECSServiceClientModel.h

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include <aws/ecs/model/RegisterTaskDefinitionResult.h>
6363
#include <aws/ecs/model/RunTaskResult.h>
6464
#include <aws/ecs/model/StartTaskResult.h>
65+
#include <aws/ecs/model/StopServiceDeploymentResult.h>
6566
#include <aws/ecs/model/StopTaskResult.h>
6667
#include <aws/ecs/model/SubmitAttachmentStateChangesResult.h>
6768
#include <aws/ecs/model/SubmitContainerStateChangeResult.h>
@@ -175,6 +176,7 @@ namespace Aws
175176
class RegisterTaskDefinitionRequest;
176177
class RunTaskRequest;
177178
class StartTaskRequest;
179+
class StopServiceDeploymentRequest;
178180
class StopTaskRequest;
179181
class SubmitAttachmentStateChangesRequest;
180182
class SubmitContainerStateChangeRequest;
@@ -237,6 +239,7 @@ namespace Aws
237239
typedef Aws::Utils::Outcome<RegisterTaskDefinitionResult, ECSError> RegisterTaskDefinitionOutcome;
238240
typedef Aws::Utils::Outcome<RunTaskResult, ECSError> RunTaskOutcome;
239241
typedef Aws::Utils::Outcome<StartTaskResult, ECSError> StartTaskOutcome;
242+
typedef Aws::Utils::Outcome<StopServiceDeploymentResult, ECSError> StopServiceDeploymentOutcome;
240243
typedef Aws::Utils::Outcome<StopTaskResult, ECSError> StopTaskOutcome;
241244
typedef Aws::Utils::Outcome<SubmitAttachmentStateChangesResult, ECSError> SubmitAttachmentStateChangesOutcome;
242245
typedef Aws::Utils::Outcome<SubmitContainerStateChangeResult, ECSError> SubmitContainerStateChangeOutcome;
@@ -299,6 +302,7 @@ namespace Aws
299302
typedef std::future<RegisterTaskDefinitionOutcome> RegisterTaskDefinitionOutcomeCallable;
300303
typedef std::future<RunTaskOutcome> RunTaskOutcomeCallable;
301304
typedef std::future<StartTaskOutcome> StartTaskOutcomeCallable;
305+
typedef std::future<StopServiceDeploymentOutcome> StopServiceDeploymentOutcomeCallable;
302306
typedef std::future<StopTaskOutcome> StopTaskOutcomeCallable;
303307
typedef std::future<SubmitAttachmentStateChangesOutcome> SubmitAttachmentStateChangesOutcomeCallable;
304308
typedef std::future<SubmitContainerStateChangeOutcome> SubmitContainerStateChangeOutcomeCallable;
@@ -364,6 +368,7 @@ namespace Aws
364368
typedef std::function<void(const ECSClient*, const Model::RegisterTaskDefinitionRequest&, const Model::RegisterTaskDefinitionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RegisterTaskDefinitionResponseReceivedHandler;
365369
typedef std::function<void(const ECSClient*, const Model::RunTaskRequest&, const Model::RunTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RunTaskResponseReceivedHandler;
366370
typedef std::function<void(const ECSClient*, const Model::StartTaskRequest&, const Model::StartTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StartTaskResponseReceivedHandler;
371+
typedef std::function<void(const ECSClient*, const Model::StopServiceDeploymentRequest&, const Model::StopServiceDeploymentOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StopServiceDeploymentResponseReceivedHandler;
367372
typedef std::function<void(const ECSClient*, const Model::StopTaskRequest&, const Model::StopTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StopTaskResponseReceivedHandler;
368373
typedef std::function<void(const ECSClient*, const Model::SubmitAttachmentStateChangesRequest&, const Model::SubmitAttachmentStateChangesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SubmitAttachmentStateChangesResponseReceivedHandler;
369374
typedef std::function<void(const ECSClient*, const Model::SubmitContainerStateChangeRequest&, const Model::SubmitContainerStateChangeOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SubmitContainerStateChangeResponseReceivedHandler;

generated/src/aws-cpp-sdk-ecs/include/aws/ecs/model/RunTaskRequest.h

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ namespace Model
7070
/**
7171
* <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your
7272
* task on. If you do not specify a cluster, the default cluster is assumed.</p>
73+
* <p>Each account receives a default cluster the first time you use the service,
74+
* but you may also create other clusters.</p>
7375
*/
7476
inline const Aws::String& GetCluster() const { return m_cluster; }
7577
inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; }

generated/src/aws-cpp-sdk-ecs/include/aws/ecs/model/ServiceDeploymentStatus.h

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace Model
2121
STOPPED,
2222
STOP_REQUESTED,
2323
IN_PROGRESS,
24+
ROLLBACK_REQUESTED,
2425
ROLLBACK_IN_PROGRESS,
2526
ROLLBACK_SUCCESSFUL,
2627
ROLLBACK_FAILED
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/ecs/ECS_EXPORTS.h>
8+
#include <aws/ecs/ECSRequest.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
10+
#include <aws/ecs/model/StopServiceDeploymentStopType.h>
11+
#include <utility>
12+
13+
namespace Aws
14+
{
15+
namespace ECS
16+
{
17+
namespace Model
18+
{
19+
20+
/**
21+
*/
22+
class StopServiceDeploymentRequest : public ECSRequest
23+
{
24+
public:
25+
AWS_ECS_API StopServiceDeploymentRequest() = default;
26+
27+
// Service request name is the Operation name which will send this request out,
28+
// each operation should has unique request name, so that we can get operation's name from this request.
29+
// Note: this is not true for response, multiple operations may have the same response name,
30+
// so we can not get operation's name from response.
31+
inline virtual const char* GetServiceRequestName() const override { return "StopServiceDeployment"; }
32+
33+
AWS_ECS_API Aws::String SerializePayload() const override;
34+
35+
AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36+
37+
38+
///@{
39+
/**
40+
* <p>The ARN of the service deployment that you want to stop.</p>
41+
*/
42+
inline const Aws::String& GetServiceDeploymentArn() const { return m_serviceDeploymentArn; }
43+
inline bool ServiceDeploymentArnHasBeenSet() const { return m_serviceDeploymentArnHasBeenSet; }
44+
template<typename ServiceDeploymentArnT = Aws::String>
45+
void SetServiceDeploymentArn(ServiceDeploymentArnT&& value) { m_serviceDeploymentArnHasBeenSet = true; m_serviceDeploymentArn = std::forward<ServiceDeploymentArnT>(value); }
46+
template<typename ServiceDeploymentArnT = Aws::String>
47+
StopServiceDeploymentRequest& WithServiceDeploymentArn(ServiceDeploymentArnT&& value) { SetServiceDeploymentArn(std::forward<ServiceDeploymentArnT>(value)); return *this;}
48+
///@}
49+
50+
///@{
51+
/**
52+
* <p>How you want Amazon ECS to stop the task. </p> <p>The valid values are
53+
* <code>ROLLBACK</code>.</p>
54+
*/
55+
inline StopServiceDeploymentStopType GetStopType() const { return m_stopType; }
56+
inline bool StopTypeHasBeenSet() const { return m_stopTypeHasBeenSet; }
57+
inline void SetStopType(StopServiceDeploymentStopType value) { m_stopTypeHasBeenSet = true; m_stopType = value; }
58+
inline StopServiceDeploymentRequest& WithStopType(StopServiceDeploymentStopType value) { SetStopType(value); return *this;}
59+
///@}
60+
private:
61+
62+
Aws::String m_serviceDeploymentArn;
63+
bool m_serviceDeploymentArnHasBeenSet = false;
64+
65+
StopServiceDeploymentStopType m_stopType{StopServiceDeploymentStopType::NOT_SET};
66+
bool m_stopTypeHasBeenSet = false;
67+
};
68+
69+
} // namespace Model
70+
} // namespace ECS
71+
} // namespace Aws
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/ecs/ECS_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSString.h>
9+
#include <utility>
10+
11+
namespace Aws
12+
{
13+
template<typename RESULT_TYPE>
14+
class AmazonWebServiceResult;
15+
16+
namespace Utils
17+
{
18+
namespace Json
19+
{
20+
class JsonValue;
21+
} // namespace Json
22+
} // namespace Utils
23+
namespace ECS
24+
{
25+
namespace Model
26+
{
27+
class StopServiceDeploymentResult
28+
{
29+
public:
30+
AWS_ECS_API StopServiceDeploymentResult() = default;
31+
AWS_ECS_API StopServiceDeploymentResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
32+
AWS_ECS_API StopServiceDeploymentResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
33+
34+
35+
///@{
36+
/**
37+
* <p>The ARN of the stopped service deployment.</p>
38+
*/
39+
inline const Aws::String& GetServiceDeploymentArn() const { return m_serviceDeploymentArn; }
40+
template<typename ServiceDeploymentArnT = Aws::String>
41+
void SetServiceDeploymentArn(ServiceDeploymentArnT&& value) { m_serviceDeploymentArnHasBeenSet = true; m_serviceDeploymentArn = std::forward<ServiceDeploymentArnT>(value); }
42+
template<typename ServiceDeploymentArnT = Aws::String>
43+
StopServiceDeploymentResult& WithServiceDeploymentArn(ServiceDeploymentArnT&& value) { SetServiceDeploymentArn(std::forward<ServiceDeploymentArnT>(value)); return *this;}
44+
///@}
45+
46+
///@{
47+
48+
inline const Aws::String& GetRequestId() const { return m_requestId; }
49+
template<typename RequestIdT = Aws::String>
50+
void SetRequestId(RequestIdT&& value) { m_requestIdHasBeenSet = true; m_requestId = std::forward<RequestIdT>(value); }
51+
template<typename RequestIdT = Aws::String>
52+
StopServiceDeploymentResult& WithRequestId(RequestIdT&& value) { SetRequestId(std::forward<RequestIdT>(value)); return *this;}
53+
///@}
54+
private:
55+
56+
Aws::String m_serviceDeploymentArn;
57+
bool m_serviceDeploymentArnHasBeenSet = false;
58+
59+
Aws::String m_requestId;
60+
bool m_requestIdHasBeenSet = false;
61+
};
62+
63+
} // namespace Model
64+
} // namespace ECS
65+
} // namespace Aws

0 commit comments

Comments
 (0)