- NAME
-
- gcloud spanner samples backend - run the backend gRPC service for the given Cloud Spanner sample app
- SYNOPSIS
-
-
gcloud spanner samples backend
APPNAME
--instance-id
=INSTANCE_ID
[--database-id
=DATABASE_ID
] [--duration
=DURATION
; default="1h"] [--port
=PORT
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
This command starts the backend gRPC service for the given sample application.
Before starting the service, create the database and load any initial data with:
gcloud spanner samples init APPNAME --instance-id=INSTANCE_ID
After starting the service, generate traffic with:
gcloud spanner samples workload APPNAME
To run all three steps together, use:
gcloud spanner samples run APPNAME --instance-id=INSTANCE_ID
- EXAMPLES
-
To run the backend gRPC service for the 'finance' sample app using instance
'my-instance', run:
gcloud spanner samples backend finance --instance-id=my-instance
- POSITIONAL ARGUMENTS
-
APPNAME
- The sample app name, e.g. "finance".
- REQUIRED FLAGS
-
--instance-id
=INSTANCE_ID
- The Cloud Spanner instance ID for the sample app.
- OPTIONAL FLAGS
-
--database-id
=DATABASE_ID
- The Cloud Spanner database ID for the sample app.
--duration
=DURATION
; default="1h"- Duration of time allowed to run before stopping the service.
--port
=PORT
- Port on which to receive gRPC requests.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
These variants are also available:
gcloud alpha spanner samples backend
gcloud beta spanner samples backend
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}