ScheduledAction

class ScheduledAction : KotlinCustomResource

Scheduled action definition. API Version: 2022-04-01-preview.

Example Usage

CreateOrUpdatePrivateScheduledAction

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scheduledAction = new AzureNative.CostManagement.ScheduledAction("scheduledAction", new()
{
DisplayName = "Monthly Cost By Resource",
Kind = "Email",
Name = "monthlyCostByResource",
Notification = new AzureNative.CostManagement.Inputs.NotificationPropertiesArgs
{
Subject = "Cost by resource this month",
To = new[]
{
"user@gmail.com",
"team@gmail.com",
},
},
Schedule = new AzureNative.CostManagement.Inputs.SchedulePropertiesArgs
{
DaysOfWeek = new[]
{
"Monday",
},
EndDate = "2021-06-19T22:21:51.1287144Z",
Frequency = "Monthly",
HourOfDay = 10,
StartDate = "2020-06-19T22:21:51.1287144Z",
WeeksOfMonth = new[]
{
"First",
"Third",
},
},
Status = "Enabled",
ViewId = "/providers/Microsoft.CostManagement/views/swaggerExample",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewScheduledAction(ctx, "scheduledAction", &costmanagement.ScheduledActionArgs{
DisplayName: pulumi.String("Monthly Cost By Resource"),
Kind: pulumi.String("Email"),
Name: pulumi.String("monthlyCostByResource"),
Notification: &costmanagement.NotificationPropertiesArgs{
Subject: pulumi.String("Cost by resource this month"),
To: pulumi.StringArray{
pulumi.String("user@gmail.com"),
pulumi.String("team@gmail.com"),
},
},
Schedule: &costmanagement.SchedulePropertiesArgs{
DaysOfWeek: pulumi.StringArray{
pulumi.String("Monday"),
},
EndDate: pulumi.String("2021-06-19T22:21:51.1287144Z"),
Frequency: pulumi.String("Monthly"),
HourOfDay: pulumi.Int(10),
StartDate: pulumi.String("2020-06-19T22:21:51.1287144Z"),
WeeksOfMonth: pulumi.StringArray{
pulumi.String("First"),
pulumi.String("Third"),
},
},
Status: pulumi.String("Enabled"),
ViewId: pulumi.String("/providers/Microsoft.CostManagement/views/swaggerExample"),
})
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.costmanagement.ScheduledAction;
import com.pulumi.azurenative.costmanagement.ScheduledActionArgs;
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 scheduledAction = new ScheduledAction("scheduledAction", ScheduledActionArgs.builder()
.displayName("Monthly Cost By Resource")
.kind("Email")
.name("monthlyCostByResource")
.notification(Map.ofEntries(
Map.entry("subject", "Cost by resource this month"),
Map.entry("to",
"user@gmail.com",
"team@gmail.com")
))
.schedule(Map.ofEntries(
Map.entry("daysOfWeek", "Monday"),
Map.entry("endDate", "2021-06-19T22:21:51.1287144Z"),
Map.entry("frequency", "Monthly"),
Map.entry("hourOfDay", 10),
Map.entry("startDate", "2020-06-19T22:21:51.1287144Z"),
Map.entry("weeksOfMonth",
"First",
"Third")
))
.status("Enabled")
.viewId("/providers/Microsoft.CostManagement/views/swaggerExample")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:costmanagement:ScheduledAction monthlyCostByResource providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource

Properties

Link copied to clipboard
val displayName: Output<String>

Scheduled action name.

Link copied to clipboard
val eTag: Output<String>

Resource Etag.

Link copied to clipboard

Destination format of the view data.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val kind: Output<String>?

Kind of the scheduled action.

Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

Notification properties based on scheduled action kind.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Schedule of the scheduled action.

Link copied to clipboard
val scope: Output<String>?

Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.

Link copied to clipboard
val status: Output<String>

Status of the scheduled action.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val viewId: Output<String>

Cost analysis viewId used for scheduled action. For example, '/providers/Microsoft.CostManagement/views/swaggerExample'