Skip to content

Latest commit

 

History

History
120 lines (91 loc) · 6.45 KB

File metadata and controls

120 lines (91 loc) · 6.45 KB

AwsConnections

(AwsConnections)

Overview

Available Operations

  • List - List AWS integration connections
  • Get - Get an AWS connection

List

Lists the available and configured AWS integration connections for the authenticated organization.

Example Usage

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.AwsConnections.List(ctx, operations.ListAwsConnectionsRequest{})
    if err != nil {
        log.Fatal(err)
    }
    if res.IntegrationsAwsConnectionEntityPaginated != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.ListAwsConnectionsRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*operations.ListAwsConnectionsResponse, error

Errors

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

Retrieves the information about the AWS connection.

Example Usage

package main

import(
	"firehydrant"
	"context"
	"log"
)

func main() {
    s := firehydrant.New(
        firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.AwsConnections.Get(ctx, "<id>")
    if err != nil {
        log.Fatal(err)
    }
    if res.IntegrationsAwsConnectionEntity != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
id string ✔️ N/A
opts []operations.Option The options for this request.

Response

*operations.GetAwsConnectionResponse, error

Errors

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 */*