Documentation
¶
Index ¶
- type CreateRequest
- type CreateResponse
- type DSAInstancesService
- func (svc *DSAInstancesService) Create(ctx context.Context, projectID, instanceName, planID string, ...) (res CreateResponse, w *wait.Handler, err error)
- func (svc *DSAInstancesService) Delete(ctx context.Context, projectID, instanceID string) (w *wait.Handler, err error)
- func (svc *DSAInstancesService) Get(ctx context.Context, projectID, instanceID string) (res Instance, err error)
- func (svc *DSAInstancesService) List(ctx context.Context, projectID string) (res ListResponse, err error)
- func (svc *DSAInstancesService) Update(ctx context.Context, projectID, instanceID, planID string, ...) (res UpdateResponse, w *wait.Handler, err error)
- type Instance
- type LastOperation
- type ListResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
PlanID string `json:"planId,omitempty"`
InstanceName string `json:"instanceName,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
}
CreateRequest holds data for creating instance
type CreateResponse ¶
type CreateResponse struct {
InstanceID string `json:"instanceId,omitempty"`
}
CreateResponse is the server response for a creation call
type DSAInstancesService ¶
DSAInstancesService is the service that manages DSA instances
func (*DSAInstancesService) Create ¶
func (svc *DSAInstancesService) Create(ctx context.Context, projectID, instanceName, planID string, parameters map[string]string) (res CreateResponse, w *wait.Handler, err error)
Create creates a new DSA instance and returns the server response (CreateResponse) and a wait handler which upon call to `Wait()` will wait until the instance is successfully created Wait() returns the full instance details (Instance) and error if it occurred See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Instance.provision
func (*DSAInstancesService) Delete ¶
func (svc *DSAInstancesService) Delete(ctx context.Context, projectID, instanceID string) (w *wait.Handler, err error)
Delete deletes a DSA instance and returns a wait handler and error if occurred `Wait()` will wait until the instance is successfully deleted Wait() returns nil on success or Instance if failed and error if it occurred See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Instance.deprovision
func (*DSAInstancesService) Get ¶
func (svc *DSAInstancesService) Get(ctx context.Context, projectID, instanceID string) (res Instance, err error)
Get returns the instance information by project and instance IDs See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Instance.get
func (*DSAInstancesService) List ¶
func (svc *DSAInstancesService) List(ctx context.Context, projectID string) (res ListResponse, err error)
List returns a list of DSA instances in project See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Instance.list
func (*DSAInstancesService) Update ¶
func (svc *DSAInstancesService) Update(ctx context.Context, projectID, instanceID, planID string, parameters map[string]string) (res UpdateResponse, w *wait.Handler, err error)
Update updates a DSA instance and returns the server response (UpdateResponse) and a wait handler which upon call to `Wait()` will wait until the instance is successfully updated Wait() returns the full instance details (Instance) and error if it occurred See also https://api.stackit.schwarz/data-services/openapi.v1.html#operation/Instance.update
type Instance ¶
type Instance struct {
InstanceID string `json:"instanceId,omitempty"`
Name string `json:"name,omitempty"`
PlanID string `json:"planId,omitempty"`
DashboardURL string `json:"dashboardUrl,omitempty"`
CFGUID string `json:"cfGuid,omitempty"`
CFSpaceGUID string `json:"cfSpaceGuid,omitempty"`
CFOrganizationGUID string `json:"cfOrganizationGuid,omitempty"`
ImageURL string `json:"imageUrl,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
LastOperation LastOperation `json:"lastOperation,omitempty"`
}
Instance is a struct representing an instance
type LastOperation ¶
type LastOperation struct {
Type string `json:"type,omitempty"`
State string `json:"state,omitempty"`
Description string `json:"description,omitempty"`
}
LastOperation is a struct representing instance last operation
type ListResponse ¶
type ListResponse struct {
Instances []Instance `json:"instances,omitempty"`
}
ListResponse represents a list of instances returned from the server
type UpdateRequest ¶
type UpdateRequest struct {
PlanID string `json:"planId,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
}
UpdateRequest holds data for updating instance
type UpdateResponse ¶
type UpdateResponse struct {
Error string `json:"error,omitempty"`
Description string `json:"description,omitempty"`
}
UpdateResponse is the server response for an Update call