Capítulo 543 de 988

Chapter 543: getServiceInfo()

Core Idea

<ExperimentalBadge> <p> Cloud Run is in <a href="/docs/cloudrun/status">Alpha status and not actively being developed.

Key Concepts

  • Example
  • Arguments
  • region
  • serviceName
  • Return value
  • memoryLimit
  • cpuLimit
  • remotionVersion

Code Examples

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"
  • What it demonstrates: Usage pattern for getServiceInfo() from the official docs.

Key Takeaways

  1. Understand example when working with getServiceInfo().
  2. Understand arguments when working with getServiceInfo().
  3. Understand region when working with getServiceInfo().
  4. Understand servicename when working with getServiceInfo().
  5. Understand return value when working with getServiceInfo().

Connects To

  • api: related page in the Cloud Run (@remotion/cloudrun) section.
  • Checklist: related page in the Cloud Run (@remotion/cloudrun) section.
  • cli: related page in the Cloud Run (@remotion/cloudrun) section.