grafana.machineLearning.Holiday
Explore with Pulumi AI
A holiday describes time periods where a time series is expected to behave differently to normal.
To use a holiday in a job, use its id in the holidays
attribute of a grafana.machineLearning.Job
:
Create Holiday Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Holiday(name: string, args?: HolidayArgs, opts?: CustomResourceOptions);
@overload
def Holiday(resource_name: str,
args: Optional[HolidayArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Holiday(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_periods: Optional[Sequence[_machinelearning.HolidayCustomPeriodArgs]] = None,
description: Optional[str] = None,
ical_timezone: Optional[str] = None,
ical_url: Optional[str] = None,
name: Optional[str] = None)
func NewHoliday(ctx *Context, name string, args *HolidayArgs, opts ...ResourceOption) (*Holiday, error)
public Holiday(string name, HolidayArgs? args = null, CustomResourceOptions? opts = null)
public Holiday(String name, HolidayArgs args)
public Holiday(String name, HolidayArgs args, CustomResourceOptions options)
type: grafana:machineLearning:Holiday
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 HolidayArgs
- 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 HolidayArgs
- 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 HolidayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HolidayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HolidayArgs
- 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 holidayResource = new Grafana.MachineLearning.Holiday("holidayResource", new()
{
CustomPeriods = new[]
{
new Grafana.MachineLearning.Inputs.HolidayCustomPeriodArgs
{
EndTime = "string",
StartTime = "string",
Name = "string",
},
},
Description = "string",
IcalTimezone = "string",
IcalUrl = "string",
Name = "string",
});
example, err := machineLearning.NewHoliday(ctx, "holidayResource", &machineLearning.HolidayArgs{
CustomPeriods: machinelearning.HolidayCustomPeriodArray{
&machinelearning.HolidayCustomPeriodArgs{
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
IcalTimezone: pulumi.String("string"),
IcalUrl: pulumi.String("string"),
Name: pulumi.String("string"),
})
var holidayResource = new Holiday("holidayResource", HolidayArgs.builder()
.customPeriods(HolidayCustomPeriodArgs.builder()
.endTime("string")
.startTime("string")
.name("string")
.build())
.description("string")
.icalTimezone("string")
.icalUrl("string")
.name("string")
.build());
holiday_resource = grafana.machine_learning.Holiday("holidayResource",
custom_periods=[{
"end_time": "string",
"start_time": "string",
"name": "string",
}],
description="string",
ical_timezone="string",
ical_url="string",
name="string")
const holidayResource = new grafana.machinelearning.Holiday("holidayResource", {
customPeriods: [{
endTime: "string",
startTime: "string",
name: "string",
}],
description: "string",
icalTimezone: "string",
icalUrl: "string",
name: "string",
});
type: grafana:machineLearning:Holiday
properties:
customPeriods:
- endTime: string
name: string
startTime: string
description: string
icalTimezone: string
icalUrl: string
name: string
Holiday 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 Holiday resource accepts the following input properties:
- Custom
Periods List<Pulumiverse.Grafana. Machine Learning. Inputs. Holiday Custom Period> - A list of custom periods for the holiday.
- Description string
- A description of the holiday.
- Ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- Ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- Name string
- The name of the holiday.
- Custom
Periods []HolidayCustom Period Args - A list of custom periods for the holiday.
- Description string
- A description of the holiday.
- Ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- Ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- Name string
- The name of the holiday.
- custom
Periods List<HolidayCustom Period> - A list of custom periods for the holiday.
- description String
- A description of the holiday.
- ical
Timezone String - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url String - A URL to an iCal file containing all occurrences of the holiday.
- name String
- The name of the holiday.
- custom
Periods HolidayCustom Period[] - A list of custom periods for the holiday.
- description string
- A description of the holiday.
- ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- name string
- The name of the holiday.
- custom_
periods Sequence[machinelearning.Holiday Custom Period Args] - A list of custom periods for the holiday.
- description str
- A description of the holiday.
- ical_
timezone str - The timezone to use for events in the iCal file pointed to by ical_url.
- ical_
url str - A URL to an iCal file containing all occurrences of the holiday.
- name str
- The name of the holiday.
- custom
Periods List<Property Map> - A list of custom periods for the holiday.
- description String
- A description of the holiday.
- ical
Timezone String - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url String - A URL to an iCal file containing all occurrences of the holiday.
- name String
- The name of the holiday.
Outputs
All input properties are implicitly available as output properties. Additionally, the Holiday resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Holiday Resource
Get an existing Holiday 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?: HolidayState, opts?: CustomResourceOptions): Holiday
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
custom_periods: Optional[Sequence[_machinelearning.HolidayCustomPeriodArgs]] = None,
description: Optional[str] = None,
ical_timezone: Optional[str] = None,
ical_url: Optional[str] = None,
name: Optional[str] = None) -> Holiday
func GetHoliday(ctx *Context, name string, id IDInput, state *HolidayState, opts ...ResourceOption) (*Holiday, error)
public static Holiday Get(string name, Input<string> id, HolidayState? state, CustomResourceOptions? opts = null)
public static Holiday get(String name, Output<String> id, HolidayState 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.
- Custom
Periods List<Pulumiverse.Grafana. Machine Learning. Inputs. Holiday Custom Period> - A list of custom periods for the holiday.
- Description string
- A description of the holiday.
- Ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- Ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- Name string
- The name of the holiday.
- Custom
Periods []HolidayCustom Period Args - A list of custom periods for the holiday.
- Description string
- A description of the holiday.
- Ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- Ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- Name string
- The name of the holiday.
- custom
Periods List<HolidayCustom Period> - A list of custom periods for the holiday.
- description String
- A description of the holiday.
- ical
Timezone String - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url String - A URL to an iCal file containing all occurrences of the holiday.
- name String
- The name of the holiday.
- custom
Periods HolidayCustom Period[] - A list of custom periods for the holiday.
- description string
- A description of the holiday.
- ical
Timezone string - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url string - A URL to an iCal file containing all occurrences of the holiday.
- name string
- The name of the holiday.
- custom_
periods Sequence[machinelearning.Holiday Custom Period Args] - A list of custom periods for the holiday.
- description str
- A description of the holiday.
- ical_
timezone str - The timezone to use for events in the iCal file pointed to by ical_url.
- ical_
url str - A URL to an iCal file containing all occurrences of the holiday.
- name str
- The name of the holiday.
- custom
Periods List<Property Map> - A list of custom periods for the holiday.
- description String
- A description of the holiday.
- ical
Timezone String - The timezone to use for events in the iCal file pointed to by ical_url.
- ical
Url String - A URL to an iCal file containing all occurrences of the holiday.
- name String
- The name of the holiday.
Supporting Types
HolidayCustomPeriod, HolidayCustomPeriodArgs
- end_
time str - start_
time str - name str
- The name of the custom period.
Import
$ pulumi import grafana:machineLearning/holiday:Holiday name "{{ id }}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.