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/lambda/Lambda_EXPORTS.h> 8 #include <aws/lambda/model/SourceAccessType.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Lambda 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>To secure and define access to your event source, you can specify the 29 * authentication protocol, VPC components, or virtual host.</p><p><h3>See 30 * Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/SourceAccessConfiguration">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_LAMBDA_API SourceAccessConfiguration 35 { 36 public: 37 SourceAccessConfiguration(); 38 SourceAccessConfiguration(Aws::Utils::Json::JsonView jsonValue); 39 SourceAccessConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The type of authentication protocol, VPC components, or virtual host for your 45 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 46 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 47 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 48 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 49 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 50 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 51 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 52 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 53 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 54 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 55 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 56 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 57 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 58 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 59 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 60 * this RabbitMQ host as the event source.</p> </li> </ul> 61 */ GetType()62 inline const SourceAccessType& GetType() const{ return m_type; } 63 64 /** 65 * <p>The type of authentication protocol, VPC components, or virtual host for your 66 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 67 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 68 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 69 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 70 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 71 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 72 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 73 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 74 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 75 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 76 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 77 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 78 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 79 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 80 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 81 * this RabbitMQ host as the event source.</p> </li> </ul> 82 */ TypeHasBeenSet()83 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 84 85 /** 86 * <p>The type of authentication protocol, VPC components, or virtual host for your 87 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 88 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 89 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 90 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 91 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 92 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 93 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 94 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 95 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 96 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 97 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 98 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 99 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 100 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 101 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 102 * this RabbitMQ host as the event source.</p> </li> </ul> 103 */ SetType(const SourceAccessType & value)104 inline void SetType(const SourceAccessType& value) { m_typeHasBeenSet = true; m_type = value; } 105 106 /** 107 * <p>The type of authentication protocol, VPC components, or virtual host for your 108 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 109 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 110 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 111 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 112 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 113 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 114 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 115 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 116 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 117 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 118 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 119 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 120 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 121 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 122 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 123 * this RabbitMQ host as the event source.</p> </li> </ul> 124 */ SetType(SourceAccessType && value)125 inline void SetType(SourceAccessType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 126 127 /** 128 * <p>The type of authentication protocol, VPC components, or virtual host for your 129 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 130 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 131 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 132 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 133 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 134 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 135 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 136 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 137 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 138 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 139 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 140 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 141 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 142 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 143 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 144 * this RabbitMQ host as the event source.</p> </li> </ul> 145 */ WithType(const SourceAccessType & value)146 inline SourceAccessConfiguration& WithType(const SourceAccessType& value) { SetType(value); return *this;} 147 148 /** 149 * <p>The type of authentication protocol, VPC components, or virtual host for your 150 * event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> 151 * <li> <p> <code>BASIC_AUTH</code> - (Amazon MQ) The Secrets Manager secret that 152 * stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> - 153 * (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for 154 * SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> 155 * <code>VPC_SUBNET</code> - The subnets associated with your VPC. Lambda connects 156 * to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> 157 * </li> <li> <p> <code>VPC_SECURITY_GROUP</code> - The VPC security group used to 158 * manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> 159 * <code>SASL_SCRAM_256_AUTH</code> - The Secrets Manager ARN of your secret key 160 * used for SASL SCRAM-256 authentication of your self-managed Apache Kafka 161 * brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> - The Secrets 162 * Manager ARN of your secret key used for SASL SCRAM-512 authentication of your 163 * self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> 164 * - (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses 165 * this RabbitMQ host as the event source.</p> </li> </ul> 166 */ WithType(SourceAccessType && value)167 inline SourceAccessConfiguration& WithType(SourceAccessType&& value) { SetType(std::move(value)); return *this;} 168 169 170 /** 171 * <p>The value for your chosen configuration in <code>Type</code>. For example: 172 * <code>"URI": 173 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 174 */ GetURI()175 inline const Aws::String& GetURI() const{ return m_uRI; } 176 177 /** 178 * <p>The value for your chosen configuration in <code>Type</code>. For example: 179 * <code>"URI": 180 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 181 */ URIHasBeenSet()182 inline bool URIHasBeenSet() const { return m_uRIHasBeenSet; } 183 184 /** 185 * <p>The value for your chosen configuration in <code>Type</code>. For example: 186 * <code>"URI": 187 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 188 */ SetURI(const Aws::String & value)189 inline void SetURI(const Aws::String& value) { m_uRIHasBeenSet = true; m_uRI = value; } 190 191 /** 192 * <p>The value for your chosen configuration in <code>Type</code>. For example: 193 * <code>"URI": 194 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 195 */ SetURI(Aws::String && value)196 inline void SetURI(Aws::String&& value) { m_uRIHasBeenSet = true; m_uRI = std::move(value); } 197 198 /** 199 * <p>The value for your chosen configuration in <code>Type</code>. For example: 200 * <code>"URI": 201 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 202 */ SetURI(const char * value)203 inline void SetURI(const char* value) { m_uRIHasBeenSet = true; m_uRI.assign(value); } 204 205 /** 206 * <p>The value for your chosen configuration in <code>Type</code>. For example: 207 * <code>"URI": 208 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 209 */ WithURI(const Aws::String & value)210 inline SourceAccessConfiguration& WithURI(const Aws::String& value) { SetURI(value); return *this;} 211 212 /** 213 * <p>The value for your chosen configuration in <code>Type</code>. For example: 214 * <code>"URI": 215 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 216 */ WithURI(Aws::String && value)217 inline SourceAccessConfiguration& WithURI(Aws::String&& value) { SetURI(std::move(value)); return *this;} 218 219 /** 220 * <p>The value for your chosen configuration in <code>Type</code>. For example: 221 * <code>"URI": 222 * "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> 223 */ WithURI(const char * value)224 inline SourceAccessConfiguration& WithURI(const char* value) { SetURI(value); return *this;} 225 226 private: 227 228 SourceAccessType m_type; 229 bool m_typeHasBeenSet; 230 231 Aws::String m_uRI; 232 bool m_uRIHasBeenSet; 233 }; 234 235 } // namespace Model 236 } // namespace Lambda 237 } // namespace Aws 238