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/shield/Shield_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/shield/model/ProtectionGroupAggregation.h> 10 #include <aws/shield/model/ProtectionGroupPattern.h> 11 #include <aws/shield/model/ProtectedResourceType.h> 12 #include <aws/core/utils/memory/stl/AWSVector.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Json 20 { 21 class JsonValue; 22 class JsonView; 23 } // namespace Json 24 } // namespace Utils 25 namespace Shield 26 { 27 namespace Model 28 { 29 30 /** 31 * <p>A grouping of protected resources that you and Shield Advanced can monitor as 32 * a collective. This resource grouping improves the accuracy of detection and 33 * reduces false positives. </p><p><h3>See Also:</h3> <a 34 * href="http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ProtectionGroup">AWS 35 * API Reference</a></p> 36 */ 37 class AWS_SHIELD_API ProtectionGroup 38 { 39 public: 40 ProtectionGroup(); 41 ProtectionGroup(Aws::Utils::Json::JsonView jsonValue); 42 ProtectionGroup& operator=(Aws::Utils::Json::JsonView jsonValue); 43 Aws::Utils::Json::JsonValue Jsonize() const; 44 45 46 /** 47 * <p>The name of the protection group. You use this to identify the protection 48 * group in lists and to manage the protection group, for example to update, 49 * delete, or describe it. </p> 50 */ GetProtectionGroupId()51 inline const Aws::String& GetProtectionGroupId() const{ return m_protectionGroupId; } 52 53 /** 54 * <p>The name of the protection group. You use this to identify the protection 55 * group in lists and to manage the protection group, for example to update, 56 * delete, or describe it. </p> 57 */ ProtectionGroupIdHasBeenSet()58 inline bool ProtectionGroupIdHasBeenSet() const { return m_protectionGroupIdHasBeenSet; } 59 60 /** 61 * <p>The name of the protection group. You use this to identify the protection 62 * group in lists and to manage the protection group, for example to update, 63 * delete, or describe it. </p> 64 */ SetProtectionGroupId(const Aws::String & value)65 inline void SetProtectionGroupId(const Aws::String& value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId = value; } 66 67 /** 68 * <p>The name of the protection group. You use this to identify the protection 69 * group in lists and to manage the protection group, for example to update, 70 * delete, or describe it. </p> 71 */ SetProtectionGroupId(Aws::String && value)72 inline void SetProtectionGroupId(Aws::String&& value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId = std::move(value); } 73 74 /** 75 * <p>The name of the protection group. You use this to identify the protection 76 * group in lists and to manage the protection group, for example to update, 77 * delete, or describe it. </p> 78 */ SetProtectionGroupId(const char * value)79 inline void SetProtectionGroupId(const char* value) { m_protectionGroupIdHasBeenSet = true; m_protectionGroupId.assign(value); } 80 81 /** 82 * <p>The name of the protection group. You use this to identify the protection 83 * group in lists and to manage the protection group, for example to update, 84 * delete, or describe it. </p> 85 */ WithProtectionGroupId(const Aws::String & value)86 inline ProtectionGroup& WithProtectionGroupId(const Aws::String& value) { SetProtectionGroupId(value); return *this;} 87 88 /** 89 * <p>The name of the protection group. You use this to identify the protection 90 * group in lists and to manage the protection group, for example to update, 91 * delete, or describe it. </p> 92 */ WithProtectionGroupId(Aws::String && value)93 inline ProtectionGroup& WithProtectionGroupId(Aws::String&& value) { SetProtectionGroupId(std::move(value)); return *this;} 94 95 /** 96 * <p>The name of the protection group. You use this to identify the protection 97 * group in lists and to manage the protection group, for example to update, 98 * delete, or describe it. </p> 99 */ WithProtectionGroupId(const char * value)100 inline ProtectionGroup& WithProtectionGroupId(const char* value) { SetProtectionGroupId(value); return *this;} 101 102 103 /** 104 * <p>Defines how Shield combines resource data for the group in order to detect, 105 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 106 * the group. This is a good choice for most cases. Examples include Elastic IP 107 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 108 * <p>Mean - Use the average of the traffic across the group. This is a good choice 109 * for resources that share traffic uniformly. Examples include accelerators and 110 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 111 * resource. This is useful for resources that don't share traffic and for 112 * resources that share that traffic in a non-uniform way. Examples include Amazon 113 * CloudFront distributions and origin resources for CloudFront distributions.</p> 114 * </li> </ul> 115 */ GetAggregation()116 inline const ProtectionGroupAggregation& GetAggregation() const{ return m_aggregation; } 117 118 /** 119 * <p>Defines how Shield combines resource data for the group in order to detect, 120 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 121 * the group. This is a good choice for most cases. Examples include Elastic IP 122 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 123 * <p>Mean - Use the average of the traffic across the group. This is a good choice 124 * for resources that share traffic uniformly. Examples include accelerators and 125 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 126 * resource. This is useful for resources that don't share traffic and for 127 * resources that share that traffic in a non-uniform way. Examples include Amazon 128 * CloudFront distributions and origin resources for CloudFront distributions.</p> 129 * </li> </ul> 130 */ AggregationHasBeenSet()131 inline bool AggregationHasBeenSet() const { return m_aggregationHasBeenSet; } 132 133 /** 134 * <p>Defines how Shield combines resource data for the group in order to detect, 135 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 136 * the group. This is a good choice for most cases. Examples include Elastic IP 137 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 138 * <p>Mean - Use the average of the traffic across the group. This is a good choice 139 * for resources that share traffic uniformly. Examples include accelerators and 140 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 141 * resource. This is useful for resources that don't share traffic and for 142 * resources that share that traffic in a non-uniform way. Examples include Amazon 143 * CloudFront distributions and origin resources for CloudFront distributions.</p> 144 * </li> </ul> 145 */ SetAggregation(const ProtectionGroupAggregation & value)146 inline void SetAggregation(const ProtectionGroupAggregation& value) { m_aggregationHasBeenSet = true; m_aggregation = value; } 147 148 /** 149 * <p>Defines how Shield combines resource data for the group in order to detect, 150 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 151 * the group. This is a good choice for most cases. Examples include Elastic IP 152 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 153 * <p>Mean - Use the average of the traffic across the group. This is a good choice 154 * for resources that share traffic uniformly. Examples include accelerators and 155 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 156 * resource. This is useful for resources that don't share traffic and for 157 * resources that share that traffic in a non-uniform way. Examples include Amazon 158 * CloudFront distributions and origin resources for CloudFront distributions.</p> 159 * </li> </ul> 160 */ SetAggregation(ProtectionGroupAggregation && value)161 inline void SetAggregation(ProtectionGroupAggregation&& value) { m_aggregationHasBeenSet = true; m_aggregation = std::move(value); } 162 163 /** 164 * <p>Defines how Shield combines resource data for the group in order to detect, 165 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 166 * the group. This is a good choice for most cases. Examples include Elastic IP 167 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 168 * <p>Mean - Use the average of the traffic across the group. This is a good choice 169 * for resources that share traffic uniformly. Examples include accelerators and 170 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 171 * resource. This is useful for resources that don't share traffic and for 172 * resources that share that traffic in a non-uniform way. Examples include Amazon 173 * CloudFront distributions and origin resources for CloudFront distributions.</p> 174 * </li> </ul> 175 */ WithAggregation(const ProtectionGroupAggregation & value)176 inline ProtectionGroup& WithAggregation(const ProtectionGroupAggregation& value) { SetAggregation(value); return *this;} 177 178 /** 179 * <p>Defines how Shield combines resource data for the group in order to detect, 180 * mitigate, and report events.</p> <ul> <li> <p>Sum - Use the total traffic across 181 * the group. This is a good choice for most cases. Examples include Elastic IP 182 * addresses for EC2 instances that scale manually or automatically.</p> </li> <li> 183 * <p>Mean - Use the average of the traffic across the group. This is a good choice 184 * for resources that share traffic uniformly. Examples include accelerators and 185 * load balancers.</p> </li> <li> <p>Max - Use the highest traffic from each 186 * resource. This is useful for resources that don't share traffic and for 187 * resources that share that traffic in a non-uniform way. Examples include Amazon 188 * CloudFront distributions and origin resources for CloudFront distributions.</p> 189 * </li> </ul> 190 */ WithAggregation(ProtectionGroupAggregation && value)191 inline ProtectionGroup& WithAggregation(ProtectionGroupAggregation&& value) { SetAggregation(std::move(value)); return *this;} 192 193 194 /** 195 * <p>The criteria to use to choose the protected resources for inclusion in the 196 * group. You can include all resources that have protections, provide a list of 197 * resource Amazon Resource Names (ARNs), or include all resources of a specified 198 * resource type.</p> 199 */ GetPattern()200 inline const ProtectionGroupPattern& GetPattern() const{ return m_pattern; } 201 202 /** 203 * <p>The criteria to use to choose the protected resources for inclusion in the 204 * group. You can include all resources that have protections, provide a list of 205 * resource Amazon Resource Names (ARNs), or include all resources of a specified 206 * resource type.</p> 207 */ PatternHasBeenSet()208 inline bool PatternHasBeenSet() const { return m_patternHasBeenSet; } 209 210 /** 211 * <p>The criteria to use to choose the protected resources for inclusion in the 212 * group. You can include all resources that have protections, provide a list of 213 * resource Amazon Resource Names (ARNs), or include all resources of a specified 214 * resource type.</p> 215 */ SetPattern(const ProtectionGroupPattern & value)216 inline void SetPattern(const ProtectionGroupPattern& value) { m_patternHasBeenSet = true; m_pattern = value; } 217 218 /** 219 * <p>The criteria to use to choose the protected resources for inclusion in the 220 * group. You can include all resources that have protections, provide a list of 221 * resource Amazon Resource Names (ARNs), or include all resources of a specified 222 * resource type.</p> 223 */ SetPattern(ProtectionGroupPattern && value)224 inline void SetPattern(ProtectionGroupPattern&& value) { m_patternHasBeenSet = true; m_pattern = std::move(value); } 225 226 /** 227 * <p>The criteria to use to choose the protected resources for inclusion in the 228 * group. You can include all resources that have protections, provide a list of 229 * resource Amazon Resource Names (ARNs), or include all resources of a specified 230 * resource type.</p> 231 */ WithPattern(const ProtectionGroupPattern & value)232 inline ProtectionGroup& WithPattern(const ProtectionGroupPattern& value) { SetPattern(value); return *this;} 233 234 /** 235 * <p>The criteria to use to choose the protected resources for inclusion in the 236 * group. You can include all resources that have protections, provide a list of 237 * resource Amazon Resource Names (ARNs), or include all resources of a specified 238 * resource type.</p> 239 */ WithPattern(ProtectionGroupPattern && value)240 inline ProtectionGroup& WithPattern(ProtectionGroupPattern&& value) { SetPattern(std::move(value)); return *this;} 241 242 243 /** 244 * <p>The resource type to include in the protection group. All protected resources 245 * of this type are included in the protection group. You must set this when you 246 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 247 * it for any other <code>Pattern</code> setting. </p> 248 */ GetResourceType()249 inline const ProtectedResourceType& GetResourceType() const{ return m_resourceType; } 250 251 /** 252 * <p>The resource type to include in the protection group. All protected resources 253 * of this type are included in the protection group. You must set this when you 254 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 255 * it for any other <code>Pattern</code> setting. </p> 256 */ ResourceTypeHasBeenSet()257 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } 258 259 /** 260 * <p>The resource type to include in the protection group. All protected resources 261 * of this type are included in the protection group. You must set this when you 262 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 263 * it for any other <code>Pattern</code> setting. </p> 264 */ SetResourceType(const ProtectedResourceType & value)265 inline void SetResourceType(const ProtectedResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } 266 267 /** 268 * <p>The resource type to include in the protection group. All protected resources 269 * of this type are included in the protection group. You must set this when you 270 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 271 * it for any other <code>Pattern</code> setting. </p> 272 */ SetResourceType(ProtectedResourceType && value)273 inline void SetResourceType(ProtectedResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } 274 275 /** 276 * <p>The resource type to include in the protection group. All protected resources 277 * of this type are included in the protection group. You must set this when you 278 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 279 * it for any other <code>Pattern</code> setting. </p> 280 */ WithResourceType(const ProtectedResourceType & value)281 inline ProtectionGroup& WithResourceType(const ProtectedResourceType& value) { SetResourceType(value); return *this;} 282 283 /** 284 * <p>The resource type to include in the protection group. All protected resources 285 * of this type are included in the protection group. You must set this when you 286 * set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set 287 * it for any other <code>Pattern</code> setting. </p> 288 */ WithResourceType(ProtectedResourceType && value)289 inline ProtectionGroup& WithResourceType(ProtectedResourceType&& value) { SetResourceType(std::move(value)); return *this;} 290 291 292 /** 293 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 294 * protection group. You must set this when you set <code>Pattern</code> to 295 * <code>ARBITRARY</code> and you must not set it for any other 296 * <code>Pattern</code> setting. </p> 297 */ GetMembers()298 inline const Aws::Vector<Aws::String>& GetMembers() const{ return m_members; } 299 300 /** 301 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 302 * protection group. You must set this when you set <code>Pattern</code> to 303 * <code>ARBITRARY</code> and you must not set it for any other 304 * <code>Pattern</code> setting. </p> 305 */ MembersHasBeenSet()306 inline bool MembersHasBeenSet() const { return m_membersHasBeenSet; } 307 308 /** 309 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 310 * protection group. You must set this when you set <code>Pattern</code> to 311 * <code>ARBITRARY</code> and you must not set it for any other 312 * <code>Pattern</code> setting. </p> 313 */ SetMembers(const Aws::Vector<Aws::String> & value)314 inline void SetMembers(const Aws::Vector<Aws::String>& value) { m_membersHasBeenSet = true; m_members = value; } 315 316 /** 317 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 318 * protection group. You must set this when you set <code>Pattern</code> to 319 * <code>ARBITRARY</code> and you must not set it for any other 320 * <code>Pattern</code> setting. </p> 321 */ SetMembers(Aws::Vector<Aws::String> && value)322 inline void SetMembers(Aws::Vector<Aws::String>&& value) { m_membersHasBeenSet = true; m_members = std::move(value); } 323 324 /** 325 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 326 * protection group. You must set this when you set <code>Pattern</code> to 327 * <code>ARBITRARY</code> and you must not set it for any other 328 * <code>Pattern</code> setting. </p> 329 */ WithMembers(const Aws::Vector<Aws::String> & value)330 inline ProtectionGroup& WithMembers(const Aws::Vector<Aws::String>& value) { SetMembers(value); return *this;} 331 332 /** 333 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 334 * protection group. You must set this when you set <code>Pattern</code> to 335 * <code>ARBITRARY</code> and you must not set it for any other 336 * <code>Pattern</code> setting. </p> 337 */ WithMembers(Aws::Vector<Aws::String> && value)338 inline ProtectionGroup& WithMembers(Aws::Vector<Aws::String>&& value) { SetMembers(std::move(value)); return *this;} 339 340 /** 341 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 342 * protection group. You must set this when you set <code>Pattern</code> to 343 * <code>ARBITRARY</code> and you must not set it for any other 344 * <code>Pattern</code> setting. </p> 345 */ AddMembers(const Aws::String & value)346 inline ProtectionGroup& AddMembers(const Aws::String& value) { m_membersHasBeenSet = true; m_members.push_back(value); return *this; } 347 348 /** 349 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 350 * protection group. You must set this when you set <code>Pattern</code> to 351 * <code>ARBITRARY</code> and you must not set it for any other 352 * <code>Pattern</code> setting. </p> 353 */ AddMembers(Aws::String && value)354 inline ProtectionGroup& AddMembers(Aws::String&& value) { m_membersHasBeenSet = true; m_members.push_back(std::move(value)); return *this; } 355 356 /** 357 * <p>The Amazon Resource Names (ARNs) of the resources to include in the 358 * protection group. You must set this when you set <code>Pattern</code> to 359 * <code>ARBITRARY</code> and you must not set it for any other 360 * <code>Pattern</code> setting. </p> 361 */ AddMembers(const char * value)362 inline ProtectionGroup& AddMembers(const char* value) { m_membersHasBeenSet = true; m_members.push_back(value); return *this; } 363 364 365 /** 366 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 367 */ GetProtectionGroupArn()368 inline const Aws::String& GetProtectionGroupArn() const{ return m_protectionGroupArn; } 369 370 /** 371 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 372 */ ProtectionGroupArnHasBeenSet()373 inline bool ProtectionGroupArnHasBeenSet() const { return m_protectionGroupArnHasBeenSet; } 374 375 /** 376 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 377 */ SetProtectionGroupArn(const Aws::String & value)378 inline void SetProtectionGroupArn(const Aws::String& value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn = value; } 379 380 /** 381 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 382 */ SetProtectionGroupArn(Aws::String && value)383 inline void SetProtectionGroupArn(Aws::String&& value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn = std::move(value); } 384 385 /** 386 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 387 */ SetProtectionGroupArn(const char * value)388 inline void SetProtectionGroupArn(const char* value) { m_protectionGroupArnHasBeenSet = true; m_protectionGroupArn.assign(value); } 389 390 /** 391 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 392 */ WithProtectionGroupArn(const Aws::String & value)393 inline ProtectionGroup& WithProtectionGroupArn(const Aws::String& value) { SetProtectionGroupArn(value); return *this;} 394 395 /** 396 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 397 */ WithProtectionGroupArn(Aws::String && value)398 inline ProtectionGroup& WithProtectionGroupArn(Aws::String&& value) { SetProtectionGroupArn(std::move(value)); return *this;} 399 400 /** 401 * <p>The ARN (Amazon Resource Name) of the protection group.</p> 402 */ WithProtectionGroupArn(const char * value)403 inline ProtectionGroup& WithProtectionGroupArn(const char* value) { SetProtectionGroupArn(value); return *this;} 404 405 private: 406 407 Aws::String m_protectionGroupId; 408 bool m_protectionGroupIdHasBeenSet; 409 410 ProtectionGroupAggregation m_aggregation; 411 bool m_aggregationHasBeenSet; 412 413 ProtectionGroupPattern m_pattern; 414 bool m_patternHasBeenSet; 415 416 ProtectedResourceType m_resourceType; 417 bool m_resourceTypeHasBeenSet; 418 419 Aws::Vector<Aws::String> m_members; 420 bool m_membersHasBeenSet; 421 422 Aws::String m_protectionGroupArn; 423 bool m_protectionGroupArnHasBeenSet; 424 }; 425 426 } // namespace Model 427 } // namespace Shield 428 } // namespace Aws 429