wait

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Overview

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

Index

Constants

View Source
const (
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	CreateSuccess = "CREATED"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	VolumeAvailableStatus = "AVAILABLE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	DeleteSuccess = "DELETED"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ErrorStatus = "ERROR"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ServerActiveStatus = "ACTIVE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ServerResizingStatus = "RESIZING"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ServerInactiveStatus = "INACTIVE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ServerDeallocatedStatus = "DEALLOCATED"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ServerRescueStatus = "RESCUE"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	ImageAvailableStatus = "AVAILABLE"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestCreateAction = "CREATE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestUpdateAction = "UPDATE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestDeleteAction = "DELETE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestCreatedStatus = "CREATED"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestUpdatedStatus = "UPDATED"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestDeletedStatus = "DELETED"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	RequestFailedStatus = "FAILED"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	XRequestIDHeader = "X-Request-Id"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	BackupAvailableStatus = "AVAILABLE"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	BackupRestoringStatus = "RESTORING"
	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	BackupDeletingStatus = "DELETING"

	// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
	SnapshotAvailableStatus = "AVAILABLE"
)

Variables

This section is empty.

Functions

func AddVolumeToServerWaitHandler deprecated added in v0.14.0

func AddVolumeToServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId, volumeId string) *wait.AsyncActionHandler[iaas.VolumeAttachment]

AddVolumeToServerWaitHandler will wait for a volume to be attached to a server

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateBackupWaitHandler deprecated added in v0.24.0

func CreateBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup]

CreateBackupWaitHandler will wait for backup creation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateNetworkAreaRegionWaitHandler deprecated added in v1.0.0

func CreateNetworkAreaRegionWaitHandler(ctx context.Context, a APIClientInterface, organizationId, areaId, region string) *wait.AsyncActionHandler[iaas.RegionalArea]

CreateNetworkAreaRegionWaitHandler will wait for network area region creation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateNetworkWaitHandler deprecated

func CreateNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network]

CreateNetworkWaitHandler will wait for network creation using network id

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateServerWaitHandler deprecated added in v0.14.0

func CreateServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

CreateServerWaitHandler will wait for server creation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateSnapshotWaitHandler deprecated added in v0.24.0

func CreateSnapshotWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, snapshotId string) *wait.AsyncActionHandler[iaas.Snapshot]

CreateSnapshotWaitHandler will wait for snapshot creation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func CreateVolumeWaitHandler deprecated added in v0.14.0

func CreateVolumeWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, volumeId string) *wait.AsyncActionHandler[iaas.Volume]

CreateVolumeWaitHandler will wait for volume creation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeallocateServerWaitHandler deprecated added in v0.16.0

func DeallocateServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

DeallocateServerWaitHandler will wait for server deallocation

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteBackupWaitHandler deprecated added in v0.24.0

func DeleteBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup]

DeleteBackupWaitHandler will wait for backup deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteImageWaitHandler deprecated added in v0.18.0

func DeleteImageWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, imageId string) *wait.AsyncActionHandler[iaas.Image]

DeleteImageWaitHandler will wait for image deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteNetworkAreaRegionWaitHandler deprecated added in v1.0.0

func DeleteNetworkAreaRegionWaitHandler(ctx context.Context, a APIClientInterface, organizationId, areaId, region string) *wait.AsyncActionHandler[iaas.RegionalArea]

DeleteNetworkAreaRegionWaitHandler will wait for network area region deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteNetworkWaitHandler deprecated

func DeleteNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network]

DeleteNetworkWaitHandler will wait for network deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteServerWaitHandler deprecated added in v0.14.0

func DeleteServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

DeleteServerWaitHandler will wait for volume deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteSnapshotWaitHandler deprecated added in v0.24.0

func DeleteSnapshotWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, snapshotId string) *wait.AsyncActionHandler[iaas.Snapshot]

DeleteSnapshotWaitHandler will wait for snapshot deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func DeleteVolumeWaitHandler deprecated added in v0.14.0

func DeleteVolumeWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, volumeId string) *wait.AsyncActionHandler[iaas.Volume]

DeleteVolumeWaitHandler will wait for volume deletion

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func ProjectRequestWaitHandler deprecated added in v0.14.0

func ProjectRequestWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, requestId string) *wait.AsyncActionHandler[iaas.Request]

ProjectRequestWaitHandler will wait for a request to succeed.

It receives a request ID that can be obtained from the "X-Request-Id" header in the HTTP response of any operation in the IaaS API. To get this response header, use the "runtime.WithCaptureHTTPResponse" method from the "core" package to get the raw HTTP response of an SDK operation. Then, the value of the request ID can be obtained by accessing the header key which is defined in the constant "XRequestIDHeader" of this package.

Example usage:

