policyaggregate

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "PolicyAggregate"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [6]string{"create", "update", "delete", "show", "show_non_catalog", "index"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeBadGateway

func MakeBadGateway(err error) *goa.ServiceError

MakeBadGateway builds a goa.ServiceError from an error.

func MakeBadRequest

func MakeBadRequest(err error) *goa.ServiceError

MakeBadRequest builds a goa.ServiceError from an error.

func MakeForbidden

func MakeForbidden(err error) *goa.ServiceError

MakeForbidden builds a goa.ServiceError from an error.

func MakeInternalError

func MakeInternalError(err error) *goa.ServiceError

MakeInternalError builds a goa.ServiceError from an error.

func MakeNotFound

func MakeNotFound(err error) *goa.ServiceError

MakeNotFound builds a goa.ServiceError from an error.

func MakeUnauthorized

func MakeUnauthorized(err error) *goa.ServiceError

MakeUnauthorized builds a goa.ServiceError from an error.

func MakeUnprocessableEntity

func MakeUnprocessableEntity(err error) *goa.ServiceError

MakeUnprocessableEntity builds a goa.ServiceError from an error.

func NewCreateEndpoint

func NewCreateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewCreateEndpoint returns an endpoint function that calls the method "create" of service "PolicyAggregate".

func NewDeleteEndpoint

func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "PolicyAggregate".

func NewIndexEndpoint

func NewIndexEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewIndexEndpoint returns an endpoint function that calls the method "index" of service "PolicyAggregate".

func NewShowEndpoint

func NewShowEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewShowEndpoint returns an endpoint function that calls the method "show" of service "PolicyAggregate".

func NewShowNonCatalogEndpoint

func NewShowNonCatalogEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewShowNonCatalogEndpoint returns an endpoint function that calls the method "show_non_catalog" of service "PolicyAggregate".

func NewUpdateEndpoint

func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "PolicyAggregate".

func NewViewedPolicyAggregate

func NewViewedPolicyAggregate(res *PolicyAggregate, view string) *policyaggregateviews.PolicyAggregate

NewViewedPolicyAggregate initializes viewed result type PolicyAggregate from result type PolicyAggregate using the given view.

func NewViewedPolicyAggregateList

func NewViewedPolicyAggregateList(res *PolicyAggregateList, view string) *policyaggregateviews.PolicyAggregateList

NewViewedPolicyAggregateList initializes viewed result type PolicyAggregateList from result type PolicyAggregateList using the given view.

func NewViewedPolicyAggregateNonCatalog

func NewViewedPolicyAggregateNonCatalog(res *PolicyAggregateNonCatalog, view string) *policyaggregateviews.PolicyAggregateNonCatalog

NewViewedPolicyAggregateNonCatalog initializes viewed result type PolicyAggregateNonCatalog from result type PolicyAggregateNonCatalog using the given view.

Types

type Auther

type Auther interface {
	// JWTAuth implements the authorization logic for the JWT security scheme.
	JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error)
}

Auther defines the authorization functions to be implemented by the service.

type Client

type Client struct {
	CreateEndpoint         goa.Endpoint
	UpdateEndpoint         goa.Endpoint
	DeleteEndpoint         goa.Endpoint
	ShowEndpoint           goa.Endpoint
	ShowNonCatalogEndpoint goa.Endpoint
	IndexEndpoint          goa.Endpoint
}

Client is the "PolicyAggregate" service client.

func NewClient

func NewClient(create, update, delete_, show, showNonCatalog, index goa.Endpoint) *Client

NewClient initializes a "PolicyAggregate" service client given the endpoints.

func (*Client) Create

func (c *Client) Create(ctx context.Context, p *CreatePayload) (res *CreateResult, err error)

Create calls the "create" endpoint of the "PolicyAggregate" service. Create may return the following errors:

  • "unprocessable_entity" (type *goa.ServiceError)
  • error: internal error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)

Delete calls the "delete" endpoint of the "PolicyAggregate" service. Delete may return the following errors:

  • "not_found" (type *goa.ServiceError)
  • error: internal error

func (*Client) Index

func (c *Client) Index(ctx context.Context, p *IndexPayload) (res *PolicyAggregateList, err error)

Index calls the "index" endpoint of the "PolicyAggregate" service.

func (*Client) Show

func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *PolicyAggregate, err error)

Show calls the "show" endpoint of the "PolicyAggregate" service. Show may return the following errors:

  • "not_found" (type *goa.ServiceError)
  • error: internal error

