• HOME
  • INTEGRATIONS
  • SDKS
  • GUIDES
  • API DOCS
No results for ""
EXPAND ALL
CLOSE
launchdarkly.com

EDIT ON GITHUB

Using actions

Read time: 2 minutes
Last edited: Oct 22, 2020

Overview

This topic explains how to use actions in custom roles policies and gives a table with all supported actions and details about them.

Actions represent changes you can make to resources, such as createFlag, deleteFlag, updateName, and more.

To learn more about how actions work within custom role policies, read Custom role concepts.

Actions reference

These are all the actions you can take, sorted by each resource type.

You can specify actions in bulk using glob syntax and wildcards. For example, you can describe all modifications to feature flags with the action specifier update*.

Account actions

ActionDescription
updateOrganizationUpdate the organization name.
updateSubscriptionChange the pricing plan for the account.
updateBillingContactUpdate the billng contact for the account.
deleteSubscriptionCancel the account plan.
updatePaymentCardChange the credit card for the account.
updateRequireMfaChange whether multi-factor authentication (MFA) is required for all users on the account.
updateAccountTokenReset account tokens (for the LaunchDarkly REST API).
deleteAccountTokenDelete account tokens (for the LaunchDarkly REST API).
createSamlConfigCreate a new SAML configuration for the account.
deleteSamlConfigDelete the SAML configuration for the account.
updateSamlEnabledEnable or disable SAML SSO for the account.
updateSamlX509CertificateUpdate the SAML X509 certificate for the account.
updateSamlSsoUrlUpdate the SAML SSO URL for the account.
updateSamlRequireSsoChange whether SSO must be used for authentication.
createScimConfigCreate a new SCIM configuration for the account.
deleteScimConfigDelete the SCIM configuration for the account.
updateSessionDurationChange the duration of sessions.
updateSessionRefreshChange whether sessions are refreshed automatically.
revokeSessionsRevoke sessions issued before a specified date.

Members actions

member is a top-level action. A code sample is below:

1member/*

To learn more, read Managing your team.

ActionDescription
createMemberAdd a new team member to an account.
updateRoleUpdate a team member's built-in roles (reader, writer, or admin).
updateCustomRoleUpdate a team member's custom roles.
deleteMemberRemove a team member from an account.
sendMfaRequestSend a team member a request to enable MFA.
sendMfaRecoveryCodeSend a team member their MFA recovery code.

Personal access token actions

token is a child resources of members. A code sample is below:

1member/*:token/*

To learn more, read API access tokens.

ActionDescription
createAccessTokenCreate a personal access token
updateAccessTokenPolicyChange the policy filter of a personal access token
updateAccessTokenNameChange the name of a personal access token
updateAccessTokenDescriptionChange the description of a personal access token
deleteAccessTokenDelete a personal access token
resetAccessTokenReset a personal access token's secret key

Service access token actions

service-token is a top-level resource. A code sample is below:

1service-token/*

To learn more, read API access tokens.

ActionDescription
createAccessTokenCreate a service access token.
updateAccessTokenNameChange the name of a service access token.
updateAccessTokenDescriptionChange the description of a service access token.
deleteAccessTokenDelete a service access token.
resetAccessTokenReset a service access token's secret key.

Role actions

role is a top-level resource. A code sample is below:

1role/*

To learn more, read Custom roles.

ActionDescription
createRoleCreate new custom roles.
updatePolicyUpdate a custom role's policy.
updateNameUpdate a custom role's name.
updateDescriptionUpdate a custom role's description.
deleteRoleDelete a custom role.
updateMembersAdd or remove users from a custom role (equivalent to updateCustomRole on team members).

Project actions

proj is a top-level resource.

1proj/*

To learn more, read Projects.

ActionDescription
createProjectCreate a new project.
deleteProjectDelete a project.
updateProjectNameRename a project.
updateTagsUpdate tags associated with a project.
updateIncludeInSnippetByDefaultMake new flags available to the client-side (JavaScript) SDK by default.
updateDefaultClientSideAvailabilityChange whether new feature flags are made available to client-side SDKs.
viewProjectView a project. If set to deny, anyone impacted by this policy can neither view nor modify a project.
More information about the viewProject action

The deny effect for your resource in the viewProject action hides the projects you specify from the member. The allow effect for the same resource and action pairing doesn't do anything since your team member can already see the project.

To learn more, read Configuring private projects with custom roles

Environments actions

env is a child resource of projects. A code sample is below:

1proj/*:env/*

To learn more, read Environments.

ActionDescription
createEnvironmentCreate new environments.
deleteEnvironmentDelete an existing environment.
updateNameChange the name of an environment.
updateColorChange the color swatch for an environment.
updateTtlChange the TTL for an environment.
updateApiKeyReset the API key for an environment.
updateMobileKeyReset the mobile key for an environment.
updateSecureModeTurn secure mode on or off for an environment.
updateDefaultTrackEventsTurn on sending detailed information for new flags by default.
updateTagsUpdate tags associated with an environment.
updateRequireCommentsRequire comments for changes to flags and segments.
updateConfirmChangesRequire environment confirmation for changes to flags and segments.

Metrics actions

The name of this action has changed

Goals have been redesigned as metrics and associated with our Experimentation add-on. You do not need to update your actions to use metric, however. If you are using goals actions, they will still work.

metric is a child resource of projects. A code sample is below:

1proj/*:metric/*

To learn more, read Experimentation introduction.

ActionDescription
createMetricCreate metrics.
deleteMetricDelete metrics.
updateEventKeyChange the event key for a custom metric.
updateNameUpdate metric's names.
updateDescriptionUpdate metric's descriptions.
updateUrlsUpdate the URLs for a click or page view metric.
updateSelectorUpdate the CSS selector for a click metric.
updateOnMark a metric as active or inactive.
updateTagsChange the tags associated with a metric.
updateNumericMark a custom metric as numeric or non-numeric.
updateNumericUnitUpdate the unit displayed in results for a numeric custom metric.
updateNumericSuccessUpdate the success criteria for a numeric custom metric.
updateMaintainerChange the metric's maintainer.

Feature flags actions

flag is a child of both a project and environments. A code sample is below:

1proj/*:env/*:flag/*

To learn more, read Creating a feature flag.

ActionDescription
createFlagCreate a feature flag. Creating a feature flag impacts all environments in a project, so users will need permission to create flags in all environments.
cloneFlagCreate a new flag with settings based on an existing flag. To clone a flag, you need to have the cloneFlag permission on the source flag, as well as the createFlag permission for the new flag
deleteFlagDelete a feature. Deleting a feature impacts all environments in a project, so users will need permission to delete features in all environments.
updateOnToggle a feature off
updateIncludeInSnippetChange whether the feature flag is available to front-end code with the JavaScript SDK. Impacts all environments in a project.
updateNameChange the name of a feature flag. Impacts all environments in a project.
updateDescriptionChange the description of a feature flag. Impacts all environments in a project.
updateClientSideFlagAvailabilityChange whether the feature flag is available to client-side SDKs.
updateTemporaryMarks a flag temporary or permanent. Impacts all environments in a project.
updateTagsUpdate tags associated with a flag. Impacts all environments in a project.
updatePrerequisitesUpdate flag prerequisites.
updateTargetsUpdate individual user targeting rules.
updateRulesUpdate custom targeting rules.
updateFallthroughUpdate the "default" or "fallthrough" rule.
updateOffVariationUpdate the variation returned when flag toggle is set to `off`.
updateMaintainerUpdate the flag maintainer. Impacts all environments.
updateFlagVariationsChange the flag's variations. Impacts all environments.
updateFlagDefaultVariationsChange the default flag variations used by newly created environments for a feature flag.
updateAttachedMetricsUpdate metrics connected to a flag (start or pause an experiment).
updateFlagCustomPropertiesUpdate custom properties attached to a flag. Impacts all environments.
createExperimentCreate an experiment.
deleteExperimentDelete an experiment.
deleteExperimentResultsDelete experiment results.
updateExperimentActiveStart or stop an experiment in an environment.
updateExperimentBaselineChange a flag's baseline variation for experiments.
updateAttachedGoalsStart or stop an A/B testing experiment.
deleteFlagAttachedGoalResultsReset the experiment results for a flag in a given environment.
copyFlagConfigFromCopy settings from a feature flag.
copyFlagConfigToCopy settings to a feature flag.
updateFlagSaltUpdate a feature flag's salt.
updateTrackEventsChange whether to send detailed event information for a flag in a given environment.
updateFlagFallthroughTrackEventsChange whether to send detailed event information for a flag in a given environment when the fallthrough variation was selected.
updateGlobalArchivedChange whether a flag is archived.
updateExpiringRulesChange a flag's expiring custom targeting rules.
updateExpiringTargetsChange a flag's expiring individual user targeting rules.
updateFeatureWorkflowsChange a flag's feature workflows.
updateScheduledChangesChange the scheduled updates on a feature flag.
updateTriggersManage trigger configurations.
viewFlagStatusView a flag's status in an environment.
updateTriggersCreate a new trigger, edit existing flag triggers, or delete an existing trigger.

Segments actions

segment is a child of both a project and environments. A code sample is below:

1proj/*:env/*:segment/*

To learn more, read Building user segments.

ActionDescription
createSegmentCreate new segments.
deleteSegmentDelete segments.
updateNameRename a segment.
updateDescriptionUpdate a segment's description.
updateTagsChange the tags associated with a segment.
updateIncludedChange a segment's included users.
updateExcludedChange a segment's excluded users.
updateRulesChange a segment's custom targeting rules.
updateExpiringRulesChange a segment's expiring custom targeting rules.
updateExpiringTargetsChange a segment's expiring individual user targeting rules.
updateScheduledChangesChange the scheduled updates on a segment.

Webhooks actions

webhook is a top-level resource. A code sample is below:

1webhook/*

To learn more, read Webhooks.

ActionDescription
createWebhookCreate new webhooks.
deleteWebhookDelete existing webhooks.
updateNameChange the name of webhook configurations.
updateUrlChange the URL for a webhook.
updateSecretModify an existing webhook's signing secret.
updateStatementsModify webhook policy statements.
updateOnEnable and disabled existing webhooks.

Integrations actions

Most third-party integrations use a shared set of custom role actions.

integration is a top-level resource. A code sample is below:

1integration/*

To learn more, read Integrations.

ActionDescription
createIntegrationCreate and configure new third-party integrations.
deleteIntegrationDelete existing third-party integrations.
updateNameChange the name of third-party integration configurations.
updateConfigurationModify existing third-party integration configurations.
updateOnEnable and disabled existing third-party integrations.

Relay Proxy automatic configuration actions

relay-proxy-config is a top-level resource for which you can allow or deny certain actions.

Here is an example:

1relay-proxy-config/*

To learn more, read Automatic configuration.

ActionDescription
createRelayAutoConfigurationCreate a Relay Proxy with automatic configuration enabled
updateRelayAutoConfigurationNameChange the Relay Proxy with automatic configuration's name
updateRelayAutoConfigurationPolicyChange the policies associated with the Relay Proxy with automatic configuration
deleteRelayAutoConfigurationDelete the Relay Proxy with automatic configuration enabled
resetRelayAutoConfigurationResets the configuration of the Relay Proxy with automatic configuration enabled

Destinations actions

destination is a child of both a project and environments.

1proj/*:env/*:destination/*

To learn more, read Data Export.

ActionDescription
createDestinationCreate a new data export destination.
deleteDestinationDelete a data export destination.
updateConfigurationChange a data export destination.
updateOnFlip the on/off status of a data export destination.
updateNameRename a data export destination.

Code references actions

code-reference-repository is a top-level resource. A code sample is below:

1code-reference-repository/*

To learn more, read Code references.

ActionDescription
createCodeRefsRepositoryConnect a Git repository.
updateCodeRefsRepositoryNameUpdate a Git repository connection name.
updateCodeRefsRepositoryConfigurationUpdate a Git repository connection configuration.
UpdateCodeRefsRepositoryOnFlip the on/off status of a Git repository connection.
updateCodeRefsRepositoryBranchesUpdate the stored branch data for a Git repository connection.
deleteCodeRefsRepositoryDelete a Git repository connection.
Optimizely API Tokens

For customers with A/B testing, a special resource integration/optimizely in conjunction with the action updateIntegration can be used to control access to updating their Optimizely API Token.

Users actions

user is a child of both a project and environments. A code sample is below:

1proj/*:env/*:user/*

To learn more, read The user dashboard.

ActionDescription
deleteUserDelete a user.