Documentation
¶
Overview ¶
resources_data_source.go
networksegments_object.go
networksegments_resource.go
Index ¶
- func DataSourceJamfProNetworkSegments() *schema.Resource
- func DataSourceJamfProNetworkSegmentsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProNetworkSegments() *schema.Resource
- func ResourceJamfProNetworkSegmentsCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProNetworkSegmentsDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProNetworkSegmentsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProNetworkSegmentsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceJamfProNetworkSegments ¶
DataSourceJamfProNetworkSegments provides information about a specific Jamf Pro resource by its ID or Name.
func DataSourceJamfProNetworkSegmentsRead ¶
func DataSourceJamfProNetworkSegmentsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
DataSourceJamfProNetworkSegmentsRead fetches the details of a specific Jamf Pro resource 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 ResourceJamfProNetworkSegments ¶
ResourceJamfProNetworkSegments defines the schema and CRUD operations for managing Jamf Pro NetworkSegments in Terraform.
func ResourceJamfProNetworkSegmentsCreate ¶
func ResourceJamfProNetworkSegmentsCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProNetworkSegmentsCreate is responsible for creating a new Jamf Network segment in the remote system. The function: 1. Constructs the printer data using the provided Terraform configuration. 2. Calls the API to create the printer in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created printer. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.
func ResourceJamfProNetworkSegmentsDelete ¶
func ResourceJamfProNetworkSegmentsDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProNetworkSegmentsDeleteis responsible for deleting a Jamf Pro network segment.
func ResourceJamfProNetworkSegmentsRead ¶
func ResourceJamfProNetworkSegmentsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProNetworkSegmentsRead 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 ResourceJamfProNetworkSegmentsUpdate ¶
func ResourceJamfProNetworkSegmentsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProNetworkSegmentsUpdate is responsible for updating an existing Jamf Pro Network Segment on the remote system.
Types ¶
This section is empty.