> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblMultiplayerSessionConstantsSetCloudComputePackageJson

> XblMultiplayerSessionConstantsSetCloudComputePackageJson

# XblMultiplayerSessionConstantsSetCloudComputePackageJson

This can only be set when creating a new session. Can only be specified if the 'cloudCompute' capability is set. Enables clients to request that a cloud compute instance be allocated on behalf of the session.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerSessionConstantsSetCloudComputePackageJson(  
         XblMultiplayerSessionHandle handle,  
         const char* sessionCloudComputePackageConstantsJson  
)  
```

### Parameters

*handle*   \_In\_\
Type: [XblMultiplayerSessionHandle](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle.md)

Handle to the multiplayer session.

*sessionCloudComputePackageConstantsJson*   \_In\_\
Type: char\*

Cloud compute instance to be allocated on behalf of the session. Example Json: `{ "crossSandbox": true, // True if the cloud compute resources are provisioned to be sandbox-agnostic, false if they are provisioned per-sandbox. "titleId" : "4567", // The title ID and GSI set of the cloud compute package to allocate. "gsiSet" : "128ce92a-45d0-4319-8a7e-bd8e940114ec" }`

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Requirements

**Header:** multiplayer\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[multiplayer\_c](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)


## Related topics

- [multiplayer_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)
- [XblMultiplayerSessionSetAllocateCloudCompute](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetallocatecloudcompute.md)
- [XblMultiplayerSessionSetMatchmakingTargetSessionConstantsJson](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetmatchmakingtargetsessionconstantsjson.md)
- [XblMultiplayerSessionConstantsSetMeasurementServerAddressesJson](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionconstantssetmeasurementserveraddressesjson.md)
- [Session template constants](https://docs.xbox.com/services/xbox-services/multiplayer/mpsd/concepts/live-session-template-constants.md)
