castai.HibernationSchedule
Explore with Pulumi AI
CAST AI hibernation schedule resource to manage hibernation schedules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as castai from "@pulumi/castai";
const mySchedule = new castai.HibernationSchedule("mySchedule", {
clusterAssignments: {
assignments: [{
clusterId: "38a49ce8-e900-4a10-be89-48fb2efb1025",
}],
},
enabled: false,
pauseConfig: {
enabled: true,
schedule: {
cronExpression: "0 17 * * 1-5",
},
},
resumeConfig: {
enabled: true,
jobConfig: {
nodeConfig: {
instanceType: "e2-standard-4",
},
},
schedule: {
cronExpression: "0 9 * * 1-5",
},
},
});
import pulumi
import pulumi_castai as castai
my_schedule = castai.HibernationSchedule("mySchedule",
cluster_assignments={
"assignments": [{
"cluster_id": "38a49ce8-e900-4a10-be89-48fb2efb1025",
}],
},
enabled=False,
pause_config={
"enabled": True,
"schedule": {
"cron_expression": "0 17 * * 1-5",
},
},
resume_config={
"enabled": True,
"job_config": {
"node_config": {
"instance_type": "e2-standard-4",
},
},
"schedule": {
"cron_expression": "0 9 * * 1-5",
},
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/castai/v7/castai"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := castai.NewHibernationSchedule(ctx, "mySchedule", &castai.HibernationScheduleArgs{
ClusterAssignments: &castai.HibernationScheduleClusterAssignmentsArgs{
Assignments: castai.HibernationScheduleClusterAssignmentsAssignmentArray{
&castai.HibernationScheduleClusterAssignmentsAssignmentArgs{
ClusterId: pulumi.String("38a49ce8-e900-4a10-be89-48fb2efb1025"),
},
},
},
Enabled: pulumi.Bool(false),
PauseConfig: &castai.HibernationSchedulePauseConfigArgs{
Enabled: pulumi.Bool(true),
Schedule: &castai.HibernationSchedulePauseConfigScheduleArgs{
CronExpression: pulumi.String("0 17 * * 1-5"),
},
},
ResumeConfig: &castai.HibernationScheduleResumeConfigArgs{
Enabled: pulumi.Bool(true),
JobConfig: &castai.HibernationScheduleResumeConfigJobConfigArgs{
NodeConfig: &castai.HibernationScheduleResumeConfigJobConfigNodeConfigArgs{
InstanceType: pulumi.String("e2-standard-4"),
},
},
Schedule: &castai.HibernationScheduleResumeConfigScheduleArgs{
CronExpression: pulumi.String("0 9 * * 1-5"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Castai = Pulumi.Castai;
return await Deployment.RunAsync(() =>
{
var mySchedule = new Castai.HibernationSchedule("mySchedule", new()
{
ClusterAssignments = new Castai.Inputs.HibernationScheduleClusterAssignmentsArgs
{
Assignments = new[]
{
new Castai.Inputs.HibernationScheduleClusterAssignmentsAssignmentArgs
{
ClusterId = "38a49ce8-e900-4a10-be89-48fb2efb1025",
},
},
},
Enabled = false,
PauseConfig = new Castai.Inputs.HibernationSchedulePauseConfigArgs
{
Enabled = true,
Schedule = new Castai.Inputs.HibernationSchedulePauseConfigScheduleArgs
{
CronExpression = "0 17 * * 1-5",
},
},
ResumeConfig = new Castai.Inputs.HibernationScheduleResumeConfigArgs
{
Enabled = true,
JobConfig = new Castai.Inputs.HibernationScheduleResumeConfigJobConfigArgs
{
NodeConfig = new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigArgs
{
InstanceType = "e2-standard-4",
},
},
Schedule = new Castai.Inputs.HibernationScheduleResumeConfigScheduleArgs
{
CronExpression = "0 9 * * 1-5",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.castai.HibernationSchedule;
import com.pulumi.castai.HibernationScheduleArgs;
import com.pulumi.castai.inputs.HibernationScheduleClusterAssignmentsArgs;
import com.pulumi.castai.inputs.HibernationSchedulePauseConfigArgs;
import com.pulumi.castai.inputs.HibernationSchedulePauseConfigScheduleArgs;
import com.pulumi.castai.inputs.HibernationScheduleResumeConfigArgs;
import com.pulumi.castai.inputs.HibernationScheduleResumeConfigJobConfigArgs;
import com.pulumi.castai.inputs.HibernationScheduleResumeConfigJobConfigNodeConfigArgs;
import com.pulumi.castai.inputs.HibernationScheduleResumeConfigScheduleArgs;
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 mySchedule = new HibernationSchedule("mySchedule", HibernationScheduleArgs.builder()
.clusterAssignments(HibernationScheduleClusterAssignmentsArgs.builder()
.assignments(HibernationScheduleClusterAssignmentsAssignmentArgs.builder()
.clusterId("38a49ce8-e900-4a10-be89-48fb2efb1025")
.build())
.build())
.enabled(false)
.pauseConfig(HibernationSchedulePauseConfigArgs.builder()
.enabled(true)
.schedule(HibernationSchedulePauseConfigScheduleArgs.builder()
.cronExpression("0 17 * * 1-5")
.build())
.build())
.resumeConfig(HibernationScheduleResumeConfigArgs.builder()
.enabled(true)
.jobConfig(HibernationScheduleResumeConfigJobConfigArgs.builder()
.nodeConfig(HibernationScheduleResumeConfigJobConfigNodeConfigArgs.builder()
.instanceType("e2-standard-4")
.build())
.build())
.schedule(HibernationScheduleResumeConfigScheduleArgs.builder()
.cronExpression("0 9 * * 1-5")
.build())
.build())
.build());
}
}
resources:
mySchedule:
type: castai:HibernationSchedule
properties:
clusterAssignments:
assignments:
- clusterId: 38a49ce8-e900-4a10-be89-48fb2efb1025
enabled: false
pauseConfig:
enabled: true
schedule:
cronExpression: 0 17 * * 1-5
resumeConfig:
enabled: true
jobConfig:
nodeConfig:
instanceType: e2-standard-4
schedule:
cronExpression: 0 9 * * 1-5
Create HibernationSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HibernationSchedule(name: string, args: HibernationScheduleArgs, opts?: CustomResourceOptions);
@overload
def HibernationSchedule(resource_name: str,
args: HibernationScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HibernationSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
pause_config: Optional[HibernationSchedulePauseConfigArgs] = None,
resume_config: Optional[HibernationScheduleResumeConfigArgs] = None,
cluster_assignments: Optional[HibernationScheduleClusterAssignmentsArgs] = None,
hibernation_schedule_id: Optional[str] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
timeouts: Optional[HibernationScheduleTimeoutsArgs] = None)
func NewHibernationSchedule(ctx *Context, name string, args HibernationScheduleArgs, opts ...ResourceOption) (*HibernationSchedule, error)
public HibernationSchedule(string name, HibernationScheduleArgs args, CustomResourceOptions? opts = null)
public HibernationSchedule(String name, HibernationScheduleArgs args)
public HibernationSchedule(String name, HibernationScheduleArgs args, CustomResourceOptions options)
type: castai:HibernationSchedule
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 HibernationScheduleArgs
- 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 HibernationScheduleArgs
- 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 HibernationScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HibernationScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HibernationScheduleArgs
- 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 hibernationScheduleResource = new Castai.HibernationSchedule("hibernationScheduleResource", new()
{
Enabled = false,
PauseConfig = new Castai.Inputs.HibernationSchedulePauseConfigArgs
{
Enabled = false,
Schedule = new Castai.Inputs.HibernationSchedulePauseConfigScheduleArgs
{
CronExpression = "string",
},
},
ResumeConfig = new Castai.Inputs.HibernationScheduleResumeConfigArgs
{
Enabled = false,
JobConfig = new Castai.Inputs.HibernationScheduleResumeConfigJobConfigArgs
{
NodeConfig = new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigArgs
{
InstanceType = "string",
ConfigId = "string",
ConfigName = "string",
GpuConfig = new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigGpuConfigArgs
{
Count = 0,
Type = "string",
},
KubernetesLabels =
{
{ "string", "string" },
},
KubernetesTaints = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaintArgs
{
Key = "string",
Effect = "string",
Value = "string",
},
},
NodeAffinities = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityArgs
{
DedicatedGroup = "string",
Affinities = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinityArgs
{
Key = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
},
},
SpotConfigs = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfigArgs
{
PriceHourly = "string",
Spot = false,
},
},
SubnetId = "string",
Volumes = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeArgs
{
RaidConfigs = new[]
{
new Castai.Inputs.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfigArgs
{
ChunkSizeKb = 0,
},
},
SizeGib = 0,
},
},
Zone = "string",
},
},
Schedule = new Castai.Inputs.HibernationScheduleResumeConfigScheduleArgs
{
CronExpression = "string",
},
},
ClusterAssignments = new Castai.Inputs.HibernationScheduleClusterAssignmentsArgs
{
Assignments = new[]
{
new Castai.Inputs.HibernationScheduleClusterAssignmentsAssignmentArgs
{
ClusterId = "string",
},
},
},
HibernationScheduleId = "string",
Name = "string",
OrganizationId = "string",
Timeouts = new Castai.Inputs.HibernationScheduleTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := castai.NewHibernationSchedule(ctx, "hibernationScheduleResource", &castai.HibernationScheduleArgs{
Enabled: pulumi.Bool(false),
PauseConfig: &castai.HibernationSchedulePauseConfigArgs{
Enabled: pulumi.Bool(false),
Schedule: &castai.HibernationSchedulePauseConfigScheduleArgs{
CronExpression: pulumi.String("string"),
},
},
ResumeConfig: &castai.HibernationScheduleResumeConfigArgs{
Enabled: pulumi.Bool(false),
JobConfig: &castai.HibernationScheduleResumeConfigJobConfigArgs{
NodeConfig: &castai.HibernationScheduleResumeConfigJobConfigNodeConfigArgs{
InstanceType: pulumi.String("string"),
ConfigId: pulumi.String("string"),
ConfigName: pulumi.String("string"),
GpuConfig: &castai.HibernationScheduleResumeConfigJobConfigNodeConfigGpuConfigArgs{
Count: pulumi.Float64(0),
Type: pulumi.String("string"),
},
KubernetesLabels: pulumi.StringMap{
"string": pulumi.String("string"),
},
KubernetesTaints: castai.HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaintArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaintArgs{
Key: pulumi.String("string"),
Effect: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
NodeAffinities: castai.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityArgs{
DedicatedGroup: pulumi.String("string"),
Affinities: castai.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinityArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinityArgs{
Key: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
},
SpotConfigs: castai.HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfigArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfigArgs{
PriceHourly: pulumi.String("string"),
Spot: pulumi.Bool(false),
},
},
SubnetId: pulumi.String("string"),
Volumes: castai.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeArgs{
RaidConfigs: castai.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfigArray{
&castai.HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfigArgs{
ChunkSizeKb: pulumi.Float64(0),
},
},
SizeGib: pulumi.Float64(0),
},
},
Zone: pulumi.String("string"),
},
},
Schedule: &castai.HibernationScheduleResumeConfigScheduleArgs{
CronExpression: pulumi.String("string"),
},
},
ClusterAssignments: &castai.HibernationScheduleClusterAssignmentsArgs{
Assignments: castai.HibernationScheduleClusterAssignmentsAssignmentArray{
&castai.HibernationScheduleClusterAssignmentsAssignmentArgs{
ClusterId: pulumi.String("string"),
},
},
},
HibernationScheduleId: pulumi.String("string"),
Name: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
Timeouts: &castai.HibernationScheduleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var hibernationScheduleResource = new HibernationSchedule("hibernationScheduleResource", HibernationScheduleArgs.builder()
.enabled(false)
.pauseConfig(HibernationSchedulePauseConfigArgs.builder()
.enabled(false)
.schedule(HibernationSchedulePauseConfigScheduleArgs.builder()
.cronExpression("string")
.build())
.build())
.resumeConfig(HibernationScheduleResumeConfigArgs.builder()
.enabled(false)
.jobConfig(HibernationScheduleResumeConfigJobConfigArgs.builder()
.nodeConfig(HibernationScheduleResumeConfigJobConfigNodeConfigArgs.builder()
.instanceType("string")
.configId("string")
.configName("string")
.gpuConfig(HibernationScheduleResumeConfigJobConfigNodeConfigGpuConfigArgs.builder()
.count(0)
.type("string")
.build())
.kubernetesLabels(Map.of("string", "string"))
.kubernetesTaints(HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaintArgs.builder()
.key("string")
.effect("string")
.value("string")
.build())
.nodeAffinities(HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityArgs.builder()
.dedicatedGroup("string")
.affinities(HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinityArgs.builder()
.key("string")
.operator("string")
.values("string")
.build())
.build())
.spotConfigs(HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfigArgs.builder()
.priceHourly("string")
.spot(false)
.build())
.subnetId("string")
.volumes(HibernationScheduleResumeConfigJobConfigNodeConfigVolumeArgs.builder()
.raidConfigs(HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfigArgs.builder()
.chunkSizeKb(0)
.build())
.sizeGib(0)
.build())
.zone("string")
.build())
.build())
.schedule(HibernationScheduleResumeConfigScheduleArgs.builder()
.cronExpression("string")
.build())
.build())
.clusterAssignments(HibernationScheduleClusterAssignmentsArgs.builder()
.assignments(HibernationScheduleClusterAssignmentsAssignmentArgs.builder()
.clusterId("string")
.build())
.build())
.hibernationScheduleId("string")
.name("string")
.organizationId("string")
.timeouts(HibernationScheduleTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
hibernation_schedule_resource = castai.HibernationSchedule("hibernationScheduleResource",
enabled=False,
pause_config={
"enabled": False,
"schedule": {
"cron_expression": "string",
},
},
resume_config={
"enabled": False,
"job_config": {
"node_config": {
"instance_type": "string",
"config_id": "string",
"config_name": "string",
"gpu_config": {
"count": 0,
"type": "string",
},
"kubernetes_labels": {
"string": "string",
},
"kubernetes_taints": [{
"key": "string",
"effect": "string",
"value": "string",
}],
"node_affinities": [{
"dedicated_group": "string",
"affinities": [{
"key": "string",
"operator": "string",
"values": ["string"],
}],
}],
"spot_configs": [{
"price_hourly": "string",
"spot": False,
}],
"subnet_id": "string",
"volumes": [{
"raid_configs": [{
"chunk_size_kb": 0,
}],
"size_gib": 0,
}],
"zone": "string",
},
},
"schedule": {
"cron_expression": "string",
},
},
cluster_assignments={
"assignments": [{
"cluster_id": "string",
}],
},
hibernation_schedule_id="string",
name="string",
organization_id="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const hibernationScheduleResource = new castai.HibernationSchedule("hibernationScheduleResource", {
enabled: false,
pauseConfig: {
enabled: false,
schedule: {
cronExpression: "string",
},
},
resumeConfig: {
enabled: false,
jobConfig: {
nodeConfig: {
instanceType: "string",
configId: "string",
configName: "string",
gpuConfig: {
count: 0,
type: "string",
},
kubernetesLabels: {
string: "string",
},
kubernetesTaints: [{
key: "string",
effect: "string",
value: "string",
}],
nodeAffinities: [{
dedicatedGroup: "string",
affinities: [{
key: "string",
operator: "string",
values: ["string"],
}],
}],
spotConfigs: [{
priceHourly: "string",
spot: false,
}],
subnetId: "string",
volumes: [{
raidConfigs: [{
chunkSizeKb: 0,
}],
sizeGib: 0,
}],
zone: "string",
},
},
schedule: {
cronExpression: "string",
},
},
clusterAssignments: {
assignments: [{
clusterId: "string",
}],
},
hibernationScheduleId: "string",
name: "string",
organizationId: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: castai:HibernationSchedule
properties:
clusterAssignments:
assignments:
- clusterId: string
enabled: false
hibernationScheduleId: string
name: string
organizationId: string
pauseConfig:
enabled: false
schedule:
cronExpression: string
resumeConfig:
enabled: false
jobConfig:
nodeConfig:
configId: string
configName: string
gpuConfig:
count: 0
type: string
instanceType: string
kubernetesLabels:
string: string
kubernetesTaints:
- effect: string
key: string
value: string
nodeAffinities:
- affinities:
- key: string
operator: string
values:
- string
dedicatedGroup: string
spotConfigs:
- priceHourly: string
spot: false
subnetId: string
volumes:
- raidConfigs:
- chunkSizeKb: 0
sizeGib: 0
zone: string
schedule:
cronExpression: string
timeouts:
create: string
delete: string
read: string
update: string
HibernationSchedule 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 HibernationSchedule resource accepts the following input properties:
- Enabled bool
- Enables or disables the schedule.
- Pause
Config HibernationSchedule Pause Config - Resume
Config HibernationSchedule Resume Config - Cluster
Assignments HibernationSchedule Cluster Assignments - Hibernation
Schedule stringId - The ID of this resource.
- Name string
- Name of the schedule.
- Organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- Timeouts
Hibernation
Schedule Timeouts
- Enabled bool
- Enables or disables the schedule.
- Pause
Config HibernationSchedule Pause Config Args - Resume
Config HibernationSchedule Resume Config Args - Cluster
Assignments HibernationSchedule Cluster Assignments Args - Hibernation
Schedule stringId - The ID of this resource.
- Name string
- Name of the schedule.
- Organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- Timeouts
Hibernation
Schedule Timeouts Args
- enabled Boolean
- Enables or disables the schedule.
- pause
Config HibernationSchedule Pause Config - resume
Config HibernationSchedule Resume Config - cluster
Assignments HibernationSchedule Cluster Assignments - hibernation
Schedule StringId - The ID of this resource.
- name String
- Name of the schedule.
- organization
Id String - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- timeouts
Hibernation
Schedule Timeouts
- enabled boolean
- Enables or disables the schedule.
- pause
Config HibernationSchedule Pause Config - resume
Config HibernationSchedule Resume Config - cluster
Assignments HibernationSchedule Cluster Assignments - hibernation
Schedule stringId - The ID of this resource.
- name string
- Name of the schedule.
- organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- timeouts
Hibernation
Schedule Timeouts
- enabled bool
- Enables or disables the schedule.
- pause_
config HibernationSchedule Pause Config Args - resume_
config HibernationSchedule Resume Config Args - cluster_
assignments HibernationSchedule Cluster Assignments Args - hibernation_
schedule_ strid - The ID of this resource.
- name str
- Name of the schedule.
- organization_
id str - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- timeouts
Hibernation
Schedule Timeouts Args
- enabled Boolean
- Enables or disables the schedule.
- pause
Config Property Map - resume
Config Property Map - cluster
Assignments Property Map - hibernation
Schedule StringId - The ID of this resource.
- name String
- Name of the schedule.
- organization
Id String - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the HibernationSchedule 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 HibernationSchedule Resource
Get an existing HibernationSchedule 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?: HibernationScheduleState, opts?: CustomResourceOptions): HibernationSchedule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_assignments: Optional[HibernationScheduleClusterAssignmentsArgs] = None,
enabled: Optional[bool] = None,
hibernation_schedule_id: Optional[str] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
pause_config: Optional[HibernationSchedulePauseConfigArgs] = None,
resume_config: Optional[HibernationScheduleResumeConfigArgs] = None,
timeouts: Optional[HibernationScheduleTimeoutsArgs] = None) -> HibernationSchedule
func GetHibernationSchedule(ctx *Context, name string, id IDInput, state *HibernationScheduleState, opts ...ResourceOption) (*HibernationSchedule, error)
public static HibernationSchedule Get(string name, Input<string> id, HibernationScheduleState? state, CustomResourceOptions? opts = null)
public static HibernationSchedule get(String name, Output<String> id, HibernationScheduleState state, CustomResourceOptions options)
resources: _: type: castai:HibernationSchedule get: id: ${id}
- 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.
- Cluster
Assignments HibernationSchedule Cluster Assignments - Enabled bool
- Enables or disables the schedule.
- Hibernation
Schedule stringId - The ID of this resource.
- Name string
- Name of the schedule.
- Organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- Pause
Config HibernationSchedule Pause Config - Resume
Config HibernationSchedule Resume Config - Timeouts
Hibernation
Schedule Timeouts
- Cluster
Assignments HibernationSchedule Cluster Assignments Args - Enabled bool
- Enables or disables the schedule.
- Hibernation
Schedule stringId - The ID of this resource.
- Name string
- Name of the schedule.
- Organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- Pause
Config HibernationSchedule Pause Config Args - Resume
Config HibernationSchedule Resume Config Args - Timeouts
Hibernation
Schedule Timeouts Args
- cluster
Assignments HibernationSchedule Cluster Assignments - enabled Boolean
- Enables or disables the schedule.
- hibernation
Schedule StringId - The ID of this resource.
- name String
- Name of the schedule.
- organization
Id String - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- pause
Config HibernationSchedule Pause Config - resume
Config HibernationSchedule Resume Config - timeouts
Hibernation
Schedule Timeouts
- cluster
Assignments HibernationSchedule Cluster Assignments - enabled boolean
- Enables or disables the schedule.
- hibernation
Schedule stringId - The ID of this resource.
- name string
- Name of the schedule.
- organization
Id string - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- pause
Config HibernationSchedule Pause Config - resume
Config HibernationSchedule Resume Config - timeouts
Hibernation
Schedule Timeouts
- cluster_
assignments HibernationSchedule Cluster Assignments Args - enabled bool
- Enables or disables the schedule.
- hibernation_
schedule_ strid - The ID of this resource.
- name str
- Name of the schedule.
- organization_
id str - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- pause_
config HibernationSchedule Pause Config Args - resume_
config HibernationSchedule Resume Config Args - timeouts
Hibernation
Schedule Timeouts Args
- cluster
Assignments Property Map - enabled Boolean
- Enables or disables the schedule.
- hibernation
Schedule StringId - The ID of this resource.
- name String
- Name of the schedule.
- organization
Id String - ID of the organization. If not provided, then will attempt to infer it using CAST AI API client.
- pause
Config Property Map - resume
Config Property Map - timeouts Property Map
Supporting Types
HibernationScheduleClusterAssignments, HibernationScheduleClusterAssignmentsArgs
HibernationScheduleClusterAssignmentsAssignment, HibernationScheduleClusterAssignmentsAssignmentArgs
- Cluster
Id string - ID of the cluster.
- Cluster
Id string - ID of the cluster.
- cluster
Id String - ID of the cluster.
- cluster
Id string - ID of the cluster.
- cluster_
id str - ID of the cluster.
- cluster
Id String - ID of the cluster.
HibernationSchedulePauseConfig, HibernationSchedulePauseConfigArgs
- Enabled bool
- Enables or disables the pause configuration.
- Schedule
Hibernation
Schedule Pause Config Schedule
- Enabled bool
- Enables or disables the pause configuration.
- Schedule
Hibernation
Schedule Pause Config Schedule
- enabled Boolean
- Enables or disables the pause configuration.
- schedule
Hibernation
Schedule Pause Config Schedule
- enabled boolean
- Enables or disables the pause configuration.
- schedule
Hibernation
Schedule Pause Config Schedule
- enabled bool
- Enables or disables the pause configuration.
- schedule
Hibernation
Schedule Pause Config Schedule
- enabled Boolean
- Enables or disables the pause configuration.
- schedule Property Map
HibernationSchedulePauseConfigSchedule, HibernationSchedulePauseConfigScheduleArgs
- Cron
Expression string - Cron expression defining when the schedule should trigger.
- Cron
Expression string - Cron expression defining when the schedule should trigger.
- cron
Expression String - Cron expression defining when the schedule should trigger.
- cron
Expression string - Cron expression defining when the schedule should trigger.
- cron_
expression str - Cron expression defining when the schedule should trigger.
- cron
Expression String - Cron expression defining when the schedule should trigger.
HibernationScheduleResumeConfig, HibernationScheduleResumeConfigArgs
- Enabled bool
- Enables or disables the pause configuration.
- Job
Config HibernationSchedule Resume Config Job Config - Schedule
Hibernation
Schedule Resume Config Schedule
- Enabled bool
- Enables or disables the pause configuration.
- Job
Config HibernationSchedule Resume Config Job Config - Schedule
Hibernation
Schedule Resume Config Schedule
- enabled Boolean
- Enables or disables the pause configuration.
- job
Config HibernationSchedule Resume Config Job Config - schedule
Hibernation
Schedule Resume Config Schedule
- enabled boolean
- Enables or disables the pause configuration.
- job
Config HibernationSchedule Resume Config Job Config - schedule
Hibernation
Schedule Resume Config Schedule
- enabled bool
- Enables or disables the pause configuration.
- job_
config HibernationSchedule Resume Config Job Config - schedule
Hibernation
Schedule Resume Config Schedule
- enabled Boolean
- Enables or disables the pause configuration.
- job
Config Property Map - schedule Property Map
HibernationScheduleResumeConfigJobConfig, HibernationScheduleResumeConfigJobConfigArgs
HibernationScheduleResumeConfigJobConfigNodeConfig, HibernationScheduleResumeConfigJobConfigNodeConfigArgs
- Instance
Type string - Instance type.
- Config
Id string - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- Config
Name string - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- Gpu
Config HibernationSchedule Resume Config Job Config Node Config Gpu Config - Kubernetes
Labels Dictionary<string, string> - Custom labels to be added to the node.
- Kubernetes
Taints List<HibernationSchedule Resume Config Job Config Node Config Kubernetes Taint> - Custom taints to be added to the node created from this configuration.
- Node
Affinities List<HibernationSchedule Resume Config Job Config Node Config Node Affinity> - Custom taints to be added to the node created from this configuration.
- Spot
Configs List<HibernationSchedule Resume Config Job Config Node Config Spot Config> - Custom taints to be added to the node created from this configuration.
- Subnet
Id string - Node subnet ID.
- Volumes
List<Hibernation
Schedule Resume Config Job Config Node Config Volume> - Zone string
- Zone of the node.
- Instance
Type string - Instance type.
- Config
Id string - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- Config
Name string - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- Gpu
Config HibernationSchedule Resume Config Job Config Node Config Gpu Config - Kubernetes
Labels map[string]string - Custom labels to be added to the node.
- Kubernetes
Taints []HibernationSchedule Resume Config Job Config Node Config Kubernetes Taint - Custom taints to be added to the node created from this configuration.
- Node
Affinities []HibernationSchedule Resume Config Job Config Node Config Node Affinity - Custom taints to be added to the node created from this configuration.
- Spot
Configs []HibernationSchedule Resume Config Job Config Node Config Spot Config - Custom taints to be added to the node created from this configuration.
- Subnet
Id string - Node subnet ID.
- Volumes
[]Hibernation
Schedule Resume Config Job Config Node Config Volume - Zone string
- Zone of the node.
- instance
Type String - Instance type.
- config
Id String - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- config
Name String - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- gpu
Config HibernationSchedule Resume Config Job Config Node Config Gpu Config - kubernetes
Labels Map<String,String> - Custom labels to be added to the node.
- kubernetes
Taints List<HibernationSchedule Resume Config Job Config Node Config Kubernetes Taint> - Custom taints to be added to the node created from this configuration.
- node
Affinities List<HibernationSchedule Resume Config Job Config Node Config Node Affinity> - Custom taints to be added to the node created from this configuration.
- spot
Configs List<HibernationSchedule Resume Config Job Config Node Config Spot Config> - Custom taints to be added to the node created from this configuration.
- subnet
Id String - Node subnet ID.
- volumes
List<Hibernation
Schedule Resume Config Job Config Node Config Volume> - zone String
- Zone of the node.
- instance
Type string - Instance type.
- config
Id string - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- config
Name string - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- gpu
Config HibernationSchedule Resume Config Job Config Node Config Gpu Config - kubernetes
Labels {[key: string]: string} - Custom labels to be added to the node.
- kubernetes
Taints HibernationSchedule Resume Config Job Config Node Config Kubernetes Taint[] - Custom taints to be added to the node created from this configuration.
- node
Affinities HibernationSchedule Resume Config Job Config Node Config Node Affinity[] - Custom taints to be added to the node created from this configuration.
- spot
Configs HibernationSchedule Resume Config Job Config Node Config Spot Config[] - Custom taints to be added to the node created from this configuration.
- subnet
Id string - Node subnet ID.
- volumes
Hibernation
Schedule Resume Config Job Config Node Config Volume[] - zone string
- Zone of the node.
- instance_
type str - Instance type.
- config_
id str - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- config_
name str - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- gpu_
config HibernationSchedule Resume Config Job Config Node Config Gpu Config - kubernetes_
labels Mapping[str, str] - Custom labels to be added to the node.
- kubernetes_
taints Sequence[HibernationSchedule Resume Config Job Config Node Config Kubernetes Taint] - Custom taints to be added to the node created from this configuration.
- node_
affinities Sequence[HibernationSchedule Resume Config Job Config Node Config Node Affinity] - Custom taints to be added to the node created from this configuration.
- spot_
configs Sequence[HibernationSchedule Resume Config Job Config Node Config Spot Config] - Custom taints to be added to the node created from this configuration.
- subnet_
id str - Node subnet ID.
- volumes
Sequence[Hibernation
Schedule Resume Config Job Config Node Config Volume] - zone str
- Zone of the node.
- instance
Type String - Instance type.
- config
Id String - ID reference of Node Configuration to be used for node creation. Supersedes 'config_name' parameter.
- config
Name String - Name reference of Node Configuration to be used for node creation. Superseded if 'config_id' parameter is provided.
- gpu
Config Property Map - kubernetes
Labels Map<String> - Custom labels to be added to the node.
- kubernetes
Taints List<Property Map> - Custom taints to be added to the node created from this configuration.
- node
Affinities List<Property Map> - Custom taints to be added to the node created from this configuration.
- spot
Configs List<Property Map> - Custom taints to be added to the node created from this configuration.
- subnet
Id String - Node subnet ID.
- volumes List<Property Map>
- zone String
- Zone of the node.
HibernationScheduleResumeConfigJobConfigNodeConfigGpuConfig, HibernationScheduleResumeConfigJobConfigNodeConfigGpuConfigArgs
HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaint, HibernationScheduleResumeConfigJobConfigNodeConfigKubernetesTaintArgs
HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinity, HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityArgs
- Dedicated
Group string - Key of a taint to be added to nodes created from this template.
- Affinities
List<Hibernation
Schedule Resume Config Job Config Node Config Node Affinity Affinity>
- Dedicated
Group string - Key of a taint to be added to nodes created from this template.
- Affinities
[]Hibernation
Schedule Resume Config Job Config Node Config Node Affinity Affinity
- dedicated
Group String - Key of a taint to be added to nodes created from this template.
- affinities
List<Hibernation
Schedule Resume Config Job Config Node Config Node Affinity Affinity>
- dedicated
Group string - Key of a taint to be added to nodes created from this template.
- affinities
Hibernation
Schedule Resume Config Job Config Node Config Node Affinity Affinity[]
- dedicated_
group str - Key of a taint to be added to nodes created from this template.
- affinities
Sequence[Hibernation
Schedule Resume Config Job Config Node Config Node Affinity Affinity]
- dedicated
Group String - Key of a taint to be added to nodes created from this template.
- affinities List<Property Map>
HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinity, HibernationScheduleResumeConfigJobConfigNodeConfigNodeAffinityAffinityArgs
HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfig, HibernationScheduleResumeConfigJobConfigNodeConfigSpotConfigArgs
- Price
Hourly string - Spot instance price. Applicable only for AWS nodes.
- Spot bool
- Whether node should be created as spot instance.
- Price
Hourly string - Spot instance price. Applicable only for AWS nodes.
- Spot bool
- Whether node should be created as spot instance.
- price
Hourly String - Spot instance price. Applicable only for AWS nodes.
- spot Boolean
- Whether node should be created as spot instance.
- price
Hourly string - Spot instance price. Applicable only for AWS nodes.
- spot boolean
- Whether node should be created as spot instance.
- price_
hourly str - Spot instance price. Applicable only for AWS nodes.
- spot bool
- Whether node should be created as spot instance.
- price
Hourly String - Spot instance price. Applicable only for AWS nodes.
- spot Boolean
- Whether node should be created as spot instance.
HibernationScheduleResumeConfigJobConfigNodeConfigVolume, HibernationScheduleResumeConfigJobConfigNodeConfigVolumeArgs
- Raid
Configs List<HibernationSchedule Resume Config Job Config Node Config Volume Raid Config> - Size
Gib double - Volume size in GiB.
- Raid
Configs []HibernationSchedule Resume Config Job Config Node Config Volume Raid Config - Size
Gib float64 - Volume size in GiB.
- raid
Configs List<HibernationSchedule Resume Config Job Config Node Config Volume Raid Config> - size
Gib Double - Volume size in GiB.
- raid
Configs HibernationSchedule Resume Config Job Config Node Config Volume Raid Config[] - size
Gib number - Volume size in GiB.
- raid_
configs Sequence[HibernationSchedule Resume Config Job Config Node Config Volume Raid Config] - size_
gib float - Volume size in GiB.
- raid
Configs List<Property Map> - size
Gib Number - Volume size in GiB.
HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfig, HibernationScheduleResumeConfigJobConfigNodeConfigVolumeRaidConfigArgs
- Chunk
Size doubleKb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
- Chunk
Size float64Kb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
- chunk
Size DoubleKb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
- chunk
Size numberKb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
- chunk_
size_ floatkb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
- chunk
Size NumberKb - Specify the RAID0 chunk size in kilobytes, this parameter affects the read/write in the disk array and must be tailored for the type of data written by the workloads in the node. If not provided it will default to 64KB
HibernationScheduleResumeConfigSchedule, HibernationScheduleResumeConfigScheduleArgs
- Cron
Expression string - Cron expression defining when the schedule should trigger.
- Cron
Expression string - Cron expression defining when the schedule should trigger.
- cron
Expression String - Cron expression defining when the schedule should trigger.
- cron
Expression string - Cron expression defining when the schedule should trigger.
- cron_
expression str - Cron expression defining when the schedule should trigger.
- cron
Expression String - Cron expression defining when the schedule should trigger.
HibernationScheduleTimeouts, HibernationScheduleTimeoutsArgs
Import
Associate terraform resource “my_schedule” with a hibernation schedule named “workday”.
Will use the default organization ID, that is associated with the API token.
$ pulumi import castai:index/hibernationSchedule:HibernationSchedule my_schedule' workday
Importing via direct schedule ID is also possible.
Will use the default organization ID, that is associated with the API token.
$ pulumi import castai:index/hibernationSchedule:HibernationSchedule my_schedule' e5ee784d-2c4b-4820-ab4e-16e4b81534a4
Import using organization ID and schedule name/ID in format
$ pulumi import castai:index/hibernationSchedule:HibernationSchedule my_schedule' 63895dfe-dc8b-49b6-959c-3f3545de525a/workday
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- castai castai/terraform-provider-castai
- License
- Notes
- This Pulumi package is based on the
castai
Terraform Provider.