1. Packages
  2. Harness Provider
  3. API Docs
  4. autostopping
  5. Schedule
Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi

harness.autostopping.Schedule

Explore with Pulumi AI

Resource for creating a fixed schedule for Harness AutoStopping rule

Create Schedule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Schedule(name: string, args: ScheduleArgs, opts?: CustomResourceOptions);
@overload
def Schedule(resource_name: str,
             args: ScheduleArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Schedule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             rules: Optional[Sequence[float]] = None,
             schedule_type: Optional[str] = None,
             time_zone: Optional[str] = None,
             ending_on: Optional[str] = None,
             name: Optional[str] = None,
             repeats: Optional[Sequence[ScheduleRepeatArgs]] = None,
             starting_from: Optional[str] = None)
func NewSchedule(ctx *Context, name string, args ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
public Schedule(string name, ScheduleArgs args, CustomResourceOptions? opts = null)
public Schedule(String name, ScheduleArgs args)
public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
type: harness:autostopping:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scheduleResource = new Harness.Autostopping.Schedule("scheduleResource", new()
{
    Rules = new[]
    {
        0,
    },
    ScheduleType = "string",
    TimeZone = "string",
    EndingOn = "string",
    Name = "string",
    Repeats = new[]
    {
        new Harness.Autostopping.Inputs.ScheduleRepeatArgs
        {
            Days = new[]
            {
                "string",
            },
            EndTime = "string",
            StartTime = "string",
        },
    },
    StartingFrom = "string",
});
Copy
example, err := autostopping.NewSchedule(ctx, "scheduleResource", &autostopping.ScheduleArgs{
	Rules: pulumi.Float64Array{
		pulumi.Float64(0),
	},
	ScheduleType: pulumi.String("string"),
	TimeZone:     pulumi.String("string"),
	EndingOn:     pulumi.String("string"),
	Name:         pulumi.String("string"),
	Repeats: autostopping.ScheduleRepeatArray{
		&autostopping.ScheduleRepeatArgs{
			Days: pulumi.StringArray{
				pulumi.String("string"),
			},
			EndTime:   pulumi.String("string"),
			StartTime: pulumi.String("string"),
		},
	},
	StartingFrom: pulumi.String("string"),
})
Copy
var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
    .rules(0)
    .scheduleType("string")
    .timeZone("string")
    .endingOn("string")
    .name("string")
    .repeats(ScheduleRepeatArgs.builder()
        .days("string")
        .endTime("string")
        .startTime("string")
        .build())
    .startingFrom("string")
    .build());
Copy
schedule_resource = harness.autostopping.Schedule("scheduleResource",
    rules=[0],
    schedule_type="string",
    time_zone="string",
    ending_on="string",
    name="string",
    repeats=[{
        "days": ["string"],
        "end_time": "string",
        "start_time": "string",
    }],
    starting_from="string")
Copy
const scheduleResource = new harness.autostopping.Schedule("scheduleResource", {
    rules: [0],
    scheduleType: "string",
    timeZone: "string",
    endingOn: "string",
    name: "string",
    repeats: [{
        days: ["string"],
        endTime: "string",
        startTime: "string",
    }],
    startingFrom: "string",
});
Copy
type: harness:autostopping:Schedule
properties:
    endingOn: string
    name: string
    repeats:
        - days:
            - string
          endTime: string
          startTime: string
    rules:
        - 0
    scheduleType: string
    startingFrom: string
    timeZone: string
Copy

Schedule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Schedule resource accepts the following input properties:

Rules This property is required. List<double>
ID of AutoStopping rules on which the schedule applies
ScheduleType This property is required. string
Type of the schedule. Valid values are uptime and downtime
TimeZone This property is required. string
Time zone in which schedule needs to be executed
EndingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
Name string
Name of the schedule
Repeats List<ScheduleRepeat>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
StartingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
Rules This property is required. []float64
ID of AutoStopping rules on which the schedule applies
ScheduleType This property is required. string
Type of the schedule. Valid values are uptime and downtime
TimeZone This property is required. string
Time zone in which schedule needs to be executed
EndingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
Name string
Name of the schedule
Repeats []ScheduleRepeatArgs
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
StartingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
rules This property is required. List<Double>
ID of AutoStopping rules on which the schedule applies
scheduleType This property is required. String
Type of the schedule. Valid values are uptime and downtime
timeZone This property is required. String
Time zone in which schedule needs to be executed
endingOn String
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
name String
Name of the schedule
repeats List<ScheduleRepeat>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
startingFrom String
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
rules This property is required. number[]
ID of AutoStopping rules on which the schedule applies
scheduleType This property is required. string
Type of the schedule. Valid values are uptime and downtime
timeZone This property is required. string
Time zone in which schedule needs to be executed
endingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
name string
Name of the schedule
repeats ScheduleRepeat[]
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
startingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
rules This property is required. Sequence[float]
ID of AutoStopping rules on which the schedule applies
schedule_type This property is required. str
Type of the schedule. Valid values are uptime and downtime
time_zone This property is required. str
Time zone in which schedule needs to be executed
ending_on str
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
name str
Name of the schedule
repeats Sequence[ScheduleRepeatArgs]
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
starting_from str
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
rules This property is required. List<Number>
ID of AutoStopping rules on which the schedule applies
scheduleType This property is required. String
Type of the schedule. Valid values are uptime and downtime
timeZone This property is required. String
Time zone in which schedule needs to be executed
endingOn String
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
name String
Name of the schedule
repeats List<Property Map>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
startingFrom String
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05

