Package com.morpheusdata.model
Class SecurityGroupRule
java.lang.Object
com.morpheusdata.model.MorpheusModel
com.morpheusdata.model.projection.MorpheusIdentityModel
com.morpheusdata.model.projection.SecurityGroupRuleIdentityProjection
com.morpheusdata.model.SecurityGroupRule
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 Summary
Modifier and TypeFieldDescriptionprotected String
protected List<SecurityGroupRuleApplication>
protected String
protected String
protected String
protected String
protected String
protected String
protected SecurityGroupIdentityProjection
protected String
protected List<SecurityGroupRuleDestination>
protected String
protected String
protected String
protected Boolean
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected List<SecurityGroupRuleLocation>
protected String
protected String
protected Integer
protected String
protected List<SecurityGroupRuleProfile>
protected String
protected String
protected String
protected String
protected String
protected List<SecurityGroupRuleScope>
protected SecurityGroupIdentityProjection
protected String
protected String
protected SecurityGroupIdentityProjection
protected String
protected List<SecurityGroupRuleSource>
protected String
protected String
protected String
protected String
protected Boolean
Fields inherited from class com.morpheusdata.model.projection.SecurityGroupRuleIdentityProjection
externalId, name
Fields inherited from class com.morpheusdata.model.MorpheusModel
config, id
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionNot usedThe Applications for this SecurityGroupRule.Always set to 'port'The cidr for the destination of the rule.The port from the destination (i.e.The destination SecurityGroup may be set.The destination port range for the rule.The Destinations for this SecurityGroupRule.The port to the destination (i.e.The destination type.The direction for the SecurityGroupRule.Whether the rule is enabledThe ether type.An external typeSome clouds group SecurityGroupRules into a group.Some clouds group SecurityGroupRules into a group.getIacId()
An infrastructure as code idNot usedAn internal idThe Locations for this SecurityGroupRule.The maximum port from the port rangeThe minimum port from the port rangeThe type of policy.The port range for the rule.The priority for the ruleNot usedThe Profiles for this SecurityGroupRule.The protocol for the rule ('icmp', 'tcp', 'all')The id used by the provider.The raw data from the provider for the ruleThe type of SecurityGroupRule.getScope()
Not usedThe Scopes for this SecurityGroupRule.The SecurityGroup for which this SecurityGroupRule appliesThe cidr for the source of the rule.The port for the source (i.e.The source SecurityGroup may be set.The source port range for the rule.The Sources for this SecurityGroupRule.The port to the source (i.e.The source type.Indicates how the rule was created.A unique idNot usedIs this rule a custom rule or a predefined rule.void
setApplication
(String application) Not usedvoid
setApplications
(List<SecurityGroupRuleApplication> applications) The Applications for this SecurityGroupRule.void
setApplicationType
(String applicationType) Always set to 'port'void
setAppliedTarget
(String appliedTarget) void
setAppliedTargetType
(String appliedTargetType) void
setDescription
(String description) void
setDestination
(String destination) The cidr for the destination of the rule.void
setDestinationFromPort
(String destinationFromPort) The port from the destination (i.e.void
setDestinationGroup
(SecurityGroupIdentityProjection destinationGroup) The destination SecurityGroup may be set.void
setDestinationPortRange
(String destinationPortRange) The destination port range for the rule.void
setDestinations
(List<SecurityGroupRuleDestination> destinations) The Destinations for this SecurityGroupRule.void
setDestinationToPort
(String destinationToPort) The port to the destination (i.e.void
setDestinationType
(String destinationType) The destination type.void
setDirection
(String direction) The direction for the SecurityGroupRule.void
setEnabled
(Boolean enabled) Whether the rule is enabledvoid
setEtherType
(String etherType) The ether type.void
setExternalType
(String externalType) An external typevoid
setGroupName
(String groupName) Some clouds group SecurityGroupRules into a group.void
setGroupType
(String groupType) Some clouds group SecurityGroupRules into a group.void
An infrastructure as code idvoid
setIcmpType
(String icmpType) Not usedvoid
setInternalId
(String internalId) An internal idvoid
setLocations
(List<SecurityGroupRuleLocation> locations) The Locations for this SecurityGroupRule.void
The type of policy.void
setPortRange
(String portRange) The port range for the rule.void
setPriority
(Integer priority) The priority for the rulevoid
setProfile
(String profile) Not usedvoid
setProfiles
(List<SecurityGroupRuleProfile> profiles) The Profiles for this SecurityGroupRule.void
setProtocol
(String protocol) The protocol for the rule ('icmp', 'tcp', 'all')void
setProviderId
(String providerId) The id used by the provider.void
setRawData
(String rawData) The raw data from the provider for the rulevoid
setRuleType
(String ruleType) The type of SecurityGroupRule.void
Not usedvoid
setScopes
(List<SecurityGroupRuleScope> scopes) The Scopes for this SecurityGroupRule.void
setSecurityGroup
(SecurityGroupIdentityProjection securityGroup) The SecurityGroup for which this SecurityGroupRule appliesvoid
The cidr for the source of the rule.void
setSourceFromPort
(String sourceFromPort) The port for the source (i.e.void
setSourceGroup
(SecurityGroupIdentityProjection sourceGroup) The source SecurityGroup may be set.void
setSourcePortRange
(String sourcePortRange) The source port range for the rule.void
setSources
(List<SecurityGroupRuleSource> sources) The Sources for this SecurityGroupRule.void
setSourceToPort
(String sourceToPort) The port to the source (i.e.void
setSourceType
(String sourceType) The source type.void
setSyncSource
(String syncSource) Indicates how the rule was created.void
setUniqueId
(String uniqueId) A unique idvoid
setVisible
(Boolean visible) Not usedMethods inherited from class com.morpheusdata.model.projection.SecurityGroupRuleIdentityProjection
getExternalId, getName, setExternalId, setName
Methods inherited from class com.morpheusdata.model.projection.MorpheusIdentityModel
getIdentityProperties
Methods inherited from class com.morpheusdata.model.MorpheusModel
getConfig, getConfigMap, getConfigProperty, getDirtyProperties, getDirtyPropertyValues, getId, getProperties, isDirty, markClean, markDirty, markDirty, setConfig, setConfigMap, setConfigProperty, setId
-
Field Details
-
securityGroup
-
groupName
-
groupType
-
description
-
ruleType
-
direction
-
etherType
-
policy
-
priority
-
source
-
sourceType
-
sourceGroup
-
destination
-
destinationType
-
destinationGroup
-
appliedTarget
-
appliedTargetType
-
applicationType
-
application
-
portRange
-
sourcePortRange
-
destinationPortRange
-
protocol
-
icmpType
-
sourceFromPort
-
sourceToPort
-
destinationFromPort
-
destinationToPort
-
internalId
-
uniqueId
-
providerId
-
externalType
-
iacId
-
rawData
-
enabled
-
visible
-
scope
-
profile
-
syncSource
-
locations
-
applications
-
destinations
-
profiles
-
scopes
-
sources
-
-
Constructor Details
-
SecurityGroupRule
public SecurityGroupRule()
-
-
Method Details
-
getSecurityGroup
The SecurityGroup for which this SecurityGroupRule applies- Returns:
- The SecurityGroup for which this SecurityGroupRule applies
-
setSecurityGroup
The SecurityGroup for which this SecurityGroupRule applies- Parameters:
securityGroup
- The SecurityGroup for which this SecurityGroupRule applies
-
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
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
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
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
-
setDescription
-
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
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
The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'- Returns:
- The direction for the SecurityGroupRule. Options are 'ingress', 'egress', or 'any'
-
setDirection
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
The ether type. Either 'IPv4' or 'IPv6'- Returns:
- The ether type. Either 'IPv4' or 'IPv6'
-
setEtherType
The ether type. Either 'IPv4' or 'IPv6'- Parameters:
etherType
- The ether type. Either 'IPv4' or 'IPv6'
-
getPolicy
The type of policy. Either 'accept' or 'reject'- Returns:
- The type of policy. Either 'accept' or 'reject'
-
setPolicy
The type of policy. Either 'accept' or 'reject'- Parameters:
policy
- The type of policy. Either 'accept' or 'reject'
-
getPriority
The priority for the rule- Returns:
- The priority for the rule
-
setPriority
The priority for the rule- Parameters:
priority
- The priority for the rule
-
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
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
The source type. 'all', 'cidr', 'group'- Returns:
- The source type. 'all', 'cidr', 'group'
-
setSourceType
The source type. 'all', 'cidr', 'group'- Parameters:
sourceType
- The source type. 'all', 'cidr', 'group'
-
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
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
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
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
The destination type. 'all', 'cidr', 'group'- Returns:
- The destination type. 'all', 'cidr', 'group'
-
setDestinationType
The destination type. 'all', 'cidr', 'group'- Parameters:
destinationType
- The destination type. 'all', 'cidr', 'group'
-
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
The destination SecurityGroup may be set. Some clouds refer to other SecurityGroups (like Amazon)- Parameters:
destinationGroup
-
-
getAppliedTarget
-
setAppliedTarget
-
getAppliedTargetType
-
setAppliedTargetType
-
getApplicationType
Always set to 'port'- Returns:
- Always set to 'port'
-
setApplicationType
Always set to 'port'- Parameters:
applicationType
- Always set to 'port'
-
getApplication
Not used- Returns:
- Not used
-
setApplication
Not used- Parameters:
application
- Not used
-
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
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
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
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
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
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
The protocol for the rule ('icmp', 'tcp', 'all')- Returns:
- The protocol for the rule ('icmp', 'tcp', 'all')
-
setProtocol
The protocol for the rule ('icmp', 'tcp', 'all')- Parameters:
protocol
- The protocol for the rule ('icmp', 'tcp', 'all')
-
getIcmpType
Not used- Returns:
- Not used
-
setIcmpType
Not used- Parameters:
icmpType
- Not used
-
getSourceFromPort
The port for the source (i.e. 3389)- Returns:
- The port for the source (i.e. 3389)
-
setSourceFromPort
The port for the source (i.e. 3389)- Parameters:
sourceFromPort
- The port for the source (i.e. 3389)
-
getSourceToPort
The port to the source (i.e. 3389)- Returns:
- The port to the source (i.e. 3389)
-
setSourceToPort
The port to the source (i.e. 3389)- Parameters:
sourceToPort
- The port to the source (i.e. 3389)
-
getDestinationFromPort
The port from the destination (i.e. 3389)- Returns:
- The port from the destination (i.e. 3389)
-
setDestinationFromPort
The port from the destination (i.e. 3389)- Parameters:
destinationFromPort
- The port from the destination (i.e. 3389)
-
getDestinationToPort
The port to the destination (i.e. 3389)- Returns:
- The port to the destination (i.e. 3389)
-
setDestinationToPort
The port to the destination (i.e. 3389)- Parameters:
destinationToPort
- The port to the destination (i.e. 3389)
-
getInternalId
An internal id- Returns:
- An internal id
-
setInternalId
An internal id- Parameters:
internalId
- An internal id
-
getUniqueId
A unique id- Returns:
- A unique id
-
setUniqueId
A unique id- Parameters:
uniqueId
- A unique id
-
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
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
An external type- Returns:
- An external type
-
setExternalType
An external type- Parameters:
externalType
- An external type
-
getIacId
An infrastructure as code id- Returns:
- An infrastructure as code id
-
setIacId
An infrastructure as code id- Parameters:
iacId
- An infrastructure as code id
-
getRawData
The raw data from the provider for the rule- Returns:
- The raw data from the provider for the rule
-
setRawData
The raw data from the provider for the rule- Parameters:
rawData
- The raw data from the provider for the rule
-
getEnabled
Whether the rule is enabled- Returns:
- Whether the rule is enabled
-
setEnabled
Whether the rule is enabled- Parameters:
enabled
- Whether the rule is enabled
-
getVisible
Not used- Returns:
-
setVisible
Not used- Parameters:
visible
- Not used
-
getScope
Not used- Returns:
- Not used
-
setScope
Not used- Parameters:
scope
- Not used
-
getProfile
Not used- Returns:
- Not used
-
setProfile
Not used- Parameters:
profile
- Not used
-
getSyncSource
Indicates how the rule was created. Either 'internal', or 'external'- Returns:
- Indicates how the rule was created. Either 'internal', or 'external'
-
setSyncSource
Indicates how the rule was created. Either 'internal', or 'external'- Parameters:
syncSource
- Indicates how the rule was created. Either 'internal', or 'external'
-
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
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
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
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
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
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
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
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
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
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
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
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
-
isCustomRule
Is this rule a custom rule or a predefined rule.- Returns:
- Boolean
-
getMinPort
The minimum port from the port range- Returns:
- the minimum port number
-
getMaxPort
The maximum port from the port range- Returns:
- the maximum port number
-