/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudWatchEvents { namespace Model { /** *

This structure specifies the VPC subnets and security groups for the task, * and whether a public IP address is to be used. This structure is relevant only * for ECS tasks that use the awsvpc network mode.

See * Also:

AWS * API Reference

*/ class AwsVpcConfiguration { public: AWS_CLOUDWATCHEVENTS_API AwsVpcConfiguration(); AWS_CLOUDWATCHEVENTS_API AwsVpcConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHEVENTS_API AwsVpcConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline const Aws::Vector& GetSubnets() const{ return m_subnets; } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline void SetSubnets(const Aws::Vector& value) { m_subnetsHasBeenSet = true; m_subnets = value; } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline void SetSubnets(Aws::Vector&& value) { m_subnetsHasBeenSet = true; m_subnets = std::move(value); } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline AwsVpcConfiguration& WithSubnets(const Aws::Vector& value) { SetSubnets(value); return *this;} /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline AwsVpcConfiguration& WithSubnets(Aws::Vector&& value) { SetSubnets(std::move(value)); return *this;} /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline AwsVpcConfiguration& AddSubnets(const Aws::String& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline AwsVpcConfiguration& AddSubnets(Aws::String&& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(std::move(value)); return *this; } /** *

Specifies the subnets associated with the task. These subnets must all be in * the same VPC. You can specify as many as 16 subnets.

*/ inline AwsVpcConfiguration& AddSubnets(const char* value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline const Aws::Vector& GetSecurityGroups() const{ return m_securityGroups; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline void SetSecurityGroups(const Aws::Vector& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = value; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline void SetSecurityGroups(Aws::Vector&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = std::move(value); } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline AwsVpcConfiguration& WithSecurityGroups(const Aws::Vector& value) { SetSecurityGroups(value); return *this;} /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline AwsVpcConfiguration& WithSecurityGroups(Aws::Vector&& value) { SetSecurityGroups(std::move(value)); return *this;} /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline AwsVpcConfiguration& AddSecurityGroups(const Aws::String& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline AwsVpcConfiguration& AddSecurityGroups(Aws::String&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(std::move(value)); return *this; } /** *

Specifies the security groups associated with the task. These security groups * must all be in the same VPC. You can specify as many as five security groups. If * you do not specify a security group, the default security group for the VPC is * used.

*/ inline AwsVpcConfiguration& AddSecurityGroups(const char* value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline const AssignPublicIp& GetAssignPublicIp() const{ return m_assignPublicIp; } /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline bool AssignPublicIpHasBeenSet() const { return m_assignPublicIpHasBeenSet; } /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline void SetAssignPublicIp(const AssignPublicIp& value) { m_assignPublicIpHasBeenSet = true; m_assignPublicIp = value; } /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline void SetAssignPublicIp(AssignPublicIp&& value) { m_assignPublicIpHasBeenSet = true; m_assignPublicIp = std::move(value); } /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline AwsVpcConfiguration& WithAssignPublicIp(const AssignPublicIp& value) { SetAssignPublicIp(value); return *this;} /** *

Specifies whether the task's elastic network interface receives a public IP * address. You can specify ENABLED only when LaunchType * in EcsParameters is set to FARGATE.

*/ inline AwsVpcConfiguration& WithAssignPublicIp(AssignPublicIp&& value) { SetAssignPublicIp(std::move(value)); return *this;} private: Aws::Vector m_subnets; bool m_subnetsHasBeenSet = false; Aws::Vector m_securityGroups; bool m_securityGroupsHasBeenSet = false; AssignPublicIp m_assignPublicIp; bool m_assignPublicIpHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchEvents } // namespace Aws