Specifying resources in the policy builder
When you create a policy statement using the policy builder, you use the Scope menu to specify the resources that the policy affects:![The "Scope" and "Select [resources]" menus when defining a policy scoped to a select set of applications.](https://mintcdn.com/launchdarkly/-b7nPh0oyigf6iW7/images/auto/custom-roles-policy-builder-scope.auto.png?fit=max&auto=format&n=-b7nPh0oyigf6iW7&q=85&s=d0154410307d64d127689a629c744072)
The "Scope" and "Select [resources]" menus when defining a policy scoped to a select set of applications.
projectAttribute, and set the value of the role attribute to “Project A” when you assign the role to member A. Then you can set the value of the role attribute to “Project B” when you assign the role to member B. Role attributes are available for all resource types.
Specifying resources in the advanced editor
When you create a policy statement using the advanced editor, you specify resources in JSON. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. This is a precise, flexible taxonomy that lets you identify and control any resource in your LaunchDarkly account. The syntax to specify a resource looks like this:tag1 AND tag2. Tags are optional.
The example also shows a property-based selector, which is a way to select resources whose properties match a particular value. To learn more, read Property-based selectors.
If you don’t need to use any tags or selectors, you can omit the semicolon (;) and all content following.
Some resources are “scoped” within specific parent resources and require additional context to be correctly identified. For example, feature flags are scoped within a project and environment.
You can name scoped resources by using the resource syntax structure depicted below:
proj/*:includes all named projects in the list of results. env/*: includes all environments in the list of results. flag/*: includes all flags in the list of results. This example will return very broad results because of how comprehensive its permissions are.
Resource types do not share permissionsMember permissions are specific to each resource type, and different types do not share or inherit permissions. For example, if you set member permissions for a project with the ID
default using proj/default, the member does not have the same permissions for the project’s environments unless you also set member permissions for proj/default:env/*.ops_:
Additional examples of resource specifier syntax
Expand the section below to review additional examples of resource specifier syntax. You only need this information if you are creating your policy statements in JSON. You do not need to review this information if you use the policy builder.Expand additional examples of resource specifier syntax
Expand additional examples of resource specifier syntax
The example below creates a resource that names all of the projects in an account:The example below names a project by the You can name sets of resources down to the tag level.The example below names all projects with the To learn more, read Using the advanced editor.
Syntax supports wildcardsThe resource syntax accepts globs and wildcards, so you can name collections of resources with
*. You can also name a specific project by its key.default key.mobile tag.About resource types and scopes
To review which resources the LaunchDarkly preset roles have access to:- Click the gear icon in the left sidebar to view Organization settings.
- Click Roles and find the role you wish to review. LaunchDarkly provides both project and organization preset roles. Select the Project or Organization tab as needed.
- Click the role name. A summary of the role and its policy statements appears.
- (Optional) Click View JSON to view the specific resources listed out by written expression.
Expand reference list of supported resources in LaunchDarkly
Expand reference list of supported resources in LaunchDarkly
Here is a reference list of all the supported resources in LaunchDarkly, their scopes, the preset and base roles that have access to the resource, and the resource identifier, ordered by written expression:
| Resource type | Resource scope | Preset roles with access | Resource identifier |
|---|---|---|---|
acct | A unique resource specifier representing modifications to your account itself. | Billing admin, Organization admin | Not applicable |
application | A top-level resource, written as:application/* | Organization admin, Architect | Application key |
code-reference-repository | A top-level resource, written as:code-reference-repository/* | Organization admin, Architect | Git repository name |
domain-verification | A top-level resource, written as:domain-verification/* | Organization admin, Architect | Domain ID |
integration | A top-level resource, written as:integration/* | Organization admin, Architect | Integration ID |
member | A top-level resource, written as:member/* | Organization admin, Architect | Member ID |
token | A child of a member, written as:member/*:token/* | Organization admin, Architect, Member | Personal access token ID |
pending-request | A top-level resource, written as:pending-request/* | Organization admin, Architect | Not applicable |
proj | A top-level resource, written as:proj/* | Project admin, Maintainer | Project key |
agent-graph | A child of a project, written as:proj/*:agent-graph/* | Project admin, Maintainer, Project developer, View developer, Release manager | Agent graph key |
agent-optimization | A child of a project, written as:proj/*:agent-optimization/* | Project admin, Maintainer, Project developer, View developer, Release manager | Agent optimization key |
agent-skill | A child of a project, written as:proj/*:agent-skill/* | Project admin, Maintainer, Project developer, View developer, Release manager | Agent skill key |
ai-dataset | A child of a project, written as:proj/*:ai-dataset/* | Project admin, Maintainer, Project developer, View developer, Release manager | AI dataset key |
ai-evaluation | A child of a project, written as:proj/*:ai-evaluation/* | Project admin, Maintainer, Project developer, View developer, Release manager | AI evaluation key |
ai-tool | A child of a project, written as:proj/*:ai-tool/* | Project admin, Maintainer, Project developer, View developer, Release manager | AI tool key |
alert | A child of a project, written as:proj/*:alert/* | Project admin, Maintainer, Project developer, View developer, Release manager | Not applicable |
context-kind | A child of a project, written as:proj/*:context-kind/* | Project admin, Maintainer, Project developer, View developer | Context kind key |
env | A child of a project, written as:proj/*:env/* | Project admin, Maintainer, Project developer, View developer | Environment key |
error | A child of a project, written as:proj/*:error/* | Project admin, Maintainer, Project developer, View developer, Release manager | Not applicable |
log | A child of a project, written as:proj/*:log/* | Project admin, Maintainer, Project developer, View developer, Release manager | Not applicable |
observability-dashboard | A child of a project, written as:proj/*:observability-dashboard/* | Project admin, Maintainer, Project developer, View developer, Release manager | Dashboard ID |
prompt-snippet | A child of a project, written as:proj/*:prompt-snippet/* | Project admin, Maintainer, Project developer, View developer, Release manager | Prompt snippet key |
session | A child of a project, written as:proj/*:session/* | Project admin, Maintainer, Project developer, View developer, Release manager | Not applicable |
sdk-key | A child of a project and an environment, written as:proj/*:env/*:sdk-key/* | Project admin | SDK key |
trace | A child of a project, written as:proj/*:trace/* | Project admin, Maintainer, Project developer, View developer, Release manager | Not applicable |
vega | A child of a project, written as:proj/*:vega/* | Project admin, Project developer, View developer | Conversation ID |
aiconfig | A child of a project and an environment, written as:proj/*:env/*:aiconfig/* | Project admin, Maintainer, Project developer, View developer, Release manager, Contributor, Reviewer | AgentControl config key |
ai-model-config | A child of a project, written as:proj/*:ai-model-config/* | Project admin, Maintainer, Release manager | Model name and model ID, concatenated with a hyphen (-) |
assignment-data-source | A child of a project and an environment, written as:proj/*:env/*:assignment-data-source/* | Project admin, Maintainer, Release manager | Data source key |
destination | A child of a project and an environment, written as:proj/*:env/*:destination/* | Project admin, Maintainer | Data Export destination ID |
environment-release-plan | A child of a project and an environment, written as:proj/*:env/*:environment-release-plan/* | None | Environment release plan key |
experiment | A child of a project and an environment, written as:proj/*:env/*:experiment/* | Project admin, Maintainer, Project developer, View developer | Experiment key |
flag | A child of a project and an environment, written as:proj/*:env/*:flag/* | Project admin, Maintainer, Project developer, View developer, Release manager, Contributor, Reviewer | Flag key |
holdout | A child of a project and an environment, written as:proj/*:env/*:holdout/* | Project admin, Maintainer, Project developer, View developer | Holdout key |
metric-data-source | A child of a project and an environment, written as:proj/*:env/*:metric-data-source/* | Project admin, Maintainer, Project developer, View developer | Data source key |
segment | A child of a project and an environment, written as:proj/*:env/*:segment/* | Project admin, Maintainer, Project developer, View developer, Reviewer | Segment key |
layer | A child of a project, written as:proj/*:layer/* | Project admin, Maintainer, Project developer, View developer | Layer key |
metric | A child of a project, written as:proj/*:metric/* | Project admin, Maintainer, Project developer, View developer | Metric key |
metric-group | A child of a project, written as:proj/*:metric-group/* | Project admin, Maintainer, Project developer, View developer | Metric group key |
release-pipeline | A child of a project, written as:proj/*:release-pipeline/* | Project admin, Maintainer, Release manager | Release pipeline key |
release-policy | A child of a project, written as:proj/*:release-policy/* | Project admin, Maintainer, Release manager | Release policy key |
view | A child of a project, written as:proj/*:view/* | Project admin, Maintainer, Project developer, View developer | View key |
relay-proxy-config | A top-level resource, written as:relay-proxy-config/* | Organization admin, Architect | Relay Proxy configuration ID |
role | A top-level resource, written as:role/* | Organization admin, Architect | Role key |
service-token | A top-level resource, written as:service-token/* | Organization admin, Architect | Service token ID |
team | A top-level resource, written as:team/* | Organization admin, Architect, Member | Team key |
template | A top-level resource, written as:template/* | Organization admin, Architect | Workflow template key |
webhook | A top-level resource, written as:webhook/* | Organization admin, Architect | Webhook ID |
The user resource is only relevant when working with older SDKsIf you are working with older SDKs, which do not yet support contexts, you can also reference the
user resource. The user resource is scoped to a project and environment. It has one action, deleteUser, which is an alias for the deleteContextInstance environment action.If you are working with SDKs that have been updated for contexts, the equivalent action is deleteContextInstance, which is scoped to the environment resource. To learn more, read Environment actions.We strongly encourage you to upgrade your SDKs to versions supporting contexts.