/** * 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 ECS { namespace Model { /** *

An object representing the networking details for a task or * service.

See Also:

AWS * API Reference

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the subnets associated with the task or service. There's a limit * of 16 subnets that can be specified per AwsVpcConfiguration.

*

All specified subnets must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

The IDs of the security groups associated with the task or service. If you * don't specify a security group, the default security group for the VPC is used. * There's a limit of 5 security groups that can be specified per * AwsVpcConfiguration.

All specified security groups * must be from the same VPC.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

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

Whether the task's elastic network interface receives a public IP address. * The default value is DISABLED.

*/ 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 ECS } // namespace Aws