policyrules

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package policyrules contains methods related to PolicyRules

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyRulesV1

type PolicyRulesV1 struct {
	// contains filtered or unexported fields
}

PolicyRulesV1 represents a custom type struct

func (*PolicyRulesV1) CreatePolicyRule

func (p *PolicyRulesV1) CreatePolicyRule(
	body *models.CreatePolicyRuleV1Request) (
	*models.CreateRuleResponse, *apiutils.APIError)

CreatePolicyRule Creates a new policy rule. Policy rules determine how a policy should be assigned to assets.

Additionally, to create a rule in the context of another Organizational Unit, refer to the
Getting Started documentation.

func (*PolicyRulesV1) DeletePolicyRule

func (p *PolicyRulesV1) DeletePolicyRule(
	ruleId string) (
	*models.DeleteRuleResponse, *apiutils.APIError)

DeletePolicyRule Deletes the specified policy rule.

func (*PolicyRulesV1) ListPolicyRules

func (p *PolicyRulesV1) ListPolicyRules(
	limit *int64,
	start *string,
	organizationalUnitId *string,
	sort *string,
	filter *string) (
	*models.ListRulesResponse, *apiutils.APIError)

ListPolicyRules Returns a list of policy rules.

func (*PolicyRulesV1) ReadPolicyRule

func (p *PolicyRulesV1) ReadPolicyRule(
	ruleId string) (
	*models.ReadRuleResponse, *apiutils.APIError)

ReadPolicyRule Returns a representation of the specified policy rule.

func (*PolicyRulesV1) UpdatePolicyRule

func (p *PolicyRulesV1) UpdatePolicyRule(
	ruleId string,
	body *models.UpdatePolicyRuleV1Request) (
	*models.UpdateRuleResponse, *apiutils.APIError)

UpdatePolicyRule Updates an existing policy rule.

type PolicyRulesV1Client

type PolicyRulesV1Client interface {
	// ListPolicyRules Returns a list of policy rules.
	ListPolicyRules(
		limit *int64,
		start *string,
		organizationalUnitId *string,
		sort *string,
		filter *string) (
		*models.ListRulesResponse, *apiutils.APIError)

	// CreatePolicyRule Creates a new policy rule. Policy rules determine how a policy should be assigned to assets.
	//  Additionally, to create a rule in the context of another Organizational Unit, refer to the
	//  Getting Started documentation.
	CreatePolicyRule(
		body *models.CreatePolicyRuleV1Request) (
		*models.CreateRuleResponse, *apiutils.APIError)

	// ReadPolicyRule Returns a representation of the specified policy rule.
	ReadPolicyRule(
		ruleId string) (
		*models.ReadRuleResponse, *apiutils.APIError)

	// UpdatePolicyRule Updates an existing policy rule.
	UpdatePolicyRule(
		ruleId string,
		body *models.UpdatePolicyRuleV1Request) (
		*models.UpdateRuleResponse, *apiutils.APIError)

	// DeletePolicyRule Deletes the specified policy rule.
	DeletePolicyRule(
		ruleId string) (
		*models.DeleteRuleResponse, *apiutils.APIError)
}

PolicyRulesV1Client represents a custom type interface

func NewPolicyRulesV1

func NewPolicyRulesV1(config config.Config) PolicyRulesV1Client

NewPolicyRulesV1 returns PolicyRulesV1Client

Jump to

Keyboard shortcuts

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