# Update a workspace setting

Launch stage: GA

`PATCH /api/2.1/settings/{name}`

Patch a setting value at workspace level. See `settingsv2/listworkspacesettingsmetadata` for list of setting available via public APIs at workspace level.
 To determine the correct field to include in a patch request, refer to the type field of the setting returned in the `settingsv2/listworkspacesettingsmetadata` response.

 Note: Page refresh is required for changes to take effect in UI.

API scopes: settings

## Path parameters

- `name` (string, required)
  Name of the setting

## Request body

- `name` (string, optional)
  Name of the setting.
- `boolean_val` (object, optional)
  Setting value for boolean type setting. This is the setting value set by consumers, check effective_boolean_val for final setting value.
  - `value` (boolean, optional)
- `string_val` (object, optional)
  Setting value for string type setting. This is the setting value set by consumers, check effective_string_val for final setting value.
  - `value` (string, optional)
    Represents a generic string value.
- `integer_val` (object, optional)
  Setting value for integer type setting. This is the setting value set by consumers, check effective_integer_val for final setting value.
  - `value` (int32, optional)
- `automatic_cluster_update_workspace` (object, optional)
  Setting value for automatic_cluster_update_workspace setting. This is the setting value set by consumers, check effective_automatic_cluster_update_workspace for final setting value.
  - `enabled` (boolean, optional)
  - `can_toggle` (boolean, optional)
  - `maintenance_window` (object, optional)
    - `week_day_based_schedule` (object, optional)
      - `frequency` (string, optional)
        Possible values:
        - `WEEK_DAY_FREQUENCY_UNSPECIFIED`
        - `FIRST_OF_MONTH`
        - `SECOND_OF_MONTH`
        - `THIRD_OF_MONTH`
        - `FOURTH_OF_MONTH`
        - `FIRST_AND_THIRD_OF_MONTH`
        - `SECOND_AND_FOURTH_OF_MONTH`
        - `EVERY_WEEK`
      - `day_of_week` (string, optional)
        Possible values:
        - `DAY_OF_WEEK_UNSPECIFIED`
        - `MONDAY`
        - `TUESDAY`
        - `WEDNESDAY`
        - `THURSDAY`
        - `FRIDAY`
        - `SATURDAY`
        - `SUNDAY`
      - `window_start_time` (object, optional)
        - `hours` (int32, optional)
        - `minutes` (int32, optional)
  - `enablement_details` (object, optional)
    - `unavailable_for_non_enterprise_tier` (boolean, optional)
      The feature is unavailable if the customer doesn't have enterprise tier
    - `unavailable_for_disabled_entitlement` (boolean, optional)
      The feature is unavailable if the corresponding entitlement disabled (see getShieldEntitlementEnable)
    - `forced_for_compliance_mode` (boolean, optional)
      The feature is force enabled if compliance mode is active
  - `restart_even_if_no_updates_available` (boolean, optional)
- `aibi_dashboard_embedding_approved_domains` (object, optional)
  Setting value for aibi_dashboard_embedding_approved_domains setting. This is the setting value set by consumers, check effective_aibi_dashboard_embedding_approved_domains for final setting value.
  - `approved_domains` (array of string, optional)
- `aibi_dashboard_embedding_access_policy` (object, optional)
  Setting value for aibi_dashboard_embedding_access_policy setting. This is the setting value set by consumers, check effective_aibi_dashboard_embedding_access_policy for final setting value.
  - `access_policy_type` (string, required)
    Possible values:
    - `ACCESS_POLICY_TYPE_UNSPECIFIED`
    - `ALLOW_ALL_DOMAINS`
    - `ALLOW_APPROVED_DOMAINS`
    - `DENY_ALL_DOMAINS`
- `restrict_workspace_admins` (object, optional)
  Setting value for restrict_workspace_admins setting. This is the setting value set by consumers, check effective_restrict_workspace_admins for final setting value.
  - `status` (string, required)
    Possible values:
    - `STATUS_UNSPECIFIED`
    - `ALLOW_ALL`
    - `RESTRICT_TOKENS_AND_JOB_RUN_AS`
  - `disable_gov_tag_creation` (boolean, optional, Public Preview)
    When true, workspace admins cannot create governance tags.
     ALLOW_ALL status does not override this; they are independent.
- `personal_compute` (object, optional)
  Setting value for personal_compute setting. This is the setting value set by consumers, check effective_personal_compute for final setting value.
  - `value` (string, optional)
    Possible values:
    - `PERSONAL_COMPUTE_MESSAGE_ENUM_UNSPECIFIED`
    - `ON`
    - `DELEGATE`
- `workspace_label` (object, optional, Beta)
  Setting value for workspace_label setting. This is the setting value set by consumers, check effective_workspace_label for final setting value.
  - `label` (string, optional, Beta)
  - `color` (string, optional, Beta)
- `allowed_apps_user_api_scopes` (object, optional, Beta)
  Setting value for allowed_apps_user_api_scopes setting. This is the setting value set by consumers, check effective_allowed_apps_user_api_scopes for final setting value.
  - `allowed_scopes` (array of string, optional, Beta)
- `operational_email_custom_recipient` (object, optional, Public Preview)
  Setting value for operational_email_custom_recipient setting. This is the setting value set by consumers, check effective_operational_email_custom_recipient for final setting value.
  - `email` (string, optional, Public Preview)
