Documentation
¶
Overview ¶
Package patch_internal_source implements the read-only jamfplatform_pro_patch_internal_source data source backed by the Jamf ProClassic patch internal sources API. Internal sources are Jamf-managed (the built-in "Jamf" definition source) and not user-creatable, so this package ships a data source only — no resource or list resource.
Index ¶
- func NewPatchInternalSourceDataSource() datasource.DataSource
- type PatchInternalSourceDataSource
- func (d *PatchInternalSourceDataSource) ConfigValidators(ctx context.Context) []datasource.ConfigValidator
- func (d *PatchInternalSourceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *PatchInternalSourceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *PatchInternalSourceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *PatchInternalSourceDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type PatchInternalSourceDataSourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPatchInternalSourceDataSource ¶
func NewPatchInternalSourceDataSource() datasource.DataSource
NewPatchInternalSourceDataSource returns a new instance of PatchInternalSourceDataSource.
Types ¶
type PatchInternalSourceDataSource ¶
type PatchInternalSourceDataSource struct {
// contains filtered or unexported fields
}
PatchInternalSourceDataSource implements the Terraform data source for Jamf Pro patch internal sources. Lookup is by ID OR by name — exactly one must be supplied.
func (*PatchInternalSourceDataSource) ConfigValidators ¶
func (d *PatchInternalSourceDataSource) ConfigValidators(ctx context.Context) []datasource.ConfigValidator
ConfigValidators enforces that exactly one of id / name is supplied.
func (*PatchInternalSourceDataSource) Configure ¶
func (d *PatchInternalSourceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure wires the Jamf ProClassic client into the data source via the shared providerdata.ConfigureProClassic helper.
func (*PatchInternalSourceDataSource) Metadata ¶
func (d *PatchInternalSourceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata sets the data source type name for the Terraform provider.
func (*PatchInternalSourceDataSource) Read ¶
func (d *PatchInternalSourceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read fetches a patch internal source by ID or by name, then its published available-titles catalog, and populates Terraform state.
func (*PatchInternalSourceDataSource) Schema ¶
func (d *PatchInternalSourceDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema returns the data source schema. id and name are the mutually-exclusive selectors (Optional+Computed); the remaining attributes are populated from the SDK response.
type PatchInternalSourceDataSourceModel ¶
type PatchInternalSourceDataSourceModel struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Enabled types.Bool `tfsdk:"enabled"`
Endpoint types.String `tfsdk:"endpoint"`
AvailableTitles []availabletitles.Model `tfsdk:"available_titles"`
Timeouts datasourceTimeouts.Value `tfsdk:"timeouts"`
}
PatchInternalSourceDataSourceModel represents the Terraform data source model for a Jamf Pro patch internal source. Internal sources are Jamf-managed (the built-in "Jamf" source) and not user-creatable, so there is no resource model. Either id or name must be supplied (enforced by ExactlyOneOf at config validation); the remaining attributes are populated from the SDK response.