Documentation
¶
Overview ¶
StackGuardian Workflows are automated sequences designed to deploy, manage, and maintain cloud infrastructure using Infrastructure as Code (IaC) templates.
For more details, visit our [Documentation](https://docs.stackguardian.io/docs/deploy/workflows/overview/).
Index ¶
- type Client
- func (c *Client) CreateWorkflow(ctx context.Context, org string, wfGrp string, request *sgsdkgo.Workflow, ...) (*sgsdkgo.GeneratedWorkflowCreateResponse, error)
- func (c *Client) DeleteWorkflow(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.GeneratedWorkflowDeleteResponse, error)
- func (c *Client) GetSignedUrlToUploadTfstateFile(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.GeneratedWorkflowUploadUrlResponse, error)
- func (c *Client) ListAllWorkflowArtifacts(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.GeneratedWorkflowListAllArtifactsResponse, error)
- func (c *Client) ListAllWorkflows(ctx context.Context, org string, wfGrp string, ...) (*sgsdkgo.WorkflowsListAll, error)
- func (c *Client) Outputs(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.GeneratedWorkflowOutputsResponse, error)
- func (c *Client) ReadWorkflow(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.WorkflowGetResponse, error)
- func (c *Client) UpdateWorkflow(ctx context.Context, org string, wf string, wfGrp string, ...) (*sgsdkgo.GeneratedWorkflowUpdateResponse, error)
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
}
func NewClient ¶
func NewClient(opts ...option.RequestOption) *Client
func (*Client) CreateWorkflow ¶
func (c *Client) CreateWorkflow( ctx context.Context, org string, wfGrp string, request *sgsdkgo.Workflow, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowCreateResponse, error)
Create a new workflow in the Workflow Group.
To create a workflow with a state file: 1. Create a workflow using this `Create Workflow` endpoint. 2. Use the '[Get Signed URL to upload tfstate file](#tag/Workflows/operation/Get%20Signed%20URL%20to%20upload%20tfstate%20file)' endpoint to get a signed upload URL for this Workflow. 3. Upload the state file to the returned signed URL.
func (*Client) DeleteWorkflow ¶
func (c *Client) DeleteWorkflow( ctx context.Context, org string, wf string, wfGrp string, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowDeleteResponse, error)
Delete an existing workflow.
func (*Client) GetSignedUrlToUploadTfstateFile ¶ added in v1.2.0
func (c *Client) GetSignedUrlToUploadTfstateFile( ctx context.Context, org string, wf string, wfGrp string, request *sgsdkgo.GetSignedUrlToUploadTfstateFileRequest, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowUploadUrlResponse, error)
This endpoint returns a signed URL to upload a tfstate file for a workflow. The state file can be uploaded by performing a PUT operation on the returned URL. This URL is valid for 5 minutes.
To create a workflow with a state file: 1. Create a Workflow using the '[Create Workflow](#tag/Workflows/operation/Create%20Workflow)' endpoint. 2. Use this `Get Signed URL to upload tfstate file` endpoint to get a signed upload URL for this Workflow. 3. Upload the state file to the returned URL using a PUT request like in the example below:
curl -v -i -s -X PUT \
-H "Content-Type: application/json" \
-T "<your_tf_state_file>.json" \
"https://<your-returned-signed-url>"
func (*Client) ListAllWorkflowArtifacts ¶
func (c *Client) ListAllWorkflowArtifacts( ctx context.Context, org string, wf string, wfGrp string, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowListAllArtifactsResponse, error)
Retrieve a list of all artifacts for a workflow. This List All endpoint does not support pagination at the moment.
func (*Client) ListAllWorkflows ¶
func (c *Client) ListAllWorkflows( ctx context.Context, org string, wfGrp string, request *sgsdkgo.ListAllWorkflowsRequest, opts ...option.RequestOption, ) (*sgsdkgo.WorkflowsListAll, error)
Retrieve a list of all workflows in a workflow group. Supports Pagination and Filtering using query parameters.
func (*Client) Outputs ¶
func (c *Client) Outputs( ctx context.Context, org string, wf string, wfGrp string, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowOutputsResponse, error)
Retrieve the outputs for a workflow.
func (*Client) ReadWorkflow ¶
func (c *Client) ReadWorkflow( ctx context.Context, org string, wf string, wfGrp string, opts ...option.RequestOption, ) (*sgsdkgo.WorkflowGetResponse, error)
Retrieve the details of an existing Workflow.
func (*Client) UpdateWorkflow ¶
func (c *Client) UpdateWorkflow( ctx context.Context, org string, wf string, wfGrp string, request *sgsdkgo.PatchedWorkflow, opts ...option.RequestOption, ) (*sgsdkgo.GeneratedWorkflowUpdateResponse, error)
Update an existing workflow's configuration