|
| 1 | +--- |
| 2 | +title: How to start or stop an Azure Spring Cloud service instance |
| 3 | +description: Describes how to start or stop an Azure Spring Cloud service instance |
| 4 | +author: karlerickson |
| 5 | +ms.author: wepa |
| 6 | +ms.service: spring-cloud |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 11/04/2021 |
| 9 | +ms.custom: devx-track-java |
| 10 | +--- |
| 11 | + |
| 12 | +# Start or stop your Azure Spring Cloud service instance |
| 13 | + |
| 14 | +This article shows you how to start or stop your Azure Spring Cloud service instance. |
| 15 | + |
| 16 | +> [!NOTE] |
| 17 | +> Stop and start is currently under preview. |
| 18 | +
|
| 19 | +Your applications running in Azure Spring Cloud may not need to run continuously - for example, if you have a service instance that's used only during business hours. At these times, Azure Spring Cloud may be idle, and running only the system components. |
| 20 | + |
| 21 | +You can reduce the active footprint of Azure Spring Cloud by reducing the running instances and ensuring costs for compute resources are reduced. |
| 22 | + |
| 23 | +To reduce your costs further, you can completely stop your Azure Spring Cloud service instance. All user apps and system components will be stopped. However, all your objects and network settings will be saved so you can restart your service instance and pick up right where you left off. |
| 24 | + |
| 25 | +> [!NOTE] |
| 26 | +> The state of a stopped Azure Spring Cloud service instance is preserved for up to 90 days during preview. If your cluster is stopped for more than 90 days, the cluster state cannot be recovered. |
| 27 | +> The maximum stop time may change after preview. |
| 28 | +
|
| 29 | +You can only start, view, or delete a stopped Azure Spring Cloud service instance. You must start your service instance before performing any update operation, such as creating or scaling an app. |
| 30 | + |
| 31 | +## Prerequisites |
| 32 | + |
| 33 | +- An existing service instance in Azure Spring Cloud. To create a new service instance, see [Quickstart: Deploy your first application in Azure Spring Cloud](./quickstart.md). |
| 34 | +- (Optional) [Azure CLI](/cli/azure/install-azure-cli) version 2.11.2 or later. |
| 35 | + |
| 36 | +# [Portal](#tab/azure-portal) |
| 37 | + |
| 38 | +## Stop a running instance |
| 39 | + |
| 40 | +In the Azure portal, use the following steps to stop a running Azure Spring Cloud instance: |
| 41 | + |
| 42 | +1. Go to the Azure Spring Cloud service overview page. |
| 43 | +2. Select **Stop** to stop a running instance. |
| 44 | + |
| 45 | +:::image type="content" source="media/stop-start-service/spring-cloud-stop-service.png" alt-text="Azure portal screenshot showing the Azure Spring Cloud Overview page with the Stop button and Status value highlighted"::: |
| 46 | + |
| 47 | +3. After the instance stops, the status will show **Succeeded (Stopped)**. |
| 48 | + |
| 49 | +## Start a stopped instance |
| 50 | + |
| 51 | +In the Azure portal, use the following steps to start a stopped Azure Spring Cloud instance: |
| 52 | + |
| 53 | +1. Go to Azure Spring Cloud service overview page. |
| 54 | +2. Select **Start** to start a stopped instance. |
| 55 | + |
| 56 | +:::image type="content" source="media/stop-start-service/spring-cloud-start-service.png" alt-text="Azure portal screenshot showing the Azure Spring Cloud Overview page with the Start button and Status value highlighted"::: |
| 57 | + |
| 58 | +3. After the instance starts, the status will show **Succeeded (Running)**. |
| 59 | + |
| 60 | +# [Azure CLI](#tab/azure-cli) |
| 61 | + |
| 62 | +## Stop a running instance |
| 63 | + |
| 64 | +With the Azure CLI, use the following command to stop a running Azure Spring Cloud instance: |
| 65 | + |
| 66 | +```azurecli |
| 67 | +az spring-cloud stop \ |
| 68 | + --name <service-instance-name> \ |
| 69 | + --resource-group <resource-group-name> |
| 70 | +``` |
| 71 | + |
| 72 | +## Start a stopped instance |
| 73 | + |
| 74 | +With the Azure CLI, use the following command to start a stopped Azure Spring Cloud instance: |
| 75 | + |
| 76 | +```azurecli |
| 77 | +az spring-cloud start \ |
| 78 | + --name <service-instance-name> \ |
| 79 | + --resource-group <resource-group-name> |
| 80 | +``` |
| 81 | + |
| 82 | +## Check the power state |
| 83 | + |
| 84 | +After the instance stops or starts, use the following command to check the power state: |
| 85 | + |
| 86 | +```azurecli |
| 87 | +az spring-cloud show \ |
| 88 | + --name <service-instance-name> \ |
| 89 | + --resource-group <resource-group-name> |
| 90 | +``` |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## Next steps |
| 95 | + |
| 96 | +* [Monitor app lifecycle events using Azure Activity log and Azure Service Health](./monitor-app-lifecycle-events.md) |
| 97 | +* [Monitor usage and estimated costs in Azure Monitor](../azure-monitor/usage-estimated-costs.md) |
0 commit comments