/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.shield.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateProtectionGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* 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. *
*/ private String protectionGroupId; /** ** 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 distributions and * origin resources for CloudFront distributions. *
** 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. *
*/ private String pattern; /** *
* The resource type to include in the protection group. All protected resources of this type are included in the
* protection group. You must set this when you set Pattern
to BY_RESOURCE_TYPE
and you
* must not set it for any other Pattern
setting.
*
* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you
* set Pattern
to ARBITRARY
and you must not set it for any other Pattern
* setting.
*
* 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. *
* * @param 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. */ public void setProtectionGroupId(String protectionGroupId) { this.protectionGroupId = 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. *
* * @return 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. */ public String getProtectionGroupId() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateProtectionGroupRequest withProtectionGroupId(String protectionGroupId) { setProtectionGroupId(protectionGroupId); return this; } /** ** 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 distributions and * origin resources for CloudFront distributions. *
** 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 * distributions and origin resources for CloudFront distributions. *
** 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 distributions and * origin resources for CloudFront distributions. *
** 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 * distributions and origin resources for CloudFront distributions. *
** 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 distributions and * origin resources for CloudFront distributions. *
** 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 * distributions and origin resources for CloudFront distributions. *
** 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 distributions and * origin resources for CloudFront distributions. *
** 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 * distributions and origin resources for CloudFront distributions. *
** 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. *
* * @param pattern * 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. * @see ProtectionGroupPattern */ public void setPattern(String pattern) { this.pattern = pattern; } /** ** 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. *
* * @return 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. * @see ProtectionGroupPattern */ public String getPattern() { return this.pattern; } /** ** 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. *
* * @param pattern * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupPattern */ public UpdateProtectionGroupRequest withPattern(String pattern) { setPattern(pattern); return this; } /** ** 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. *
* * @param pattern * 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. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtectionGroupPattern */ public UpdateProtectionGroupRequest withPattern(ProtectionGroupPattern pattern) { this.pattern = pattern.toString(); return this; } /** *
* The resource type to include in the protection group. All protected resources of this type are included in the
* protection group. You must set this when you set Pattern
to BY_RESOURCE_TYPE
and you
* must not set it for any other Pattern
setting.
*
Pattern
to BY_RESOURCE_TYPE
* and you must not set it for any other Pattern
setting.
* @see ProtectedResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The resource type to include in the protection group. All protected resources of this type are included in the
* protection group. You must set this when you set Pattern
to BY_RESOURCE_TYPE
and you
* must not set it for any other Pattern
setting.
*
Pattern
to
* BY_RESOURCE_TYPE
and you must not set it for any other Pattern
setting.
* @see ProtectedResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The resource type to include in the protection group. All protected resources of this type are included in the
* protection group. You must set this when you set Pattern
to BY_RESOURCE_TYPE
and you
* must not set it for any other Pattern
setting.
*
Pattern
to BY_RESOURCE_TYPE
* and you must not set it for any other Pattern
setting.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProtectedResourceType
*/
public UpdateProtectionGroupRequest withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The resource type to include in the protection group. All protected resources of this type are included in the
* protection group. You must set this when you set Pattern
to BY_RESOURCE_TYPE
and you
* must not set it for any other Pattern
setting.
*
Pattern
to BY_RESOURCE_TYPE
* and you must not set it for any other Pattern
setting.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProtectedResourceType
*/
public UpdateProtectionGroupRequest withResourceType(ProtectedResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
*
* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you
* set Pattern
to ARBITRARY
and you must not set it for any other Pattern
* setting.
*
Pattern
to ARBITRARY
and you must not set it for any other
* Pattern
setting.
*/
public java.util.List
* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you
* set Pattern
to ARBITRARY
and you must not set it for any other Pattern
* setting.
*
Pattern
to ARBITRARY
and you must not set it for any other
* Pattern
setting.
*/
public void setMembers(java.util.Collection
* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you
* set Pattern
to ARBITRARY
and you must not set it for any other Pattern
* setting.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMembers(java.util.Collection)} or {@link #withMembers(java.util.Collection)} if you want to override * the existing values. *
* * @param members * The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this * when you setPattern
to ARBITRARY
and you must not set it for any other
* Pattern
setting.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectionGroupRequest withMembers(String... members) {
if (this.members == null) {
setMembers(new java.util.ArrayList
* The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you
* set Pattern
to ARBITRARY
and you must not set it for any other Pattern
* setting.
*
Pattern
to ARBITRARY
and you must not set it for any other
* Pattern
setting.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProtectionGroupRequest withMembers(java.util.Collection