Documentation ¶
Overview ¶
apiroles_data_source.go
apiroles_data_validation.go
apiroles_resource.go
Index ¶
- func DataSourceJamfProAPIRoles() *schema.Resource
- func DataSourceJamfProAPIRolesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProAPIRoles() *schema.Resource
- func ResourceJamfProAPIRolesCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProAPIRolesDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProAPIRolesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProAPIRolesUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceJamfProAPIRoles ¶
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 ¶
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.