(Runbooks)
Operations related to Runbooks
- ListAudits - List runbook audits
- List - List runbooks
- Create - Create a runbook
- ListActions - List runbook actions
- ListExecutions - List runbook executions
- CreateExecution - Create a runbook execution
- GetExecution - Get a runbook execution
- UpdateExecutionStep - Update a runbook execution step
- GetExecutionStepScript - Get a runbook execution step script
- UpdateExecutionStepScriptState - Update the script state for a runbook execution step
- UpdateExecutionStepVotes - Update votes for a runbook execution step
- GetStepVoteStatus - Get vote counts for a runbook step
- UpdateExecutionVotes - Vote on a runbook execution
- GetExecutionVoteStatus - Get vote counts for a runbook execution
- ListSelectOptions - List select options for a runbook integration action field
- Get - Get a runbook
- Update - Update a runbook
- Delete - Delete a runbook
Please contact support to enable audit logging for your account.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.ListAudits(ctx, nil, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
auditableType |
*operations.AuditableType | ➖ | A query to filter audits by type |
sort |
*string | ➖ | A query to sort audits by their created_at timestamp. Options are 'asc' or 'desc' |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListRunbookAuditsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Lists all available runbooks.
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.List(ctx, operations.ListRunbooksRequest{})
if err != nil {
log.Fatal(err)
}
if res.RunbookEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListRunbooksRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListRunbooksResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Create a new runbook for use with incidents.
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.Create(ctx, components.PostV1Runbooks{
Name: "<value>",
Type: components.PostV1RunbooksTypeIncident,
})
if err != nil {
log.Fatal(err)
}
if res.RunbookEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1Runbooks | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateRunbookResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
List all Runbook actions available through your connected integrations
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.ListActions(ctx, nil, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.RunbooksActionsEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
type_ |
*string | ➖ | List actions supporting this specific Runbook type |
lite |
*bool | ➖ | Boolean to determine whether to return a slimified version of the action object's integration |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListRunbookActionsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
List all Runbook executions across all Runbooks
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.ListExecutions(ctx, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListRunbookExecutionsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Attaches a runbook to an incident and executes it
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.CreateExecution(ctx, components.PostV1RunbooksExecutions{
ExecuteFor: "<value>",
RunbookID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1RunbooksExecutions | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateRunbookExecutionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieve a runbook execution by ID
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.GetExecution(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookExecutionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Updates a runbook step execution, especially for changing the state of a step execution.
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.UpdateExecutionStep(ctx, "<id>", "<id>", components.PutV1RunbooksExecutionsExecutionIDStepsStepID{
State: "South Carolina",
})
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
stepID |
string | ✔️ | N/A |
putV1RunbooksExecutionsExecutionIDStepsStepID |
components.PutV1RunbooksExecutionsExecutionIDStepsStepID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateRunbookExecutionStepResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieves the bash script from a "script" step.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.GetExecutionStepScript(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
stepID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookExecutionStepScriptResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Updates the execution's step.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.UpdateExecutionStepScriptState(ctx, "<id>", "<id>", "Mississippi")
if err != nil {
log.Fatal(err)
}
if res.RunbooksExecutionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
stepID |
string | ✔️ | N/A |
state |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateRunbookExecutionStepScriptStateResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Allows for upvoting or downvoting an event
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.UpdateExecutionStepVotes(ctx, "<id>", "<id>", components.PatchV1RunbooksExecutionsExecutionIDStepsStepIDVotes{
Direction: components.PatchV1RunbooksExecutionsExecutionIDStepsStepIDVotesDirectionUp,
})
if err != nil {
log.Fatal(err)
}
if res.VotesEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
stepID |
string | ✔️ | N/A |
patchV1RunbooksExecutionsExecutionIDStepsStepIDVotes |
components.PatchV1RunbooksExecutionsExecutionIDStepsStepIDVotes | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateRunbookExecutionStepVotesResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Returns the current vote counts for an object
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.GetStepVoteStatus(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res.VotesEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
stepID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookStepVoteStatusResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Allows for upvoting or downvoting an event
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.UpdateExecutionVotes(ctx, "<id>", components.PatchV1RunbooksExecutionsExecutionIDVotes{
Direction: components.PatchV1RunbooksExecutionsExecutionIDVotesDirectionDig,
})
if err != nil {
log.Fatal(err)
}
if res.VotesEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
patchV1RunbooksExecutionsExecutionIDVotes |
components.PatchV1RunbooksExecutionsExecutionIDVotes | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateRunbookExecutionVotesResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Returns the current vote counts for an object
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.GetExecutionVoteStatus(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.VotesEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
executionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookExecutionVoteStatusResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
List select options for a runbook integration action field
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.ListSelectOptions(ctx, operations.GetRunbookSelectOptionsRequest{
IntegrationSlug: "<value>",
ActionSlug: "<value>",
Field: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetRunbookSelectOptionsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookSelectOptionsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Get a runbook and all its configuration
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.Get(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.RunbookEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
runbookID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetRunbookResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything about a runbook, including but not limited to the steps, environments, attachment rules, and severities.
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.Update(ctx, "<id>", components.PutV1RunbooksRunbookID{})
if err != nil {
log.Fatal(err)
}
if res.RunbookEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
runbookID |
string | ✔️ | N/A |
putV1RunbooksRunbookID |
components.PutV1RunbooksRunbookID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateRunbookResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Delete a runbook and make it unavailable for any future incidents.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Runbooks.Delete(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.RunbookEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
runbookID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteRunbookResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |