/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* For tasks that use the awsvpc
networking mode, the VPC subnet and security group configuration.
*
* Whether the task's elastic network interface receives a public IP address. The default value is
* DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*
* The IDs of the security groups associated with the task or service. *
** You can provide up to five security groups. *
*/ private java.util.List* The IDs of the subnets associated with the task or service. *
** You can provide up to 16 subnets. *
*/ private java.util.List
* Whether the task's elastic network interface receives a public IP address. The default value is
* DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*
DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*/
public void setAssignPublicIp(String assignPublicIp) {
this.assignPublicIp = assignPublicIp;
}
/**
*
* Whether the task's elastic network interface receives a public IP address. The default value is
* DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*
DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*/
public String getAssignPublicIp() {
return this.assignPublicIp;
}
/**
*
* Whether the task's elastic network interface receives a public IP address. The default value is
* DISABLED
.
*
* Valid values: ENABLED
| DISABLED
*
DISABLED
.
*
* Valid values: ENABLED
| DISABLED
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails withAssignPublicIp(String assignPublicIp) {
setAssignPublicIp(assignPublicIp);
return this;
}
/**
*
* The IDs of the security groups associated with the task or service. *
** You can provide up to five security groups. *
* * @return The IDs of the security groups associated with the task or service. *
* You can provide up to five security groups.
*/
public java.util.List
* The IDs of the security groups associated with the task or service.
*
* You can provide up to five security groups.
*
* You can provide up to five security groups.
*/
public void setSecurityGroups(java.util.Collection
* The IDs of the security groups associated with the task or service.
*
* You can provide up to five security groups.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want
* to override the existing values.
*
* You can provide up to five security groups.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails withSecurityGroups(String... securityGroups) {
if (this.securityGroups == null) {
setSecurityGroups(new java.util.ArrayList
* The IDs of the security groups associated with the task or service.
*
* You can provide up to five security groups.
*
* You can provide up to five security groups.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails withSecurityGroups(java.util.Collection
* The IDs of the subnets associated with the task or service.
*
* You can provide up to 16 subnets.
*
* You can provide up to 16 subnets.
*/
public java.util.List
* The IDs of the subnets associated with the task or service.
*
* You can provide up to 16 subnets.
*
* You can provide up to 16 subnets.
*/
public void setSubnets(java.util.Collection
* The IDs of the subnets associated with the task or service.
*
* You can provide up to 16 subnets.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnets(java.util.Collection)} or {@link #withSubnets(java.util.Collection)} if you want to override
* the existing values.
*
* You can provide up to 16 subnets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails withSubnets(String... subnets) {
if (this.subnets == null) {
setSubnets(new java.util.ArrayList
* The IDs of the subnets associated with the task or service.
*
* You can provide up to 16 subnets.
*
* You can provide up to 16 subnets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails withSubnets(java.util.Collection