public CreateAgentRequest withSecurityGroupArns(java.util.Collection<String> securityGroupArns) {
        setSecurityGroupArns(securityGroupArns);
        return this;
    }
<p>
Specifies the Amazon Resource Name (ARN) of the security group that protects your task's <a
href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces"
>network interfaces</a> when <a href=
"https://docs.aws.amazon.com/datasync/latest/userguide/choose-service-endpoint.html#choose-service-endpoint-vpc"
>using a virtual private cloud (VPC) endpoint</a>. You can only specify one ARN.
</p>

@param securityGroupArns
       Specifies the Amazon Resource Name (ARN) of the security group that protects your task's <a href=
       "https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces"
       >network interfaces</a> when <a href=
       "https://docs.aws.amazon.com/datasync/latest/userguide/choose-service-endpoint.html#choose-service-endpoint-vpc"
       >using a virtual private cloud (VPC) endpoint</a>. You can only specify one ARN.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-datasync/src/main/java/com/amazonaws/services/datasync/model/CreateAgentRequest.java