Documentation ¶
Index ¶
- Variables
- func AllEnrollmentTokens(ctx context.Context, client *Client) ([]fleetapi.EnrollmentApiKey, diag.Diagnostics)
- func AllPackages(ctx context.Context, client *Client, prerelease bool) ([]fleetapi.SearchResult, diag.Diagnostics)
- func CreateAgentPolicy(ctx context.Context, client *Client, req fleetapi.AgentPolicyCreateRequest, ...) (*fleetapi.AgentPolicy, diag.Diagnostics)
- func CreateFleetServerHost(ctx context.Context, client *Client, ...) (*fleetapi.FleetServerHost, diag.Diagnostics)
- func CreateOutput(ctx context.Context, client *Client, req fleetapi.PostOutputsJSONRequestBody) (*fleetapi.OutputCreateRequest, diag.Diagnostics)
- func CreatePackagePolicy(ctx context.Context, client *Client, ...) (*fleetapi.PackagePolicy, diag.Diagnostics)
- func DeleteAgentPolicy(ctx context.Context, client *Client, id string) diag.Diagnostics
- func DeleteFleetServerHost(ctx context.Context, client *Client, id string) diag.Diagnostics
- func DeleteOutput(ctx context.Context, client *Client, id string) diag.Diagnostics
- func DeletePackagePolicy(ctx context.Context, client *Client, id string, force bool) diag.Diagnostics
- func GetEnrollmentTokensByPolicy(ctx context.Context, client *Client, policyID string) ([]fleetapi.EnrollmentApiKey, diag.Diagnostics)
- func InstallPackage(ctx context.Context, client *Client, name, version string, force bool) diag.Diagnostics
- func ReadAgentPolicy(ctx context.Context, client *Client, id string) (*fleetapi.AgentPolicy, diag.Diagnostics)
- func ReadFleetServerHost(ctx context.Context, client *Client, id string) (*fleetapi.FleetServerHost, diag.Diagnostics)
- func ReadOutput(ctx context.Context, client *Client, id string) (*fleetapi.OutputCreateRequest, diag.Diagnostics)
- func ReadPackage(ctx context.Context, client *Client, name, version string) (*fleetapi.GetPackageItem, diag.Diagnostics)
- func ReadPackagePolicy(ctx context.Context, client *Client, id string) (*fleetapi.PackagePolicy, diag.Diagnostics)
- func Uninstall(ctx context.Context, client *Client, name, version string, force bool) diag.Diagnostics
- func UpdateAgentPolicy(ctx context.Context, client *Client, id string, ...) (*fleetapi.AgentPolicy, diag.Diagnostics)
- func UpdateFleetServerHost(ctx context.Context, client *Client, id string, ...) (*fleetapi.FleetServerHost, diag.Diagnostics)
- func UpdateOutput(ctx context.Context, client *Client, id string, ...) (*fleetapi.OutputUpdateRequest, diag.Diagnostics)
- func UpdatePackagePolicy(ctx context.Context, client *Client, id string, ...) (*fleetapi.PackagePolicy, diag.Diagnostics)
- type Client
- type Config
Constants ¶
This section is empty.
Variables ¶
var (
ErrPackageNotFound = errors.New("package not found")
)
Functions ¶
func AllEnrollmentTokens ¶
func AllEnrollmentTokens(ctx context.Context, client *Client) ([]fleetapi.EnrollmentApiKey, diag.Diagnostics)
AllEnrollmentTokens reads all enrollment tokens from the API.
func AllPackages ¶ added in v0.11.0
func AllPackages(ctx context.Context, client *Client, prerelease bool) ([]fleetapi.SearchResult, diag.Diagnostics)
AllPackages returns information about the latest packages known to Fleet.
func CreateAgentPolicy ¶
func CreateAgentPolicy(ctx context.Context, client *Client, req fleetapi.AgentPolicyCreateRequest, sysMonitoring bool) (*fleetapi.AgentPolicy, diag.Diagnostics)
CreateAgentPolicy creates a new agent policy.
func CreateFleetServerHost ¶
func CreateFleetServerHost(ctx context.Context, client *Client, req fleetapi.PostFleetServerHostsJSONRequestBody) (*fleetapi.FleetServerHost, diag.Diagnostics)
CreateFleetServerHost creates a new fleet server host.
func CreateOutput ¶
func CreateOutput(ctx context.Context, client *Client, req fleetapi.PostOutputsJSONRequestBody) (*fleetapi.OutputCreateRequest, diag.Diagnostics)
CreateOutput creates a new output.
func CreatePackagePolicy ¶ added in v0.10.0
func CreatePackagePolicy(ctx context.Context, client *Client, req fleetapi.CreatePackagePolicyJSONRequestBody) (*fleetapi.PackagePolicy, diag.Diagnostics)
CreatePackagePolicy creates a new package policy.
func DeleteAgentPolicy ¶
DeleteAgentPolicy deletes an existing agent policy
func DeleteFleetServerHost ¶
DeleteFleetServerHost deletes an existing fleet server host.
func DeleteOutput ¶
DeleteOutput deletes an existing output
func DeletePackagePolicy ¶ added in v0.10.0
func DeletePackagePolicy(ctx context.Context, client *Client, id string, force bool) diag.Diagnostics
DeletePackagePolicy deletes an existing package policy.
func GetEnrollmentTokensByPolicy ¶ added in v0.11.5
func GetEnrollmentTokensByPolicy(ctx context.Context, client *Client, policyID string) ([]fleetapi.EnrollmentApiKey, diag.Diagnostics)
GetEnrollmentTokensByPolicy Get enrollment tokens by given policy ID
func InstallPackage ¶ added in v0.10.0
func InstallPackage(ctx context.Context, client *Client, name, version string, force bool) diag.Diagnostics
InstallPackage installs a package.
func ReadAgentPolicy ¶
func ReadAgentPolicy(ctx context.Context, client *Client, id string) (*fleetapi.AgentPolicy, diag.Diagnostics)
ReadAgentPolicy reads a specific agent policy from the API.
func ReadFleetServerHost ¶
func ReadFleetServerHost(ctx context.Context, client *Client, id string) (*fleetapi.FleetServerHost, diag.Diagnostics)
ReadFleetServerHost reads a specific fleet server host from the API.
func ReadOutput ¶
func ReadOutput(ctx context.Context, client *Client, id string) (*fleetapi.OutputCreateRequest, diag.Diagnostics)
ReadOutput reads a specific output from the API.
func ReadPackage ¶ added in v0.10.0
func ReadPackage(ctx context.Context, client *Client, name, version string) (*fleetapi.GetPackageItem, diag.Diagnostics)
ReadPackage reads a specific package from the API.
func ReadPackagePolicy ¶ added in v0.10.0
func ReadPackagePolicy(ctx context.Context, client *Client, id string) (*fleetapi.PackagePolicy, diag.Diagnostics)
ReadPackagePolicy reads a specific package policy from the API.
func Uninstall ¶ added in v0.10.0
func Uninstall(ctx context.Context, client *Client, name, version string, force bool) diag.Diagnostics
Uninstall uninstalls a package.
func UpdateAgentPolicy ¶
func UpdateAgentPolicy(ctx context.Context, client *Client, id string, req fleetapi.AgentPolicyUpdateRequest) (*fleetapi.AgentPolicy, diag.Diagnostics)
UpdateAgentPolicy updates an existing agent policy.
func UpdateFleetServerHost ¶
func UpdateFleetServerHost(ctx context.Context, client *Client, id string, req fleetapi.UpdateFleetServerHostsJSONRequestBody) (*fleetapi.FleetServerHost, diag.Diagnostics)
UpdateFleetServerHost updates an existing fleet server host.
func UpdateOutput ¶
func UpdateOutput(ctx context.Context, client *Client, id string, req fleetapi.UpdateOutputJSONRequestBody) (*fleetapi.OutputUpdateRequest, diag.Diagnostics)
UpdateOutput updates an existing output.
func UpdatePackagePolicy ¶ added in v0.10.0
func UpdatePackagePolicy(ctx context.Context, client *Client, id string, req fleetapi.UpdatePackagePolicyJSONRequestBody) (*fleetapi.PackagePolicy, diag.Diagnostics)
UpdatePackagePolicy updates an existing package policy.