apigateway

package
v6.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper for the API Gateway SDK client

func NewClient

func NewClient(username, password, token, url, version, terraformVersion string) *Client

NewClient returns a new API Gateway client

func (*Client) CreateAPIGateway

CreateAPIGateway creates a new gateway

func (*Client) CreateRoute

CreateRoute sends a POST request with the given data to the API to create a route.

func (*Client) DeleteAPIGateway

func (c *Client) DeleteAPIGateway(ctx context.Context, id string) (*apigateway.APIResponse, error)

DeleteAPIGateway deletes a gateway given an ID

func (*Client) DeleteRoute

func (c *Client) DeleteRoute(ctx context.Context, gatewayID string, routeID string) (*apigateway.APIResponse, error)

DeleteRoute sends a DELETE request to the API to delete a route by ID from a given gateway.

func (*Client) GetAPIGatewayByID

func (c *Client) GetAPIGatewayByID(ctx context.Context, id string) (apigateway.GatewayRead, *apigateway.APIResponse, error)

GetAPIGatewayByID returns a gateway given an ID

func (*Client) GetRouteByID

func (c *Client) GetRouteByID(ctx context.Context, gatewayID string, routeID string) (apigateway.RouteRead, *apigateway.APIResponse, error)

GetRouteByID sends a GET request to the API to retrieve a route by ID from a given gateway.

func (*Client) IsAPIGatewayRouteAvailable

func (c *Client) IsAPIGatewayRouteAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)

IsAPIGatewayRouteAvailable checks if the API Gateway Route is available.

func (*Client) IsAPIGatewayRouteDeleted

func (c *Client) IsAPIGatewayRouteDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)

IsAPIGatewayRouteDeleted checks if the API Gateway Route has been deleted.

func (*Client) IsGatewayDeleted

func (c *Client) IsGatewayDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)

IsGatewayDeleted checks if the gateway is deleted

func (*Client) IsGatewayReady

func (c *Client) IsGatewayReady(ctx context.Context, d *schema.ResourceData) (bool, error)

IsGatewayReady checks if the gateway is ready

func (*Client) ListAPIGateways

ListAPIGateways returns a list of all gateways

func (*Client) ListRoutes

func (c *Client) ListRoutes(ctx context.Context, gatewayID string) (apigateway.RouteReadList, *apigateway.APIResponse, error)

ListRoutes sends a GET request to the API to retrieve all routes from a given gateway.

func (*Client) SetAPIGatewayData

func (c *Client) SetAPIGatewayData(d *schema.ResourceData, apiGateway apigateway.GatewayRead) error

SetAPIGatewayData sets the data of the gateway in the terraform resource

func (*Client) SetAPIGatewayRouteData

func (c *Client) SetAPIGatewayRouteData(d *schema.ResourceData, route apigateway.RouteRead) error

SetAPIGatewayRouteData sets the data for the API Gateway Route.

func (*Client) UpdateAPIGateway

UpdateAPIGateway updates a gateway given an ID or creates a new one if it doesn't exist

func (*Client) UpdateRoute

UpdateRoute sends a PUT request with the given data to the API to update the route.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL