Class SecurityGroupRule


  • public class SecurityGroupRule
    extends SecurityGroupRuleIdentityProjection
    SecurityGroupRules are used to model the routing rules on Security Groups or firewalls. For example, the Inbound and Outbound rules in Amazon are modeled using SecurityGroupRule. The protocol, port range, type, source, destination, and policy (among other attributes) can be specified.
    • Field Detail

      • groupName

        protected java.lang.String groupName
      • groupType

        protected java.lang.String groupType
      • description

        protected java.lang.String description
      • ruleType

        protected java.lang.String ruleType
      • direction

        protected java.lang.String direction
      • etherType

        protected java.lang.String etherType
      • policy

        protected java.lang.String policy
      • priority

        protected java.lang.Integer priority
      • source

        protected java.lang.String source
      • sourceType

        protected java.lang.String sourceType
      • destination

        protected java.lang.String destination
      • destinationType

        protected java.lang.String destinationType
      • appliedTarget

        protected java.lang.String appliedTarget
      • appliedTargetType

        protected java.lang.String appliedTargetType
      • applicationType

        protected java.lang.String applicationType
      • application

        protected java.lang.String application
      • portRange

        protected java.lang.String portRange
      • sourcePortRange

        protected java.lang.String sourcePortRange
      • destinationPortRange

        protected java.lang.String destinationPortRange
      • protocol

        protected java.lang.String protocol
      • icmpType

        protected java.lang.String icmpType
      • sourceFromPort

        protected java.lang.String sourceFromPort
      • sourceToPort

        protected java.lang.String sourceToPort
      • destinationFromPort

        protected java.lang.String destinationFromPort
      • destinationToPort

        protected java.lang.String destinationToPort
      • internalId

        protected java.lang.String internalId
      • uniqueId

        protected java.lang.String uniqueId
      • providerId

        protected java.lang.String providerId
      • externalType

        protected java.lang.String externalType
      • iacId

        protected java.lang.String iacId
      • rawData

        protected java.lang.String rawData
      • enabled

        protected java.lang.Boolean enabled
      • visible

        protected java.lang.Boolean visible
      • scope

        protected java.lang.String scope
      • profile

        protected java.lang.String profile
      • syncSource

        protected java.lang.String syncSource
    • Constructor Detail

      • SecurityGroupRule

        public SecurityGroupRule()
    • Method Detail

      • getSecurityGroup

        public SecurityGroupIdentityProjection getSecurityGroup()
        The SecurityGroup for which this SecurityGroupRule applies
        Returns:
        The SecurityGroup for which this SecurityGroupRule applies
      • setSecurityGroup

        public void setSecurityGroup​(SecurityGroupIdentityProjection securityGroup)
        The SecurityGroup for which this SecurityGroupRule applies
        Parameters:
        securityGroup - The SecurityGroup for which this SecurityGroupRule applies
      • getGroupName

        public java.lang.String getGroupName()
        Some clouds group SecurityGroupRules into a group. The name of that group may be specified
        Returns:
        Some clouds group SecurityGroupRules into a group. The name of that group may be specified
      • setGroupName

        public void setGroupName​(java.lang.String groupName)
        Some clouds group SecurityGroupRules into a group. The name of that group may be specified
        Parameters:
        groupName - Some clouds group SecurityGroupRules into a group. The name of that group may be specified
      • getGroupType

        public java.lang.String getGroupType()
        Some clouds group SecurityGroupRules into a group. The type of that group may be specified. Either instance, firewall, or router is typical
        Returns:
        Some clouds group SecurityGroupRules into a group. The type of that group may be specified. Either instance, firewall, or router is typical
      • setGroupType

        public void setGroupType​(java.lang.String groupType)
        Some clouds group SecurityGroupRules into a group. The type of that group may be specified. Either instance, firewall, or router is typical
        Parameters:
        groupType - Some clouds group SecurityGroupRules into a group. The type of that group may be specified. Either instance, firewall, or router is typical
      • getDescription

        public java.lang.String getDescription()
      • setDescription

        public void setDescription​(java.lang.String description)
      • getRuleType

        public java.lang.String getRuleType()
        The type of SecurityGroupRule. In most cases, should be set to 'custom'
        Returns:
        The type of SecurityGroupRule. In most cases, should be set to 'custom'
      • setRuleType

        public void setRuleType​(java.lang.String ruleType)
        The type of SecurityGroupRule. In most cases, should be set to 'custom'
        Parameters:
        ruleType - The type of SecurityGroupRule. In most cases, should be set to 'custom'
      • getDirection

        public java.lang.String getDirection()
        The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'
        Returns:
        The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'
      • setDirection

        public void setDirection​(java.lang.String direction)
        The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'
        Parameters:
        direction - The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'
      • getEtherType

        public java.lang.String getEtherType()
        The ether type. Either 'IPv4' or 'IPv6'
        Returns:
        The ether type. Either 'IPv4' or 'IPv6'
      • setEtherType

        public void setEtherType​(java.lang.String etherType)
        The ether type. Either 'IPv4' or 'IPv6'
        Parameters:
        etherType - The ether type. Either 'IPv4' or 'IPv6'
      • getPolicy

        public java.lang.String getPolicy()
        The type of policy. Either 'accept' or 'reject'
        Returns:
        The type of policy. Either 'accept' or 'reject'
      • setPolicy

        public void setPolicy​(java.lang.String policy)
        The type of policy. Either 'accept' or 'reject'
        Parameters:
        policy - The type of policy. Either 'accept' or 'reject'
      • getPriority

        public java.lang.Integer getPriority()
        The priority for the rule
        Returns:
        The priority for the rule
      • setPriority

        public void setPriority​(java.lang.Integer priority)
        The priority for the rule
        Parameters:
        priority - The priority for the rule
      • getSource

        public java.lang.String getSource()
        The cidr for the source of the rule. i.e. 10.0.0.0/23
        Returns:
        The cidr for the source of the rule. i.e. 10.0.0.0/23
      • setSource

        public void setSource​(java.lang.String source)
        The cidr for the source of the rule. i.e. 10.0.0.0/23
        Parameters:
        source - The cidr for the source of the rule. i.e. 10.0.0.0/23
      • getSourceType

        public java.lang.String getSourceType()
        The source type. 'all', 'cidr', 'group'
        Returns:
        The source type. 'all', 'cidr', 'group'
      • setSourceType

        public void setSourceType​(java.lang.String sourceType)
        The source type. 'all', 'cidr', 'group'
        Parameters:
        sourceType - The source type. 'all', 'cidr', 'group'
      • getSourceGroup

        public SecurityGroup getSourceGroup()
        The source SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
        Returns:
        The source SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
      • setSourceGroup

        public void setSourceGroup​(SecurityGroup sourceGroup)
        The source SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
        Parameters:
        sourceGroup - The source SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
      • getDestination

        public java.lang.String getDestination()
        The cidr for the destination of the rule. i.e. 10.0.0.0/23
        Returns:
        The cidr for the destination of the rule. i.e. 10.0.0.0/23
      • setDestination

        public void setDestination​(java.lang.String destination)
        The cidr for the destination of the rule. i.e. 10.0.0.0/23
        Parameters:
        destination - The cidr for the destination of the rule. i.e. 10.0.0.0/23
      • getDestinationType

        public java.lang.String getDestinationType()
        The destination type. 'all', 'cidr', 'group'
        Returns:
        The destination type. 'all', 'cidr', 'group'
      • setDestinationType

        public void setDestinationType​(java.lang.String destinationType)
        The destination type. 'all', 'cidr', 'group'
        Parameters:
        destinationType - The destination type. 'all', 'cidr', 'group'
      • getDestinationGroup

        public SecurityGroup getDestinationGroup()
        The destination SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
        Returns:
        The destination SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
      • setDestinationGroup

        public void setDestinationGroup​(SecurityGroup destinationGroup)
        The destination SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)
        Parameters:
        destinationGroup -
      • getAppliedTarget

        public java.lang.String getAppliedTarget()
      • setAppliedTarget

        public void setAppliedTarget​(java.lang.String appliedTarget)
      • getAppliedTargetType

        public java.lang.String getAppliedTargetType()
      • setAppliedTargetType

        public void setAppliedTargetType​(java.lang.String appliedTargetType)
      • getApplicationType

        public java.lang.String getApplicationType()
        Always set to 'port'
        Returns:
        Always set to 'port'
      • setApplicationType

        public void setApplicationType​(java.lang.String applicationType)
        Always set to 'port'
        Parameters:
        applicationType - Always set to 'port'
      • getApplication

        public java.lang.String getApplication()
        Not used
        Returns:
        Not used
      • setApplication

        public void setApplication​(java.lang.String application)
        Not used
        Parameters:
        application - Not used
      • getPortRange

        public java.lang.String getPortRange()
        The port range for the rule. (i.e. 0-65535 or 10000-10050)
        Returns:
        The port range for the rule. (i.e. 0-65535 or 10000-10050)
      • setPortRange

        public void setPortRange​(java.lang.String portRange)
        The port range for the rule. (i.e. 0-65535 or 10000-10050)
        Parameters:
        portRange - The port range for the rule. (i.e. 0-65535 or 10000-10050)
      • getSourcePortRange

        public java.lang.String getSourcePortRange()
        The source port range for the rule. (i.e. 0-65535 or 10000-10050)
        Returns:
        The source port range for the rule. (i.e. 0-65535 or 10000-10050)
      • setSourcePortRange

        public void setSourcePortRange​(java.lang.String sourcePortRange)
        The source port range for the rule. (i.e. 0-65535 or 10000-10050)
        Parameters:
        sourcePortRange - The source port range for the rule. (i.e. 0-65535 or 10000-10050)
      • getDestinationPortRange

        public java.lang.String getDestinationPortRange()
        The destination port range for the rule. (i.e. 0-65535 or 10000-10050)
        Returns:
        The destination port range for the rule. (i.e. 0-65535 or 10000-10050)
      • setDestinationPortRange

        public void setDestinationPortRange​(java.lang.String destinationPortRange)
        The destination port range for the rule. (i.e. 0-65535 or 10000-10050)
        Parameters:
        destinationPortRange - The destination port range for the rule. (i.e. 0-65535 or 10000-10050)
      • getProtocol

        public java.lang.String getProtocol()
        The protocol for the rule ('icmp', 'tcp', 'all')
        Returns:
        The protocol for the rule ('icmp', 'tcp', 'all')
      • setProtocol

        public void setProtocol​(java.lang.String protocol)
        The protocol for the rule ('icmp', 'tcp', 'all')
        Parameters:
        protocol - The protocol for the rule ('icmp', 'tcp', 'all')
      • getIcmpType

        public java.lang.String getIcmpType()
        Not used
        Returns:
        Not used
      • setIcmpType

        public void setIcmpType​(java.lang.String icmpType)
        Not used
        Parameters:
        icmpType - Not used
      • getSourceFromPort

        public java.lang.String getSourceFromPort()
        The port for the source (i.e. 3389)
        Returns:
        The port for the source (i.e. 3389)
      • setSourceFromPort

        public void setSourceFromPort​(java.lang.String sourceFromPort)
        The port for the source (i.e. 3389)
        Parameters:
        sourceFromPort - The port for the source (i.e. 3389)
      • getSourceToPort

        public java.lang.String getSourceToPort()
        The port to the source (i.e. 3389)
        Returns:
        The port to the source (i.e. 3389)
      • setSourceToPort

        public void setSourceToPort​(java.lang.String sourceToPort)
        The port to the source (i.e. 3389)
        Parameters:
        sourceToPort - The port to the source (i.e. 3389)
      • getDestinationFromPort

        public java.lang.String getDestinationFromPort()
        The port from the destination (i.e. 3389)
        Returns:
        The port from the destination (i.e. 3389)
      • setDestinationFromPort

        public void setDestinationFromPort​(java.lang.String destinationFromPort)
        The port from the destination (i.e. 3389)
        Parameters:
        destinationFromPort - The port from the destination (i.e. 3389)
      • getDestinationToPort

        public java.lang.String getDestinationToPort()
        The port to the destination (i.e. 3389)
        Returns:
        The port to the destination (i.e. 3389)
      • setDestinationToPort

        public void setDestinationToPort​(java.lang.String destinationToPort)
        The port to the destination (i.e. 3389)
        Parameters:
        destinationToPort - The port to the destination (i.e. 3389)
      • getInternalId

        public java.lang.String getInternalId()
        An internal id
        Returns:
        An internal id
      • setInternalId

        public void setInternalId​(java.lang.String internalId)
        An internal id
        Parameters:
        internalId - An internal id
      • getUniqueId

        public java.lang.String getUniqueId()
        A unique id
        Returns:
        A unique id
      • setUniqueId

        public void setUniqueId​(java.lang.String uniqueId)
        A unique id
        Parameters:
        uniqueId - A unique id
      • getProviderId

        public java.lang.String getProviderId()
        The id used by the provider. May be used for sync operations
        Returns:
        The id used by the provider. May be used for sync operations
      • setProviderId

        public void setProviderId​(java.lang.String providerId)
        The id used by the provider. May be used for sync operations
        Parameters:
        providerId - The id used by the provider. May be used for sync operations
      • getExternalType

        public java.lang.String getExternalType()
        An external type
        Returns:
        An external type
      • setExternalType

        public void setExternalType​(java.lang.String externalType)
        An external type
        Parameters:
        externalType - An external type
      • getIacId

        public java.lang.String getIacId()
        An infrastructure as code id
        Returns:
        An infrastructure as code id
      • setIacId

        public void setIacId​(java.lang.String iacId)
        An infrastructure as code id
        Parameters:
        iacId - An infrastructure as code id
      • getRawData

        public java.lang.String getRawData()
        The raw data from the provider for the rule
        Returns:
        The raw data from the provider for the rule
      • setRawData

        public void setRawData​(java.lang.String rawData)
        The raw data from the provider for the rule
        Parameters:
        rawData - The raw data from the provider for the rule
      • getEnabled

        public java.lang.Boolean getEnabled()
        Whether the rule is enabled
        Returns:
        Whether the rule is enabled
      • setEnabled

        public void setEnabled​(java.lang.Boolean enabled)
        Whether the rule is enabled
        Parameters:
        enabled - Whether the rule is enabled
      • getVisible

        public java.lang.Boolean getVisible()
        Not used
        Returns:
      • setVisible

        public void setVisible​(java.lang.Boolean visible)
        Not used
        Parameters:
        visible - Not used
      • getScope

        public java.lang.String getScope()
        Not used
        Returns:
        Not used
      • setScope

        public void setScope​(java.lang.String scope)
        Not used
        Parameters:
        scope - Not used
      • getProfile

        public java.lang.String getProfile()
        Not used
        Returns:
        Not used
      • setProfile

        public void setProfile​(java.lang.String profile)
        Not used
        Parameters:
        profile - Not used
      • getSyncSource

        public java.lang.String getSyncSource()
        Indicates how the rule was created. Either 'internal', or 'external'
        Returns:
        Indicates how the rule was created. Either 'internal', or 'external'
      • setSyncSource

        public void setSyncSource​(java.lang.String syncSource)
        Indicates how the rule was created. Either 'internal', or 'external'
        Parameters:
        syncSource - Indicates how the rule was created. Either 'internal', or 'external'
      • getLocations

        public java.util.List<SecurityGroupRuleLocation> getLocations()
        The Locations for this SecurityGroupRule. A location usually indicates a cloud. For example, a SecurityGroupRule can exist in multiple locations or clouds
        Returns:
        The locations for this SecurityGroupRule
      • setLocations

        public void setLocations​(java.util.List<SecurityGroupRuleLocation> locations)
        The Locations for this SecurityGroupRule. A location usually indicates a cloud. For example, a SecurityGroupRule can exist in multiple locations or clouds
        Parameters:
        locations - The locations for this SecurityGroupRule
      • getApplications

        public java.util.List<SecurityGroupRuleApplication> getApplications()
        The Applications for this SecurityGroupRule. For example, NSX-T associates Applications (like APP_HTTP) to rules and these are modeled via the SecurityGroupRuleApplication
        Returns:
        The Applications for this SecurityGroupRule
      • setApplications

        public void setApplications​(java.util.List<SecurityGroupRuleApplication> applications)
        The Applications for this SecurityGroupRule. For example, NSX-T associates Applications (like APP_HTTP) to rules and these are modeled via the SecurityGroupRuleApplication
        Parameters:
        applications - The Applications for this SecurityGroupRule
      • getDestinations

        public java.util.List<SecurityGroupRuleDestination> getDestinations()
        The Destinations for this SecurityGroupRule. For example, NSX-T associates Destinations (like ipset-2) to firewall rules and these are modeled with SecurityGroupRuleDestination and SecurityGroupRules
        Returns:
        The Destinations for this SecurityGroupRule
      • setDestinations

        public void setDestinations​(java.util.List<SecurityGroupRuleDestination> destinations)
        The Destinations for this SecurityGroupRule. For example, NSX-T associates Destinations (like ipset-2) to firewall rules and these are modeled with SecurityGroupRuleDestination and SecurityGroupRules
        Parameters:
        destinations - The Destinations for this SecurityGroupRule
      • getProfiles

        public java.util.List<SecurityGroupRuleProfile> getProfiles()
        The Profiles for this SecurityGroupRule. For example, NSX-T associates Profiles to firewall rules and these are modeled with SecurityGroupRuleProfile and SecurityGroupRules The Profiles for this SecurityGroupRule
        Returns:
      • setProfiles

        public void setProfiles​(java.util.List<SecurityGroupRuleProfile> profiles)
        The Profiles for this SecurityGroupRule. For example, NSX-T associates Profiles to firewall rules and these are modeled with SecurityGroupRuleProfile and SecurityGroupRules
        Parameters:
        profiles - The Profiles for this SecurityGroupRule
      • getScopes

        public java.util.List<SecurityGroupRuleScope> getScopes()
        The Scopes for this SecurityGroupRule. For example, NSX-T associates Scopes to firewall rules and these are modeled with SecurityGroupRuleScope and SecurityGroupRules
        Returns:
        The Scopes for this SecurityGroupRule
      • setScopes

        public void setScopes​(java.util.List<SecurityGroupRuleScope> scopes)
        The Scopes for this SecurityGroupRule. For example, NSX-T associates Scopes to firewall rules and these are modeled with SecurityGroupRuleScope and SecurityGroupRules
        Parameters:
        scopes - The Scopes for this SecurityGroupRule
      • getSources

        public java.util.List<SecurityGroupRuleSource> getSources()
        The Sources for this SecurityGroupRule. For example, NSX-T associates Sources to firewall rules and these are modeled with SecurityGroupRuleSource and SecurityGroupRule
        Returns:
        The Sources for this SecurityGroupRule
      • setSources

        public void setSources​(java.util.List<SecurityGroupRuleSource> sources)
        The Sources for this SecurityGroupRule. For example, NSX-T associates Sources to firewall rules and these are modeled with SecurityGroupRuleSource and SecurityGroupRule
        Parameters:
        sources - The Sources for this SecurityGroupRule