Start Stop Managed Instance Schedule Args
data class StartStopManagedInstanceScheduleArgs(val description: Output<String>? = null, val managedInstanceName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scheduleList: Output<List<ScheduleItemArgs>>? = null, val startStopScheduleName: Output<String>? = null, val timeZoneId: Output<String>? = null) : ConvertibleToJava<StartStopManagedInstanceScheduleArgs>
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
The description of the schedule.
Link copied to clipboard
The name of the managed instance.
Link copied to clipboard
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
Link copied to clipboard
Schedule list.
Link copied to clipboard
Name of the managed instance Start/Stop schedule.
Link copied to clipboard
The time zone of the schedule.