Documentation
¶
Overview ¶
Policies within the StackGuardian platform serve as a set of rules or guardrails, enforceable on workflows or cloud infrastructure. These policies facilitate a self-service model with granular control.
For more details, visit our [Documentation](https://docs.stackguardian.io/docs/develop/policies/policy_types/).
Index ¶
- type Client
- func (c *Client) CreatePolicy(ctx context.Context, org string, request *sgsdkgo.PolymorphicPolicy, ...) (*sgsdkgo.PolicyCreateUpdateResponse, error)
- func (c *Client) DeletePolicy(ctx context.Context, org string, policy string, opts ...option.RequestOption) error
- func (c *Client) ListAllPolicies(ctx context.Context, org string, request *sgsdkgo.ListAllPoliciesRequest, ...) error
- func (c *Client) ReadPolicy(ctx context.Context, org string, policy string, opts ...option.RequestOption) (*sgsdkgo.PolicyGetResponse, error)
- func (c *Client) UpdatePolicy(ctx context.Context, org string, policy string, ...) (*sgsdkgo.PolicyCreateUpdateResponse, 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) CreatePolicy ¶
func (c *Client) CreatePolicy( ctx context.Context, org string, request *sgsdkgo.PolymorphicPolicy, opts ...option.RequestOption, ) (*sgsdkgo.PolicyCreateUpdateResponse, error)
Create a new Policy inside an Organization.
To create a new Insight Filter Policy, please have a look at [this discussion](https://github.com/StackGuardian/feedback/discussions/147).
func (*Client) DeletePolicy ¶
func (c *Client) DeletePolicy( ctx context.Context, org string, policy string, opts ...option.RequestOption, ) error
Permanently removes an existing policy from the Organization.
func (*Client) ListAllPolicies ¶
func (c *Client) ListAllPolicies( ctx context.Context, org string, request *sgsdkgo.ListAllPoliciesRequest, opts ...option.RequestOption, ) error
List all the policies inside an Organization. Supports Pagination and Filtering using query parameters.
func (*Client) ReadPolicy ¶
func (c *Client) ReadPolicy( ctx context.Context, org string, policy string, opts ...option.RequestOption, ) (*sgsdkgo.PolicyGetResponse, error)
Read an existing policy's details.
func (*Client) UpdatePolicy ¶
func (c *Client) UpdatePolicy( ctx context.Context, org string, policy string, request *sgsdkgo.PatchedPolymorphicPolicy, opts ...option.RequestOption, ) (*sgsdkgo.PolicyCreateUpdateResponse, error)
Update an existing policy's details.