Scheduled Action Args
Manages an Azure Cost Management Scheduled Action.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.costmanagement.ScheduledAction("example", {
name: "examplescheduledaction",
displayName: "Report Last 6 Months",
viewId: "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService",
emailAddressSender: "platformteam@test.com",
emailSubject: "Cost Management Report",
emailAddresses: ["example@example.com"],
message: "Hi all, take a look at last 6 months spending!",
frequency: "Daily",
startDate: "2023-01-02T00:00:00Z",
endDate: "2023-02-02T00:00:00Z",
});
import pulumi
import pulumi_azure as azure
example = azure.costmanagement.ScheduledAction("example",
name="examplescheduledaction",
display_name="Report Last 6 Months",
view_id="/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService",
email_address_sender="platformteam@test.com",
email_subject="Cost Management Report",
email_addresses=["example@example.com"],
message="Hi all, take a look at last 6 months spending!",
frequency="Daily",
start_date="2023-01-02T00:00:00Z",
end_date="2023-02-02T00:00:00Z")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.CostManagement.ScheduledAction("example", new()
{
Name = "examplescheduledaction",
DisplayName = "Report Last 6 Months",
ViewId = "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService",
EmailAddressSender = "platformteam@test.com",
EmailSubject = "Cost Management Report",
EmailAddresses = new[]
{
"example@example.com",
},
Message = "Hi all, take a look at last 6 months spending!",
Frequency = "Daily",
StartDate = "2023-01-02T00:00:00Z",
EndDate = "2023-02-02T00:00:00Z",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/costmanagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewScheduledAction(ctx, "example", &costmanagement.ScheduledActionArgs{
Name: pulumi.String("examplescheduledaction"),
DisplayName: pulumi.String("Report Last 6 Months"),
ViewId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService"),
EmailAddressSender: pulumi.String("platformteam@test.com"),
EmailSubject: pulumi.String("Cost Management Report"),
EmailAddresses: pulumi.StringArray{
pulumi.String("example@example.com"),
},
Message: pulumi.String("Hi all, take a look at last 6 months spending!"),
Frequency: pulumi.String("Daily"),
StartDate: pulumi.String("2023-01-02T00:00:00Z"),
EndDate: pulumi.String("2023-02-02T00:00:00Z"),
})
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.azure.costmanagement.ScheduledAction;
import com.pulumi.azure.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 example = new ScheduledAction("example", ScheduledActionArgs.builder()
.name("examplescheduledaction")
.displayName("Report Last 6 Months")
.viewId("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService")
.emailAddressSender("platformteam@test.com")
.emailSubject("Cost Management Report")
.emailAddresses("example@example.com")
.message("Hi all, take a look at last 6 months spending!")
.frequency("Daily")
.startDate("2023-01-02T00:00:00Z")
.endDate("2023-02-02T00:00:00Z")
.build());
}
}
resources:
example:
type: azure:costmanagement:ScheduledAction
properties:
name: examplescheduledaction
displayName: Report Last 6 Months
viewId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService
emailAddressSender: platformteam@test.com
emailSubject: Cost Management Report
emailAddresses:
- example@example.com
message: Hi all, take a look at last 6 months spending!
frequency: Daily
startDate: 2023-01-02T00:00:00Z
endDate: 2023-02-02T00:00:00Z
Import
Azure Cost Management Scheduled Actions can be imported using the resource id
, e.g.
$ pulumi import azure:costmanagement/scheduledAction:ScheduledAction example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/scheduledaction1
Constructors
Properties
UTC day on which cost analysis data will be emailed. Must be between 1
and 31
. This property is applicable when frequency
is Monthly
.
Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is Weekly
or Monthly
. Possible values are Friday
, Monday
, Saturday
, Sunday
, Thursday
, Tuesday
and Wednesday
.
User visible input name of the Cost Management Scheduled Action.
Specifies a list of email addresses that will receive the Scheduled Action.
Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails.
Subject of the email. Length is limited to 70 characters.
Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when frequency
is Monthly
and used in combination with days_of_week
. Possible values are First
, Fourth
, Last
, Second
and Third
.