Documentation
¶
Index ¶
- func BuildSpaceAwarePath(spaceID, basePath string) string
- func ConnectorConfigWithDefaults(connectorTypeID, plan string) (string, error)
- func ConnectorResponseToModel(spaceID string, connector *kbapi.ConnectorResponse) (*models.KibanaActionConnector, fwdiag.Diagnostics)
- func CreateConnector(ctx context.Context, client *Client, connectorOld models.KibanaActionConnector) (string, fwdiag.Diagnostics)
- func CreateDataView(ctx context.Context, client *Client, spaceID string, ...) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
- func CreateExceptionList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
- func CreateExceptionListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
- func CreateList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
- func CreateListIndex(ctx context.Context, client *Client, spaceId string) (bool, diag.Diagnostics)
- func CreateListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
- func CreateMaintenanceWindow(ctx context.Context, client *Client, spaceID string, ...) (*kbapi.PostMaintenanceWindowResponse, diag.Diagnostics)
- func DeleteConnector(ctx context.Context, client *Client, connectorID string, spaceID string) fwdiag.Diagnostics
- func DeleteDataView(ctx context.Context, client *Client, spaceID string, viewID string) diag.Diagnostics
- func DeleteExceptionList(ctx context.Context, client *Client, spaceId string, ...) diag.Diagnostics
- func DeleteExceptionListItem(ctx context.Context, client *Client, spaceId string, ...) diag.Diagnostics
- func DeleteList(ctx context.Context, client *Client, spaceId string, ...) diag.Diagnostics
- func DeleteListIndex(ctx context.Context, client *Client, spaceId string) diag.Diagnostics
- func DeleteListItem(ctx context.Context, client *Client, spaceId string, ...) diag.Diagnostics
- func DeleteMaintenanceWindow(ctx context.Context, client *Client, spaceID string, ...) diag.Diagnostics
- func GetConnector(ctx context.Context, client *Client, connectorID, spaceID string) (*models.KibanaActionConnector, fwdiag.Diagnostics)
- func GetDataView(ctx context.Context, client *Client, spaceID string, viewID string) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
- func GetDataViews(ctx context.Context, client *Client, spaceID string) ([]kbapi.GetDataViewsResponseItem, diag.Diagnostics)
- func GetDefaultDataView(ctx context.Context, client *Client, spaceID string) (*string, diag.Diagnostics)
- func GetExceptionList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
- func GetExceptionListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
- func GetList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
- func GetListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
- func GetMaintenanceWindow(ctx context.Context, client *Client, spaceID string, ...) (*kbapi.GetMaintenanceWindowIdResponse, diag.Diagnostics)
- func GetPrebuiltRulesStatus(ctx context.Context, client *Client, spaceID string) (*kbapi.ReadPrebuiltRulesAndTimelinesStatusResponse, diag.Diagnostics)
- func InstallPrebuiltRules(ctx context.Context, client *Client, spaceID string) diag.Diagnostics
- func ReadListIndex(ctx context.Context, client *Client, spaceId string) (listIndex bool, listItemIndex bool, diags diag.Diagnostics)
- func SearchConnectors(ctx context.Context, client *Client, ...) ([]*models.KibanaActionConnector, sdkdiag.Diagnostics)
- func SetDefaultDataView(ctx context.Context, client *Client, spaceID string, ...) diag.Diagnostics
- func SpaceAwarePathRequestEditor(spaceID string) func(ctx context.Context, req *http.Request) error
- func UpdateConnector(ctx context.Context, client *Client, connectorOld models.KibanaActionConnector) (string, fwdiag.Diagnostics)
- func UpdateDataView(ctx context.Context, client *Client, spaceID string, viewID string, ...) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
- func UpdateExceptionList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
- func UpdateExceptionListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
- func UpdateList(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
- func UpdateListItem(ctx context.Context, client *Client, spaceId string, ...) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
- func UpdateMaintenanceWindow(ctx context.Context, client *Client, spaceID string, ...) diag.Diagnostics
- type Client
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSpaceAwarePath ¶ added in v0.13.0
BuildSpaceAwarePath constructs an API path with space awareness. If spaceID is empty or "default", returns the basePath unchanged. Otherwise, prepends "/s/{spaceID}" to the basePath.
func ConnectorConfigWithDefaults ¶ added in v0.11.18
func ConnectorResponseToModel ¶ added in v0.11.18
func ConnectorResponseToModel(spaceID string, connector *kbapi.ConnectorResponse) (*models.KibanaActionConnector, fwdiag.Diagnostics)
func CreateConnector ¶ added in v0.11.18
func CreateConnector(ctx context.Context, client *Client, connectorOld models.KibanaActionConnector) (string, fwdiag.Diagnostics)
func CreateDataView ¶
func CreateDataView(ctx context.Context, client *Client, spaceID string, req kbapi.DataViewsCreateDataViewRequestObject) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
CreateDataView creates a new data view.
func CreateExceptionList ¶ added in v0.13.0
func CreateExceptionList(ctx context.Context, client *Client, spaceId string, body kbapi.CreateExceptionListJSONRequestBody) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
CreateExceptionList creates a new exception list.
func CreateExceptionListItem ¶ added in v0.13.0
func CreateExceptionListItem(ctx context.Context, client *Client, spaceId string, body kbapi.CreateExceptionListItemJSONRequestBody) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
CreateExceptionListItem creates a new exception list item.
func CreateList ¶ added in v0.13.0
func CreateList(ctx context.Context, client *Client, spaceId string, body kbapi.CreateListJSONRequestBody) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
CreateList creates a new security list.
func CreateListIndex ¶ added in v0.13.0
CreateListIndex creates the .lists and .items data streams for a space if they don't exist. This is required before any list operations can be performed. Returns true if acknowledged, and diagnostics if there was an error.
func CreateListItem ¶ added in v0.13.0
func CreateListItem(ctx context.Context, client *Client, spaceId string, body kbapi.CreateListItemJSONRequestBody) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
CreateListItem creates a new security list item.
func CreateMaintenanceWindow ¶ added in v0.11.18
func CreateMaintenanceWindow(ctx context.Context, client *Client, spaceID string, body kbapi.PostMaintenanceWindowJSONRequestBody) (*kbapi.PostMaintenanceWindowResponse, diag.Diagnostics)
CreateMaintenanceWindow creates a new maintenance window.
func DeleteConnector ¶ added in v0.11.18
func DeleteDataView ¶
func DeleteDataView(ctx context.Context, client *Client, spaceID string, viewID string) diag.Diagnostics
DeleteDataView deletes an existing data view.
func DeleteExceptionList ¶ added in v0.13.0
func DeleteExceptionList(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteExceptionListParams) diag.Diagnostics
DeleteExceptionList deletes an existing exception list.
func DeleteExceptionListItem ¶ added in v0.13.0
func DeleteExceptionListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteExceptionListItemParams) diag.Diagnostics
DeleteExceptionListItem deletes an existing exception list item.
func DeleteList ¶ added in v0.13.0
func DeleteList(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteListParams) diag.Diagnostics
DeleteList deletes an existing security list.
func DeleteListIndex ¶ added in v0.13.0
DeleteListIndex deletes the .lists and .items data streams for a space. Returns diagnostics if there was an error.
func DeleteListItem ¶ added in v0.13.0
func DeleteListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteListItemParams) diag.Diagnostics
DeleteListItem deletes an existing security list item.
func DeleteMaintenanceWindow ¶ added in v0.11.18
func DeleteMaintenanceWindow(ctx context.Context, client *Client, spaceID string, maintenanceWindowID string) diag.Diagnostics
DeleteMaintenanceWindow deletes an existing maintenance window.
func GetConnector ¶ added in v0.11.18
func GetConnector(ctx context.Context, client *Client, connectorID, spaceID string) (*models.KibanaActionConnector, fwdiag.Diagnostics)
func GetDataView ¶
func GetDataView(ctx context.Context, client *Client, spaceID string, viewID string) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
GetDataView reads a specific data view from the API.
func GetDataViews ¶
func GetDataViews(ctx context.Context, client *Client, spaceID string) ([]kbapi.GetDataViewsResponseItem, diag.Diagnostics)
GetDataViews reads all data views from the API.
func GetDefaultDataView ¶ added in v0.13.0
func GetDefaultDataView(ctx context.Context, client *Client, spaceID string) (*string, diag.Diagnostics)
GetDefaultDataView reads the default data view from the API.
func GetExceptionList ¶ added in v0.13.0
func GetExceptionList(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadExceptionListParams) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
GetExceptionList reads an exception list from the API by ID or list_id
func GetExceptionListItem ¶ added in v0.13.0
func GetExceptionListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadExceptionListItemParams) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
GetExceptionListItem reads an exception list item from the API by ID or item_id
func GetList ¶ added in v0.13.0
func GetList(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadListParams) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
GetList reads a security list from the API by ID
func GetListItem ¶ added in v0.13.0
func GetListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadListItemParams) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
GetListItem reads a security list item from the API by ID or list_id and value The response can be a single item or an array, so we unmarshal from the body. When querying by ID, we expect a single item.
func GetMaintenanceWindow ¶ added in v0.11.18
func GetMaintenanceWindow(ctx context.Context, client *Client, spaceID string, maintenanceWindowID string) (*kbapi.GetMaintenanceWindowIdResponse, diag.Diagnostics)
GetMaintenanceWindow reads a maintenance window from the API by ID
func GetPrebuiltRulesStatus ¶ added in v0.13.0
func GetPrebuiltRulesStatus(ctx context.Context, client *Client, spaceID string) (*kbapi.ReadPrebuiltRulesAndTimelinesStatusResponse, diag.Diagnostics)
GetPrebuiltRulesStatus retrieves the status of prebuilt rules and timelines for a given space.
func InstallPrebuiltRules ¶ added in v0.13.0
InstallPrebuiltRules installs or updates prebuilt rules and timelines for a given space.
func ReadListIndex ¶ added in v0.13.0
func ReadListIndex(ctx context.Context, client *Client, spaceId string) (listIndex bool, listItemIndex bool, diags diag.Diagnostics)
ReadListIndex reads the status of .lists and .items data streams for a space. Returns the status of list_index and list_item_index separately, and diagnostics on error.
func SearchConnectors ¶ added in v0.11.18
func SearchConnectors(ctx context.Context, client *Client, connectorName, spaceID, connectorTypeID string) ([]*models.KibanaActionConnector, sdkdiag.Diagnostics)
func SetDefaultDataView ¶ added in v0.13.0
func SetDefaultDataView(ctx context.Context, client *Client, spaceID string, req kbapi.SetDefaultDatailViewDefaultJSONRequestBody) diag.Diagnostics
SetDefaultDataView sets the default data view.
func SpaceAwarePathRequestEditor ¶ added in v0.13.0
func UpdateConnector ¶ added in v0.11.18
func UpdateConnector(ctx context.Context, client *Client, connectorOld models.KibanaActionConnector) (string, fwdiag.Diagnostics)
func UpdateDataView ¶
func UpdateDataView(ctx context.Context, client *Client, spaceID string, viewID string, req kbapi.DataViewsUpdateDataViewRequestObject) (*kbapi.DataViewsDataViewResponseObject, diag.Diagnostics)
UpdateDataView updates an existing data view.
func UpdateExceptionList ¶ added in v0.13.0
func UpdateExceptionList(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateExceptionListJSONRequestBody) (*kbapi.SecurityExceptionsAPIExceptionList, diag.Diagnostics)
UpdateExceptionList updates an existing exception list.
func UpdateExceptionListItem ¶ added in v0.13.0
func UpdateExceptionListItem(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateExceptionListItemJSONRequestBody) (*kbapi.SecurityExceptionsAPIExceptionListItem, diag.Diagnostics)
UpdateExceptionListItem updates an existing exception list item.
func UpdateList ¶ added in v0.13.0
func UpdateList(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateListJSONRequestBody) (*kbapi.SecurityListsAPIList, diag.Diagnostics)
UpdateList updates an existing security list.
func UpdateListItem ¶ added in v0.13.0
func UpdateListItem(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateListItemJSONRequestBody) (*kbapi.SecurityListsAPIListItem, diag.Diagnostics)
UpdateListItem updates an existing security list item.
func UpdateMaintenanceWindow ¶ added in v0.11.18
func UpdateMaintenanceWindow(ctx context.Context, client *Client, spaceID string, maintenanceWindowID string, req kbapi.PatchMaintenanceWindowIdJSONRequestBody) diag.Diagnostics
UpdateMaintenanceWindow updates an existing maintenance window.