@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
168 lines (167 loc) • 5.23 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Retrieves all k6 schedules.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const schedulesProject = new grafana.k6.Project("schedules_project", {name: "Terraform Schedules Test Project"});
* const schedulesLoadTest = new grafana.k6.LoadTest("schedules_load_test", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const schedulesLoadTest2 = new grafana.k6.LoadTest("schedules_load_test_2", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules (2)",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const schedulesLoadTest3 = new grafana.k6.LoadTest("schedules_load_test_3", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules (3)",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const testSchedule1 = new grafana.k6.Schedule("test_schedule_1", {
* loadTestId: schedulesLoadTest.id,
* starts: "2029-12-25T10:00:00Z",
* recurrenceRule: {
* frequency: "MONTHLY",
* interval: 15,
* count: 100,
* },
* }, {
* dependsOn: [schedulesLoadTest],
* });
* const testSchedule2 = new grafana.k6.Schedule("test_schedule_2", {
* loadTestId: schedulesLoadTest2.id,
* starts: "2023-12-26T14:00:00Z",
* recurrenceRule: {
* frequency: "WEEKLY",
* interval: 2,
* until: "2047-01-31T23:59:59Z",
* },
* }, {
* dependsOn: [schedulesLoadTest2],
* });
* const testSchedule3 = new grafana.k6.Schedule("test_schedule_3", {
* loadTestId: schedulesLoadTest3.id,
* starts: "2023-12-26T14:00:00Z",
* cron: {
* schedule: "0 10 1 12 6",
* timezone: "UTC",
* },
* }, {
* dependsOn: [schedulesLoadTest3],
* });
* const fromLoadTestId = grafana.k6.getSchedules({});
* ```
*/
export declare function getSchedules(opts?: pulumi.InvokeOptions): Promise<GetSchedulesResult>;
/**
* A collection of values returned by getSchedules.
*/
export interface GetSchedulesResult {
/**
* The identifier for this data source.
*/
readonly id: string;
/**
* List of k6 schedules.
*/
readonly schedules: outputs.k6.GetSchedulesSchedule[];
}
/**
* Retrieves all k6 schedules.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const schedulesProject = new grafana.k6.Project("schedules_project", {name: "Terraform Schedules Test Project"});
* const schedulesLoadTest = new grafana.k6.LoadTest("schedules_load_test", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const schedulesLoadTest2 = new grafana.k6.LoadTest("schedules_load_test_2", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules (2)",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const schedulesLoadTest3 = new grafana.k6.LoadTest("schedules_load_test_3", {
* projectId: schedulesProject.id,
* name: "Terraform Test Load Test for Schedules (3)",
* script: `export default function() {
* console.log('Hello from k6 schedules test!');
* }
* `,
* }, {
* dependsOn: [schedulesProject],
* });
* const testSchedule1 = new grafana.k6.Schedule("test_schedule_1", {
* loadTestId: schedulesLoadTest.id,
* starts: "2029-12-25T10:00:00Z",
* recurrenceRule: {
* frequency: "MONTHLY",
* interval: 15,
* count: 100,
* },
* }, {
* dependsOn: [schedulesLoadTest],
* });
* const testSchedule2 = new grafana.k6.Schedule("test_schedule_2", {
* loadTestId: schedulesLoadTest2.id,
* starts: "2023-12-26T14:00:00Z",
* recurrenceRule: {
* frequency: "WEEKLY",
* interval: 2,
* until: "2047-01-31T23:59:59Z",
* },
* }, {
* dependsOn: [schedulesLoadTest2],
* });
* const testSchedule3 = new grafana.k6.Schedule("test_schedule_3", {
* loadTestId: schedulesLoadTest3.id,
* starts: "2023-12-26T14:00:00Z",
* cron: {
* schedule: "0 10 1 12 6",
* timezone: "UTC",
* },
* }, {
* dependsOn: [schedulesLoadTest3],
* });
* const fromLoadTestId = grafana.k6.getSchedules({});
* ```
*/
export declare function getSchedulesOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSchedulesResult>;