<commit_before>---
title: Using Feature Flags
owner: CLI
---

<strong><%= modified_date %></strong>

This topic describes how Cloud Foundry (CF) administrators can set feature flags using the Cloud Foundry Command Line Interface (cf CLI) to enable or disable the features available to users.

## <a id='flag-commands'></a>View and Edit Feature Flags

To perform the following procedures, you must be logged in to your deployment as an administrator using the cf CLI.

1. Use the `cf feature-flags` command to list the feature flags:

    <pre class="terminal">
    $ cf feature-flags

    Features                               State
    user_org_creation                      disabled
    private_domain_creation                enabled
    app_bits_upload                        enabled
    app_scaling                            enabled
    route_creation                         enabled
    service_instance_creation              enabled
    diego_docker                           disabled
    set_roles_by_username                  enabled
    unset_roles_by_username                enabled
    task_creation                          enabled
    env_var_visibility                     enabled
    space_scoped_private_broker_creation   enabled
    space_developer_env_var_visibility     enabled
    service_instance_sharing               disabled
    </pre>
    <br>
    For descriptions of the features enabled by each feature flag, see the [Feature Flags](#flags) section below.

1. To view the status of a feature flag, use the `cf feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf feature-flag user_org_creation

    Retrieving status of user_org_creation as admin...
    OK

    Features            State
    user_org_creation   disabled
    </pre>

1. To enable a feature flag, use the `cf enable-feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf enable-feature-flag user_org_creation
    </pre>

1. To disable a feature flag, use the `cf disable-feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf disable-feature-flag user_org_creation
    </pre>

## <a id='flags'></a>Feature Flags ##

Only administrators can set feature flags. 
All flags are enabled by default except `user_org_creation` and `diego_docker`. 
When disabled, these features are only available to administrators.

The following list provides descriptions of the features enabled or disabled by 
each flag, and the minimum Cloud Controller API (CC API) version necessary to use the feature:

* `user_org_creation`: Any user can create an organization. <%= vars.user_org_creation %> Minimum CC API version: 2.12.
* `private_domain_creation`: An Org Manager can create private domains for that organization. Minimum CC API version: 2.12.
* `app_bits_upload`: Space Developers can upload app bits. Minimum CC API version: 2.12.
* `app_scaling`: Space Developers can perform scaling operations (i.e. change memory, disk, or instances). Minimum CC API version: 2.12.
* `route_creation`: Space Developers can create routes in a space. Minimum CC API version: 2.12.
* `service_instance_creation`: Space Developers can create service instances in a space. Minimum CC API version: 2.12.
* `diego_docker`: Space Developers can push Docker apps. Minimum CC API version 2.33.
* `set_roles_by_username`: Org Managers and Space Managers can add roles by username. Minimum CC API version: 2.37.
* `unset_roles_by_username`: Org Managers and Space Managers can remove roles by username. Minimum CC API version: 2.37.
* `task_creation`: Space Developers can create tasks on their application. Minimum CC API version: 2.47.
* `env_var_visibility`: All users can view environment variables. Minimum CC API version: 2.58.
* `space_scoped_private_broker_creation`: Space Developers can create space-scoped private service brokers. Minimum CC API version: 2.58.
* `space_developer_env_var_visibility`: Space Developers can view their v2 environment variables. Org Managers and Space Managers can view their v3 environment variables. Minimum CC API version: 2.58.
* `service_instance_sharing`: Space Developers can share service instances between two spaces (across orgs) in which they have the Space Developer role.

For more information about feature flag commands, see the **Feature Flags** 
section of the [Cloud Foundry API documentation](http://apidocs.cloudfoundry.org).

## <a id="disabling-custom-buildpacks"></a>Disabling Custom Buildpacks ##
<%=vars.disable_custom_buildpacks%>
<commit_msg>before min CAPI version ref's, tell how to get CAPI version [#53610585]<commit_after>---
title: Using Feature Flags
owner: CLI
---

<strong><%= modified_date %></strong>

This topic describes how Cloud Foundry (CF) administrators can set feature flags using the Cloud Foundry Command Line Interface (cf CLI) to enable or disable the features available to users.

## <a id='flag-commands'></a>View and Edit Feature Flags

To perform the following procedures, you must be logged in to your deployment as an administrator using the cf CLI.

1. Use the `cf feature-flags` command to list the feature flags:

    <pre class="terminal">
    $ cf feature-flags

    Features                               State
    user_org_creation                      disabled
    private_domain_creation                enabled
    app_bits_upload                        enabled
    app_scaling                            enabled
    route_creation                         enabled
    service_instance_creation              enabled
    diego_docker                           disabled
    set_roles_by_username                  enabled
    unset_roles_by_username                enabled
    task_creation                          enabled
    env_var_visibility                     enabled
    space_scoped_private_broker_creation   enabled
    space_developer_env_var_visibility     enabled
    service_instance_sharing               disabled
    </pre>
    <br>
    For descriptions of the features enabled by each feature flag, see the [Feature Flags](#flags) section below.

1. To view the status of a feature flag, use the `cf feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf feature-flag user_org_creation

    Retrieving status of user_org_creation as admin...
    OK

    Features            State
    user_org_creation   disabled
    </pre>

1. To enable a feature flag, use the `cf enable-feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf enable-feature-flag user_org_creation
    </pre>

1. To disable a feature flag, use the `cf disable-feature-flag FEATURE-FLAG-NAME` command:

    <pre class="terminal">
    $ cf disable-feature-flag user_org_creation
    </pre>

## <a id='flags'></a>Feature Flags ##

Only administrators can set feature flags. 
All flags are enabled by default except `user_org_creation` and `diego_docker`. 
When disabled, these features are only available to administrators.

The following list provides descriptions of the features enabled or disabled by 
each flag, and the minimum Cloud Controller API (CC API) version necessary to use the feature. <%= vars.api_version %>:

* `user_org_creation`: Any user can create an organization. <%= vars.user_org_creation %> Minimum CC API version: 2.12.
* `private_domain_creation`: An Org Manager can create private domains for that organization. Minimum CC API version: 2.12.
* `app_bits_upload`: Space Developers can upload app bits. Minimum CC API version: 2.12.
* `app_scaling`: Space Developers can perform scaling operations (i.e. change memory, disk, or instances). Minimum CC API version: 2.12.
* `route_creation`: Space Developers can create routes in a space. Minimum CC API version: 2.12.
* `service_instance_creation`: Space Developers can create service instances in a space. Minimum CC API version: 2.12.
* `diego_docker`: Space Developers can push Docker apps. Minimum CC API version 2.33.
* `set_roles_by_username`: Org Managers and Space Managers can add roles by username. Minimum CC API version: 2.37.
* `unset_roles_by_username`: Org Managers and Space Managers can remove roles by username. Minimum CC API version: 2.37.
* `task_creation`: Space Developers can create tasks on their application. Minimum CC API version: 2.47.
* `env_var_visibility`: All users can view environment variables. Minimum CC API version: 2.58.
* `space_scoped_private_broker_creation`: Space Developers can create space-scoped private service brokers. Minimum CC API version: 2.58.
* `space_developer_env_var_visibility`: Space Developers can view their v2 environment variables. Org Managers and Space Managers can view their v3 environment variables. Minimum CC API version: 2.58.
* `service_instance_sharing`: Space Developers can share service instances between two spaces (across orgs) in which they have the Space Developer role.

For more information about feature flag commands, see the **Feature Flags** 
section of the [Cloud Foundry API documentation](http://apidocs.cloudfoundry.org).

## <a id="disabling-custom-buildpacks"></a>Disabling Custom Buildpacks ##
<%=vars.disable_custom_buildpacks%>

{'fraction_non_alphanumeric': 0.06834807293372638, 'fraction_numerical': 0.010699858063107326, 'mean_word_length': 3.2703962703962706, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3608220', 'n_tokens_mistral': 2584, 'n_tokens_neox': 2332, 'n_words': 998}