ScheduledActionByScopeArgs

data class ScheduledActionByScopeArgs(val displayName: Output<String>? = null, val fileDestination: Output<FileDestinationArgs>? = null, val kind: Output<Either<String, ScheduledActionKind>>? = null, val name: Output<String>? = null, val notification: Output<NotificationPropertiesArgs>? = null, val schedule: Output<SchedulePropertiesArgs>? = null, val scope: Output<String>? = null, val status: Output<Either<String, ScheduledActionStatus>>? = null, val viewId: Output<String>? = null) : ConvertibleToJava<ScheduledActionByScopeArgs>

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

Example Usage

CreateOrUpdateScheduledActionByScope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scheduledActionByScope = new AzureNative.CostManagement.ScheduledActionByScope("scheduledActionByScope", new()
{
DisplayName = "Monthly Cost By Resource",
FileDestination = new AzureNative.CostManagement.Inputs.FileDestinationArgs
{
FileFormats = new[]
{
"Csv",
},
},
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",
},
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
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.NewScheduledActionByScope(ctx, "scheduledActionByScope", &costmanagement.ScheduledActionByScopeArgs{
DisplayName: pulumi.String("Monthly Cost By Resource"),
FileDestination: &costmanagement.FileDestinationArgs{
FileFormats: pulumi.StringArray{
pulumi.String("Csv"),
},
},
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"),
},
},
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
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.ScheduledActionByScope;
import com.pulumi.azurenative.costmanagement.ScheduledActionByScopeArgs;
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 scheduledActionByScope = new ScheduledActionByScope("scheduledActionByScope", ScheduledActionByScopeArgs.builder()
.displayName("Monthly Cost By Resource")
.fileDestination(Map.of("fileFormats", "Csv"))
.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")
))
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.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:ScheduledActionByScope monthlyCostByResource subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource

Constructors

Link copied to clipboard
constructor(displayName: Output<String>? = null, fileDestination: Output<FileDestinationArgs>? = null, kind: Output<Either<String, ScheduledActionKind>>? = null, name: Output<String>? = null, notification: Output<NotificationPropertiesArgs>? = null, schedule: Output<SchedulePropertiesArgs>? = null, scope: Output<String>? = null, status: Output<Either<String, ScheduledActionStatus>>? = null, viewId: Output<String>? = null)

Properties

Link copied to clipboard
val displayName: Output<String>? = null

Scheduled action name.

Link copied to clipboard

Destination format of the view data.

Link copied to clipboard
val kind: Output<Either<String, ScheduledActionKind>>? = null

Kind of the scheduled action.

Link copied to clipboard
val name: Output<String>? = null

Scheduled action name.

Link copied to clipboard

Notification properties based on scheduled action kind.

Link copied to clipboard
val schedule: Output<SchedulePropertiesArgs>? = null

Schedule of the scheduled action.

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

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<Either<String, ScheduledActionStatus>>? = null

Status of the scheduled action.

Link copied to clipboard
val viewId: Output<String>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): ScheduledActionByScopeArgs