func (*Client) ShowNonCatalog

func (c *Client) ShowNonCatalog(ctx context.Context, p *ShowNonCatalogPayload) (res *PolicyAggregateNonCatalog, err error)

ShowNonCatalog calls the "show_non_catalog" endpoint of the "PolicyAggregate" service.

func (*Client) Update

func (c *Client) Update(ctx context.Context, p *UpdatePayload) (err error)

Update calls the "update" endpoint of the "PolicyAggregate" service.

type ConfigurationOption

type ConfigurationOption struct {
	// name of option
	Name string
	// label of option
	Label string
	// type of option
	Type string
	// value of option
	Value interface{}
	// no_echo determines whether the value of the configuration option should be
	// hidden in UIs and API responses.
	NoEcho bool
}

ConfigurationOption describes a single parameter value used to configure an applied policy.

type ConfigurationOptionCreateType

type ConfigurationOptionCreateType struct {
	// name of option
	Name string
	// value of option
	Value interface{}
}

ConfigurationOptionCreateType is the payload for creating a single parameter value used to configure an applied policy.

type CreatePayload

type CreatePayload struct {
	// org_id identifies an org by ID.
	OrgID uint
	// name provides a name for this specific application of the policy.
	Name string
	// description provides a human readable description for this specific
	// application of the policy.
	Description *string
	// template_href is the href of the published template that is applied.
	TemplateHref string
	// A list of project ids to include in this aggregate.
	ProjectIds []uint
	// all_projects is a flag to specify the policy should be run on all projects
	// in the org.
	AllProjects bool
	// frequency specifies the frequency with which to run policy evaluations
	Frequency string
	// dry_run is a flag used for testing a policy so that an incident can be
	// raised without performing an action.
	DryRun bool
	// skip_approvals means that any approval actions will be skipped and all
	// actions automatically run.
	SkipApprovals bool
	// severity is the severity level of the incident.
	Severity *string
	// options lists the configuration options used to parameterize the policy.
	Options []*ConfigurationOptionCreateType
	// credentials is the map of name to credential used to launch the policy.
	Credentials map[string]string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

CreatePayload is the payload type of the PolicyAggregate service create method.

type CreateResult

type CreateResult struct {
	Location string
}

CreateResult is the result type of the PolicyAggregate service create method.

type Credentials

type Credentials struct {
	// Name in policy template source code
	Name string `json:"name"`
	// Schemes of credentials service resource supported.
	Schemes []string `json:"schemes"`
	// Label for the auth reference
	Label string `json:"label"`
	// Description of what types of permissions need to be provided by auth.
	Description *string `json:"description"`
	// Tags is an optional filter to only show credentials matching a certain tag.
	Tags []*CredentialsTag `json:"tags"`
}

Credentials describes a reference to an API signer in the credentials service in the policy language.

type CredentialsTag

type CredentialsTag struct {
	// Key is the tag key.
	Key string `json:"key"`
	// Value is the tag value.
	Value string `json:"value"`
}

type DeletePayload

type DeletePayload struct {
	// org_id identifies an org by ID.
	OrgID uint
	// policy_aggregate_id identifies a policy aggregate by ID.
	PolicyAggregateID string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

DeletePayload is the payload type of the PolicyAggregate service delete method.

type Endpoints

type Endpoints struct {
	Create         goa.Endpoint
	Update         goa.Endpoint
	Delete         goa.Endpoint
	Show           goa.Endpoint
	ShowNonCatalog goa.Endpoint
	Index          goa.Endpoint
}

Endpoints wraps the "PolicyAggregate" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "PolicyAggregate" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "PolicyAggregate" service endpoints.

type IndexPayload

type IndexPayload struct {
	// org_id identifies an org by ID.
	OrgID uint
	// etag is an HTTP ETag. It is typically the previous ETag value retrieved by
	// client if any. Service returns an empty response with HTTP status code 304
	// Not Modified if value matches current value server side.
	Etag *string
	// View used to render policy aggregates.
	View *string
	// name is a filter to only show policy aggregates that match this name.
	Name []string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

IndexPayload is the payload type of the PolicyAggregate service index method.

type Org

type Org struct {
	// id is the Org ID
	ID uint
	// name is the organization name
	Name string
}

Org represents a RightScale organization.

type Parameter

type Parameter struct {
	// Name of the parameter
	Name string `json:"name"`
	// Type of the parameter
	Type string `json:"type"`
	// Label to show in the UI
	Label string `json:"label"`
	// The index of this parameter in the list
	Index uint `json:"index"`
	// The category used to group parameters
	Category *string `json:"category"`
	// Description of the parameter
	Description *string `json:"description"`
	// The default value for the parameter
	Default interface{} `json:"default"`
	// no_echo determines whether the value of the parameter should be hidden in
	// UIs and API responses.
	NoEcho bool `json:"no_echo"`
	// List of values allowed for this parameter
	AllowedValues []interface{} `json:"allowed_values"`
	// The minimum length of a string parameter
	MinLength *uint `json:"min_length"`
	// The maximum length of a string parameter
	MaxLength *uint `json:"max_length"`
	// The minimum value of a number parmameter
	MinValue *float64 `json:"min_value"`
	// The maximum value of a number parameter
	MaxValue *float64 `json:"max_value"`
	// The regular expression pattern used to validate a string parameter
	AllowedPattern *Regexp `json:"allowed_pattern"`
	// The description used for constraints
	ConstraintDescription *string `json:"constraint_description"`
}

Parameter defines a parameter given as input to a Policy

type Permission

type Permission struct {
	// Name of a permission
	Name string `json:"name"`
	// Label is used in the UI
	Label *string `json:"label"`
	// List of resource names the permission is applied to
	Resources []string `json:"resources"`
	// List of action names the permission is applied to
	Actions []string `json:"actions"`
}

Permission defines a role required in RightScale to perform actions on resources

type PolicyAggregate

type PolicyAggregate struct {
	// id identifies an policy aggregate by ID.
	ID string
	// name provides a name for this specific application of the policy.
	Name string
	// Org represents a RightScale organization.
	Org *Org
	// href is the href of the policy aggregate.
	Href string
	// incident_aggregate_href is the href of the incident aggregate.
	IncidentAggregateHref *string
	// published_template links to key attributes of the published template from
	// which the policy aggregate originated.
	PublishedTemplate *PublishedTemplate
	// project_ids is a the list of projects in this aggregate. If empty, applies
	// to all projects, minus excluded projects
	ProjectIds []uint
	// excluded_project_ids is a list of projects to exclude form this aggregate.
	ExcludedProjectIds []uint
	// description provides a human readable description for this specific
	// application of the policy.
	Description *string
	// doc_link is a HTTP URI to a page containing detailed documentation for the
	// policy.
	DocLink *string
	// info is an arbitrary set of key/value pairs that provide additional
	// information such as the policy author, support contact information, etc.
	Info map[string]string
	// created_by is the RightScale user that applied the policy.
	CreatedBy *User
	// created_at is the policy aggregate creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_at is the policy aggregate update timestamp in RFC3339 format.
	UpdatedAt *string
	// severity defines the severity level of incidents raised from this policy
	// aggregate.
	Severity *string
	// category is the type categorization of the policy aggregate.
	Category *string
	// frequency specifies the frequency with which individual policy evaluations
	// run.
	Frequency *string
	// dry_run is a flag used for testing a policy so that an incident can be
	// raised without performing an action.
	DryRun *bool
	// skip_approvals means that any approval actions will be skipped and all
	// actions automatically run.
	SkipApprovals *bool
	// options lists the configuration options used to parameterize the policy.
	Options []*ConfigurationOption
	// credentials is the map of name to credential used to launch the policy.
	Credentials map[string]string
	// status is used to identify the current status of the policy aggregate.
	Status *string
	// running_project_ids is a the list of projects the policy aggregate is
	// currently running on.
	RunningProjectIds []uint
	// The number of applied policies running across all projects.
	Count *uint
	// The number of applied policies in an active state.
	ActiveCount *uint
	// The number of applied policies in an error state.
	ErrorCount *uint
	// errors captures the errors occurred while applying aggregate to individual
	// projects.
	Errors map[string]string
	// An array of the individual applied policies and their statuses.
	Items PolicyAggregateItemCollection
	// kind is "gov#policy_aggregate".
	Kind string
}

PolicyAggregate is the result type of the PolicyAggregate service show method.

func NewPolicyAggregate

func NewPolicyAggregate(vres *policyaggregateviews.PolicyAggregate) *PolicyAggregate

NewPolicyAggregate initializes result type PolicyAggregate from viewed result type PolicyAggregate.

type PolicyAggregateCollection

type PolicyAggregateCollection []*PolicyAggregate

type PolicyAggregateItem

type PolicyAggregateItem struct {
	// id identifies an applied policy by ID.
	ID string
	// Project represents a RightScale project and provides some information about
	// the project.
	Project *Project
	// url of the applied policy.
	URL string
	// created_at is the applied policy creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_at is the applied policy update timestamp in RFC3339 format.
	UpdatedAt *string
	// status is used to identify the current status of the applied policy.
	Status *string
	// error is the error message returned if the evaluation failed. On success
	// this attribute is empty.
	Error *string
	// errored_at is the applied policy error timestamp in RFC3339 format. On
	// success this attribute is empty.
	ErroredAt *string
	// kind is "gov#policy_aggregate_item".
	Kind string
}

PolicyAggregateItem is a summarized view of a running applied policy.

type PolicyAggregateItemCollection

type PolicyAggregateItemCollection []*PolicyAggregateItem

type PolicyAggregateList

type PolicyAggregateList struct {
	// count is the number of policy aggregates in the list.
	Count *uint
	// etag is an HTTP ETag for the policy aggregate list.
	Etag string
	// items is the array of policy aggregates.
	Items PolicyAggregateCollection
	// not_modified is a flag used internally that indicates how to encode the HTTP
	// response (i.e. 200 or 304).
	NotModified *string
	// kind is "gov#policy_aggregate_list".
	Kind string
}

PolicyAggregateList is the result type of the PolicyAggregate service index method.

func NewPolicyAggregateList

func NewPolicyAggregateList(vres *policyaggregateviews.PolicyAggregateList) *PolicyAggregateList

NewPolicyAggregateList initializes result type PolicyAggregateList from viewed result type PolicyAggregateList.

type PolicyAggregateNonCatalog

type PolicyAggregateNonCatalog struct {
	// href is the href of the policy aggregate.
	Href string
	// incident_aggregate_href is the href of the incident aggregate.
	IncidentAggregateHref *string
	// running_project_ids is a the list of projects the policy aggregate is
	// currently running on.
	RunningProjectIds []uint
	// The number of applied policies running across all projects.
	Count *uint
	// The number of applied policies in an active state.
	ActiveCount *uint
	// The number of applied policies in an error state.
	ErrorCount *uint
	// An array of the individual applied policies and their statuses.
	Items PolicyAggregateNonCatalogItemCollection
	// kind is "gov#policy_aggregate_non_catalog".
	Kind string
}

PolicyAggregateNonCatalog is the result type of the PolicyAggregate service show_non_catalog method.

func NewPolicyAggregateNonCatalog

NewPolicyAggregateNonCatalog initializes result type PolicyAggregateNonCatalog from viewed result type PolicyAggregateNonCatalog.

type PolicyAggregateNonCatalogItem

type PolicyAggregateNonCatalogItem struct {
	// id identifies an applied policy by ID.
	ID string
	// name provides a name for this specific application of the policy.
	Name *string
	// description provides a human readable description for this specific
	// application of the policy.
	Description *string
	// Project represents a RightScale project and provides some information about
	// the project.
	Project *Project
	// url of the applied policy.
	URL string
	// policy_template links to key attributes of the template from which the item
	// originated.
	PolicyTemplate *PolicyTemplate
	// status is used to identify the current status of the applied policy.
	Status *string
	// error is the error message returned if the evaluation failed. On success
	// this attribute is empty.
	Error *string
	// errored_at is the applied policy error timestamp in RFC3339 format. On
	// success this attribute is empty.
	ErroredAt *string
	// created_by is the RightScale user that applied the policy.
	CreatedBy *User
	// created_at is the policy aggregate creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_at is the policy aggregate update timestamp in RFC3339 format.
	UpdatedAt *string
	// severity defines the severity level of incidents raised from this policy
	// aggregate.
	Severity *string
	// category is the type categorization of the policy aggregate.
	Category *string
	// frequency specifies the frequency with which individual policy evaluations
	// run.
	Frequency *string
	// dry_run is a flag used for testing a policy so that an incident can be
	// raised without performing an action.
	DryRun *bool
	// kind is "gov#policy_aggregate_non_catalog_item".
	Kind string
}

PolicyAggregateNonCatalogItem is a summarized view of a running applied policy.

type PolicyAggregateNonCatalogItemCollection

type PolicyAggregateNonCatalogItemCollection []*PolicyAggregateNonCatalogItem

type PolicyTemplate

type PolicyTemplate struct {
	// id identifies a policy template by ID.
	ID string
	// name is the unique name of the policy template in the project.
	Name string
	// project_id is the ID of the project that the policy template applies to.
	ProjectID *uint
	// rs_pt_ver is the policy engine version.
	RsPtVer *uint
	// short_description is the short description of the policy template.
	ShortDescription *string
	// long_description is the long description of the policy template. The content
	// can be markdown.
	LongDescription *string
	// doc_link is an HTTP URI to a page containing detailed documentation for the
	// policy.
	DocLink *string
	// info is an arbitrary set of key/value pairs that provide additional
	// information such as the policy author, support contact information, etc.
	Info map[string]string
	// default_frequency defines the interval the template will be run unless set
	// differently during application.
	DefaultFrequency *string
	// href is the href of the policy template.
	Href string
	// filename is the name of the file that was uploaded to create the policy
	// template.
	Filename *string
	// source is the policy template source code.
	Source *string
	// fingerprint is a SHA created during compilation. It is used to determine if
	// the template is outdated.
	Fingerprint string
	// category is the type categorization of the policy template.
	Category *string
	// created_by is the RightScale user that created the policy template.
	CreatedBy *User
	// created_at is the policy template creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_by is the RightScale user that updated the policy template.
	UpdatedBy *User
	// updated_at is the last update timestamp in RFC3339 format.
	UpdatedAt *string
	// permissions is a list of permissions required to run the policy.
	Permissions map[string]*Permission
	// required_roles is a list of governance roles, derived from permissions,
	// required to run the policy.
	RequiredRoles []string
	// parameters is a list of parameters required to apply the policy.
	Parameters map[string]*Parameter
	// severity defines the severity level of incidents raised from this policy
	// template.
	Severity *string
	// tenancy indicates whether this template can be run across multiple projects
	// or is restricted to a single project.
	Tenancy *string
	// credentials is a list of authorization for external APIs needed to run the
	// policy.
	Credentials map[string]*Credentials
	// kind is "gov#policy_template".
	Kind string
}

PolicyTemplate describes a previously uploaded policy template.

type Project

type Project struct {
	// id is the Project ID
	ID uint
	// name is the Project Name
	Name string
	// org_id is the RightScale Organization ID
	OrgID uint
	// org_name is the RightScale Organization Name
	OrgName string
}

Project represents a RightScale project and provides some information about the project.

type PublishedTemplate

type PublishedTemplate struct {
	// id identifies a published template by ID.
	ID string
	// name is the unique name of the published template in the organization.
	Name string
	// org_id is the ID of the organization that the published template belongs to.
	OrgID *uint
	// project_id is the ID of the project that the published template is published
	// from.
	ProjectID *uint
	// policy_template_id is the ID of the policy template from which the published
	// template originated.
	PolicyTemplateID *string
	// policy_template_url is the full URL to the policy template from which the
	// published template originated.
	PolicyTemplateURL *string
	// policy_template_fingerprint is fingerprint of the policy template. It is
	// used to determine if the policy template that this was published from is
	// outdated.
	PolicyTemplateFingerprint *string
	// rs_pt_ver is the policy engine version.
	RsPtVer *uint
	// short_description is the short description of the published template.
	ShortDescription *string
	// long_description is the long description of the published template. The
	// content can be markdown.
	LongDescription *string
	// doc_link is a HTTP URI to a page containing detailed documentation for the
	// policy.
	DocLink *string
	// info is an arbitrary set of key/value pairs that provide additional
	// information such as the policy author, support contact information, etc.
	Info map[string]string
	// default_frequency defines the interval the template will be run unless set
	// differently during application.
	DefaultFrequency *string
	// href is the self-referential href of the published template.
	Href string
	// filename is the name of the file that was uploaded to create the policy
	// template.
	Filename *string
	// source is published template source code.
	Source *string
	// fingerprint is a SHA created during compilation. It is used to determine if
	// the policy template that this was published from is outdated.
	Fingerprint string
	// category is the type categorization of the published template.
	Category *string
	// created_by is the RightScale user that created the published template.
	CreatedBy *User
	// created_at is the published template creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_by is the RightScale user that updated the published template.
	UpdatedBy *User
	// updated_at is the published template update timestamp in RFC3339 format.
	UpdatedAt *string
	// permissions is a list of permissions required to run the policy.
	Permissions map[string]*Permission
	// required_roles is a list of governance roles, derived from permissions,
	// required to run the policy.
	RequiredRoles []string
	// parameters is a list of parameters required to apply the policy.
	Parameters map[string]*Parameter
	// severity defines the severity level of incidents raised from this published
	// template.
	Severity *string
	// built_in is a flag to indicate whether the published template is a
	// "built-in" RS-supplied template.
	BuiltIn *bool
	// hidden is a flag to indicate whether the published template is hidden.
	Hidden *bool
	// hidden_by is the RightScale user that marked the published template as
	// hidden.
	HiddenBy *User
	// hidden_at is the hidden at timestamp in RFC3339 format.
	HiddenAt *string
	// tenancy indicates whether this template can be run across multiple projects
	// or is restricted to a single project.
	Tenancy *string
	// credentials is a list of authorization for external APIs needed to run the
	// policy.
	Credentials map[string]*Credentials
	// kind is "gov#published_template".
	Kind string
}

PublishedTemplate describes a previously created published template.

type Regexp

type Regexp struct {
	// Pattern is the regular expression pattern.
	Pattern string `json:"pattern"`
	// Options are the regular expression options. Options i (case insensitve) and
	// m (match over newlines) supported.
	Options *string `json:"options"`
}

Regular expression

type Service

type Service interface {
	// Create applies a policy template to a given project. The policy aggregate
	// will continually run until deleted.
	Create(context.Context, *CreatePayload) (res *CreateResult, err error)
	// Update changes the list of projects in a policy aggregate.
	Update(context.Context, *UpdatePayload) (err error)
	// Delete asynchronously stops and deletes a policy aggregate. All individual
	// applied policies in the aggregate will be stopped.
	Delete(context.Context, *DeletePayload) (err error)
	// Show retrieves the details of a policy aggregate.
	// The "view" return value must have one of the following views
	//	- "default"
	//	- "index"
	//	- "source"
	//	- "link"
	Show(context.Context, *ShowPayload) (res *PolicyAggregate, view string, err error)
	// ShowNonCatalog retrieves applied policies that are not part of a regular
	// aggregate. Only applied policies are applied from the project-scoped
	// Template endpoint (as opposed to the org-wide Catalog) are part of this
	// view. These template-based policies should largely be only used for
	// development and testing purposes.
	// The "view" return value must have one of the following views
	//	- "default"
	//	- "index"
	//	- "link"
	ShowNonCatalog(context.Context, *ShowNonCatalogPayload) (res *PolicyAggregateNonCatalog, view string, err error)
	// Index retrieves the list of policy aggregates in an org.
	// The "view" return value must have one of the following views
	//	- "default"
	//	- "link"
	Index(context.Context, *IndexPayload) (res *PolicyAggregateList, view string, err error)
}

Service is the PolicyAggregate service interface.

type ShowNonCatalogPayload

type ShowNonCatalogPayload struct {
	// org_id identifies an org by ID.
	OrgID uint
	// View used to render applied policy items.
	View *string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

ShowNonCatalogPayload is the payload type of the PolicyAggregate service show_non_catalog method.

type ShowPayload

type ShowPayload struct {
	// org_id identifies an org by ID.
	OrgID uint
	// policy_aggregate_id identifies a policy aggregate by ID.
	PolicyAggregateID string
	// View used to render policy aggregate
	View *string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

ShowPayload is the payload type of the PolicyAggregate service show method.

type UpdatePayload

type UpdatePayload struct {
	// policy_aggregate_id identifies an policy aggregate by ID.
	PolicyAggregateID string
	// org_id identifies an org by ID.
	OrgID uint
	// project_ids is a the list of projects in this aggregate. If empty, applies
	// to all projects, minus excluded projects
	ProjectIds []uint
	// excluded_project_ids is a list of project ids to exclude from this aggregate.
	ExcludedProjectIds []uint
	// name provides a name for this specific application of the policy.
	Name *string
	// description provides a human readable description for this specific
	// application of the policy.
	Description *string
	// frequency specifies the frequency with which to run policy evaluations
	Frequency *string
	// dry_run is a flag used for testing a policy so that an incident can be
	// raised without performing an action.
	DryRun *bool
	// skip_approvals means that any approval actions will be skipped and all
	// actions automatically run.
	SkipApprovals *bool
	// options lists the configuration options used to parameterize the policy.
	Options []*ConfigurationOptionCreateType
	// severity defines the severity level of incidents raised from this applied
	// policy.
	Severity *string
	// JWT token used to perform authorization
	Token *string
	// API Version, must be specified using this header
	APIVersion string
}

UpdatePayload is the payload type of the PolicyAggregate service update method.

type User

type User struct {
	// ID of user
	ID uint
	// email of user
	Email string
	// name of user, usually of the form 'First Last'
	Name string
}

User represents a registered RightScale user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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