Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird beschrieben, wie Sie eine benutzerdefinierte Beschreibung für Ihre Cloud Run-Dienste festlegen.
Eine Beschreibung ist ein optionaler für Menschen lesbarer Text, der an den Dienst angehängt ist.
Beschreibungen sind auf 512 Zeichen beschränkt.
Falls vorhanden, wird die Beschreibung beim Aufrufen der Details zu einem Dienst mit gcloud run services describe angezeigt.
Erforderliche Rollen
Bitten Sie Ihren Administrator, Ihnen die folgenden IAM-Rollen zuzuweisen, um die Berechtigungen zu erhalten, die Sie zum Konfigurieren und Bereitstellen von Cloud Run-Diensten benötigen:
Dienstkontonutzer (roles/iam.serviceAccountUser)
für die Dienstidentität
Wenn Sie einen Dienst oder eine Funktion aus Quellcode bereitstellen, müssen Sie auch zusätzliche Rollen für Ihr Projekt und Ihr Cloud Build-Dienstkonto haben.
Sie können eine Beschreibung für Cloud Run-Dienste festlegen.
gcloud
Sie können die Beschreibung während der Bereitstellung festlegen oder aktualisieren:
gcloudrundeploySERVICE--descriptionDESCRIPTION
Ersetzen
SERVICE durch den Namen Ihres Cloud Run-Dienstes
DESCRIPTION durch die Beschreibung des Dienstes
YAML
Wenn Sie einen neuen Dienst erstellen, überspringen Sie diesen Schritt.
Wenn Sie einen vorhandenen Dienst aktualisieren, laden Sie die zugehörige YAML-Konfiguration herunter:
resource"google_cloud_run_v2_service""default"{name="cloudrun-service-description"location="us-central1"description="This service has a custom description"deletion_protection=false # set to "true" in productiontemplate{containers{image="us-docker.pkg.dev/cloudrun/container/hello"}}}
Ersetzen Sie die Beschreibung durch den gewünschten Wert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Set service descriptions\n\nThis page shows how to set a custom description on your Cloud Run\nservices.\nA description is an optional human-readable text attached to the service.\nA description is limited to 512 characters.\nIf present, the description is displayed when\n[viewing details of a service using `gcloud run services describe`](/run/docs/managing/services#command-line_1).\n\nRequired roles\n--------------\n\n\nTo get the permissions that\nyou need to configure and deploy Cloud Run services,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- [Cloud Run Developer](/iam/docs/roles-permissions/run#run.developer) (`roles/run.developer`) on the Cloud Run service\n- [Service Account User](/iam/docs/roles-permissions/iam#iam.serviceAccountUser) (`roles/iam.serviceAccountUser`) on the service identity\n\n\nIf you are deploying a [service](/run/docs/deploying-source-code#required_roles)\nor [function](/run/docs/deploy-functions#required-roles) from source code, you\nmust also have additional roles granted to you on your project and\nCloud Build service account.\n\nFor a list of IAM roles and permissions that are associated with\nCloud Run, see\n[Cloud Run IAM roles](/run/docs/reference/iam/roles)\nand [Cloud Run IAM permissions](/run/docs/reference/iam/permissions).\nIf your Cloud Run service interfaces with\nGoogle Cloud APIs, such as Cloud Client Libraries, see the\n[service identity configuration guide](/run/docs/configuring/services/service-identity).\nFor more information about granting roles, see\n[deployment permissions](/run/docs/reference/iam/roles#additional-configuration)\nand [manage access](/iam/docs/granting-changing-revoking-access).\n\nSet or modify a description\n---------------------------\n\nYou can set a description on Cloud Run services. \n\n### gcloud\n\nYou can set or update the description during [deployment](/run/docs/deploying#service):\n\n\u003cbr /\u003e\n\n```bash\ngcloud run deploy SERVICE --description DESCRIPTION\n```\n\n\u003cbr /\u003e\n\nReplace\n\n- \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with name of your Cloud Run service\n- \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e with the description of the service\n\n### YAML\n\n1. If you are creating a new service, skip this step.\n If you are updating an existing service, download its [YAML configuration](/run/docs/reference/yaml/v1):\n\n ```bash\n gcloud run services describe SERVICE --format export \u003e service.yaml\n ```\n2. Update the `run.googleapis.com/description` annotation:\n\n ```yaml\n apiVersion: serving.knative.dev/v1\n kind: Service\n metadata:\n name: SERVICE\n annotations:\n run.googleapis.com/description: \"\u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e\"\n spec:\n template:\n ...\n ```\n\n Replace\n - \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of your Cloud Run service\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e with the description of the service\n3. Create or update the service using the following command:\n\n ```bash\n gcloud run services replace service.yaml\n ```\n\n### Terraform\n\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\nAdd the following to a [`google_cloud_run_v2_service`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service) resource in your Terraform configuration: \n\n\u003cbr /\u003e\n\n resource \"google_cloud_run_v2_service\" \"default\" {\n name = \"cloudrun-service-description\"\n location = \"us-central1\"\n\n description = \"This service has a custom description\"\n\n deletion_protection = false # set to \"true\" in production\n\n template {\n containers {\n image = \"us-docker.pkg.dev/cloudrun/container/hello\"\n }\n }\n\n }\n\nReplace the description with your desired value."]]