Package com.strongdm.api
Class AccessRule
java.lang.Object
com.strongdm.api.AccessRule
An AccessRule grants access to a set of Resources. There are two kinds of
AccessRules:
- Dynamic: a rule which identifies Resources based on their type or tags
- Static: a rule which contains an explicit list of Resource IDs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclearIds()getId(int index) getIds()intgetQuery()A boolean tag query that identifies the Resources granted by this AccessRule.getTags()getType()voidremoveId(int index) voidvoidsetIds(Collection<String> in) Sets a list of Resource IDs granted by this AccessRule.voidsetPrivileges(AccessRule.Privileges privileges) voidSets the boolean tag query that identifies the Resources granted by this AccessRule.voidSpecifies a list of key/value pairs.voidSpecifies a Resource type.
-
Constructor Details
-
AccessRule
public AccessRule()
-
-
Method Details
-
getTags
-
setTags
Specifies a list of key/value pairs. You can set this field by itself to grant access to all Resources which have all the given tags. You can also use it in conjunction with the Type field to further narrow down the scope of Resources granted. -
getIds
-
getId
-
getIdsCount
public int getIdsCount() -
setId
-
removeId
public void removeId(int index) -
addId
-
addAllIds
-
setIds
Sets a list of Resource IDs granted by this AccessRule. If this field is set, the rule is a static access rule. No other fields can be set on a static access rule. -
clearIds
public void clearIds() -
getType
-
setType
Specifies a Resource type. You can set this field by itself to grant access to all Resources of a certain type. You can also use it in conjunction with the Tags field to further narrow down the scope of Resources granted. See the following link for a list of possible values for this field: https://docs.strongdm.com/references/cli/filters/#potential-resource-type-values -
getQuery
A boolean tag query that identifies the Resources granted by this AccessRule. It combines tag conditions with the AND, OR, and NOT operators and parentheses for grouping, e.g.env=prod AND (region=us OR region=eu) AND NOT deprecated. Operator precedence, from highest to lowest, is: parentheses, NOT, AND, OR. A bare tag (env) matches any Resource carrying that tag regardless of value;env=prodmatches a specific value. Query is mutually exclusive with the ids, type, and tags fields. -
setQuery
Sets the boolean tag query that identifies the Resources granted by this AccessRule. SeegetQuery()for the supported syntax. Query is mutually exclusive with the ids, type, and tags fields. -
setPrivileges
-
getPrivileges
-