# Update Link Settings

Update the security policies on one or more CloudFiles links from Apex.

> Kind: Apex method · Updated: 2026-07-01

## Signature

```apex
global static void updateLinksSettings(
  List<Types.UpdateLinkSettingsInput> inputs,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| inputs | List&lt;<a href="#/apex-type-update-link-settings-input">Types.UpdateLinkSettingsInput</a>&gt; | required | One entry per link whose settings you want to update. Fields on Types.UpdateLinkSettingsInput: id, isActive, allowDownloading, requirePassword, password, allowedEmails, allowedDomains, enableEmailVerification. |
| runAs | String | optional | Email Id of the user on whose behalf the function should run. To run the action as the automation user, supply integrationUser. |

## Return Type

void

## Example

```apex
cldfs.UpdateLinkSettings.FlowInput flowInput = new cldfs.UpdateLinkSettings.FlowInput();
flowInput.linkId = '68591442a9a65391d56b7caf';
flowInput.isDisabled = false;
flowInput.allowDownloading = false;
flowInput.password = 'password123';
cldfs.UpdateLinkSettings.execute(new List<cldfs.UpdateLinkSettings.FlowInput>{flowInput});
```

> **Example uses the invocable form** — The signature above documents the cldfs.Client.updateLinksSettings(List<Types.UpdateLinkSettingsInput&gt;, String) method. The example instead calls the invocable class cldfs.UpdateLinkSettings.execute(List<FlowInput&gt;), whose FlowInput uses different field names (linkId, isDisabled, allowDownloading, password) than Types.UpdateLinkSettingsInput (id, isActive, allowDownloading, requirePassword, password, allowedEmails, allowedDomains, enableEmailVerification). Map fields accordingly when calling the Client method.
