# Services

## Overview

### Available Operations

* [List](#list) - Get All Services
* [Create](#create) - Create Service
* [GetByName](#getbyname) - Get Services By Name
* [GetByID](#getbyid) - Get Service By ID
* [Update](#update) - Update Service
* [Delete](#delete) - Delete Service
* [CreateOrUpdateAptaConfig](#createorupdateaptaconfig) - Auto Pause Transient Alerts (APTA)
* [UpsertIagConfig](#upsertiagconfig) - Intelligent Alert Grouping (IAG)
* [UpdateNotificationDelayConfig](#updatenotificationdelayconfig) - Delayed Notification Config
* [CreateOrUpdateDependencies](#createorupdatedependencies) - Create or Update Dependencies
* [CreateOrUpdateNotificationTemplateOverlay](#createorupdatenotificationtemplateoverlay) - Create or Update Notification Template Overlay
* [GetAllDedupKeyOverlays](#getalldedupkeyoverlays) - Get All Dedup Key Overlay by Service
* [UpdateDedupKeyOverlay](#updatededupkeyoverlay) - Update Dedup Key Overlay
* [GetRoutingRules](#getroutingrules) - Get Routing Rules
* [CreateOrUpdateSuppressionRules](#createorupdatesuppressionrules) - Create or Update Suppression Rules
* [CreateOrUpdateTaggingRules](#createorupdatetaggingrules) - Create or Update Tagging Rules

## List

Get All Services

### 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.Services.List(ctx, "<id>", nil, nil)
    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                                 |
| `entityOwner` | `*string`                                                        | :heavy\_minus\_sign: | N/A                                 |
| `name`        | `*string`                                                        | :heavy\_minus\_sign: | N/A                                 |
| `opts`        | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesGetServicesResponse**](/go-sdk/docs/models/operations/servicesgetservicesresponse.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 Service

### 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.Services.Create(ctx, "<id>", components.V3ServicesCreateServiceRequest{
        Name: "<value>",
        EscalationPolicyID: "<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: | N/A                                 |
| `v3ServicesCreateServiceRequest` | [components.V3ServicesCreateServiceRequest](/go-sdk/docs/models/components/v3servicescreateservicerequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                           | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                              | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesCreateServiceResponse**](/go-sdk/docs/models/operations/servicescreateserviceresponse.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    | \*/\*            |

## GetByName

Get Services By Name

### 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.Services.GetByName(ctx, "<value>", "<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. |
| `name`    | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `ownerID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`    | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesGetServicesByNameResponse**](/go-sdk/docs/models/operations/servicesgetservicesbynameresponse.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    | \*/\*            |

## GetByID

Get Service By ID

### 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.Services.GetByID(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. |
| `serviceID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`      | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesGetServiceByIDResponse**](/go-sdk/docs/models/operations/servicesgetservicebyidresponse.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 Service

### 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.Services.Update(ctx, "<id>", components.V3ServicesUpdateServiceRequest{})
    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. |
| `serviceID`                      | `string`                                                                                                      | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesUpdateServiceRequest` | [components.V3ServicesUpdateServiceRequest](/go-sdk/docs/models/components/v3servicesupdateservicerequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                           | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                              | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesUpdateServiceResponse**](/go-sdk/docs/models/operations/servicesupdateserviceresponse.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    | \*/\*            |

## Delete

Delete Service

### 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.Services.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. |
| `serviceID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`      | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesDeleteServiceResponse**](/go-sdk/docs/models/operations/servicesdeleteserviceresponse.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    | \*/\*            |

## CreateOrUpdateAptaConfig

Auto Pause Transient Alerts (APTA)

### 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.Services.CreateOrUpdateAptaConfig(ctx, "<id>", components.V3ServicesAPTAConfigRequest{
        IsEnabled: false,
        TimeoutInMins: 680029,
    })
    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. |
| `serviceID`                   | `string`                                                                                                | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesAPTAConfigRequest` | [components.V3ServicesAPTAConfigRequest](/go-sdk/docs/models/components/v3servicesaptaconfigrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                        | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                        | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesCreateOrUpdateAPTAConfigResponse**](/go-sdk/docs/models/operations/servicescreateorupdateaptaconfigresponse.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    | \*/\*            |

## UpsertIagConfig

Intelligent Alert Grouping (IAG)

### 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.Services.UpsertIagConfig(ctx, "<id>", components.V3ServicesIAGConfigRequest{
        IsEnabled: true,
        RollingWindowInMins: 246036,
    })
    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. |
| `serviceID`                  | `string`                                                                                              | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesIAGConfigRequest` | [components.V3ServicesIAGConfigRequest](/go-sdk/docs/models/components/v3servicesiagconfigrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                       | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                      | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesCreateOrUpdateIAGConfigResponse**](/go-sdk/docs/models/operations/servicescreateorupdateiagconfigresponse.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    | \*/\*            |

## UpdateNotificationDelayConfig

Delayed Notification Config

### 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.Services.UpdateNotificationDelayConfig(ctx, "<id>", components.V3ServicesNotificationDelayConfigRequest{
        IsEnabled: false,
    })
    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. |
| `serviceID`                                | `string`                                                                                                                          | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesNotificationDelayConfigRequest` | [components.V3ServicesNotificationDelayConfigRequest](/go-sdk/docs/models/components/v3servicesnotificationdelayconfigrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                     | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                  | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.ServicesDelayedNotificationConfigResponse**](/go-sdk/docs/models/operations/servicesdelayednotificationconfigresponse.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    | \*/\*            |

## CreateOrUpdateDependencies

Create or Update Dependencies

### 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.Services.CreateOrUpdateDependencies(ctx, "<id>", components.V3ServicesDependenciesCreateOrUpdateDependenciesRequest{
        Dependencies: []string{
            "<value 1>",
            "<value 2>",
            "<value 3>",
        },
    })
    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. |
| `serviceID`                                               | `string`                                                                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesDependenciesCreateOrUpdateDependenciesRequest` | [components.V3ServicesDependenciesCreateOrUpdateDependenciesRequest](/go-sdk/docs/models/components/v3servicesdependenciescreateorupdatedependenciesrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                                    | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.DependenciesCreateOrUpdateDependenciesResponse**](/go-sdk/docs/models/operations/dependenciescreateorupdatedependenciesresponse.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    | \*/\*            |

## CreateOrUpdateNotificationTemplateOverlay

Create or Update Notification Template Overlay

### 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.Services.CreateOrUpdateNotificationTemplateOverlay(ctx, "<id>", "<value>", components.V3ServicesOverlayUpdateCustomContentTemplateOverlayRequest{
        OverlayTemplateType: "<value>",
        MessageOverlay: components.MessageOverlay{
            Template: "<value>",
        },
        DescriptionOverlay: components.DescriptionOverlay{
            Template: "<value>",
        },
    })
    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. |
| `serviceID`                                                  | `string`                                                                                                                                                              | :heavy\_check\_mark: | N/A                                 |
| `alertSource`                                                | `string`                                                                                                                                                              | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesOverlayUpdateCustomContentTemplateOverlayRequest` | [components.V3ServicesOverlayUpdateCustomContentTemplateOverlayRequest](/go-sdk/docs/models/components/v3servicesoverlayupdatecustomcontenttemplateoverlayrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                                       | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                                                      | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.OverlayCreateOrUpdateNotificationTemplateOverlayResponse**](/go-sdk/docs/models/operations/overlaycreateorupdatenotificationtemplateoverlayresponse.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    | \*/\*            |

## GetAllDedupKeyOverlays

Get All Dedup Key Overlay by Service

### 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.Services.GetAllDedupKeyOverlays(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. |
| `serviceID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`      | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.OverlayGetAllDedupKeyOverlayByServiceResponse**](/go-sdk/docs/models/operations/overlaygetalldedupkeyoverlaybyserviceresponse.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    | \*/\*            |

## UpdateDedupKeyOverlay

Update Dedup Key Overlay

### Example Usage

```go
package main

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

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

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

    res, err := s.Services.UpdateDedupKeyOverlay(ctx, "<id>", "<value>", components.V3ServicesOverlayUpdateDedupKeyOverlayRequest{
        OverlayTemplateType: "<value>",
        DedupKeyOverlay: components.DedupKeyOverlay{
            Template: "<value>",
            Duration: 360400,
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.OneOf != nil {
        switch res.OneOf.Type {
            case operations.OverlayUpdateDedupKeyOverlayResponseBodyTypeResponseBody1:
                // res.OneOf.ResponseBody1 is populated
            case operations.OverlayUpdateDedupKeyOverlayResponseBodyTypeResponseBody2:
                // res.OneOf.ResponseBody2 is populated
        }

    }
}
```

### Parameters

| Parameter                                       | Type                                                                                                                                        | Required             | Description                         |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------- |
| `ctx`                                           | [context.Context](https://pkg.go.dev/context#Context)                                                                                       | :heavy\_check\_mark: | The context to use for the request. |
| `serviceID`                                     | `string`                                                                                                                                    | :heavy\_check\_mark: | N/A                                 |
| `alertSource`                                   | `string`                                                                                                                                    | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesOverlayUpdateDedupKeyOverlayRequest` | [components.V3ServicesOverlayUpdateDedupKeyOverlayRequest](/go-sdk/docs/models/components/v3servicesoverlayupdatededupkeyoverlayrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                          | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                            | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.OverlayUpdateDedupKeyOverlayResponse**](/go-sdk/docs/models/operations/overlayupdatededupkeyoverlayresponse.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    | \*/\*            |

## GetRoutingRules

Get Routing 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.Services.GetRoutingRules(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. |
| `serviceID` | `string`                                                         | :heavy\_check\_mark: | N/A                                 |
| `opts`      | \[][operations.Option](/go-sdk/docs/models/operations/option.md) | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.RoutingRulesGetRoutingRulesResponse**](/go-sdk/docs/models/operations/routingrulesgetroutingrulesresponse.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    | \*/\*            |

## CreateOrUpdateSuppressionRules

Create or Update Suppression 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.Services.CreateOrUpdateSuppressionRules(ctx, "<id>", components.V3ServicesSuppressionRulesCreateOrUpdateSuppressionRulesRequest{
        Rules: []components.V3ServicesSuppressionRulesSuppressionRule{},
    })
    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. |
| `serviceID`                                                       | `string`                                                                                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesSuppressionRulesCreateOrUpdateSuppressionRulesRequest` | [components.V3ServicesSuppressionRulesCreateOrUpdateSuppressionRulesRequest](/go-sdk/docs/models/components/v3servicessuppressionrulescreateorupdatesuppressionrulesrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                                            | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SuppressionRulesCreateOrUpdateSuppressionRulesResponse**](/go-sdk/docs/models/operations/suppressionrulescreateorupdatesuppressionrulesresponse.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    | \*/\*            |

## CreateOrUpdateTaggingRules

Create or Update Tagging 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.Services.CreateOrUpdateTaggingRules(ctx, "<id>", components.V3ServicesTaggingRulesCreateOrUpdateTaggingRulesRequest{
        Rules: []components.V3ServicesTaggingRulesTagRule{
            components.V3ServicesTaggingRulesTagRule{},
        },
    })
    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. |
| `serviceID`                                               | `string`                                                                                                                                                        | :heavy\_check\_mark: | N/A                                 |
| `v3ServicesTaggingRulesCreateOrUpdateTaggingRulesRequest` | [components.V3ServicesTaggingRulesCreateOrUpdateTaggingRulesRequest](/go-sdk/docs/models/components/v3servicestaggingrulescreateorupdatetaggingrulesrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                                                    | \[][operations.Option](/go-sdk/docs/models/operations/option.md)                                                                                                | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.TaggingRulesCreateOrUpdateTaggingRulesResponse**](/go-sdk/docs/models/operations/taggingrulescreateorupdatetaggingrulesresponse.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    | \*/\*            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
