indexes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceKey = "scp_indexes"
)

Variables

View Source
var GeneralRetryableStatusCodes = map[int]string{
	http.StatusTooManyRequests: http.StatusText(429),
}

Functions

func DataSourceIndex added in v1.1.0

func DataSourceIndex() *schema.Resource

func IndexStatusCreate

func IndexStatusCreate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, createIndexRequest v2.CreateIndexJSONRequestBody) resource.StateRefreshFunc

IndexStatusCreate returns StateRefreshFunc that makes POST request and checks if response is accepted

func IndexStatusDelete

func IndexStatusDelete(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string) resource.StateRefreshFunc

IndexStatusDelete returns StateRefreshFunc that makes DELETE request and checks if request was accepted

func IndexStatusPoll

func IndexStatusPoll(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string, targetStatus []string, pendingStatus []string) resource.StateRefreshFunc

IndexStatusPoll returns StateRefreshFunc that makes GET request and checks if response is desired target (200 for create and 404 for delete)

func IndexStatusRead

func IndexStatusRead(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string) resource.StateRefreshFunc

IndexStatusRead returns StateRefreshFunc that makes GET request, checks if request was successful, and returns index response

func IndexStatusUpdate

func IndexStatusUpdate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, patchIndexRequest v2.PatchIndexInfoJSONRequestBody, indexName string) resource.StateRefreshFunc

IndexStatusUpdate returns StateRefreshFunc that makes PATCH request and checks if request was accepted

func IndexStatusVerifyUpdate

func IndexStatusVerifyUpdate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, patchRequest v2.PatchIndexInfoJSONRequestBody, indexName string) resource.StateRefreshFunc

IndexStatusVerifyUpdate returns a StateRefreshFunc that makes a GET request and checks to see if the index fields matches those in patch request

func ResourceIndex

func ResourceIndex() *schema.Resource

func VerifyIndexUpdate

func VerifyIndexUpdate(patchRequest v2.PatchIndexInfoJSONRequestBody, index v2.IndexResponse) bool

VerifyIndexUpdate is a helper to verify that the fields in patch request match fields in the index response

func WaitIndexCreate

func WaitIndexCreate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, createIndexRequest v2.CreateIndexJSONRequestBody) error

WaitIndexCreate Handles retry logic for POST requests for create lifecycle function

func WaitIndexDelete

func WaitIndexDelete(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string) error

WaitIndexDelete Handles retry logic for DELETE requests for the delete lifecycle function

func WaitIndexPoll

func WaitIndexPoll(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string, targetStatus []string, pendingStatus []string) error

WaitIndexPoll Handles retry logic for polling after POST and DELETE requests for create/delete lifecycle functions

func WaitIndexRead

func WaitIndexRead(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, indexName string) (*v2.IndexResponse, error)

WaitIndexRead Handles retry logic for GET requests for the read lifecycle function

func WaitIndexUpdate

func WaitIndexUpdate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, patchRequest v2.PatchIndexInfoJSONRequestBody, indexName string) error

WaitIndexUpdate Handles retry logic for PATCH requests for the update lifecycle function

func WaitVerifyIndexUpdate

func WaitVerifyIndexUpdate(ctx context.Context, acsClient v2.ClientInterface, stack v2.Stack, patchRequest v2.PatchIndexInfoJSONRequestBody, indexName string) error

WaitVerifyIndexUpdate Handles retry logic for GET request for the update lifecycle function to verify that the fields in the index response match those of the patch request

Types

This section is empty.

Jump to

Keyboard shortcuts

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