devicehealthscript

package
v0.20241128.1084944 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/devicemanagement/beta/devicehealthscript Documentation

The devicehealthscript SDK allows for interaction with Microsoft Graph devicemanagement (API Version beta).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/microsoft-graph/devicemanagement/beta/devicehealthscript"

Client Initialization

client := devicehealthscript.NewDeviceHealthScriptClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: DeviceHealthScriptClient.AssignDeviceHealthScript

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

payload := devicehealthscript.AssignDeviceHealthScriptRequest{
	// ...
}


read, err := client.AssignDeviceHealthScript(ctx, id, payload, devicehealthscript.DefaultAssignDeviceHealthScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.CreateDeviceHealthScript

ctx := context.TODO()

payload := devicehealthscript.DeviceHealthScript{
	// ...
}


read, err := client.CreateDeviceHealthScript(ctx, payload, devicehealthscript.DefaultCreateDeviceHealthScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.DeleteDeviceHealthScript

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

read, err := client.DeleteDeviceHealthScript(ctx, id, devicehealthscript.DefaultDeleteDeviceHealthScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.EnableDeviceHealthScriptsGlobalScripts

ctx := context.TODO()


read, err := client.EnableDeviceHealthScriptsGlobalScripts(ctx, devicehealthscript.DefaultEnableDeviceHealthScriptsGlobalScriptsOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.GetDeviceHealthScript

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

read, err := client.GetDeviceHealthScript(ctx, id, devicehealthscript.DefaultGetDeviceHealthScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.GetDeviceHealthScriptGlobalScriptHighestAvailableVersion

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

read, err := client.GetDeviceHealthScriptGlobalScriptHighestAvailableVersion(ctx, id, devicehealthscript.DefaultGetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.GetDeviceHealthScriptsCount

ctx := context.TODO()


read, err := client.GetDeviceHealthScriptsCount(ctx, devicehealthscript.DefaultGetDeviceHealthScriptsCountOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.ListDeviceHealthScripts

ctx := context.TODO()


// alternatively `client.ListDeviceHealthScripts(ctx, devicehealthscript.DefaultListDeviceHealthScriptsOperationOptions())` can be used to do batched pagination
items, err := client.ListDeviceHealthScriptsComplete(ctx, devicehealthscript.DefaultListDeviceHealthScriptsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DeviceHealthScriptClient.UpdateDeviceHealthScript

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

payload := devicehealthscript.DeviceHealthScript{
	// ...
}


read, err := client.UpdateDeviceHealthScript(ctx, id, payload, devicehealthscript.DefaultUpdateDeviceHealthScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DeviceHealthScriptClient.UpdateDeviceHealthScriptGlobalScript

ctx := context.TODO()
id := devicehealthscript.NewDeviceManagementDeviceHealthScriptID("deviceHealthScriptId")

payload := devicehealthscript.UpdateDeviceHealthScriptGlobalScriptRequest{
	// ...
}


read, err := client.UpdateDeviceHealthScriptGlobalScript(ctx, id, payload, devicehealthscript.DefaultUpdateDeviceHealthScriptGlobalScriptOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignDeviceHealthScriptOperationOptions

type AssignDeviceHealthScriptOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultAssignDeviceHealthScriptOperationOptions

func DefaultAssignDeviceHealthScriptOperationOptions() AssignDeviceHealthScriptOperationOptions

func (AssignDeviceHealthScriptOperationOptions) ToHeaders

func (AssignDeviceHealthScriptOperationOptions) ToOData

func (AssignDeviceHealthScriptOperationOptions) ToQuery

type AssignDeviceHealthScriptOperationResponse

type AssignDeviceHealthScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type AssignDeviceHealthScriptRequest

type AssignDeviceHealthScriptRequest struct {
	DeviceHealthScriptAssignments *[]beta.DeviceHealthScriptAssignment `json:"deviceHealthScriptAssignments,omitempty"`
}

type CreateDeviceHealthScriptOperationOptions

type CreateDeviceHealthScriptOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateDeviceHealthScriptOperationOptions

func DefaultCreateDeviceHealthScriptOperationOptions() CreateDeviceHealthScriptOperationOptions

func (CreateDeviceHealthScriptOperationOptions) ToHeaders

func (CreateDeviceHealthScriptOperationOptions) ToOData

func (CreateDeviceHealthScriptOperationOptions) ToQuery

type CreateDeviceHealthScriptOperationResponse

type CreateDeviceHealthScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceHealthScript
}

type DeleteDeviceHealthScriptOperationOptions

type DeleteDeviceHealthScriptOperationOptions struct {
	IfMatch   *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultDeleteDeviceHealthScriptOperationOptions

func DefaultDeleteDeviceHealthScriptOperationOptions() DeleteDeviceHealthScriptOperationOptions

func (DeleteDeviceHealthScriptOperationOptions) ToHeaders

func (DeleteDeviceHealthScriptOperationOptions) ToOData

func (DeleteDeviceHealthScriptOperationOptions) ToQuery

type DeleteDeviceHealthScriptOperationResponse

type DeleteDeviceHealthScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeviceHealthScriptClient

type DeviceHealthScriptClient struct {
	Client *msgraph.Client
}

func NewDeviceHealthScriptClientWithBaseURI

func NewDeviceHealthScriptClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceHealthScriptClient, error)

func (DeviceHealthScriptClient) AssignDeviceHealthScript

AssignDeviceHealthScript - Invoke action assign

func (DeviceHealthScriptClient) CreateDeviceHealthScript

CreateDeviceHealthScript - Create new navigation property to deviceHealthScripts for deviceManagement

func (DeviceHealthScriptClient) DeleteDeviceHealthScript

DeleteDeviceHealthScript - Delete navigation property deviceHealthScripts for deviceManagement

func (DeviceHealthScriptClient) EnableDeviceHealthScriptsGlobalScripts

EnableDeviceHealthScriptsGlobalScripts - Invoke action enableGlobalScripts

func (DeviceHealthScriptClient) GetDeviceHealthScript

GetDeviceHealthScript - Get deviceHealthScripts from deviceManagement. The list of device health scripts associated with the tenant.

func (DeviceHealthScriptClient) GetDeviceHealthScriptGlobalScriptHighestAvailableVersion

GetDeviceHealthScriptGlobalScriptHighestAvailableVersion - Invoke action getGlobalScriptHighestAvailableVersion. Update the Proprietary Device Health Script

func (DeviceHealthScriptClient) GetDeviceHealthScriptsCount

GetDeviceHealthScriptsCount - Get the number of the resource

func (DeviceHealthScriptClient) ListDeviceHealthScripts

ListDeviceHealthScripts - Get deviceHealthScripts from deviceManagement. The list of device health scripts associated with the tenant.

func (DeviceHealthScriptClient) ListDeviceHealthScriptsComplete

ListDeviceHealthScriptsComplete retrieves all the results into a single object

func (DeviceHealthScriptClient) ListDeviceHealthScriptsCompleteMatchingPredicate

func (c DeviceHealthScriptClient) ListDeviceHealthScriptsCompleteMatchingPredicate(ctx context.Context, options ListDeviceHealthScriptsOperationOptions, predicate DeviceHealthScriptOperationPredicate) (result ListDeviceHealthScriptsCompleteResult, err error)

ListDeviceHealthScriptsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeviceHealthScriptClient) UpdateDeviceHealthScript

UpdateDeviceHealthScript - Update the navigation property deviceHealthScripts in deviceManagement

func (DeviceHealthScriptClient) UpdateDeviceHealthScriptGlobalScript

UpdateDeviceHealthScriptGlobalScript - Invoke action updateGlobalScript. Update the Proprietary Device Health Script

type DeviceHealthScriptOperationPredicate

type DeviceHealthScriptOperationPredicate struct {
}

func (DeviceHealthScriptOperationPredicate) Matches

type EnableDeviceHealthScriptsGlobalScriptsOperationOptions

type EnableDeviceHealthScriptsGlobalScriptsOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultEnableDeviceHealthScriptsGlobalScriptsOperationOptions

func DefaultEnableDeviceHealthScriptsGlobalScriptsOperationOptions() EnableDeviceHealthScriptsGlobalScriptsOperationOptions

func (EnableDeviceHealthScriptsGlobalScriptsOperationOptions) ToHeaders

func (EnableDeviceHealthScriptsGlobalScriptsOperationOptions) ToOData

func (EnableDeviceHealthScriptsGlobalScriptsOperationOptions) ToQuery

type EnableDeviceHealthScriptsGlobalScriptsOperationResponse

type EnableDeviceHealthScriptsGlobalScriptsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func (GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions) ToHeaders

func (GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions) ToOData

func (GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationOptions) ToQuery

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationResponse

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GetDeviceHealthScriptGlobalScriptHighestAvailableVersionResult
}

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionResult

type GetDeviceHealthScriptGlobalScriptHighestAvailableVersionResult struct {
	Value nullable.Type[string] `json:"value,omitempty"`
}

type GetDeviceHealthScriptOperationOptions

type GetDeviceHealthScriptOperationOptions struct {
	Expand    *odata.Expand
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Select    *[]string
}

func DefaultGetDeviceHealthScriptOperationOptions

func DefaultGetDeviceHealthScriptOperationOptions() GetDeviceHealthScriptOperationOptions

func (GetDeviceHealthScriptOperationOptions) ToHeaders

func (GetDeviceHealthScriptOperationOptions) ToOData

func (GetDeviceHealthScriptOperationOptions) ToQuery

type GetDeviceHealthScriptOperationResponse

type GetDeviceHealthScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceHealthScript
}

type GetDeviceHealthScriptsCountOperationOptions

type GetDeviceHealthScriptsCountOperationOptions struct {
	Filter    *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Search    *string
}

func DefaultGetDeviceHealthScriptsCountOperationOptions

func DefaultGetDeviceHealthScriptsCountOperationOptions() GetDeviceHealthScriptsCountOperationOptions

func (GetDeviceHealthScriptsCountOperationOptions) ToHeaders

func (GetDeviceHealthScriptsCountOperationOptions) ToOData

func (GetDeviceHealthScriptsCountOperationOptions) ToQuery

type GetDeviceHealthScriptsCountOperationResponse

type GetDeviceHealthScriptsCountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]byte
}

type ListDeviceHealthScriptsCompleteResult

type ListDeviceHealthScriptsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.DeviceHealthScript
}

type ListDeviceHealthScriptsCustomPager

type ListDeviceHealthScriptsCustomPager struct {
	NextLink *odata.Link `json:"@odata.nextLink"`
}
func (p *ListDeviceHealthScriptsCustomPager) NextPageLink() *odata.Link

type ListDeviceHealthScriptsOperationOptions

type ListDeviceHealthScriptsOperationOptions struct {
	Count     *bool
	Expand    *odata.Expand
	Filter    *string
	Metadata  *odata.Metadata
	OrderBy   *odata.OrderBy
	RetryFunc client.RequestRetryFunc
	Search    *string
	Select    *[]string
	Skip      *int64
	Top       *int64
}

func DefaultListDeviceHealthScriptsOperationOptions

func DefaultListDeviceHealthScriptsOperationOptions() ListDeviceHealthScriptsOperationOptions

func (ListDeviceHealthScriptsOperationOptions) ToHeaders

func (ListDeviceHealthScriptsOperationOptions) ToOData

func (ListDeviceHealthScriptsOperationOptions) ToQuery

type ListDeviceHealthScriptsOperationResponse

type ListDeviceHealthScriptsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.DeviceHealthScript
}

type UpdateDeviceHealthScriptGlobalScriptOperationOptions

type UpdateDeviceHealthScriptGlobalScriptOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUpdateDeviceHealthScriptGlobalScriptOperationOptions

func DefaultUpdateDeviceHealthScriptGlobalScriptOperationOptions() UpdateDeviceHealthScriptGlobalScriptOperationOptions

func (UpdateDeviceHealthScriptGlobalScriptOperationOptions) ToHeaders

func (UpdateDeviceHealthScriptGlobalScriptOperationOptions) ToOData

func (UpdateDeviceHealthScriptGlobalScriptOperationOptions) ToQuery

type UpdateDeviceHealthScriptGlobalScriptOperationResponse

type UpdateDeviceHealthScriptGlobalScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *UpdateDeviceHealthScriptGlobalScriptResult
}

type UpdateDeviceHealthScriptGlobalScriptRequest

type UpdateDeviceHealthScriptGlobalScriptRequest struct {
	Version nullable.Type[string] `json:"version,omitempty"`
}

type UpdateDeviceHealthScriptGlobalScriptResult

type UpdateDeviceHealthScriptGlobalScriptResult struct {
	Value nullable.Type[string] `json:"value,omitempty"`
}

type UpdateDeviceHealthScriptOperationOptions

type UpdateDeviceHealthScriptOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUpdateDeviceHealthScriptOperationOptions

func DefaultUpdateDeviceHealthScriptOperationOptions() UpdateDeviceHealthScriptOperationOptions

func (UpdateDeviceHealthScriptOperationOptions) ToHeaders

func (UpdateDeviceHealthScriptOperationOptions) ToOData

func (UpdateDeviceHealthScriptOperationOptions) ToQuery

type UpdateDeviceHealthScriptOperationResponse

type UpdateDeviceHealthScriptOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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