configurationgovernancev1

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package configurationgovernancev1 : Operations and models for the ConfigurationGovernanceV1 service

Index

Constants

View Source
const (
	EnforcementActionActionAuditLogConst = "audit_log"
	EnforcementActionActionDisallowConst = "disallow"
)

Constants associated with the EnforcementAction.Action property. To block a request from completing, use `disallow`. To log the request to Activity Tracker with LogDNA, use `audit_log`.

View Source
const (
	RuleConditionOperatorIpsInRangeConst           = "ips_in_range"
	RuleConditionOperatorIsEmptyConst              = "is_empty"
	RuleConditionOperatorIsFalseConst              = "is_false"
	RuleConditionOperatorIsNotEmptyConst           = "is_not_empty"
	RuleConditionOperatorIsTrueConst               = "is_true"
	RuleConditionOperatorNumEqualsConst            = "num_equals"
	RuleConditionOperatorNumGreaterThanConst       = "num_greater_than"
	RuleConditionOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleConditionOperatorNumLessThanConst          = "num_less_than"
	RuleConditionOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleConditionOperatorNumNotEqualsConst         = "num_not_equals"
	RuleConditionOperatorStringEqualsConst         = "string_equals"
	RuleConditionOperatorStringMatchConst          = "string_match"
	RuleConditionOperatorStringNotEqualsConst      = "string_not_equals"
	RuleConditionOperatorStringNotMatchConst       = "string_not_match"
	RuleConditionOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleCondition.Operator property. The way in which the `property` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const (
	RuleRequiredConfigOperatorIpsInRangeConst           = "ips_in_range"
	RuleRequiredConfigOperatorIsEmptyConst              = "is_empty"
	RuleRequiredConfigOperatorIsFalseConst              = "is_false"
	RuleRequiredConfigOperatorIsNotEmptyConst           = "is_not_empty"
	RuleRequiredConfigOperatorIsTrueConst               = "is_true"
	RuleRequiredConfigOperatorNumEqualsConst            = "num_equals"
	RuleRequiredConfigOperatorNumGreaterThanConst       = "num_greater_than"
	RuleRequiredConfigOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleRequiredConfigOperatorNumLessThanConst          = "num_less_than"
	RuleRequiredConfigOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleRequiredConfigOperatorNumNotEqualsConst         = "num_not_equals"
	RuleRequiredConfigOperatorStringEqualsConst         = "string_equals"
	RuleRequiredConfigOperatorStringMatchConst          = "string_match"
	RuleRequiredConfigOperatorStringNotEqualsConst      = "string_not_equals"
	RuleRequiredConfigOperatorStringNotMatchConst       = "string_not_match"
	RuleRequiredConfigOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleRequiredConfig.Operator property. The way in which the `property` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const (
	RuleScopeScopeTypeAccountConst                = "account"
	RuleScopeScopeTypeAccountResourceGroupConst   = "account.resource_group"
	RuleScopeScopeTypeEnterpriseConst             = "enterprise"
	RuleScopeScopeTypeEnterpriseAccountConst      = "enterprise.account"
	RuleScopeScopeTypeEnterpriseAccountGroupConst = "enterprise.account_group"
)

Constants associated with the RuleScope.ScopeType property. The type of scope that you want to evaluate.

View Source
const (
	RuleSinglePropertyOperatorIpsInRangeConst           = "ips_in_range"
	RuleSinglePropertyOperatorIsEmptyConst              = "is_empty"
	RuleSinglePropertyOperatorIsFalseConst              = "is_false"
	RuleSinglePropertyOperatorIsNotEmptyConst           = "is_not_empty"
	RuleSinglePropertyOperatorIsTrueConst               = "is_true"
	RuleSinglePropertyOperatorNumEqualsConst            = "num_equals"
	RuleSinglePropertyOperatorNumGreaterThanConst       = "num_greater_than"
	RuleSinglePropertyOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleSinglePropertyOperatorNumLessThanConst          = "num_less_than"
	RuleSinglePropertyOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleSinglePropertyOperatorNumNotEqualsConst         = "num_not_equals"
	RuleSinglePropertyOperatorStringEqualsConst         = "string_equals"
	RuleSinglePropertyOperatorStringMatchConst          = "string_match"
	RuleSinglePropertyOperatorStringNotEqualsConst      = "string_not_equals"
	RuleSinglePropertyOperatorStringNotMatchConst       = "string_not_match"
	RuleSinglePropertyOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleSingleProperty.Operator property. The way in which the `property` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const (
	RuleTargetAttributeOperatorIpsInRangeConst           = "ips_in_range"
	RuleTargetAttributeOperatorIsEmptyConst              = "is_empty"
	RuleTargetAttributeOperatorIsFalseConst              = "is_false"
	RuleTargetAttributeOperatorIsNotEmptyConst           = "is_not_empty"
	RuleTargetAttributeOperatorIsTrueConst               = "is_true"
	RuleTargetAttributeOperatorNumEqualsConst            = "num_equals"
	RuleTargetAttributeOperatorNumGreaterThanConst       = "num_greater_than"
	RuleTargetAttributeOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleTargetAttributeOperatorNumLessThanConst          = "num_less_than"
	RuleTargetAttributeOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleTargetAttributeOperatorNumNotEqualsConst         = "num_not_equals"
	RuleTargetAttributeOperatorStringEqualsConst         = "string_equals"
	RuleTargetAttributeOperatorStringMatchConst          = "string_match"
	RuleTargetAttributeOperatorStringNotEqualsConst      = "string_not_equals"
	RuleTargetAttributeOperatorStringNotMatchConst       = "string_not_match"
	RuleTargetAttributeOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleTargetAttribute.Operator property. The way in which the `name` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const (
	RuleConditionSinglePropertyOperatorIpsInRangeConst           = "ips_in_range"
	RuleConditionSinglePropertyOperatorIsEmptyConst              = "is_empty"
	RuleConditionSinglePropertyOperatorIsFalseConst              = "is_false"
	RuleConditionSinglePropertyOperatorIsNotEmptyConst           = "is_not_empty"
	RuleConditionSinglePropertyOperatorIsTrueConst               = "is_true"
	RuleConditionSinglePropertyOperatorNumEqualsConst            = "num_equals"
	RuleConditionSinglePropertyOperatorNumGreaterThanConst       = "num_greater_than"
	RuleConditionSinglePropertyOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleConditionSinglePropertyOperatorNumLessThanConst          = "num_less_than"
	RuleConditionSinglePropertyOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleConditionSinglePropertyOperatorNumNotEqualsConst         = "num_not_equals"
	RuleConditionSinglePropertyOperatorStringEqualsConst         = "string_equals"
	RuleConditionSinglePropertyOperatorStringMatchConst          = "string_match"
	RuleConditionSinglePropertyOperatorStringNotEqualsConst      = "string_not_equals"
	RuleConditionSinglePropertyOperatorStringNotMatchConst       = "string_not_match"
	RuleConditionSinglePropertyOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleConditionSingleProperty.Operator property. The way in which the `property` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const (
	RuleRequiredConfigSinglePropertyOperatorIpsInRangeConst           = "ips_in_range"
	RuleRequiredConfigSinglePropertyOperatorIsEmptyConst              = "is_empty"
	RuleRequiredConfigSinglePropertyOperatorIsFalseConst              = "is_false"
	RuleRequiredConfigSinglePropertyOperatorIsNotEmptyConst           = "is_not_empty"
	RuleRequiredConfigSinglePropertyOperatorIsTrueConst               = "is_true"
	RuleRequiredConfigSinglePropertyOperatorNumEqualsConst            = "num_equals"
	RuleRequiredConfigSinglePropertyOperatorNumGreaterThanConst       = "num_greater_than"
	RuleRequiredConfigSinglePropertyOperatorNumGreaterThanEqualsConst = "num_greater_than_equals"
	RuleRequiredConfigSinglePropertyOperatorNumLessThanConst          = "num_less_than"
	RuleRequiredConfigSinglePropertyOperatorNumLessThanEqualsConst    = "num_less_than_equals"
	RuleRequiredConfigSinglePropertyOperatorNumNotEqualsConst         = "num_not_equals"
	RuleRequiredConfigSinglePropertyOperatorStringEqualsConst         = "string_equals"
	RuleRequiredConfigSinglePropertyOperatorStringMatchConst          = "string_match"
	RuleRequiredConfigSinglePropertyOperatorStringNotEqualsConst      = "string_not_equals"
	RuleRequiredConfigSinglePropertyOperatorStringNotMatchConst       = "string_not_match"
	RuleRequiredConfigSinglePropertyOperatorStringsInListConst        = "strings_in_list"
)

Constants associated with the RuleRequiredConfigSingleProperty.Operator property. The way in which the `property` field is compared to its value.

There are three types of operators: string, numeric, and boolean.

View Source
const DefaultServiceName = "configuration_governance"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://compliance.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

View Source
const (
	RuleRequestRuleTypeUserDefinedConst = "user_defined"
)

Constants associated with the RuleRequest.RuleType property. The type of rule. Rules that you create are `user_defined`.

View Source
const (
	RuleRuleTypeUserDefinedConst = "user_defined"
)

Constants associated with the Rule.RuleType property. The type of rule. Rules that you create are `user_defined`.

View Source
const (
	UpdateRuleOptionsRuleTypeUserDefinedConst = "user_defined"
)

Constants associated with the UpdateRuleOptions.RuleType property. The type of rule. Rules that you create are `user_defined`.

Variables

This section is empty.

Functions

func GetServiceURLForRegion added in v0.17.1

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAttachment

func UnmarshalAttachment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAttachment unmarshals an instance of Attachment from the specified map of raw messages.

func UnmarshalAttachmentList

func UnmarshalAttachmentList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAttachmentList unmarshals an instance of AttachmentList from the specified map of raw messages.

func UnmarshalAttachmentRequest

func UnmarshalAttachmentRequest(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAttachmentRequest unmarshals an instance of AttachmentRequest from the specified map of raw messages.

func UnmarshalCreateAttachmentsResponse

func UnmarshalCreateAttachmentsResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateAttachmentsResponse unmarshals an instance of CreateAttachmentsResponse from the specified map of raw messages.

func UnmarshalCreateRuleRequest

func UnmarshalCreateRuleRequest(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateRuleRequest unmarshals an instance of CreateRuleRequest from the specified map of raw messages.

func UnmarshalCreateRuleResponse

func UnmarshalCreateRuleResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateRuleResponse unmarshals an instance of CreateRuleResponse from the specified map of raw messages.

func UnmarshalCreateRulesResponse

func UnmarshalCreateRulesResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateRulesResponse unmarshals an instance of CreateRulesResponse from the specified map of raw messages.

func UnmarshalEnforcementAction

func UnmarshalEnforcementAction(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnforcementAction unmarshals an instance of EnforcementAction from the specified map of raw messages.

func UnmarshalLink(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalLink unmarshals an instance of Link from the specified map of raw messages.

func UnmarshalRule

func UnmarshalRule(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRule unmarshals an instance of Rule from the specified map of raw messages.

func UnmarshalRuleCondition

func UnmarshalRuleCondition(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleCondition unmarshals an instance of RuleCondition from the specified map of raw messages.

func UnmarshalRuleConditionAndLvl2

func UnmarshalRuleConditionAndLvl2(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleConditionAndLvl2 unmarshals an instance of RuleConditionAndLvl2 from the specified map of raw messages.

func UnmarshalRuleConditionOrLvl2

func UnmarshalRuleConditionOrLvl2(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleConditionOrLvl2 unmarshals an instance of RuleConditionOrLvl2 from the specified map of raw messages.

func UnmarshalRuleConditionSingleProperty

func UnmarshalRuleConditionSingleProperty(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleConditionSingleProperty unmarshals an instance of RuleConditionSingleProperty from the specified map of raw messages.

func UnmarshalRuleList

func UnmarshalRuleList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleList unmarshals an instance of RuleList from the specified map of raw messages.

func UnmarshalRuleRequest

func UnmarshalRuleRequest(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequest unmarshals an instance of RuleRequest from the specified map of raw messages.

func UnmarshalRuleRequiredConfig

func UnmarshalRuleRequiredConfig(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequiredConfig unmarshals an instance of RuleRequiredConfig from the specified map of raw messages.

func UnmarshalRuleRequiredConfigMultipleProperties

func UnmarshalRuleRequiredConfigMultipleProperties(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequiredConfigMultipleProperties unmarshals an instance of RuleRequiredConfigMultipleProperties from the specified map of raw messages.

func UnmarshalRuleRequiredConfigMultiplePropertiesConditionAnd

func UnmarshalRuleRequiredConfigMultiplePropertiesConditionAnd(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequiredConfigMultiplePropertiesConditionAnd unmarshals an instance of RuleRequiredConfigMultiplePropertiesConditionAnd from the specified map of raw messages.

func UnmarshalRuleRequiredConfigMultiplePropertiesConditionOr

func UnmarshalRuleRequiredConfigMultiplePropertiesConditionOr(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequiredConfigMultiplePropertiesConditionOr unmarshals an instance of RuleRequiredConfigMultiplePropertiesConditionOr from the specified map of raw messages.

func UnmarshalRuleRequiredConfigSingleProperty

func UnmarshalRuleRequiredConfigSingleProperty(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleRequiredConfigSingleProperty unmarshals an instance of RuleRequiredConfigSingleProperty from the specified map of raw messages.

func UnmarshalRuleResponseError

func UnmarshalRuleResponseError(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleResponseError unmarshals an instance of RuleResponseError from the specified map of raw messages.

func UnmarshalRuleScope

func UnmarshalRuleScope(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleScope unmarshals an instance of RuleScope from the specified map of raw messages.

func UnmarshalRuleSingleProperty

func UnmarshalRuleSingleProperty(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleSingleProperty unmarshals an instance of RuleSingleProperty from the specified map of raw messages.

func UnmarshalRuleTargetAttribute

func UnmarshalRuleTargetAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRuleTargetAttribute unmarshals an instance of RuleTargetAttribute from the specified map of raw messages.

func UnmarshalTargetResource

func UnmarshalTargetResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTargetResource unmarshals an instance of TargetResource from the specified map of raw messages.

Types

type Attachment

type Attachment struct {
	// The UUID that uniquely identifies the attachment.
	AttachmentID *string `json:"attachment_id" validate:"required"`

	// The UUID that uniquely identifies the rule.
	RuleID *string `json:"rule_id" validate:"required"`

	// Your IBM Cloud account ID.
	AccountID *string `json:"account_id" validate:"required"`

	// The extent at which the rule can be attached across your accounts.
	IncludedScope *RuleScope `json:"included_scope" validate:"required"`

	// The extent at which the rule can be excluded from the included scope.
	ExcludedScopes []RuleScope `json:"excluded_scopes,omitempty"`
}

Attachment : The scopes to attach to the rule.

type AttachmentList

type AttachmentList struct {
	// The requested offset for the returned items.
	Offset *int64 `json:"offset" validate:"required"`

	// The requested limit for the returned items.
	Limit *int64 `json:"limit" validate:"required"`

	// The total number of available items.
	TotalCount *int64 `json:"total_count" validate:"required"`

	// The first page of available items.
	First *Link `json:"first" validate:"required"`

	// The last page of available items.
	Last *Link `json:"last" validate:"required"`

	Attachments []Attachment `json:"attachments" validate:"required"`
}

AttachmentList : A list of attachments.

type AttachmentRequest

type AttachmentRequest struct {
	// Your IBM Cloud account ID.
	AccountID *string `json:"account_id" validate:"required"`

	// The extent at which the rule can be attached across your accounts.
	IncludedScope *RuleScope `json:"included_scope" validate:"required"`

	// The extent at which the rule can be excluded from the included scope.
	ExcludedScopes []RuleScope `json:"excluded_scopes,omitempty"`
}

AttachmentRequest : The scopes to attach to the rule.

type ConfigurationGovernanceV1

type ConfigurationGovernanceV1 struct {
	Service *core.BaseService
}

ConfigurationGovernanceV1 : API specification for the Configuration Governance service.

Version: 1.0.0

func NewConfigurationGovernanceV1

func NewConfigurationGovernanceV1(options *ConfigurationGovernanceV1Options) (service *ConfigurationGovernanceV1, err error)

NewConfigurationGovernanceV1 : constructs an instance of ConfigurationGovernanceV1 with passed in options.

func NewConfigurationGovernanceV1UsingExternalConfig

func NewConfigurationGovernanceV1UsingExternalConfig(options *ConfigurationGovernanceV1Options) (configurationGovernance *ConfigurationGovernanceV1, err error)

NewConfigurationGovernanceV1UsingExternalConfig : constructs an instance of ConfigurationGovernanceV1 with passed in options and external configuration.

func (*ConfigurationGovernanceV1) Clone added in v0.17.1

func (configurationGovernance *ConfigurationGovernanceV1) Clone() *ConfigurationGovernanceV1

Clone makes a copy of "configurationGovernance" suitable for processing requests.

func (*ConfigurationGovernanceV1) CreateAttachments

func (configurationGovernance *ConfigurationGovernanceV1) CreateAttachments(createAttachmentsOptions *CreateAttachmentsOptions) (result *CreateAttachmentsResponse, response *core.DetailedResponse, err error)

CreateAttachments : Create attachments Creates one or more scope attachments for an existing rule.

You can attach an existing rule to a scope, such as a specific IBM Cloud account, to start evaluating the rule for compliance. A successful `POST /config/v1/rules/{rule_id}/attachments` returns the ID value for the attachment, along with other metadata.

func (*ConfigurationGovernanceV1) CreateAttachmentsWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) CreateAttachmentsWithContext(ctx context.Context, createAttachmentsOptions *CreateAttachmentsOptions) (result *CreateAttachmentsResponse, response *core.DetailedResponse, err error)

CreateAttachmentsWithContext is an alternate form of the CreateAttachments method which supports a Context parameter

func (*ConfigurationGovernanceV1) CreateRules

func (configurationGovernance *ConfigurationGovernanceV1) CreateRules(createRulesOptions *CreateRulesOptions) (result *CreateRulesResponse, response *core.DetailedResponse, err error)

CreateRules : Create rules Creates one or more rules that you can use to govern the way that IBM Cloud resources can be provisioned and configured.

A successful `POST /config/rules` request defines a rule based on the target, conditions, and enforcement actions that you specify. The response returns the ID value for your rule, along with other metadata.

func (*ConfigurationGovernanceV1) CreateRulesWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) CreateRulesWithContext(ctx context.Context, createRulesOptions *CreateRulesOptions) (result *CreateRulesResponse, response *core.DetailedResponse, err error)

CreateRulesWithContext is an alternate form of the CreateRules method which supports a Context parameter

func (*ConfigurationGovernanceV1) DeleteAttachment

func (configurationGovernance *ConfigurationGovernanceV1) DeleteAttachment(deleteAttachmentOptions *DeleteAttachmentOptions) (response *core.DetailedResponse, err error)

DeleteAttachment : Delete an attachment Deletes an existing scope attachment.

func (*ConfigurationGovernanceV1) DeleteAttachmentWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) DeleteAttachmentWithContext(ctx context.Context, deleteAttachmentOptions *DeleteAttachmentOptions) (response *core.DetailedResponse, err error)

DeleteAttachmentWithContext is an alternate form of the DeleteAttachment method which supports a Context parameter

func (*ConfigurationGovernanceV1) DeleteRule

func (configurationGovernance *ConfigurationGovernanceV1) DeleteRule(deleteRuleOptions *DeleteRuleOptions) (response *core.DetailedResponse, err error)

DeleteRule : Delete a rule Deletes an existing rule.

func (*ConfigurationGovernanceV1) DeleteRuleWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) DeleteRuleWithContext(ctx context.Context, deleteRuleOptions *DeleteRuleOptions) (response *core.DetailedResponse, err error)

DeleteRuleWithContext is an alternate form of the DeleteRule method which supports a Context parameter

func (*ConfigurationGovernanceV1) DisableRetries added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*ConfigurationGovernanceV1) EnableRetries added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*ConfigurationGovernanceV1) GetAttachment

func (configurationGovernance *ConfigurationGovernanceV1) GetAttachment(getAttachmentOptions *GetAttachmentOptions) (result *Attachment, response *core.DetailedResponse, err error)

GetAttachment : Get an attachment Retrieves an existing scope attachment for a rule.

func (*ConfigurationGovernanceV1) GetAttachmentWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) GetAttachmentWithContext(ctx context.Context, getAttachmentOptions *GetAttachmentOptions) (result *Attachment, response *core.DetailedResponse, err error)

GetAttachmentWithContext is an alternate form of the GetAttachment method which supports a Context parameter

func (*ConfigurationGovernanceV1) GetEnableGzipCompression added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*ConfigurationGovernanceV1) GetRule

func (configurationGovernance *ConfigurationGovernanceV1) GetRule(getRuleOptions *GetRuleOptions) (result *Rule, response *core.DetailedResponse, err error)

GetRule : Get a rule Retrieves an existing rule and its details.

func (*ConfigurationGovernanceV1) GetRuleWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) GetRuleWithContext(ctx context.Context, getRuleOptions *GetRuleOptions) (result *Rule, response *core.DetailedResponse, err error)

GetRuleWithContext is an alternate form of the GetRule method which supports a Context parameter

func (*ConfigurationGovernanceV1) GetServiceURL added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*ConfigurationGovernanceV1) ListAttachments

func (configurationGovernance *ConfigurationGovernanceV1) ListAttachments(listAttachmentsOptions *ListAttachmentsOptions) (result *AttachmentList, response *core.DetailedResponse, err error)

ListAttachments : List attachments Retrieves a list of scope attachments that are associated with the specified rule.

func (*ConfigurationGovernanceV1) ListAttachmentsWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) ListAttachmentsWithContext(ctx context.Context, listAttachmentsOptions *ListAttachmentsOptions) (result *AttachmentList, response *core.DetailedResponse, err error)

ListAttachmentsWithContext is an alternate form of the ListAttachments method which supports a Context parameter

func (*ConfigurationGovernanceV1) ListRules

func (configurationGovernance *ConfigurationGovernanceV1) ListRules(listRulesOptions *ListRulesOptions) (result *RuleList, response *core.DetailedResponse, err error)

ListRules : List rules Retrieves a list of the rules that are available in your account.

func (*ConfigurationGovernanceV1) ListRulesWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) ListRulesWithContext(ctx context.Context, listRulesOptions *ListRulesOptions) (result *RuleList, response *core.DetailedResponse, err error)

ListRulesWithContext is an alternate form of the ListRules method which supports a Context parameter

func (*ConfigurationGovernanceV1) NewAttachmentRequest

func (*ConfigurationGovernanceV1) NewAttachmentRequest(accountID string, includedScope *RuleScope) (model *AttachmentRequest, err error)

NewAttachmentRequest : Instantiate AttachmentRequest (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewCreateAttachmentsOptions

func (*ConfigurationGovernanceV1) NewCreateAttachmentsOptions(ruleID string, attachments []AttachmentRequest) *CreateAttachmentsOptions

NewCreateAttachmentsOptions : Instantiate CreateAttachmentsOptions

func (*ConfigurationGovernanceV1) NewCreateRuleRequest

func (*ConfigurationGovernanceV1) NewCreateRuleRequest(rule *RuleRequest) (model *CreateRuleRequest, err error)

NewCreateRuleRequest : Instantiate CreateRuleRequest (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewCreateRulesOptions

func (*ConfigurationGovernanceV1) NewCreateRulesOptions(rules []CreateRuleRequest) *CreateRulesOptions

NewCreateRulesOptions : Instantiate CreateRulesOptions

func (*ConfigurationGovernanceV1) NewDeleteAttachmentOptions

func (*ConfigurationGovernanceV1) NewDeleteAttachmentOptions(ruleID string, attachmentID string) *DeleteAttachmentOptions

NewDeleteAttachmentOptions : Instantiate DeleteAttachmentOptions

func (*ConfigurationGovernanceV1) NewDeleteRuleOptions

func (*ConfigurationGovernanceV1) NewDeleteRuleOptions(ruleID string) *DeleteRuleOptions

NewDeleteRuleOptions : Instantiate DeleteRuleOptions

func (*ConfigurationGovernanceV1) NewEnforcementAction

func (*ConfigurationGovernanceV1) NewEnforcementAction(action string) (model *EnforcementAction, err error)

NewEnforcementAction : Instantiate EnforcementAction (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewGetAttachmentOptions

func (*ConfigurationGovernanceV1) NewGetAttachmentOptions(ruleID string, attachmentID string) *GetAttachmentOptions

NewGetAttachmentOptions : Instantiate GetAttachmentOptions

func (*ConfigurationGovernanceV1) NewGetRuleOptions

func (*ConfigurationGovernanceV1) NewGetRuleOptions(ruleID string) *GetRuleOptions

NewGetRuleOptions : Instantiate GetRuleOptions

func (*ConfigurationGovernanceV1) NewListAttachmentsOptions

func (*ConfigurationGovernanceV1) NewListAttachmentsOptions(ruleID string) *ListAttachmentsOptions

NewListAttachmentsOptions : Instantiate ListAttachmentsOptions

func (*ConfigurationGovernanceV1) NewListRulesOptions

func (*ConfigurationGovernanceV1) NewListRulesOptions(accountID string) *ListRulesOptions

NewListRulesOptions : Instantiate ListRulesOptions

func (*ConfigurationGovernanceV1) NewRuleConditionAndLvl2

func (*ConfigurationGovernanceV1) NewRuleConditionAndLvl2(and []RuleSingleProperty) (model *RuleConditionAndLvl2, err error)

NewRuleConditionAndLvl2 : Instantiate RuleConditionAndLvl2 (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleConditionOrLvl2

func (*ConfigurationGovernanceV1) NewRuleConditionOrLvl2(or []RuleSingleProperty) (model *RuleConditionOrLvl2, err error)

NewRuleConditionOrLvl2 : Instantiate RuleConditionOrLvl2 (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleConditionSingleProperty

func (*ConfigurationGovernanceV1) NewRuleConditionSingleProperty(property string, operator string) (model *RuleConditionSingleProperty, err error)

NewRuleConditionSingleProperty : Instantiate RuleConditionSingleProperty (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleRequest

func (*ConfigurationGovernanceV1) NewRuleRequest(name string, description string, target *TargetResource, requiredConfig RuleRequiredConfigIntf, enforcementActions []EnforcementAction) (model *RuleRequest, err error)

NewRuleRequest : Instantiate RuleRequest (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigMultiplePropertiesConditionAnd

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigMultiplePropertiesConditionAnd(and []RuleConditionIntf) (model *RuleRequiredConfigMultiplePropertiesConditionAnd, err error)

NewRuleRequiredConfigMultiplePropertiesConditionAnd : Instantiate RuleRequiredConfigMultiplePropertiesConditionAnd (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigMultiplePropertiesConditionOr

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigMultiplePropertiesConditionOr(or []RuleConditionIntf) (model *RuleRequiredConfigMultiplePropertiesConditionOr, err error)

NewRuleRequiredConfigMultiplePropertiesConditionOr : Instantiate RuleRequiredConfigMultiplePropertiesConditionOr (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigSingleProperty

func (*ConfigurationGovernanceV1) NewRuleRequiredConfigSingleProperty(property string, operator string) (model *RuleRequiredConfigSingleProperty, err error)

NewRuleRequiredConfigSingleProperty : Instantiate RuleRequiredConfigSingleProperty (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleScope

func (*ConfigurationGovernanceV1) NewRuleScope(scopeID string, scopeType string) (model *RuleScope, err error)

NewRuleScope : Instantiate RuleScope (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleSingleProperty

func (*ConfigurationGovernanceV1) NewRuleSingleProperty(property string, operator string) (model *RuleSingleProperty, err error)

NewRuleSingleProperty : Instantiate RuleSingleProperty (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewRuleTargetAttribute

func (*ConfigurationGovernanceV1) NewRuleTargetAttribute(name string, operator string) (model *RuleTargetAttribute, err error)

NewRuleTargetAttribute : Instantiate RuleTargetAttribute (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewTargetResource

func (*ConfigurationGovernanceV1) NewTargetResource(serviceName string, resourceKind string) (model *TargetResource, err error)

NewTargetResource : Instantiate TargetResource (Generic Model Constructor)

func (*ConfigurationGovernanceV1) NewUpdateAttachmentOptions

func (*ConfigurationGovernanceV1) NewUpdateAttachmentOptions(ruleID string, attachmentID string, ifMatch string, accountID string, includedScope *RuleScope) *UpdateAttachmentOptions

NewUpdateAttachmentOptions : Instantiate UpdateAttachmentOptions

func (*ConfigurationGovernanceV1) NewUpdateRuleOptions

func (*ConfigurationGovernanceV1) NewUpdateRuleOptions(ruleID string, ifMatch string, name string, description string, target *TargetResource, requiredConfig RuleRequiredConfigIntf, enforcementActions []EnforcementAction) *UpdateRuleOptions

NewUpdateRuleOptions : Instantiate UpdateRuleOptions

func (*ConfigurationGovernanceV1) SetDefaultHeaders added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*ConfigurationGovernanceV1) SetEnableGzipCompression added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*ConfigurationGovernanceV1) SetServiceURL

func (configurationGovernance *ConfigurationGovernanceV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*ConfigurationGovernanceV1) UpdateAttachment

func (configurationGovernance *ConfigurationGovernanceV1) UpdateAttachment(updateAttachmentOptions *UpdateAttachmentOptions) (result *Attachment, response *core.DetailedResponse, err error)

UpdateAttachment : Update an attachment Updates an existing scope attachment based on the properties that you specify.

func (*ConfigurationGovernanceV1) UpdateAttachmentWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) UpdateAttachmentWithContext(ctx context.Context, updateAttachmentOptions *UpdateAttachmentOptions) (result *Attachment, response *core.DetailedResponse, err error)

UpdateAttachmentWithContext is an alternate form of the UpdateAttachment method which supports a Context parameter

func (*ConfigurationGovernanceV1) UpdateRule

func (configurationGovernance *ConfigurationGovernanceV1) UpdateRule(updateRuleOptions *UpdateRuleOptions) (result *Rule, response *core.DetailedResponse, err error)

UpdateRule : Update a rule Updates an existing rule based on the properties that you specify.

func (*ConfigurationGovernanceV1) UpdateRuleWithContext added in v0.12.2

func (configurationGovernance *ConfigurationGovernanceV1) UpdateRuleWithContext(ctx context.Context, updateRuleOptions *UpdateRuleOptions) (result *Rule, response *core.DetailedResponse, err error)

UpdateRuleWithContext is an alternate form of the UpdateRule method which supports a Context parameter

type ConfigurationGovernanceV1Options

type ConfigurationGovernanceV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

ConfigurationGovernanceV1Options : Service options

type CreateAttachmentsOptions

type CreateAttachmentsOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	Attachments []AttachmentRequest `validate:"required"`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateAttachmentsOptions : The CreateAttachments options.

func (*CreateAttachmentsOptions) SetAttachments

func (options *CreateAttachmentsOptions) SetAttachments(attachments []AttachmentRequest) *CreateAttachmentsOptions

SetAttachments : Allow user to set Attachments

func (*CreateAttachmentsOptions) SetHeaders

func (options *CreateAttachmentsOptions) SetHeaders(param map[string]string) *CreateAttachmentsOptions

SetHeaders : Allow user to set Headers

func (*CreateAttachmentsOptions) SetRuleID

func (options *CreateAttachmentsOptions) SetRuleID(ruleID string) *CreateAttachmentsOptions

SetRuleID : Allow user to set RuleID

func (*CreateAttachmentsOptions) SetTransactionID

func (options *CreateAttachmentsOptions) SetTransactionID(transactionID string) *CreateAttachmentsOptions

SetTransactionID : Allow user to set TransactionID

type CreateAttachmentsResponse

type CreateAttachmentsResponse struct {
	Attachments []Attachment `json:"attachments" validate:"required"`
}

CreateAttachmentsResponse : CreateAttachmentsResponse struct

type CreateRuleRequest

type CreateRuleRequest struct {
	// A field that you can use in bulk operations to store a custom identifier for an individual request. If you omit this
	// field, the service generates and sends a `request_id` string for each new rule. The generated string corresponds
	// with the numerical order of the rules request array. For example, `"request_id": "1"`, `"request_id": "2"`.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `request_id` with
	// each request.
	RequestID *string `json:"request_id,omitempty"`

	// User-settable properties associated with a rule to be created or updated.
	Rule *RuleRequest `json:"rule" validate:"required"`
}

CreateRuleRequest : A rule to be created.

type CreateRuleResponse

type CreateRuleResponse struct {
	// The identifier that is used to correlate an individual request.
	//
	// To assist with debugging, you can use this ID to identify and inspect only one request that was made as part of a
	// bulk operation.
	RequestID *string `json:"request_id,omitempty"`

	// The HTTP response status code.
	StatusCode *int64 `json:"status_code,omitempty"`

	// Information about a newly-created rule.
	//
	// This field will be present for a successful request.
	Rule *Rule `json:"rule,omitempty"`

	// The error contents of the multi-status response.
	//
	// This field will be present for a failed rule request.
	Errors []RuleResponseError `json:"errors,omitempty"`

	// The UUID that uniquely identifies the request.
	//
	// This field will be present for a failed rule request.
	Trace *string `json:"trace,omitempty"`
}

CreateRuleResponse : Response information for a rule request.

If the 'status_code' property indicates success, the 'request_id' and 'rule' properties will be present. If the 'status_code' property indicates an error, the 'request_id', 'errors', and 'trace' fields will be present.

type CreateRulesOptions

type CreateRulesOptions struct {
	// A list of rules to be created.
	Rules []CreateRuleRequest `validate:"required"`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateRulesOptions : The CreateRules options.

func (*CreateRulesOptions) SetHeaders

func (options *CreateRulesOptions) SetHeaders(param map[string]string) *CreateRulesOptions

SetHeaders : Allow user to set Headers

func (*CreateRulesOptions) SetRules

func (options *CreateRulesOptions) SetRules(rules []CreateRuleRequest) *CreateRulesOptions

SetRules : Allow user to set Rules

func (*CreateRulesOptions) SetTransactionID

func (options *CreateRulesOptions) SetTransactionID(transactionID string) *CreateRulesOptions

SetTransactionID : Allow user to set TransactionID

type CreateRulesResponse

type CreateRulesResponse struct {
	// An array of rule responses.
	Rules []CreateRuleResponse `json:"rules" validate:"required"`
}

CreateRulesResponse : The response associated with a request to create one or more rules.

type DeleteAttachmentOptions

type DeleteAttachmentOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The UUID that uniquely identifies the attachment.
	AttachmentID *string `validate:"required,ne="`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteAttachmentOptions : The DeleteAttachment options.

func (*DeleteAttachmentOptions) SetAttachmentID

func (options *DeleteAttachmentOptions) SetAttachmentID(attachmentID string) *DeleteAttachmentOptions

SetAttachmentID : Allow user to set AttachmentID

func (*DeleteAttachmentOptions) SetHeaders

func (options *DeleteAttachmentOptions) SetHeaders(param map[string]string) *DeleteAttachmentOptions

SetHeaders : Allow user to set Headers

func (*DeleteAttachmentOptions) SetRuleID

func (options *DeleteAttachmentOptions) SetRuleID(ruleID string) *DeleteAttachmentOptions

SetRuleID : Allow user to set RuleID

func (*DeleteAttachmentOptions) SetTransactionID

func (options *DeleteAttachmentOptions) SetTransactionID(transactionID string) *DeleteAttachmentOptions

SetTransactionID : Allow user to set TransactionID

type DeleteRuleOptions

type DeleteRuleOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteRuleOptions : The DeleteRule options.

func (*DeleteRuleOptions) SetHeaders

func (options *DeleteRuleOptions) SetHeaders(param map[string]string) *DeleteRuleOptions

SetHeaders : Allow user to set Headers

func (*DeleteRuleOptions) SetRuleID

func (options *DeleteRuleOptions) SetRuleID(ruleID string) *DeleteRuleOptions

SetRuleID : Allow user to set RuleID

func (*DeleteRuleOptions) SetTransactionID

func (options *DeleteRuleOptions) SetTransactionID(transactionID string) *DeleteRuleOptions

SetTransactionID : Allow user to set TransactionID

type EnforcementAction

type EnforcementAction struct {
	// To block a request from completing, use `disallow`. To log the request to Activity Tracker with LogDNA, use
	// `audit_log`.
	Action *string `json:"action" validate:"required"`
}

EnforcementAction : EnforcementAction struct

type GetAttachmentOptions

type GetAttachmentOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The UUID that uniquely identifies the attachment.
	AttachmentID *string `validate:"required,ne="`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAttachmentOptions : The GetAttachment options.

func (*GetAttachmentOptions) SetAttachmentID

func (options *GetAttachmentOptions) SetAttachmentID(attachmentID string) *GetAttachmentOptions

SetAttachmentID : Allow user to set AttachmentID

func (*GetAttachmentOptions) SetHeaders

func (options *GetAttachmentOptions) SetHeaders(param map[string]string) *GetAttachmentOptions

SetHeaders : Allow user to set Headers

func (*GetAttachmentOptions) SetRuleID

func (options *GetAttachmentOptions) SetRuleID(ruleID string) *GetAttachmentOptions

SetRuleID : Allow user to set RuleID

func (*GetAttachmentOptions) SetTransactionID

func (options *GetAttachmentOptions) SetTransactionID(transactionID string) *GetAttachmentOptions

SetTransactionID : Allow user to set TransactionID

type GetRuleOptions

type GetRuleOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetRuleOptions : The GetRule options.

func (*GetRuleOptions) SetHeaders

func (options *GetRuleOptions) SetHeaders(param map[string]string) *GetRuleOptions

SetHeaders : Allow user to set Headers

func (*GetRuleOptions) SetRuleID

func (options *GetRuleOptions) SetRuleID(ruleID string) *GetRuleOptions

SetRuleID : Allow user to set RuleID

func (*GetRuleOptions) SetTransactionID

func (options *GetRuleOptions) SetTransactionID(transactionID string) *GetRuleOptions

SetTransactionID : Allow user to set TransactionID

type Link struct {
	// The URL for the first, previous, next, or last page of resources.
	Href *string `json:"href" validate:"required"`
}

Link : A link that is used to paginate through available resources.

type ListAttachmentsOptions

type ListAttachmentsOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// The number of resources to retrieve. By default, list operations return the first 100 items. To retrieve a different
	// set of items, use `limit` with `offset` to page through your available resources.
	//
	// **Usage:** If you have 20 rules, and you want to retrieve only the first 5 rules, use
	// `../rules?account_id={account_id}&limit=5`.
	Limit *int64

	// The number of resources to skip. By specifying `offset`, you retrieve a subset of resources that starts with the
	// `offset` value. Use `offset` with `limit` to page through your available resources.
	//
	// **Usage:** If you have 100 rules, and you want to retrieve rules 26 through 50, use
	// `../rules?account_id={account_id}&offset=25&limit=5`.
	Offset *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListAttachmentsOptions : The ListAttachments options.

func (*ListAttachmentsOptions) SetHeaders

func (options *ListAttachmentsOptions) SetHeaders(param map[string]string) *ListAttachmentsOptions

SetHeaders : Allow user to set Headers

func (*ListAttachmentsOptions) SetLimit

func (options *ListAttachmentsOptions) SetLimit(limit int64) *ListAttachmentsOptions

SetLimit : Allow user to set Limit

func (*ListAttachmentsOptions) SetOffset

func (options *ListAttachmentsOptions) SetOffset(offset int64) *ListAttachmentsOptions

SetOffset : Allow user to set Offset

func (*ListAttachmentsOptions) SetRuleID

func (options *ListAttachmentsOptions) SetRuleID(ruleID string) *ListAttachmentsOptions

SetRuleID : Allow user to set RuleID

func (*ListAttachmentsOptions) SetTransactionID

func (options *ListAttachmentsOptions) SetTransactionID(transactionID string) *ListAttachmentsOptions

SetTransactionID : Allow user to set TransactionID

type ListRulesOptions

type ListRulesOptions struct {
	// Your IBM Cloud account ID.
	AccountID *string `validate:"required"`

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Retrieves a list of rules that have scope attachments.
	Attached *bool

	// Retrieves a list of rules that match the labels that you specify.
	Labels *string

	// Retrieves a list of rules that match the scope ID that you specify.
	Scopes *string

	// The number of resources to retrieve. By default, list operations return the first 100 items. To retrieve a different
	// set of items, use `limit` with `offset` to page through your available resources.
	//
	// **Usage:** If you have 20 rules, and you want to retrieve only the first 5 rules, use
	// `../rules?account_id={account_id}&limit=5`.
	Limit *int64

	// The number of resources to skip. By specifying `offset`, you retrieve a subset of resources that starts with the
	// `offset` value. Use `offset` with `limit` to page through your available resources.
	//
	// **Usage:** If you have 100 rules, and you want to retrieve rules 26 through 50, use
	// `../rules?account_id={account_id}&offset=25&limit=5`.
	Offset *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListRulesOptions : The ListRules options.

func (*ListRulesOptions) SetAccountID

func (options *ListRulesOptions) SetAccountID(accountID string) *ListRulesOptions

SetAccountID : Allow user to set AccountID

func (*ListRulesOptions) SetAttached

func (options *ListRulesOptions) SetAttached(attached bool) *ListRulesOptions

SetAttached : Allow user to set Attached

func (*ListRulesOptions) SetHeaders

func (options *ListRulesOptions) SetHeaders(param map[string]string) *ListRulesOptions

SetHeaders : Allow user to set Headers

func (*ListRulesOptions) SetLabels

func (options *ListRulesOptions) SetLabels(labels string) *ListRulesOptions

SetLabels : Allow user to set Labels

func (*ListRulesOptions) SetLimit

func (options *ListRulesOptions) SetLimit(limit int64) *ListRulesOptions

SetLimit : Allow user to set Limit

func (*ListRulesOptions) SetOffset

func (options *ListRulesOptions) SetOffset(offset int64) *ListRulesOptions

SetOffset : Allow user to set Offset

func (*ListRulesOptions) SetScopes

func (options *ListRulesOptions) SetScopes(scopes string) *ListRulesOptions

SetScopes : Allow user to set Scopes

func (*ListRulesOptions) SetTransactionID

func (options *ListRulesOptions) SetTransactionID(transactionID string) *ListRulesOptions

SetTransactionID : Allow user to set TransactionID

type Rule

type Rule struct {
	// Your IBM Cloud account ID.
	AccountID *string `json:"account_id,omitempty"`

	// A human-readable alias to assign to your rule.
	Name *string `json:"name" validate:"required"`

	// An extended description of your rule.
	Description *string `json:"description" validate:"required"`

	// The type of rule. Rules that you create are `user_defined`.
	RuleType *string `json:"rule_type,omitempty"`

	// The properties that describe the resource that you want to target
	// with the rule.
	Target *TargetResource `json:"target" validate:"required"`

	RequiredConfig RuleRequiredConfigIntf `json:"required_config" validate:"required"`

	// The actions that the service must run on your behalf when a request to create or modify the target resource does not
	// comply with your conditions.
	EnforcementActions []EnforcementAction `json:"enforcement_actions" validate:"required"`

	// Labels that you can use to group and search for similar rules, such as those that help you to meet a specific
	// organization guideline.
	Labels []string `json:"labels,omitempty"`

	// The UUID that uniquely identifies the rule.
	RuleID *string `json:"rule_id,omitempty"`

	// The date the resource was created.
	CreationDate *strfmt.DateTime `json:"creation_date,omitempty"`

	// The unique identifier for the user or application that created the resource.
	CreatedBy *string `json:"created_by,omitempty"`

	// The date the resource was last modified.
	ModificationDate *strfmt.DateTime `json:"modification_date,omitempty"`

	// The unique identifier for the user or application that last modified the resource.
	ModifiedBy *string `json:"modified_by,omitempty"`

	// The number of scope attachments that are associated with the rule.
	NumberOfAttachments *int64 `json:"number_of_attachments,omitempty"`
}

Rule : Properties associated with a rule, including both user-settable and server-populated properties.

type RuleCondition

type RuleCondition struct {
	Description *string `json:"description,omitempty"`

	// A resource configuration variable that describes the property that you want to apply to the target resource.
	//
	// Available options depend on the target service and resource.
	Property *string `json:"property,omitempty"`

	// The way in which the `property` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator,omitempty"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`

	Or []RuleSingleProperty `json:"or,omitempty"`

	And []RuleSingleProperty `json:"and,omitempty"`
}

RuleCondition : RuleCondition struct Models which "extend" this model: - RuleConditionSingleProperty - RuleConditionOrLvl2 - RuleConditionAndLvl2

type RuleConditionAndLvl2

type RuleConditionAndLvl2 struct {
	Description *string `json:"description,omitempty"`

	And []RuleSingleProperty `json:"and" validate:"required"`
}

RuleConditionAndLvl2 : A condition with the `and` logical operator. This model "extends" RuleCondition

type RuleConditionIntf

type RuleConditionIntf interface {
	// contains filtered or unexported methods
}

type RuleConditionOrLvl2

type RuleConditionOrLvl2 struct {
	Description *string `json:"description,omitempty"`

	Or []RuleSingleProperty `json:"or" validate:"required"`
}

RuleConditionOrLvl2 : A condition with the `or` logical operator. This model "extends" RuleCondition

type RuleConditionSingleProperty

type RuleConditionSingleProperty struct {
	Description *string `json:"description,omitempty"`

	// A resource configuration variable that describes the property that you want to apply to the target resource.
	//
	// Available options depend on the target service and resource.
	Property *string `json:"property" validate:"required"`

	// The way in which the `property` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator" validate:"required"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`
}

RuleConditionSingleProperty : The requirement that must be met to determine the resource's level of compliance in accordance with the rule.

To apply a single property check, define a configuration property and the desired value that you want to check against. This model "extends" RuleCondition

type RuleList

type RuleList struct {
	// The requested offset for the returned items.
	Offset *int64 `json:"offset" validate:"required"`

	// The requested limit for the returned items.
	Limit *int64 `json:"limit" validate:"required"`

	// The total number of available items.
	TotalCount *int64 `json:"total_count" validate:"required"`

	// The first page of available items.
	First *Link `json:"first" validate:"required"`

	// The last page of available items.
	Last *Link `json:"last" validate:"required"`

	// An array of rules.
	Rules []Rule `json:"rules" validate:"required"`
}

RuleList : A list of rules.

type RuleRequest

type RuleRequest struct {
	// Your IBM Cloud account ID.
	AccountID *string `json:"account_id,omitempty"`

	// A human-readable alias to assign to your rule.
	Name *string `json:"name" validate:"required"`

	// An extended description of your rule.
	Description *string `json:"description" validate:"required"`

	// The type of rule. Rules that you create are `user_defined`.
	RuleType *string `json:"rule_type,omitempty"`

	// The properties that describe the resource that you want to target
	// with the rule.
	Target *TargetResource `json:"target" validate:"required"`

	RequiredConfig RuleRequiredConfigIntf `json:"required_config" validate:"required"`

	// The actions that the service must run on your behalf when a request to create or modify the target resource does not
	// comply with your conditions.
	EnforcementActions []EnforcementAction `json:"enforcement_actions" validate:"required"`

	// Labels that you can use to group and search for similar rules, such as those that help you to meet a specific
	// organization guideline.
	Labels []string `json:"labels,omitempty"`
}

RuleRequest : User-settable properties associated with a rule to be created or updated.

type RuleRequiredConfig

type RuleRequiredConfig struct {
	Description *string `json:"description,omitempty"`

	// A resource configuration variable that describes the property that you want to apply to the target resource.
	//
	// Available options depend on the target service and resource.
	Property *string `json:"property,omitempty"`

	// The way in which the `property` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator,omitempty"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`

	Or []RuleConditionIntf `json:"or,omitempty"`

	And []RuleConditionIntf `json:"and,omitempty"`
}

RuleRequiredConfig : RuleRequiredConfig struct Models which "extend" this model: - RuleRequiredConfigSingleProperty - RuleRequiredConfigMultipleProperties

type RuleRequiredConfigIntf

type RuleRequiredConfigIntf interface {
	// contains filtered or unexported methods
}

type RuleRequiredConfigMultipleProperties

type RuleRequiredConfigMultipleProperties struct {
	Description *string `json:"description,omitempty"`

	Or []RuleConditionIntf `json:"or,omitempty"`

	And []RuleConditionIntf `json:"and,omitempty"`
}

RuleRequiredConfigMultipleProperties : The requirements that must be met to determine the resource's level of compliance in accordance with the rule.

Use logical operators (`and`/`or`) to define multiple property checks and conditions. To define requirements for a rule, list one or more property check objects in the `and` array. To add conditions to a property check, use `or`. Models which "extend" this model: - RuleRequiredConfigMultiplePropertiesConditionOr - RuleRequiredConfigMultiplePropertiesConditionAnd This model "extends" RuleRequiredConfig

type RuleRequiredConfigMultiplePropertiesConditionAnd

type RuleRequiredConfigMultiplePropertiesConditionAnd struct {
	Description *string `json:"description,omitempty"`

	And []RuleConditionIntf `json:"and" validate:"required"`
}

RuleRequiredConfigMultiplePropertiesConditionAnd : A condition with the `and` logical operator. This model "extends" RuleRequiredConfigMultipleProperties

type RuleRequiredConfigMultiplePropertiesConditionOr

type RuleRequiredConfigMultiplePropertiesConditionOr struct {
	Description *string `json:"description,omitempty"`

	Or []RuleConditionIntf `json:"or" validate:"required"`
}

RuleRequiredConfigMultiplePropertiesConditionOr : A condition with the `or` logical operator. This model "extends" RuleRequiredConfigMultipleProperties

type RuleRequiredConfigMultiplePropertiesIntf

type RuleRequiredConfigMultiplePropertiesIntf interface {
	RuleRequiredConfigIntf
	// contains filtered or unexported methods
}

type RuleRequiredConfigSingleProperty

type RuleRequiredConfigSingleProperty struct {
	Description *string `json:"description,omitempty"`

	// A resource configuration variable that describes the property that you want to apply to the target resource.
	//
	// Available options depend on the target service and resource.
	Property *string `json:"property" validate:"required"`

	// The way in which the `property` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator" validate:"required"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`
}

RuleRequiredConfigSingleProperty : The requirement that must be met to determine the resource's level of compliance in accordance with the rule.

To apply a single property check, define a configuration property and the desired value that you want to check against. This model "extends" RuleRequiredConfig

type RuleResponseError

type RuleResponseError struct {
	// Specifies the problem that caused the error.
	Code *string `json:"code" validate:"required"`

	// Describes the problem.
	Message *string `json:"message" validate:"required"`
}

RuleResponseError : RuleResponseError struct

type RuleScope

type RuleScope struct {
	// A short description or alias to assign to the scope.
	Note *string `json:"note,omitempty"`

	// The ID of the scope, such as an enterprise, account, or account group, that you want to evaluate.
	ScopeID *string `json:"scope_id" validate:"required"`

	// The type of scope that you want to evaluate.
	ScopeType *string `json:"scope_type" validate:"required"`
}

RuleScope : The extent at which the rule can be attached across your accounts.

type RuleSingleProperty

type RuleSingleProperty struct {
	Description *string `json:"description,omitempty"`

	// A resource configuration variable that describes the property that you want to apply to the target resource.
	//
	// Available options depend on the target service and resource.
	Property *string `json:"property" validate:"required"`

	// The way in which the `property` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator" validate:"required"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`
}

RuleSingleProperty : The requirement that must be met to determine the resource's level of compliance in accordance with the rule.

To apply a single property check, define a configuration property and the desired value that you want to check against.

type RuleTargetAttribute

type RuleTargetAttribute struct {
	Name *string `json:"name" validate:"required"`

	// The way in which the `name` field is compared to its value.
	//
	// There are three types of operators: string, numeric, and boolean.
	Operator *string `json:"operator" validate:"required"`

	// The way in which you want your property to be applied.
	//
	// Value options differ depending on the rule that you configure. If you use a boolean operator, you do not need to
	// input a value.
	Value *string `json:"value,omitempty"`
}

RuleTargetAttribute : The attributes that are associated with a rule target.

type TargetResource

type TargetResource struct {
	// The programmatic name of the IBM Cloud service that you want to target with the rule.
	ServiceName *string `json:"service_name" validate:"required"`

	// The type of resource that you want to target.
	ResourceKind *string `json:"resource_kind" validate:"required"`

	// An extra qualifier for the resource kind. When you include additional attributes, only the resources that match the
	// definition are included in the rule.
	AdditionalTargetAttributes []RuleTargetAttribute `json:"additional_target_attributes,omitempty"`
}

TargetResource : The properties that describe the resource that you want to target with the rule.

type UpdateAttachmentOptions

type UpdateAttachmentOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// The UUID that uniquely identifies the attachment.
	AttachmentID *string `validate:"required,ne="`

	// Compares a supplied `Etag` value with the version that is stored for the requested resource. If the values match,
	// the server allows the request method to continue.
	//
	// To find the `Etag` value, run a GET request on the resource that you want to modify, and check the response headers.
	IfMatch *string `validate:"required"`

	// Your IBM Cloud account ID.
	AccountID *string `validate:"required"`

	// The extent at which the rule can be attached across your accounts.
	IncludedScope *RuleScope `validate:"required"`

	// The extent at which the rule can be excluded from the included scope.
	ExcludedScopes []RuleScope

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateAttachmentOptions : The UpdateAttachment options.

func (*UpdateAttachmentOptions) SetAccountID

func (options *UpdateAttachmentOptions) SetAccountID(accountID string) *UpdateAttachmentOptions

SetAccountID : Allow user to set AccountID

func (*UpdateAttachmentOptions) SetAttachmentID

func (options *UpdateAttachmentOptions) SetAttachmentID(attachmentID string) *UpdateAttachmentOptions

SetAttachmentID : Allow user to set AttachmentID

func (*UpdateAttachmentOptions) SetExcludedScopes

func (options *UpdateAttachmentOptions) SetExcludedScopes(excludedScopes []RuleScope) *UpdateAttachmentOptions

SetExcludedScopes : Allow user to set ExcludedScopes

func (*UpdateAttachmentOptions) SetHeaders

func (options *UpdateAttachmentOptions) SetHeaders(param map[string]string) *UpdateAttachmentOptions

SetHeaders : Allow user to set Headers

func (*UpdateAttachmentOptions) SetIfMatch

func (options *UpdateAttachmentOptions) SetIfMatch(ifMatch string) *UpdateAttachmentOptions

SetIfMatch : Allow user to set IfMatch

func (*UpdateAttachmentOptions) SetIncludedScope

func (options *UpdateAttachmentOptions) SetIncludedScope(includedScope *RuleScope) *UpdateAttachmentOptions

SetIncludedScope : Allow user to set IncludedScope

func (*UpdateAttachmentOptions) SetRuleID

func (options *UpdateAttachmentOptions) SetRuleID(ruleID string) *UpdateAttachmentOptions

SetRuleID : Allow user to set RuleID

func (*UpdateAttachmentOptions) SetTransactionID

func (options *UpdateAttachmentOptions) SetTransactionID(transactionID string) *UpdateAttachmentOptions

SetTransactionID : Allow user to set TransactionID

type UpdateRuleOptions

type UpdateRuleOptions struct {
	// The UUID that uniquely identifies the rule.
	RuleID *string `validate:"required,ne="`

	// Compares a supplied `Etag` value with the version that is stored for the requested resource. If the values match,
	// the server allows the request method to continue.
	//
	// To find the `Etag` value, run a GET request on the resource that you want to modify, and check the response headers.
	IfMatch *string `validate:"required"`

	// A human-readable alias to assign to your rule.
	Name *string `validate:"required"`

	// An extended description of your rule.
	Description *string `validate:"required"`

	// The properties that describe the resource that you want to target
	// with the rule.
	Target *TargetResource `validate:"required"`

	RequiredConfig RuleRequiredConfigIntf `validate:"required"`

	// The actions that the service must run on your behalf when a request to create or modify the target resource does not
	// comply with your conditions.
	EnforcementActions []EnforcementAction `validate:"required"`

	// Your IBM Cloud account ID.
	AccountID *string

	// The type of rule. Rules that you create are `user_defined`.
	RuleType *string

	// Labels that you can use to group and search for similar rules, such as those that help you to meet a specific
	// organization guideline.
	Labels []string

	// The unique identifier that is used to trace an entire request. If you omit this field, the service generates and
	// sends a transaction ID as a response header of the request. In the case of an error, the transaction ID is set in
	// the `trace` field of the response body.
	//
	// **Note:** To help with debugging logs, it is strongly recommended that you generate and supply a `Transaction-Id`
	// with each request.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateRuleOptions : The UpdateRule options.

func (*UpdateRuleOptions) SetAccountID

func (options *UpdateRuleOptions) SetAccountID(accountID string) *UpdateRuleOptions

SetAccountID : Allow user to set AccountID

func (*UpdateRuleOptions) SetDescription

func (options *UpdateRuleOptions) SetDescription(description string) *UpdateRuleOptions

SetDescription : Allow user to set Description

func (*UpdateRuleOptions) SetEnforcementActions

func (options *UpdateRuleOptions) SetEnforcementActions(enforcementActions []EnforcementAction) *UpdateRuleOptions

SetEnforcementActions : Allow user to set EnforcementActions

func (*UpdateRuleOptions) SetHeaders

func (options *UpdateRuleOptions) SetHeaders(param map[string]string) *UpdateRuleOptions

SetHeaders : Allow user to set Headers

func (*UpdateRuleOptions) SetIfMatch

func (options *UpdateRuleOptions) SetIfMatch(ifMatch string) *UpdateRuleOptions

SetIfMatch : Allow user to set IfMatch

func (*UpdateRuleOptions) SetLabels

func (options *UpdateRuleOptions) SetLabels(labels []string) *UpdateRuleOptions

SetLabels : Allow user to set Labels

func (*UpdateRuleOptions) SetName

func (options *UpdateRuleOptions) SetName(name string) *UpdateRuleOptions

SetName : Allow user to set Name

func (*UpdateRuleOptions) SetRequiredConfig

func (options *UpdateRuleOptions) SetRequiredConfig(requiredConfig RuleRequiredConfigIntf) *UpdateRuleOptions

SetRequiredConfig : Allow user to set RequiredConfig

func (*UpdateRuleOptions) SetRuleID

func (options *UpdateRuleOptions) SetRuleID(ruleID string) *UpdateRuleOptions

SetRuleID : Allow user to set RuleID

func (*UpdateRuleOptions) SetRuleType

func (options *UpdateRuleOptions) SetRuleType(ruleType string) *UpdateRuleOptions

SetRuleType : Allow user to set RuleType

func (*UpdateRuleOptions) SetTarget

func (options *UpdateRuleOptions) SetTarget(target *TargetResource) *UpdateRuleOptions

SetTarget : Allow user to set Target

func (*UpdateRuleOptions) SetTransactionID

func (options *UpdateRuleOptions) SetTransactionID(transactionID string) *UpdateRuleOptions

SetTransactionID : Allow user to set TransactionID

Jump to

Keyboard shortcuts

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