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

The VPC security groups and subnets that are attached to a Lambda function. * For more information, see Configuring * a Lambda function to access resources in a VPC.

See Also:

* AWS * API Reference

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

A list of VPC subnet IDs.

*/ inline const Aws::Vector& GetSubnetIds() const{ return m_subnetIds; } inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; } inline void SetSubnetIds(const Aws::Vector& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } inline void SetSubnetIds(Aws::Vector&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = std::move(value); } inline VpcConfig& WithSubnetIds(const Aws::Vector& value) { SetSubnetIds(value); return *this;} inline VpcConfig& WithSubnetIds(Aws::Vector&& value) { SetSubnetIds(std::move(value)); return *this;} inline VpcConfig& AddSubnetIds(const Aws::String& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } inline VpcConfig& AddSubnetIds(Aws::String&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(std::move(value)); return *this; } inline VpcConfig& AddSubnetIds(const char* value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } ///@} ///@{ /** *

A list of VPC security group IDs.

*/ inline const Aws::Vector& GetSecurityGroupIds() const{ return m_securityGroupIds; } inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; } inline void SetSecurityGroupIds(const Aws::Vector& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = value; } inline void SetSecurityGroupIds(Aws::Vector&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds = std::move(value); } inline VpcConfig& WithSecurityGroupIds(const Aws::Vector& value) { SetSecurityGroupIds(value); return *this;} inline VpcConfig& WithSecurityGroupIds(Aws::Vector&& value) { SetSecurityGroupIds(std::move(value)); return *this;} inline VpcConfig& AddSecurityGroupIds(const Aws::String& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; } inline VpcConfig& AddSecurityGroupIds(Aws::String&& value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(std::move(value)); return *this; } inline VpcConfig& AddSecurityGroupIds(const char* value) { m_securityGroupIdsHasBeenSet = true; m_securityGroupIds.push_back(value); return *this; } ///@} ///@{ /** *

Allows outbound IPv6 traffic on VPC functions that are connected to * dual-stack subnets.

*/ inline bool GetIpv6AllowedForDualStack() const{ return m_ipv6AllowedForDualStack; } inline bool Ipv6AllowedForDualStackHasBeenSet() const { return m_ipv6AllowedForDualStackHasBeenSet; } inline void SetIpv6AllowedForDualStack(bool value) { m_ipv6AllowedForDualStackHasBeenSet = true; m_ipv6AllowedForDualStack = value; } inline VpcConfig& WithIpv6AllowedForDualStack(bool value) { SetIpv6AllowedForDualStack(value); return *this;} ///@} private: Aws::Vector m_subnetIds; bool m_subnetIdsHasBeenSet = false; Aws::Vector m_securityGroupIds; bool m_securityGroupIdsHasBeenSet = false; bool m_ipv6AllowedForDualStack; bool m_ipv6AllowedForDualStackHasBeenSet = false; }; } // namespace Model } // namespace Lambda } // namespace Aws