StartStopManagedInstanceSchedule

class StartStopManagedInstanceSchedule : KotlinCustomResource

Managed instance's Start/Stop schedule. Uses Azure REST API version 2022-11-01-preview. Other available API versions: 2023-02-01-preview, 2023-05-01-preview, 2023-08-01, 2023-08-01-preview, 2024-05-01-preview.

Example Usage

Creates or updates the managed instance's Start/Stop schedule with all optional parameters specified.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var startStopManagedInstanceSchedule = new AzureNative.Sql.StartStopManagedInstanceSchedule("startStopManagedInstanceSchedule", new()
{
Description = "This is a schedule for our Dev/Test environment.",
ManagedInstanceName = "schedulemi",
ResourceGroupName = "schedulerg",
ScheduleList = new[]
{
new AzureNative.Sql.Inputs.ScheduleItemArgs
{
StartDay = AzureNative.Sql.DayOfWeek.Thursday,
StartTime = "18:00",
StopDay = AzureNative.Sql.DayOfWeek.Thursday,
StopTime = "17:00",
},
new AzureNative.Sql.Inputs.ScheduleItemArgs
{
StartDay = AzureNative.Sql.DayOfWeek.Thursday,
StartTime = "15:00",
StopDay = AzureNative.Sql.DayOfWeek.Thursday,
StopTime = "14:00",
},
},
StartStopScheduleName = "default",
TimeZoneId = "Central European Standard Time",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewStartStopManagedInstanceSchedule(ctx, "startStopManagedInstanceSchedule", &sql.StartStopManagedInstanceScheduleArgs{
Description: pulumi.String("This is a schedule for our Dev/Test environment."),
ManagedInstanceName: pulumi.String("schedulemi"),
ResourceGroupName: pulumi.String("schedulerg"),
ScheduleList: sql.ScheduleItemArray{
&sql.ScheduleItemArgs{
StartDay: pulumi.String(sql.DayOfWeekThursday),
StartTime: pulumi.String("18:00"),
StopDay: pulumi.String(sql.DayOfWeekThursday),
StopTime: pulumi.String("17:00"),
},
&sql.ScheduleItemArgs{
StartDay: pulumi.String(sql.DayOfWeekThursday),
StartTime: pulumi.String("15:00"),
StopDay: pulumi.String(sql.DayOfWeekThursday),
StopTime: pulumi.String("14:00"),
},
},
StartStopScheduleName: pulumi.String("default"),
TimeZoneId: pulumi.String("Central European Standard Time"),
})
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.sql.StartStopManagedInstanceSchedule;
import com.pulumi.azurenative.sql.StartStopManagedInstanceScheduleArgs;
import com.pulumi.azurenative.sql.inputs.ScheduleItemArgs;
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 startStopManagedInstanceSchedule = new StartStopManagedInstanceSchedule("startStopManagedInstanceSchedule", StartStopManagedInstanceScheduleArgs.builder()
.description("This is a schedule for our Dev/Test environment.")
.managedInstanceName("schedulemi")
.resourceGroupName("schedulerg")
.scheduleList(
ScheduleItemArgs.builder()
.startDay("Thursday")
.startTime("18:00")
.stopDay("Thursday")
.stopTime("17:00")
.build(),
ScheduleItemArgs.builder()
.startDay("Thursday")
.startTime("15:00")
.stopDay("Thursday")
.stopTime("14:00")
.build())
.startStopScheduleName("default")
.timeZoneId("Central European Standard Time")
.build());
}
}

Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var startStopManagedInstanceSchedule = new AzureNative.Sql.StartStopManagedInstanceSchedule("startStopManagedInstanceSchedule", new()
{
ManagedInstanceName = "schedulemi",
ResourceGroupName = "schedulerg",
ScheduleList = new[]
{
new AzureNative.Sql.Inputs.ScheduleItemArgs
{
StartDay = AzureNative.Sql.DayOfWeek.Thursday,
StartTime = "18:00",
StopDay = AzureNative.Sql.DayOfWeek.Thursday,
StopTime = "17:00",
},
new AzureNative.Sql.Inputs.ScheduleItemArgs
{
StartDay = AzureNative.Sql.DayOfWeek.Thursday,
StartTime = "15:00",
StopDay = AzureNative.Sql.DayOfWeek.Thursday,
StopTime = "14:00",
},
},
StartStopScheduleName = "default",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewStartStopManagedInstanceSchedule(ctx, "startStopManagedInstanceSchedule", &sql.StartStopManagedInstanceScheduleArgs{
ManagedInstanceName: pulumi.String("schedulemi"),
ResourceGroupName: pulumi.String("schedulerg"),
ScheduleList: sql.ScheduleItemArray{
&sql.ScheduleItemArgs{
StartDay: pulumi.String(sql.DayOfWeekThursday),
StartTime: pulumi.String("18:00"),
StopDay: pulumi.String(sql.DayOfWeekThursday),
StopTime: pulumi.String("17:00"),
},
&sql.ScheduleItemArgs{
StartDay: pulumi.String(sql.DayOfWeekThursday),
StartTime: pulumi.String("15:00"),
StopDay: pulumi.String(sql.DayOfWeekThursday),
StopTime: pulumi.String("14:00"),
},
},
StartStopScheduleName: pulumi.String("default"),
})
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.sql.StartStopManagedInstanceSchedule;
import com.pulumi.azurenative.sql.StartStopManagedInstanceScheduleArgs;
import com.pulumi.azurenative.sql.inputs.ScheduleItemArgs;
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 startStopManagedInstanceSchedule = new StartStopManagedInstanceSchedule("startStopManagedInstanceSchedule", StartStopManagedInstanceScheduleArgs.builder()
.managedInstanceName("schedulemi")
.resourceGroupName("schedulerg")
.scheduleList(
ScheduleItemArgs.builder()
.startDay("Thursday")
.startTime("18:00")
.stopDay("Thursday")
.stopTime("17:00")
.build(),
ScheduleItemArgs.builder()
.startDay("Thursday")
.startTime("15:00")
.stopDay("Thursday")
.stopTime("14:00")
.build())
.startStopScheduleName("default")
.build());
}
}

Import

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

$ pulumi import azure-native:sql:StartStopManagedInstanceSchedule default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}

Properties

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

The description of the schedule.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

Timestamp when the next action will be executed in the corresponding schedule time zone.

Link copied to clipboard
val nextRunAction: Output<String>

Next action to be executed (Start or Stop)

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

Schedule list.

Link copied to clipboard

System data of the scheduled resource.

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

The time zone of the schedule.

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>