# Set Resource Property

Update resource metadata properties from Apex.

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

## Signature

```apex
global static void updateResources(
  List<Types.UpdateResourceInput> inputs,
  String library,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| inputs | List&lt;<a href="#/apex-type-update-resource-input">Types.UpdateResourceInput</a>&gt; | required | List of Types.UpdateResourceInput entries, one per resource whose metadata is being updated. |
| library | String | required | Type of library, e.g. sharepoint. You can get this value from the Content Library. |
| runAs | String | optional | runAs; usually a static value such as integrationUser. |

## Return Type

void

## Example

```apex
cldfs.Resource resource = new cldfs.Resource(
    '01KEHAKUXCQ6YIOFLOPJHJN57Y5EYQTJMZ',//resourceId
    'folder',// file or folder
    'Leads', //folder or file Name
    'sharepoint', //library
    'b!nJBtPq_z5UeJtFrj_f24XEQqlPUD8vtFsg7GBcrXJepiUn9bkb_7QbDPtqHVD-cP' //drive Id
);
Map<String, String> updates = new Map<String, String>();
updates.put('name', 'CloudFiles Leads');

List<cldfs.Types.UpdateResourceInput> inputs = new List<cldfs.Types.UpdateResourceInput>{
    new cldfs.Types.UpdateResourceInput(
        resource,
        updates
    )
};

String library = 'sharepoint';
String runAs = 'integrationUser';
Cldfs.Client.updateResources(inputs, library, runAs);
```

> **Same method as Update Resources** — This is the same underlying Client.updateResources method documented by the Update Resources page; both entry points call it.