var httpResp *http.Response
ctxWithHTTPResp := runtime.WithCaptureHTTPResponse(context.Background(), &httpResp)

err = iaasClient.AddPublicIpToServer(ctxWithHTTPResp, projectId, serverId, publicIpId).Execute()

requestId := httpResp.Header[wait.XRequestIDHeader][0]
_, err = wait.ProjectRequestWaitHandler(context.Background(), iaasClient, projectId, requestId).WaitWithContext(context.Background())

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func ReadyForNetworkAreaDeletionWaitHandler deprecated added in v0.30.0

func ReadyForNetworkAreaDeletionWaitHandler(ctx context.Context, a APIClientInterface, r ResourceManagerAPIClientInterface, organizationId, areaId string) *wait.AsyncActionHandler[iaas.ProjectListResponse]

ReadyForNetworkAreaDeletionWaitHandler will wait until a deletion of network area is possible Workaround for https://github.com/stackitcloud/terraform-provider-stackit/issues/907. When the deletion for a project is triggered, the backend starts a workflow in the background which cleans up all resources within a project and deletes the project in each service. When the project is attached to an SNA, the SNA can't be deleted until the workflow inform the IaaS-API that the project is deleted.

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func RemoveVolumeFromServerWaitHandler deprecated added in v0.14.0

func RemoveVolumeFromServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId, volumeId string) *wait.AsyncActionHandler[iaas.VolumeAttachment]

RemoveVolumeFromServerWaitHandler will wait for a volume to be attached to a server

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func RescueServerWaitHandler deprecated added in v0.16.0

func RescueServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

RescueServerWaitHandler will wait for server rescue

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func ResizeServerWaitHandler deprecated added in v0.14.0

func ResizeServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) (h *wait.AsyncActionHandler[iaas.Server])

ResizeServerWaitHandler will wait for server resize It checks for an intermediate resizing status and only then waits for the server to become active

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func RestoreBackupWaitHandler deprecated added in v0.24.0

func RestoreBackupWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, backupId string) *wait.AsyncActionHandler[iaas.Backup]

RestoreBackupWaitHandler will wait for backup restoration

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func StartServerWaitHandler deprecated added in v0.16.0

func StartServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

StartServerWaitHandler will wait for server start

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func StopServerWaitHandler deprecated added in v0.16.0

func StopServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

StopServerWaitHandler will wait for server stop

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func UnrescueServerWaitHandler deprecated added in v0.16.0

func UnrescueServerWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, serverId string) *wait.AsyncActionHandler[iaas.Server]

UnrescueServerWaitHandler will wait for server unrescue

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func UpdateNetworkWaitHandler deprecated

func UpdateNetworkWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, networkId string) *wait.AsyncActionHandler[iaas.Network]

UpdateNetworkWaitHandler will wait for network update

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

func UploadImageWaitHandler deprecated added in v0.18.0

func UploadImageWaitHandler(ctx context.Context, a APIClientInterface, projectId, region, imageId string) *wait.AsyncActionHandler[iaas.Image]

UploadImageWaitHandler will wait for the status image to become AVAILABLE, which indicates the upload of the image has been completed successfully

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

Types

type APIClientInterface deprecated

type APIClientInterface interface {
	GetNetworkAreaExecute(ctx context.Context, organizationId, areaId string) (*iaas.NetworkArea, error)
	GetNetworkAreaRegionExecute(ctx context.Context, organizationId string, areaId string, region string) (*iaas.RegionalArea, error)
	ListNetworkAreaProjectsExecute(ctx context.Context, organizationId, areaId string) (*iaas.ProjectListResponse, error)
	GetProjectRequestExecute(ctx context.Context, projectId, region, requestId string) (*iaas.Request, error)
	GetNetworkExecute(ctx context.Context, projectId, region, networkId string) (*iaas.Network, error)
	GetVolumeExecute(ctx context.Context, projectId, region, volumeId string) (*iaas.Volume, error)
	GetServerExecute(ctx context.Context, projectId, region, serverId string) (*iaas.Server, error)
	GetAttachedVolumeExecute(ctx context.Context, projectId, region, serverId, volumeId string) (*iaas.VolumeAttachment, error)
	GetImageExecute(ctx context.Context, projectId, region, imageId string) (*iaas.Image, error)
	GetBackupExecute(ctx context.Context, projectId, region, backupId string) (*iaas.Backup, error)
	GetSnapshotExecute(ctx context.Context, projectId, region, snapshotId string) (*iaas.Snapshot, error)
}

Interfaces needed for tests

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

type ResourceManagerAPIClientInterface deprecated added in v0.30.0

type ResourceManagerAPIClientInterface interface {
	GetProjectExecute(ctx context.Context, id string) (*resourcemanager.GetProjectResponse, error)
}

Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead

Jump to

Keyboard shortcuts

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