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 string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
type: harness:autostopping:Schedule
properties:
endingOn: string
name: string
repeats:
- days:
- string
endTime: string
startTime: string
rules:
- 0
scheduleType: string
startingFrom: string
timeZone: string
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 List<double>
- ID of AutoStopping rules on which the schedule applies
- Schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- Time
Zone string - Time zone in which schedule needs to be executed
- Ending
On 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<Schedule
Repeat> - For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
- Starting
From 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 []float64
- ID of AutoStopping rules on which the schedule applies
- Schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- Time
Zone string - Time zone in which schedule needs to be executed
- Ending
On 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
[]Schedule
Repeat Args - For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
- Starting
From 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 List<Double>
- ID of AutoStopping rules on which the schedule applies
- schedule
Type String - Type of the schedule. Valid values are
uptime
anddowntime
- time
Zone String - Time zone in which schedule needs to be executed
- ending
On 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<Schedule
Repeat> - For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
- starting
From 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 number[]
- ID of AutoStopping rules on which the schedule applies
- schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- time
Zone string - Time zone in which schedule needs to be executed
- ending
On 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
Schedule
Repeat[] - For defining periodic schedule. Periodic nature will be applicable from the time of creation of schedule, unless specific 'time_period' is specified
- starting
From 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 Sequence[float]
- ID of AutoStopping rules on which the schedule applies
- schedule_
type str - Type of the schedule. Valid values are
uptime
anddowntime
- time_
zone 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[Schedule
Repeat Args] - 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 List<Number>
- ID of AutoStopping rules on which the schedule applies
- schedule
Type String - Type of the schedule. Valid values are
uptime
anddowntime
- time
Zone String - Time zone in which schedule needs to be executed
- ending
On 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
- starting
From 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Ending
On 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<Schedule
Repeat> - 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
- Schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- Starting
From 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
- Time
Zone string - Time zone in which schedule needs to be executed
- Ending
On 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
[]Schedule
Repeat Args - 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
- Schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- Starting
From 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
- Time
Zone string - Time zone in which schedule needs to be executed
- ending
On 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<Schedule
Repeat> - 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
- schedule
Type String - Type of the schedule. Valid values are
uptime
anddowntime
- starting
From 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
- time
Zone String - Time zone in which schedule needs to be executed
- ending
On 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
Schedule
Repeat[] - 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
- schedule
Type string - Type of the schedule. Valid values are
uptime
anddowntime
- starting
From 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
- time
Zone 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[Schedule
Repeat Args] - 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
anddowntime
- 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
- ending
On 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
- schedule
Type String - Type of the schedule. Valid values are
uptime
anddowntime
- starting
From 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
- time
Zone String - Time zone in which schedule needs to be executed
Supporting Types
ScheduleRepeat, ScheduleRepeatArgs
- Days List<string>
- List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
- End
Time 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
- Start
Time 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 []string
- List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
- End
Time 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
- Start
Time 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 List<String>
- List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
- end
Time 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
- start
Time 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 string[]
- List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
- end
Time 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
- start
Time 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 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 List<String>
- List of days on which schedule need to be active. Valid values are SUN, MON, TUE, WED, THU, FRI and SAT.
- end
Time 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
- start
Time 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.