apiroles

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: 16 Imported by: 0

Documentation

Overview

apiroles_data_source.go

apiroles_data_validation.go

apiroles_resource.go

apiroles_state.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceJamfProAPIRoles

func DataSourceJamfProAPIRoles() *schema.Resource

DataSourceJamfProAPIRoles provides information about a specific Jamf Pro API role by its ID or Name.

func DataSourceJamfProAPIRolesRead added in v0.0.18

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

DataSourceJamfProAPIRolesRead fetches the details of a specific API role 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.

func ResourceJamfProAPIRoles

func ResourceJamfProAPIRoles() *schema.Resource

ResourceJamfProAPIRoles defines the schema for managing Jamf Pro API Roles in Terraform.

func ResourceJamfProAPIRolesCreate

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

ResourceJamfProAPIRolesCreate handles the creation of a Jamf Pro API Role. The function: 1. Constructs the API role data using the provided Terraform configuration. 2. Calls the API to create the role in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created role. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.

func ResourceJamfProAPIRolesDelete

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

ResourceJamfProAPIRolesDelete handles the deletion of a Jamf Pro API Role.

func ResourceJamfProAPIRolesRead

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

ResourceJamfProAPIRolesRead handles reading a Jamf Pro API Role from the remote system. The function: 1. Tries to fetch the API role based on the ID from the Terraform state. 2. If fetching by ID fails, attempts to fetch it by the display name. 3. Updates the Terraform state with the fetched data.

func ResourceJamfProAPIRolesUpdate

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

ResourceJamfProAPIRolesUpdate handles updating a Jamf Pro API Role. The function: 1. Constructs the updated API role data using the provided Terraform configuration. 2. Calls the API to update the role in Jamf Pro. 3. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.

Types

This section is empty.

Jump to

Keyboard shortcuts

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