Documentation ¶
Overview ¶
usergroups_data_source.go
usergroups_data_validation.go
usergroups_object.go
usergroups_resource.go
usergroups_state.go
Index ¶
- Constants
- func DataSourceJamfProUserGroups() *schema.Resource
- func DataSourceJamfProUserGroupsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProUserGroupCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProUserGroupDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProUserGroupRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProUserGroupUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProUserGroups() *schema.Resource
- type UserGroupAndOr
Constants ¶
const ( And UserGroupAndOr = "and" Or UserGroupAndOr = "or" SearchTypeIs = "is" SearchTypeIsNot = "is not" SearchTypeLike = "like" SearchTypeNotLike = "not like" SearchTypeMatchesRegex = "matches regex" SearchTypeDoesNotMatch = "does not match regex" SearchTypeMemberOf = "member of" SearchTypeNotMemberOf = "not member of" )
Variables ¶
This section is empty.
Functions ¶
func DataSourceJamfProUserGroups ¶
DataSourceJamfProUserGroups provides information about a specific Jamf Pro User Group by its ID or Name.
func DataSourceJamfProUserGroupsRead ¶
func DataSourceJamfProUserGroupsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
DataSourceJamfProUserGroupsRead fetches the details of a specific Jamf Pro user group 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 ResourceJamfProUserGroupCreate ¶
func ResourceJamfProUserGroupCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProUserGroupCreate is responsible for creating a new Jamf Pro User Group in the remote system. The function: 1. Constructs the User Group data using the provided Terraform configuration. 2. Calls the API to create the User Group in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created User Group. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.
func ResourceJamfProUserGroupDelete ¶
func ResourceJamfProUserGroupDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProUserGroupDelete is responsible for deleting a Jamf Pro User Group.
func ResourceJamfProUserGroupRead ¶
func ResourceJamfProUserGroupRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProUserGroupRead is responsible for reading the current state of a Jamf Pro User Group Resource from the remote system. The function: 1. Fetches the user group's current state using its ID. If it fails, it tries to obtain the user group'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 user group being deleted outside of Terraform, to keep the Terraform state synchronized.
func ResourceJamfProUserGroupUpdate ¶
func ResourceJamfProUserGroupUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProUserGroupUpdate is responsible for updating an existing Jamf Pro Printer on the remote system.
func ResourceJamfProUserGroups ¶
ResourceJamfProUserGroups defines the schema and CRUD operations for managing Jamf Pro Scripts in Terraform.
Types ¶
type UserGroupAndOr ¶ added in v0.0.43
type UserGroupAndOr string