---
title: timeoutIntervalForResource
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlsessionconfiguration/timeoutintervalforresource
---

# timeoutIntervalForResource

The maximum amount of time that a resource request should be allowed to take.

## Declaration

```swift
var timeoutIntervalForResource: TimeInterval { get set }
```

## Discussion

Discussion This property determines the resource timeout interval for all tasks within sessions based on this configuration. The resource timeout interval controls how long (in seconds) to wait for an entire resource to transfer before giving up. The resource timer starts when the request is initiated and counts until either the request completes or this timeout interval is reached, whichever comes first. The default value is 7 days.

## See Also

### Setting general properties

- [identifier](foundation/urlsessionconfiguration/identifier.md)
- [httpAdditionalHeaders](foundation/urlsessionconfiguration/httpadditionalheaders.md)
- [networkServiceType](foundation/urlsessionconfiguration/networkservicetype.md)
- [allowsCellularAccess](foundation/urlsessionconfiguration/allowscellularaccess.md)
- [timeoutIntervalForRequest](foundation/urlsessionconfiguration/timeoutintervalforrequest.md)
- [sharedContainerIdentifier](foundation/urlsessionconfiguration/sharedcontaineridentifier.md)
- [waitsForConnectivity](foundation/urlsessionconfiguration/waitsforconnectivity.md)
- [usesClassicLoadingMode](foundation/urlsessionconfiguration/usesclassicloadingmode.md)
