Skip to main content

getServiceInfo()

Gets information about a service given its name and region.

To get a list of deployed services, use getServices().

To deploy a service, use deployService().

Example​

import {getServiceInfo} from '@remotion/cloudrun/client';

const info = await getServiceInfo({
  region: 'us-east1',
  serviceName: 'remotion--3-3-82--mem512mi--cpu1-0--t-500',
});
console.log(info.serviceName); // remotion--3-3-82--mem512mi--cpu1-0--t-500
console.log(info.timeoutInSeconds); // 500
console.log(info.memoryLimit); // "2Gi"
console.log(info.cpuLimit); // "1.0"
console.log(info.remotionVersion); // '4.0.1'
console.log(info.uri); // "https://remotion--3-3-82--mem512mi--cpu1-0--t-500-1a2b3c4d5e-ue.a.run.app"
console.log(info.region); // "us-east1"
console.log(info.consoleUrl); // "https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-500/logs"
note

Import from @remotion/cloudrun/client to not import the whole renderer, which cannot be bundled.

Arguments​

An object containing the following properties:

region​

The GCP region the service resides in.

serviceName​

The name of the service.

Return value​

If the service does not exist, an error is thrown by the GCP SDK. If the service exists, a promise resolving to an object with the following properties is returned:

memoryLimit​

The upper bound on the amount of RAM that the Cloud Run service can consume.

cpuLimit​

The maximum number of CPU cores that the Cloud Run service can use to process requests.

remotionVersion​

The Remotion version of the service. Remotion is versioning the Cloud Run service and a render can only be triggered from a version of @remotion/cloudrun that is matching the one of the service.

timeoutInSeconds​

The timeout that has been assigned to the Cloud Run service.

uri​

The endpoint of the service.

region​

The region of the deployed service.

consoleUrl​

A link to the GCP console page for this service. Specifically, a link to logs display.

Compatibility​

ServersEnvironments
Node.js
Bun
Serverless Functions
Node.js runtime

For serverless functions, use the light client.

See also​