Outputs

All input properties are implicitly available as output properties. Additionally, the Schedule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Identifier double
Unique identifier of the schedule
Id string
The provider-assigned unique ID for this managed resource.
Identifier float64
Unique identifier of the schedule
id String
The provider-assigned unique ID for this managed resource.
identifier Double
Unique identifier of the schedule
id string
The provider-assigned unique ID for this managed resource.
identifier number
Unique identifier of the schedule
id str
The provider-assigned unique ID for this managed resource.
identifier float
Unique identifier of the schedule
id String
The provider-assigned unique ID for this managed resource.
identifier Number
Unique identifier of the schedule

Look up Existing Schedule Resource

Get an existing Schedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ScheduleState, opts?: CustomResourceOptions): Schedule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ending_on: Optional[str] = None,
        identifier: Optional[float] = None,
        name: Optional[str] = None,
        repeats: Optional[Sequence[ScheduleRepeatArgs]] = None,
        rules: Optional[Sequence[float]] = None,
        schedule_type: Optional[str] = None,
        starting_from: Optional[str] = None,
        time_zone: Optional[str] = None) -> Schedule
func GetSchedule(ctx *Context, name string, id IDInput, state *ScheduleState, opts ...ResourceOption) (*Schedule, error)
public static Schedule Get(string name, Input<string> id, ScheduleState? state, CustomResourceOptions? opts = null)
public static Schedule get(String name, Output<String> id, ScheduleState state, CustomResourceOptions options)
resources:  _:    type: harness:autostopping:Schedule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
EndingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
Identifier double
Unique identifier of the schedule
Name string
Name of the schedule
Repeats List<ScheduleRepeat>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
Rules List<double>
ID of AutoStopping rules on which the schedule applies
ScheduleType string
Type of the schedule. Valid values are uptime and downtime
StartingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
TimeZone string
Time zone in which schedule needs to be executed
EndingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
Identifier float64
Unique identifier of the schedule
Name string
Name of the schedule
Repeats []ScheduleRepeatArgs
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
Rules []float64
ID of AutoStopping rules on which the schedule applies
ScheduleType string
Type of the schedule. Valid values are uptime and downtime
StartingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
TimeZone string
Time zone in which schedule needs to be executed
endingOn String
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
identifier Double
Unique identifier of the schedule
name String
Name of the schedule
repeats List<ScheduleRepeat>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
rules List<Double>
ID of AutoStopping rules on which the schedule applies
scheduleType String
Type of the schedule. Valid values are uptime and downtime
startingFrom String
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
timeZone String
Time zone in which schedule needs to be executed
endingOn string
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
identifier number
Unique identifier of the schedule
name string
Name of the schedule
repeats ScheduleRepeat[]
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
rules number[]
ID of AutoStopping rules on which the schedule applies
scheduleType string
Type of the schedule. Valid values are uptime and downtime
startingFrom string
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
timeZone string
Time zone in which schedule needs to be executed
ending_on str
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
identifier float
Unique identifier of the schedule
name str
Name of the schedule
repeats Sequence[ScheduleRepeatArgs]
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
rules Sequence[float]
ID of AutoStopping rules on which the schedule applies
schedule_type str
Type of the schedule. Valid values are uptime and downtime
starting_from str
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
time_zone str
Time zone in which schedule needs to be executed
endingOn String
Time until which schedule will be active. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
identifier Number
Unique identifier of the schedule
name String
Name of the schedule
repeats List<Property Map>
For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
rules List<Number>
ID of AutoStopping rules on which the schedule applies
scheduleType String
Type of the schedule. Valid values are uptime and downtime
startingFrom String
Time from which schedule will be active. Schedule will take immediate effect if starting_from is not specified. Need to be in YYYY-MM-DD HH:mm:SS format. Eg 2006-01-02 15:04:05
timeZone String
Time zone in which schedule needs to be executed

Supporting Types

ScheduleRepeat
, ScheduleRepeatArgs

Days This property is required. List<string>
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
EndTime string
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
StartTime string
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm
Days This property is required. []string
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
EndTime string
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
StartTime string
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm
days This property is required. List<String>
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
endTime String
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
startTime String
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm
days This property is required. string[]
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
endTime string
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
startTime string
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm
days This property is required. Sequence[str]
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
end_time str
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
start_time str
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm
days This property is required. List<String>
List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
endTime String
Ending time of schedule action on the day. Defaults to 24:00Hrs unless specified. Accepted format is HH:MM. Eg : 20:00 for 8pm
startTime String
Starting time of schedule action on the day. Defaults to 00:00Hrs unless specified. Accepted format is HH:MM. Eg : 13:15 for 01:15pm

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.