packages

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

packages_data_handling.go

packages_data_source.go

packages_helpers.go

packages_data_object.go

packages_resource.go

packages_state.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceJamfProPackages

func DataSourceJamfProPackages() *schema.Resource

DataSourceJamfProPackages provides information about a specific Jamf Pro site by its ID or Name.

func DataSourceJamfProPackagesRead

func DataSourceJamfProPackagesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

DataSourceJamfProPackagesRead fetches the details of a specific Jamf Pro package from Jamf Pro using either its unique Name or its Id. The function prioritizes the 'name' attribute over the 'id' attribute for fetching details. If neither 'name' nor 'id' is provided, it returns an error. Once the details are fetched, they are set in the data source's state.

Parameters: - ctx: The context within which the function is called. It's used for timeouts and cancellation. - d: The current state of the data source. - meta: The meta object that can be used to retrieve the API client connection.

Returns: - diag.Diagnostics: Returns any diagnostics (errors or warnings) encountered during the function's execution.

func ResourceJamfProPackages

func ResourceJamfProPackages() *schema.Resource

ResourceJamfProPackages defines the schema and CRUD operations for managing Jamf Pro Packages in Terraform.

func ResourceJamfProPackagesCreate

func ResourceJamfProPackagesCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProPackagesCreate is responsible for creating a new Jamf Pro Package in the remote system. The function: 1. Constructs the attribute data using the provided Terraform configuration. 2. Calls the API to create the attribute in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created attribute. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.

func ResourceJamfProPackagesDelete

func ResourceJamfProPackagesDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProPackagesDelete is responsible for deleting a Jamf Pro Package.

func ResourceJamfProPackagesRead

func ResourceJamfProPackagesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProPackagesRead is responsible for reading the current state of a Jamf Pro Site Resource from the remote system. The function: 1. Fetches the attribute's current state using its ID. If it fails then obtain attribute's current state using its Name. 2. Updates the Terraform state with the fetched data to ensure it accurately reflects the current state in Jamf Pro. 3. Handles any discrepancies, such as the attribute being deleted outside of Terraform, to keep the Terraform state synchronized.

func ResourceJamfProPackagesUpdate

func ResourceJamfProPackagesUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProPackagesUpdate is responsible for updating an existing Jamf Pro Package on the remote system.

Types

This section is empty.

Jump to

Keyboard shortcuts

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