Documentation
¶
Index ¶
- Variables
- func NewQueryRulesetDataSource() datasource.DataSource
- func NewQueryRulesetResource() resource.Resource
- type QueryRuleActionsModel
- type QueryRuleCriteriaModel
- type QueryRuleModel
- type QueryRulesetData
- func (data QueryRulesetData) GetElasticsearchConnection() fwtypes.List
- func (data QueryRulesetData) GetID() fwtypes.String
- func (data QueryRulesetData) GetResourceID() fwtypes.String
- func (data QueryRulesetData) GetVersionRequirements(_ context.Context) ([]entitycore.VersionRequirement, diag.Diagnostics)
Constants ¶
This section is empty.
Variables ¶
var MinSupportedVersion = version.Must(version.NewVersion("8.16.0"))
MinSupportedVersion is the minimum Elasticsearch version supported by this resource. The Query Rules API is GA in 8.12, but support for the schema this provider exposes (the `priority` field and the `exclude` rule type) only stabilized in 8.16.0.
Functions ¶
func NewQueryRulesetDataSource ¶
func NewQueryRulesetDataSource() datasource.DataSource
NewQueryRulesetDataSource returns a new query ruleset data source for registration with the provider.
func NewQueryRulesetResource ¶
NewQueryRulesetResource returns a new query ruleset resource for registration with the provider.
Types ¶
type QueryRuleActionsModel ¶
type QueryRuleActionsModel struct {
IDs fwtypes.List `tfsdk:"ids"`
Docs fwtypes.List `tfsdk:"docs"`
}
QueryRuleActionsModel represents the actions block for a query rule.
type QueryRuleCriteriaModel ¶
type QueryRuleCriteriaModel struct {
Type fwtypes.String `tfsdk:"type"`
Metadata fwtypes.String `tfsdk:"metadata"`
Values jsontypes.Normalized `tfsdk:"values"`
}
QueryRuleCriteriaModel represents a single match criterion for a query rule.
type QueryRuleModel ¶
type QueryRuleModel struct {
RuleID fwtypes.String `tfsdk:"rule_id"`
Type fwtypes.String `tfsdk:"type"`
Priority fwtypes.Int64 `tfsdk:"priority"`
Criteria fwtypes.List `tfsdk:"criteria"`
Actions fwtypes.Object `tfsdk:"actions"`
}
QueryRuleModel represents a single query rule nested block.
type QueryRulesetData ¶
type QueryRulesetData struct {
entitycore.ElasticsearchConnectionField
entitycore.ResourceTimeoutsField
ID fwtypes.String `tfsdk:"id"`
RulesetID fwtypes.String `tfsdk:"ruleset_id"`
Rules fwtypes.List `tfsdk:"rules"`
}
QueryRulesetData is the Terraform state model for the query ruleset resource. The data source uses queryRulesetDataSourceModel and maps through this type for its shared read/populate logic.
func (QueryRulesetData) GetElasticsearchConnection ¶
func (data QueryRulesetData) GetElasticsearchConnection() fwtypes.List
func (QueryRulesetData) GetID ¶
func (data QueryRulesetData) GetID() fwtypes.String
func (QueryRulesetData) GetResourceID ¶
func (data QueryRulesetData) GetResourceID() fwtypes.String
func (QueryRulesetData) GetVersionRequirements ¶
func (data QueryRulesetData) GetVersionRequirements(_ context.Context) ([]entitycore.VersionRequirement, diag.Diagnostics)
GetVersionRequirements satisfies entitycore.WithVersionRequirements.