circle-info
Squadcast is now SolarWinds Incident Response

Schedules.Overrides

Overview

Available Operations

  • List - List Overrides

  • Delete - Delete Schedule Override

List

List Overrides

Example Usage

package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_BEARER_AUTH")),
    )

    res, err := s.Schedules.Overrides.List(ctx, operations.OverridesListOverridesRequest{
        ScheduleID: "<id>",
        StartTime: "<value>",
        EndTime: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

request

✔️

The request object to use for the request.

opts

The options for this request.

Response

*operations.OverridesListOverridesResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

Delete

Delete Schedule Override

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

overrideID

string

✔️

N/A

opts

The options for this request.

Response

*operations.OverridesDeleteScheduleOverrideResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

Last updated