- `effective_automatic_cluster_update_workspace` (object, optional)
  Effective setting value for automatic_cluster_update_workspace setting. This is the final effective value of setting. To set a value use automatic_cluster_update_workspace.
  - `enabled` (boolean, optional)
  - `can_toggle` (boolean, optional)
  - `maintenance_window` (object, optional)
    - `week_day_based_schedule` (object, optional)
      - `frequency` (string, optional)
        Possible values:
        - `WEEK_DAY_FREQUENCY_UNSPECIFIED`
        - `FIRST_OF_MONTH`
        - `SECOND_OF_MONTH`
        - `THIRD_OF_MONTH`
        - `FOURTH_OF_MONTH`
        - `FIRST_AND_THIRD_OF_MONTH`
        - `SECOND_AND_FOURTH_OF_MONTH`
        - `EVERY_WEEK`
      - `day_of_week` (string, optional)
        Possible values:
        - `DAY_OF_WEEK_UNSPECIFIED`
        - `MONDAY`
        - `TUESDAY`
        - `WEDNESDAY`
        - `THURSDAY`
        - `FRIDAY`
        - `SATURDAY`
        - `SUNDAY`
      - `window_start_time` (object, optional)
        - `hours` (int32, optional)
        - `minutes` (int32, optional)
  - `enablement_details` (object, optional)
    - `unavailable_for_non_enterprise_tier` (boolean, optional)
      The feature is unavailable if the customer doesn't have enterprise tier
    - `unavailable_for_disabled_entitlement` (boolean, optional)
      The feature is unavailable if the corresponding entitlement disabled (see getShieldEntitlementEnable)
    - `forced_for_compliance_mode` (boolean, optional)
      The feature is force enabled if compliance mode is active
  - `restart_even_if_no_updates_available` (boolean, optional)
- `effective_aibi_dashboard_embedding_approved_domains` (object, optional)
  Effective setting value for aibi_dashboard_embedding_approved_domains setting. This is the final effective value of setting. To set a value use aibi_dashboard_embedding_approved_domains.
  - `approved_domains` (array of string, optional)
- `effective_aibi_dashboard_embedding_access_policy` (object, optional)
  Effective setting value for aibi_dashboard_embedding_access_policy setting. This is the final effective value of setting. To set a value use aibi_dashboard_embedding_access_policy.
  - `access_policy_type` (string, required)
    Possible values:
    - `ACCESS_POLICY_TYPE_UNSPECIFIED`
    - `ALLOW_ALL_DOMAINS`
    - `ALLOW_APPROVED_DOMAINS`
    - `DENY_ALL_DOMAINS`
- `effective_restrict_workspace_admins` (object, optional)
  Effective setting value for restrict_workspace_admins setting. This is the final effective value of setting. To set a value use restrict_workspace_admins.
  - `status` (string, required)
    Possible values:
    - `STATUS_UNSPECIFIED`
    - `ALLOW_ALL`
    - `RESTRICT_TOKENS_AND_JOB_RUN_AS`
  - `disable_gov_tag_creation` (boolean, optional, Public Preview)
    When true, workspace admins cannot create governance tags.
     ALLOW_ALL status does not override this; they are independent.
- `effective_personal_compute` (object, optional)
  Effective setting value for personal_compute setting. This is the final effective value of setting. To set a value use personal_compute.
  - `value` (string, optional)
    Possible values:
    - `PERSONAL_COMPUTE_MESSAGE_ENUM_UNSPECIFIED`
    - `ON`
    - `DELEGATE`
- `effective_workspace_label` (object, optional, Beta)
  Effective setting value for workspace_label setting. This is the final effective value of setting. To set a value use workspace_label.
  - `label` (string, optional, Beta)
  - `color` (string, optional, Beta)

## Returns

Returns the Setting object.

## Response

```json
{
  "name": "string",
  "boolean_val": {
    "value": true
  },
  "string_val": {
    "value": "string"
  },
  "integer_val": {
    "value": 0
  },
  "automatic_cluster_update_workspace": {
    "enabled": true,
    "can_toggle": true,
    "maintenance_window": {},
    "enablement_details": {},
    "restart_even_if_no_updates_available": true
  },
  "aibi_dashboard_embedding_approved_domains": {
    "approved_domains": [
      "string"
    ]
  },
  "aibi_dashboard_embedding_access_policy": {
    "access_policy_type": "ALLOW_ALL_DOMAINS"
  },
  "restrict_workspace_admins": {
    "status": "ALLOW_ALL",
    "disable_gov_tag_creation": true
  },
  "personal_compute": {
    "value": "ON"
  },
  "workspace_label": {
    "label": "string",
    "color": "string"
  },
  "allowed_apps_user_api_scopes": {
    "allowed_scopes": [
      "string"
    ]
  },
  "operational_email_custom_recipient": {
    "email": "string"
  },
  "effective_boolean_val": {
    "value": true
  },
  "effective_string_val": {
    "value": "string"
  },
  "effective_integer_val": {
    "value": 0
  },
  "effective_automatic_cluster_update_workspace": {
    "enabled": true,
    "can_toggle": true,
    "maintenance_window": {},
    "enablement_details": {},
    "restart_even_if_no_updates_available": true
  },
  "effective_aibi_dashboard_embedding_approved_domains": {
    "approved_domains": [
      "string"
    ]
  },
  "effective_aibi_dashboard_embedding_access_policy": {
    "access_policy_type": "ALLOW_ALL_DOMAINS"
  },
  "effective_restrict_workspace_admins": {
    "status": "ALLOW_ALL",
    "disable_gov_tag_creation": true
  },
  "effective_personal_compute": {
    "value": "ON"
  },
  "effective_workspace_label": {
    "label": "string",
    "color": "string"
  },
  "effective_allowed_apps_user_api_scopes": {
    "allowed_scopes": [
      "string"
    ]
  },
  "effective_operational_email_custom_recipient": {
    "email": "string"
  }
}
```

