aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/SuspendMojo.java
blob: f2bcb5288e0ccee40b9a84b8bceb1273eec81fde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.hosted.plugin;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Sets suspension status for a Vespa application deployment.
 *
 * @author jonmv
 */
@Mojo(name = "suspend")
public class SuspendMojo extends AbstractVespaDeploymentMojo {

    @Parameter(property = "suspend", required = true)
    protected boolean suspend;

    @Override
    protected void doExecute() {
        getLog().info(controller.suspend(id, zoneOf(environment, region), suspend));
    }

}