1. Packages
  2. Opsgenie Provider
  3. API Docs
  4. getSchedule
Opsgenie v1.3.14 published on Wednesday, Feb 12, 2025 by Pulumi

opsgenie.getSchedule

Explore with Pulumi AI

Opsgenie v1.3.14 published on Wednesday, Feb 12, 2025 by Pulumi

Manages a Schedule within Opsgenie.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const test = opsgenie.getSchedule({
    name: "sre-team schedule",
});
Copy
import pulumi
import pulumi_opsgenie as opsgenie

test = opsgenie.get_schedule(name="sre-team schedule")
Copy
package main

import (
	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opsgenie.LookupSchedule(ctx, &opsgenie.LookupScheduleArgs{
			Name: "sre-team schedule",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

return await Deployment.RunAsync(() => 
{
    var test = Opsgenie.GetSchedule.Invoke(new()
    {
        Name = "sre-team schedule",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opsgenie.OpsgenieFunctions;
import com.pulumi.opsgenie.inputs.GetScheduleArgs;
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) {
        final var test = OpsgenieFunctions.getSchedule(GetScheduleArgs.builder()
            .name("sre-team schedule")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: opsgenie:getSchedule
      arguments:
        name: sre-team schedule
Copy

Using getSchedule

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSchedule(args: GetScheduleArgs, opts?: InvokeOptions): Promise<GetScheduleResult>
function getScheduleOutput(args: GetScheduleOutputArgs, opts?: InvokeOptions): Output<GetScheduleResult>
Copy
def get_schedule(description: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 name: Optional[str] = None,
                 owner_team_id: Optional[str] = None,
                 timezone: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetScheduleResult
def get_schedule_output(description: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 owner_team_id: Optional[pulumi.Input[str]] = None,
                 timezone: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetScheduleResult]
Copy
func LookupSchedule(ctx *Context, args *LookupScheduleArgs, opts ...InvokeOption) (*LookupScheduleResult, error)
func LookupScheduleOutput(ctx *Context, args *LookupScheduleOutputArgs, opts ...InvokeOption) LookupScheduleResultOutput
Copy

> Note: This function is named LookupSchedule in the Go SDK.

public static class GetSchedule 
{
    public static Task<GetScheduleResult> InvokeAsync(GetScheduleArgs args, InvokeOptions? opts = null)
    public static Output<GetScheduleResult> Invoke(GetScheduleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetScheduleResult> getSchedule(GetScheduleArgs args, InvokeOptions options)
public static Output<GetScheduleResult> getSchedule(GetScheduleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: opsgenie:index/getSchedule:getSchedule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the schedule.
Description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
Enabled bool
Enable/disable state of schedule
OwnerTeamId string
Owner team id of the schedule.
Timezone string
The description of schedule.
Name This property is required. string
Name of the schedule.
Description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
Enabled bool
Enable/disable state of schedule
OwnerTeamId string
Owner team id of the schedule.
Timezone string
The description of schedule.
name This property is required. String
Name of the schedule.
description String
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled Boolean
Enable/disable state of schedule
ownerTeamId String
Owner team id of the schedule.
timezone String
The description of schedule.
name This property is required. string
Name of the schedule.
description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled boolean
Enable/disable state of schedule
ownerTeamId string
Owner team id of the schedule.
timezone string
The description of schedule.
name This property is required. str
Name of the schedule.
description str
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled bool
Enable/disable state of schedule
owner_team_id str
Owner team id of the schedule.
timezone str
The description of schedule.
name This property is required. String
Name of the schedule.
description String
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled Boolean
Enable/disable state of schedule
ownerTeamId String
Owner team id of the schedule.
timezone String
The description of schedule.

getSchedule Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
Enabled bool
Enable/disable state of schedule
OwnerTeamId string
Owner team id of the schedule.
Timezone string
The description of schedule.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
Enabled bool
Enable/disable state of schedule
OwnerTeamId string
Owner team id of the schedule.
Timezone string
The description of schedule.
id String
The provider-assigned unique ID for this managed resource.
name String
description String
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled Boolean
Enable/disable state of schedule
ownerTeamId String
Owner team id of the schedule.
timezone String
The description of schedule.
id string
The provider-assigned unique ID for this managed resource.
name string
description string
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled boolean
Enable/disable state of schedule
ownerTeamId string
Owner team id of the schedule.
timezone string
The description of schedule.
id str
The provider-assigned unique ID for this managed resource.
name str
description str
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled bool
Enable/disable state of schedule
owner_team_id str
Owner team id of the schedule.
timezone str
The description of schedule.
id String
The provider-assigned unique ID for this managed resource.
name String
description String
Timezone of schedule. Please look at Supported Timezone Ids for available timezones - Default: America/New_York.
enabled Boolean
Enable/disable state of schedule
ownerTeamId String
Owner team id of the schedule.
timezone String
The description of schedule.

Package Details

Repository
Opsgenie pulumi/pulumi-opsgenie
License
Apache-2.0
Notes
This Pulumi package is based on the opsgenie Terraform Provider.
Opsgenie v1.3.14 published on Wednesday, Feb 12, 2025 by Pulumi