> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/globaloncallreminderrules.md).

# GlobalOncallReminderRules

## Overview

### Available Operations

* [Delete](#delete) - Delete Global Oncall Reminder Rules
* [List](#list) - Get Global Oncall Reminder Rules
* [Create](#create) - Create Global Oncall Reminder Rules
* [Update](#update) - Update Global Oncall Reminder Rules

## Delete

Delete Global Oncall Reminder Rules

### Example Usage

```go
package main

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

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

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

    res, err := s.GlobalOncallReminderRules.Delete(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.Body != nil {
        // handle response
    }
}
```

### Parameters

| Parameter | Type                                                                                                              | Required             | Description                         |
| --------- | ----------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`     | [context.Context](https://pkg.go.dev/context#Context)                                                             | :heavy\_check\_mark: | The context to use for the request. |
| `ownerID` | `string`                                                                                                          | :heavy\_check\_mark: | N/A                                 |
| `opts`    | \[][operations.Option](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.GlobalOncallReminderRulesDeleteGlobalOncallReminderRulesResponse**](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/globaloncallreminderrulesdeleteglobaloncallreminderrulesresponse.md)**, error**

### Errors

| Error Type                         | Status Code | Content Type     |
| ---------------------------------- | ----------- | ---------------- |
| apierrors.BadRequestError          | 400         | application/json |
| apierrors.UnauthorizedError        | 401         | application/json |
| apierrors.PaymentRequiredError     | 402         | application/json |
| apierrors.ForbiddenError           | 403         | application/json |
| apierrors.NotFoundError            | 404         | application/json |
| apierrors.ConflictError            | 409         | application/json |
| apierrors.UnprocessableEntityError | 422         | application/json |
| apierrors.InternalServerError      | 500         | application/json |
| apierrors.BadGatewayError          | 502         | application/json |
| apierrors.ServiceUnavailableError  | 503         | application/json |
| apierrors.GatewayTimeoutError      | 504         | application/json |
| apierrors.APIError                 | 4XX, 5XX    | \*/\*            |

## List

Get Global Oncall Reminder Rules

### Example Usage

```go
package main

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

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

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

    res, err := s.GlobalOncallReminderRules.List(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter | Type                                                                                                              | Required             | Description                         |
| --------- | ----------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`     | [context.Context](https://pkg.go.dev/context#Context)                                                             | :heavy\_check\_mark: | The context to use for the request. |
| `ownerID` | `string`                                                                                                          | :heavy\_check\_mark: | required \*                         |
| `opts`    | \[][operations.Option](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.GlobalOncallReminderRulesGetGlobalOncallReminderRulesResponse**](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/globaloncallreminderrulesgetglobaloncallreminderrulesresponse.md)**, error**

### Errors

| Error Type                         | Status Code | Content Type     |
| ---------------------------------- | ----------- | ---------------- |
| apierrors.BadRequestError          | 400         | application/json |
| apierrors.UnauthorizedError        | 401         | application/json |
| apierrors.PaymentRequiredError     | 402         | application/json |
| apierrors.ForbiddenError           | 403         | application/json |
| apierrors.NotFoundError            | 404         | application/json |
| apierrors.ConflictError            | 409         | application/json |
| apierrors.UnprocessableEntityError | 422         | application/json |
| apierrors.InternalServerError      | 500         | application/json |
| apierrors.BadGatewayError          | 502         | application/json |
| apierrors.ServiceUnavailableError  | 503         | application/json |
| apierrors.GatewayTimeoutError      | 504         | application/json |
| apierrors.APIError                 | 4XX, 5XX    | \*/\*            |

## Create

Create Global Oncall Reminder Rules

### Example Usage

```go
package main

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

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

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

    res, err := s.GlobalOncallReminderRules.Create(ctx, components.V3GlobalOncallReminderRulesCreateGlobalOncallReminderRulesRequest{
        IsEnabled: true,
        OwnerID: "<id>",
        Rules: []components.V3GlobalOncallReminderRulesRule{},
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter | Type                                                                                                                                                                                                                                 | Required             | Description                                |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------ |
| `ctx`     | [context.Context](https://pkg.go.dev/context#Context)                                                                                                                                                                                | :heavy\_check\_mark: | The context to use for the request.        |
| `request` | [components.V3GlobalOncallReminderRulesCreateGlobalOncallReminderRulesRequest](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/components/v3globaloncallreminderrulescreateglobaloncallreminderrulesrequest.md) | :heavy\_check\_mark: | The request object to use for the request. |
| `opts`    | \[][operations.Option](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/option.md)                                                                                                                    | :heavy\_minus\_sign: | The options for this request.              |

### Response

[**\*operations.GlobalOncallReminderRulesCreateGlobalOncallReminderRulesResponse**](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/globaloncallreminderrulescreateglobaloncallreminderrulesresponse.md)**, error**

### Errors

| Error Type                         | Status Code | Content Type     |
| ---------------------------------- | ----------- | ---------------- |
| apierrors.BadRequestError          | 400         | application/json |
| apierrors.UnauthorizedError        | 401         | application/json |
| apierrors.PaymentRequiredError     | 402         | application/json |
| apierrors.ForbiddenError           | 403         | application/json |
| apierrors.NotFoundError            | 404         | application/json |
| apierrors.ConflictError            | 409         | application/json |
| apierrors.UnprocessableEntityError | 422         | application/json |
| apierrors.InternalServerError      | 500         | application/json |
| apierrors.BadGatewayError          | 502         | application/json |
| apierrors.ServiceUnavailableError  | 503         | application/json |
| apierrors.GatewayTimeoutError      | 504         | application/json |
| apierrors.APIError                 | 4XX, 5XX    | \*/\*            |

## Update

Update Global Oncall Reminder Rules

### Example Usage

```go
package main

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

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

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

    res, err := s.GlobalOncallReminderRules.Update(ctx, "<id>", components.V3GlobalOncallReminderRulesUpdateGlobalOncallReminderRulesRequest{
        IsEnabled: true,
        Rules: []components.V3GlobalOncallReminderRulesRule{},
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter                                                           | Type                                                                                                                                                                                                                                 | Required             | Description                         |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ----------------------------------- |
| `ctx`                                                               | [context.Context](https://pkg.go.dev/context#Context)                                                                                                                                                                                | :heavy\_check\_mark: | The context to use for the request. |
| `ownerID`                                                           | `string`                                                                                                                                                                                                                             | :heavy\_check\_mark: | N/A                                 |
| `v3GlobalOncallReminderRulesUpdateGlobalOncallReminderRulesRequest` | [components.V3GlobalOncallReminderRulesUpdateGlobalOncallReminderRulesRequest](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/components/v3globaloncallreminderrulesupdateglobaloncallreminderrulesrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                                              | \[][operations.Option](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/option.md)                                                                                                                    | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.GlobalOncallReminderRulesUpdateGlobalOncallReminderRulesResponse**](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/globaloncallreminderrulesupdateglobaloncallreminderrulesresponse.md)**, error**

### Errors

| Error Type                         | Status Code | Content Type     |
| ---------------------------------- | ----------- | ---------------- |
| apierrors.BadRequestError          | 400         | application/json |
| apierrors.UnauthorizedError        | 401         | application/json |
| apierrors.PaymentRequiredError     | 402         | application/json |
| apierrors.ForbiddenError           | 403         | application/json |
| apierrors.NotFoundError            | 404         | application/json |
| apierrors.ConflictError            | 409         | application/json |
| apierrors.UnprocessableEntityError | 422         | application/json |
| apierrors.InternalServerError      | 500         | application/json |
| apierrors.BadGatewayError          | 502         | application/json |
| apierrors.ServiceUnavailableError  | 503         | application/json |
| apierrors.GatewayTimeoutError      | 504         | application/json |
| apierrors.APIError                 | 4XX, 5XX    | \*/\*            |
