- Get - Get Deduplication Rules
- CreateOrUpdate - Create or Update Deduplication Rules
Get Deduplication Rules
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.DeduplicationRules.Get(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
serviceID |
string |
✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeduplicationRulesGetDeduplicationRulesResponse, error
| 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 or Update Deduplication Rules
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.DeduplicationRules.CreateOrUpdate(ctx, "<id>", components.V3ServicesDeduplicationRulesCreateDeduplicationRulesRequest{
Rules: []components.V3ServicesDeduplicationRulesDeduplicationRule{},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
serviceID |
string |
✔️ | N/A |
v3ServicesDeduplicationRulesCreateDeduplicationRulesRequest |
components.V3ServicesDeduplicationRulesCreateDeduplicationRulesRequest | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeduplicationRulesCreateOrUpdateDeduplicationRulesResponse, error
| 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 | */* |