com.azure.resourcemanager.automation.models.Watcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-automation Show documentation
Show all versions of azure-resourcemanager-automation Show documentation
This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2022-02-22.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.automation.models;
import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.automation.fluent.models.WatcherInner;
import java.time.OffsetDateTime;
import java.util.Map;
/**
* An immutable client-side representation of Watcher.
*/
public interface Watcher {
/**
* Gets the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
String id();
/**
* Gets the name property: The name of the resource.
*
* @return the name value.
*/
String name();
/**
* Gets the type property: The type of the resource.
*
* @return the type value.
*/
String type();
/**
* Gets the etag property: Gets or sets the etag of the resource.
*
* @return the etag value.
*/
String etag();
/**
* Gets the tags property: Resource tags.
*
* @return the tags value.
*/
Map tags();
/**
* Gets the location property: The geo-location where the resource lives.
*
* @return the location value.
*/
String location();
/**
* Gets the executionFrequencyInSeconds property: Gets or sets the frequency at which the watcher is invoked.
*
* @return the executionFrequencyInSeconds value.
*/
Long executionFrequencyInSeconds();
/**
* Gets the scriptName property: Gets or sets the name of the script the watcher is attached to, i.e. the name of an
* existing runbook.
*
* @return the scriptName value.
*/
String scriptName();
/**
* Gets the scriptParameters property: Gets or sets the parameters of the script.
*
* @return the scriptParameters value.
*/
Map scriptParameters();
/**
* Gets the scriptRunOn property: Gets or sets the name of the hybrid worker group the watcher will run on.
*
* @return the scriptRunOn value.
*/
String scriptRunOn();
/**
* Gets the status property: Gets the current status of the watcher.
*
* @return the status value.
*/
String status();
/**
* Gets the creationTime property: Gets or sets the creation time.
*
* @return the creationTime value.
*/
OffsetDateTime creationTime();
/**
* Gets the lastModifiedTime property: Gets or sets the last modified time.
*
* @return the lastModifiedTime value.
*/
OffsetDateTime lastModifiedTime();
/**
* Gets the lastModifiedBy property: Details of the user who last modified the watcher.
*
* @return the lastModifiedBy value.
*/
String lastModifiedBy();
/**
* Gets the description property: Gets or sets the description.
*
* @return the description value.
*/
String description();
/**
* Gets the region of the resource.
*
* @return the region of the resource.
*/
Region region();
/**
* Gets the name of the resource region.
*
* @return the name of the resource region.
*/
String regionName();
/**
* Gets the name of the resource group.
*
* @return the name of the resource group.
*/
String resourceGroupName();
/**
* Gets the inner com.azure.resourcemanager.automation.fluent.models.WatcherInner object.
*
* @return the inner object.
*/
WatcherInner innerModel();
/**
* The entirety of the Watcher definition.
*/
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
/**
* The Watcher definition stages.
*/
interface DefinitionStages {
/**
* The first stage of the Watcher definition.
*/
interface Blank extends WithParentResource {
}
/**
* The stage of the Watcher definition allowing to specify parent resource.
*/
interface WithParentResource {
/**
* Specifies resourceGroupName, automationAccountName.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @return the next definition stage.
*/
WithCreate withExistingAutomationAccount(String resourceGroupName, String automationAccountName);
}
/**
* The stage of the Watcher definition which contains all the minimum required properties for the resource to be
* created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithEtag,
DefinitionStages.WithExecutionFrequencyInSeconds, DefinitionStages.WithScriptName,
DefinitionStages.WithScriptParameters, DefinitionStages.WithScriptRunOn, DefinitionStages.WithDescription {
/**
* Executes the create request.
*
* @return the created resource.
*/
Watcher create();
/**
* Executes the create request.
*
* @param context The context to associate with this operation.
* @return the created resource.
*/
Watcher create(Context context);
}
/**
* The stage of the Watcher definition allowing to specify location.
*/
interface WithLocation {
/**
* Specifies the region for the resource.
*
* @param location The geo-location where the resource lives.
* @return the next definition stage.
*/
WithCreate withRegion(Region location);
/**
* Specifies the region for the resource.
*
* @param location The geo-location where the resource lives.
* @return the next definition stage.
*/
WithCreate withRegion(String location);
}
/**
* The stage of the Watcher definition allowing to specify tags.
*/
interface WithTags {
/**
* Specifies the tags property: Resource tags..
*
* @param tags Resource tags.
* @return the next definition stage.
*/
WithCreate withTags(Map tags);
}
/**
* The stage of the Watcher definition allowing to specify etag.
*/
interface WithEtag {
/**
* Specifies the etag property: Gets or sets the etag of the resource..
*
* @param etag Gets or sets the etag of the resource.
* @return the next definition stage.
*/
WithCreate withEtag(String etag);
}
/**
* The stage of the Watcher definition allowing to specify executionFrequencyInSeconds.
*/
interface WithExecutionFrequencyInSeconds {
/**
* Specifies the executionFrequencyInSeconds property: Gets or sets the frequency at which the watcher is
* invoked..
*
* @param executionFrequencyInSeconds Gets or sets the frequency at which the watcher is invoked.
* @return the next definition stage.
*/
WithCreate withExecutionFrequencyInSeconds(Long executionFrequencyInSeconds);
}
/**
* The stage of the Watcher definition allowing to specify scriptName.
*/
interface WithScriptName {
/**
* Specifies the scriptName property: Gets or sets the name of the script the watcher is attached to, i.e.
* the name of an existing runbook..
*
* @param scriptName Gets or sets the name of the script the watcher is attached to, i.e. the name of an
* existing runbook.
* @return the next definition stage.
*/
WithCreate withScriptName(String scriptName);
}
/**
* The stage of the Watcher definition allowing to specify scriptParameters.
*/
interface WithScriptParameters {
/**
* Specifies the scriptParameters property: Gets or sets the parameters of the script..
*
* @param scriptParameters Gets or sets the parameters of the script.
* @return the next definition stage.
*/
WithCreate withScriptParameters(Map scriptParameters);
}
/**
* The stage of the Watcher definition allowing to specify scriptRunOn.
*/
interface WithScriptRunOn {
/**
* Specifies the scriptRunOn property: Gets or sets the name of the hybrid worker group the watcher will run
* on..
*
* @param scriptRunOn Gets or sets the name of the hybrid worker group the watcher will run on.
* @return the next definition stage.
*/
WithCreate withScriptRunOn(String scriptRunOn);
}
/**
* The stage of the Watcher definition allowing to specify description.
*/
interface WithDescription {
/**
* Specifies the description property: Gets or sets the description..
*
* @param description Gets or sets the description.
* @return the next definition stage.
*/
WithCreate withDescription(String description);
}
}
/**
* Begins update for the Watcher resource.
*
* @return the stage of resource update.
*/
Watcher.Update update();
/**
* The template for Watcher update.
*/
interface Update extends UpdateStages.WithName, UpdateStages.WithExecutionFrequencyInSeconds {
/**
* Executes the update request.
*
* @return the updated resource.
*/
Watcher apply();
/**
* Executes the update request.
*
* @param context The context to associate with this operation.
* @return the updated resource.
*/
Watcher apply(Context context);
}
/**
* The Watcher update stages.
*/
interface UpdateStages {
/**
* The stage of the Watcher update allowing to specify name.
*/
interface WithName {
/**
* Specifies the name property: Gets or sets the name of the resource..
*
* @param name Gets or sets the name of the resource.
* @return the next definition stage.
*/
Update withName(String name);
}
/**
* The stage of the Watcher update allowing to specify executionFrequencyInSeconds.
*/
interface WithExecutionFrequencyInSeconds {
/**
* Specifies the executionFrequencyInSeconds property: Gets or sets the frequency at which the watcher is
* invoked..
*
* @param executionFrequencyInSeconds Gets or sets the frequency at which the watcher is invoked.
* @return the next definition stage.
*/
Update withExecutionFrequencyInSeconds(Long executionFrequencyInSeconds);
}
}
/**
* Refreshes the resource to sync with Azure.
*
* @return the refreshed resource.
*/
Watcher refresh();
/**
* Refreshes the resource to sync with Azure.
*
* @param context The context to associate with this operation.
* @return the refreshed resource.
*/
Watcher refresh(Context context);
/**
* Resume the watcher identified by watcher name.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response}.
*/
Response startWithResponse(Context context);
/**
* Resume the watcher identified by watcher name.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void start();
/**
* Resume the watcher identified by watcher name.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response}.
*/
Response stopWithResponse(Context context);
/**
* Resume the watcher identified by watcher name.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
void stop();
}