azure-native.databasewatcher.AlertRuleResource
Explore with Pulumi AI
Concrete proxy resource types can be created by aliasing this type using a specific property type. Azure REST API version: 2024-07-19-preview.
Example Usage
AlertRuleResources_CreateOrUpdate - generated by [MaximumSet] rule
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var alertRuleResource = new AzureNative.DatabaseWatcher.AlertRuleResource("alertRuleResource", new()
{
AlertRuleResourceId = "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
AlertRuleResourceName = "testAlert",
AlertRuleTemplateId = "someTemplateId",
AlertRuleTemplateVersion = "1.0",
CreatedWithProperties = AzureNative.DatabaseWatcher.AlertRuleCreationProperties.CreatedWithActionGroup,
CreationTime = "2024-07-25T15:38:47.798Z",
ResourceGroupName = "rgWatcher",
WatcherName = "testWatcher",
});
});
package main
import (
databasewatcher "github.com/pulumi/pulumi-azure-native-sdk/databasewatcher/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databasewatcher.NewAlertRuleResource(ctx, "alertRuleResource", &databasewatcher.AlertRuleResourceArgs{
AlertRuleResourceId: pulumi.String("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
AlertRuleResourceName: pulumi.String("testAlert"),
AlertRuleTemplateId: pulumi.String("someTemplateId"),
AlertRuleTemplateVersion: pulumi.String("1.0"),
CreatedWithProperties: pulumi.String(databasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
CreationTime: pulumi.String("2024-07-25T15:38:47.798Z"),
ResourceGroupName: pulumi.String("rgWatcher"),
WatcherName: pulumi.String("testWatcher"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.databasewatcher.AlertRuleResource;
import com.pulumi.azurenative.databasewatcher.AlertRuleResourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var alertRuleResource = new AlertRuleResource("alertRuleResource", AlertRuleResourceArgs.builder()
.alertRuleResourceId("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo")
.alertRuleResourceName("testAlert")
.alertRuleTemplateId("someTemplateId")
.alertRuleTemplateVersion("1.0")
.createdWithProperties("CreatedWithActionGroup")
.creationTime("2024-07-25T15:38:47.798Z")
.resourceGroupName("rgWatcher")
.watcherName("testWatcher")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
alert_rule_resource = azure_native.databasewatcher.AlertRuleResource("alertRuleResource",
alert_rule_resource_id="/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
alert_rule_resource_name="testAlert",
alert_rule_template_id="someTemplateId",
alert_rule_template_version="1.0",
created_with_properties=azure_native.databasewatcher.AlertRuleCreationProperties.CREATED_WITH_ACTION_GROUP,
creation_time="2024-07-25T15:38:47.798Z",
resource_group_name="rgWatcher",
watcher_name="testWatcher")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const alertRuleResource = new azure_native.databasewatcher.AlertRuleResource("alertRuleResource", {
alertRuleResourceId: "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
alertRuleResourceName: "testAlert",
alertRuleTemplateId: "someTemplateId",
alertRuleTemplateVersion: "1.0",
createdWithProperties: azure_native.databasewatcher.AlertRuleCreationProperties.CreatedWithActionGroup,
creationTime: "2024-07-25T15:38:47.798Z",
resourceGroupName: "rgWatcher",
watcherName: "testWatcher",
});
resources:
alertRuleResource:
type: azure-native:databasewatcher:AlertRuleResource
properties:
alertRuleResourceId: /subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo
alertRuleResourceName: testAlert
alertRuleTemplateId: someTemplateId
alertRuleTemplateVersion: '1.0'
createdWithProperties: CreatedWithActionGroup
creationTime: 2024-07-25T15:38:47.798Z
resourceGroupName: rgWatcher
watcherName: testWatcher
Create AlertRuleResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertRuleResource(name: string, args: AlertRuleResourceArgs, opts?: CustomResourceOptions);
@overload
def AlertRuleResource(resource_name: str,
args: AlertRuleResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertRuleResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_rule_resource_id: Optional[str] = None,
alert_rule_template_id: Optional[str] = None,
alert_rule_template_version: Optional[str] = None,
created_with_properties: Optional[Union[str, AlertRuleCreationProperties]] = None,
creation_time: Optional[str] = None,
resource_group_name: Optional[str] = None,
watcher_name: Optional[str] = None,
alert_rule_resource_name: Optional[str] = None)
func NewAlertRuleResource(ctx *Context, name string, args AlertRuleResourceArgs, opts ...ResourceOption) (*AlertRuleResource, error)
public AlertRuleResource(string name, AlertRuleResourceArgs args, CustomResourceOptions? opts = null)
public AlertRuleResource(String name, AlertRuleResourceArgs args)
public AlertRuleResource(String name, AlertRuleResourceArgs args, CustomResourceOptions options)
type: azure-native:databasewatcher:AlertRuleResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AlertRuleResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AlertRuleResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AlertRuleResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertRuleResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertRuleResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alertRuleResourceResource = new AzureNative.DatabaseWatcher.AlertRuleResource("alertRuleResourceResource", new()
{
AlertRuleResourceId = "string",
AlertRuleTemplateId = "string",
AlertRuleTemplateVersion = "string",
CreatedWithProperties = "string",
CreationTime = "string",
ResourceGroupName = "string",
WatcherName = "string",
AlertRuleResourceName = "string",
});
example, err := databasewatcher.NewAlertRuleResource(ctx, "alertRuleResourceResource", &databasewatcher.AlertRuleResourceArgs{
AlertRuleResourceId: pulumi.String("string"),
AlertRuleTemplateId: pulumi.String("string"),
AlertRuleTemplateVersion: pulumi.String("string"),
CreatedWithProperties: pulumi.String("string"),
CreationTime: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
WatcherName: pulumi.String("string"),
AlertRuleResourceName: pulumi.String("string"),
})
var alertRuleResourceResource = new AlertRuleResource("alertRuleResourceResource", AlertRuleResourceArgs.builder()
.alertRuleResourceId("string")
.alertRuleTemplateId("string")
.alertRuleTemplateVersion("string")
.createdWithProperties("string")
.creationTime("string")
.resourceGroupName("string")
.watcherName("string")
.alertRuleResourceName("string")
.build());
alert_rule_resource_resource = azure_native.databasewatcher.AlertRuleResource("alertRuleResourceResource",
alert_rule_resource_id="string",
alert_rule_template_id="string",
alert_rule_template_version="string",
created_with_properties="string",
creation_time="string",
resource_group_name="string",
watcher_name="string",
alert_rule_resource_name="string")
const alertRuleResourceResource = new azure_native.databasewatcher.AlertRuleResource("alertRuleResourceResource", {
alertRuleResourceId: "string",
alertRuleTemplateId: "string",
alertRuleTemplateVersion: "string",
createdWithProperties: "string",
creationTime: "string",
resourceGroupName: "string",
watcherName: "string",
alertRuleResourceName: "string",
});
type: azure-native:databasewatcher:AlertRuleResource
properties:
alertRuleResourceId: string
alertRuleResourceName: string
alertRuleTemplateId: string
alertRuleTemplateVersion: string
createdWithProperties: string
creationTime: string
resourceGroupName: string
watcherName: string
AlertRuleResource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AlertRuleResource resource accepts the following input properties:
- Alert
Rule stringResource Id - The resource ID of the alert rule resource.
- Alert
Rule stringTemplate Id - The template ID associated with alert rule resource.
- Alert
Rule stringTemplate Version - The alert rule template version.
- Created
With string | Pulumi.Properties Azure Native. Database Watcher. Alert Rule Creation Properties - The properties with which the alert rule resource was created.
- Creation
Time string - The creation time of the alert rule resource.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Watcher
Name string - The database watcher name.
- Alert
Rule stringResource Name - The alert rule proxy resource name.
- Alert
Rule stringResource Id - The resource ID of the alert rule resource.
- Alert
Rule stringTemplate Id - The template ID associated with alert rule resource.
- Alert
Rule stringTemplate Version - The alert rule template version.
- Created
With string | AlertProperties Rule Creation Properties - The properties with which the alert rule resource was created.
- Creation
Time string - The creation time of the alert rule resource.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Watcher
Name string - The database watcher name.
- Alert
Rule stringResource Name - The alert rule proxy resource name.
- alert
Rule StringResource Id - The resource ID of the alert rule resource.
- alert
Rule StringTemplate Id - The template ID associated with alert rule resource.
- alert
Rule StringTemplate Version - The alert rule template version.
- created
With String | AlertProperties Rule Creation Properties - The properties with which the alert rule resource was created.
- creation
Time String - The creation time of the alert rule resource.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- watcher
Name String - The database watcher name.
- alert
Rule StringResource Name - The alert rule proxy resource name.
- alert
Rule stringResource Id - The resource ID of the alert rule resource.
- alert
Rule stringTemplate Id - The template ID associated with alert rule resource.
- alert
Rule stringTemplate Version - The alert rule template version.
- created
With string | AlertProperties Rule Creation Properties - The properties with which the alert rule resource was created.
- creation
Time string - The creation time of the alert rule resource.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- watcher
Name string - The database watcher name.
- alert
Rule stringResource Name - The alert rule proxy resource name.
- alert_
rule_ strresource_ id - The resource ID of the alert rule resource.
- alert_
rule_ strtemplate_ id - The template ID associated with alert rule resource.
- alert_
rule_ strtemplate_ version - The alert rule template version.
- created_
with_ str | Alertproperties Rule Creation Properties - The properties with which the alert rule resource was created.
- creation_
time str - The creation time of the alert rule resource.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- watcher_
name str - The database watcher name.
- alert_
rule_ strresource_ name - The alert rule proxy resource name.
- alert
Rule StringResource Id - The resource ID of the alert rule resource.
- alert
Rule StringTemplate Id - The template ID associated with alert rule resource.
- alert
Rule StringTemplate Version - The alert rule template version.
- created
With String | "CreatedProperties With Action Group" | "None" - The properties with which the alert rule resource was created.
- creation
Time String - The creation time of the alert rule resource.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- watcher
Name String - The database watcher name.
- alert
Rule StringResource Name - The alert rule proxy resource name.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertRuleResource resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state of the alert rule resource.
- System
Data Pulumi.Azure Native. Database Watcher. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state of the alert rule resource.
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - The provisioning state of the alert rule resource.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioning
State string - The provisioning state of the alert rule resource.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_
state str - The provisioning state of the alert rule resource.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioning
State String - The provisioning state of the alert rule resource.
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
AlertRuleCreationProperties, AlertRuleCreationPropertiesArgs
- Created
With Action Group - CreatedWithActionGroupThe alert rule was created with an action group.
- None
- NoneThe alert rule was created with no properties.
- Alert
Rule Creation Properties Created With Action Group - CreatedWithActionGroupThe alert rule was created with an action group.
- Alert
Rule Creation Properties None - NoneThe alert rule was created with no properties.
- Created
With Action Group - CreatedWithActionGroupThe alert rule was created with an action group.
- None
- NoneThe alert rule was created with no properties.
- Created
With Action Group - CreatedWithActionGroupThe alert rule was created with an action group.
- None
- NoneThe alert rule was created with no properties.
- CREATED_WITH_ACTION_GROUP
- CreatedWithActionGroupThe alert rule was created with an action group.
- NONE
- NoneThe alert rule was created with no properties.
- "Created
With Action Group" - CreatedWithActionGroupThe alert rule was created with an action group.
- "None"
- NoneThe alert rule was created with no properties.
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:databasewatcher:AlertRuleResource testAlert /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0