Capítulo 544 de 988

Chapter 544: getServices()

Core Idea

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

Key Concepts

  • Example
  • Argument
  • region
  • compatibleOnly
  • Return value
  • serviceName
  • memoryLimit
  • cpuLimit

Code Examples

const info = await getServices({
  region: 'us-east1',
  compatibleOnly: true,
});

for (const service of info) {
  console.log(service.serviceName); // "remotion--3-3-82--mem512mi--cpu1-0"
  console.log(service.timeoutInSeconds); // 300
  console.log(service.memoryLimit); // 512Mi
  console.log(service.cpuLimit); // 1.0
  console.log(service.remotionVersion); // "4.0.1"
  console.log(service.uri); // "https://remotion--3-3-82--mem512mi--cpu1-0--t-300-1a2b3c4d5e-ue.a.run.app"
  console.log(service.region); // "us-east1"
  console.log(service.consoleUrl); // "https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-300/logs"
}
  • What it demonstrates: Usage pattern for getServices() from the official docs.

Key Takeaways

  1. Understand example when working with getServices().
  2. Understand argument when working with getServices().
  3. Understand region when working with getServices().
  4. Understand compatibleonly when working with getServices().
  5. Understand return value when working with getServices().

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.