create_protection_group
async
¶
create_protection_group(
protection_group_id: ProtectionGroupId,
aggregation: ProtectionGroupAggregation,
pattern: ProtectionGroupPattern,
*,
config_overrides: Optional[AsyncShieldClientConfig] = None,
resource_type: Optional[ProtectedResourceType] = None,
members: Optional[ProtectionGroupMembers] = None,
tags: Optional[TagList] = None,
) -> CreateProtectionGroupResponse
Creates a grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
Parameters:
-
protection_group_id(ProtectionGroupId) –The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
-
aggregation(ProtectionGroupAggregation) –Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.
-
Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
-
Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
-
Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront and origin resources for CloudFront distributions.
-
-
pattern(ProtectionGroupPattern) –The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
-
resource_type(Optional[ProtectedResourceType], default:None) –The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set
PatterntoBY_RESOURCE_TYPEand you must not set it for any otherPatternsetting. -
members(Optional[ProtectionGroupMembers], default:None) –The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set
PatterntoARBITRARYand you must not set it for any otherPatternsetting. -
tags(Optional[TagList], default:None) –One or more tag key-value pairs for the protection group.
Raises:
-
InternalErrorException–Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.
-
InvalidParameterException–Exception that indicates that the parameters passed to the API are invalid. If available, this exception includes details in additional properties.
-
LimitsExceededException–Exception that indicates that the operation would exceed a limit.
-
OptimisticLockException–Exception that indicates that the resource state has been modified by another client. Retrieve the resource and then retry your request.
-
ResourceAlreadyExistsException–Exception indicating the specified resource already exists. If available, this exception includes details in additional properties.
-
ResourceNotFoundException–Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_shield/_services/async_shield.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | |