template

package
v0.20241126.1723 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

The template 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/template"

Client Initialization

client := template.NewTemplateClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: TemplateClient.CreateTemplate

ctx := context.TODO()

payload := template.DeviceManagementTemplate{
	// ...
}


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

Example Usage: TemplateClient.CreateTemplateInstance

ctx := context.TODO()
id := template.NewDeviceManagementTemplateID("deviceManagementTemplateId")

payload := template.CreateTemplateInstanceRequest{
	// ...
}


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

Example Usage: TemplateClient.DeleteTemplate

ctx := context.TODO()
id := template.NewDeviceManagementTemplateID("deviceManagementTemplateId")

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

Example Usage: TemplateClient.GetTemplate

ctx := context.TODO()
id := template.NewDeviceManagementTemplateID("deviceManagementTemplateId")

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

Example Usage: TemplateClient.GetTemplatesCount

ctx := context.TODO()


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

Example Usage: TemplateClient.ListTemplateImportOffice365DeviceConfigurationPolicies

ctx := context.TODO()


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

Example Usage: TemplateClient.ListTemplates

ctx := context.TODO()


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

Example Usage: TemplateClient.UpdateTemplate

ctx := context.TODO()
id := template.NewDeviceManagementTemplateID("deviceManagementTemplateId")

payload := template.DeviceManagementTemplate{
	// ...
}


read, err := client.UpdateTemplate(ctx, id, payload, template.DefaultUpdateTemplateOperationOptions())
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 CreateTemplateInstanceOperationOptions

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

func DefaultCreateTemplateInstanceOperationOptions

func DefaultCreateTemplateInstanceOperationOptions() CreateTemplateInstanceOperationOptions

func (CreateTemplateInstanceOperationOptions) ToHeaders

func (CreateTemplateInstanceOperationOptions) ToOData

func (CreateTemplateInstanceOperationOptions) ToQuery

type CreateTemplateInstanceOperationResponse

type CreateTemplateInstanceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceManagementIntent
}

type CreateTemplateInstanceRequest

type CreateTemplateInstanceRequest struct {
	Description     nullable.Type[string]                   `json:"description,omitempty"`
	DisplayName     nullable.Type[string]                   `json:"displayName,omitempty"`
	RoleScopeTagIds *[]string                               `json:"roleScopeTagIds,omitempty"`
	SettingsDelta   *[]beta.DeviceManagementSettingInstance `json:"settingsDelta,omitempty"`
}

type CreateTemplateOperationOptions

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

func DefaultCreateTemplateOperationOptions

func DefaultCreateTemplateOperationOptions() CreateTemplateOperationOptions

func (CreateTemplateOperationOptions) ToHeaders

func (CreateTemplateOperationOptions) ToOData

func (CreateTemplateOperationOptions) ToQuery

type CreateTemplateOperationResponse

type CreateTemplateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.DeviceManagementTemplate
}

type DeleteTemplateOperationOptions

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

func DefaultDeleteTemplateOperationOptions

func DefaultDeleteTemplateOperationOptions() DeleteTemplateOperationOptions

func (DeleteTemplateOperationOptions) ToHeaders

func (DeleteTemplateOperationOptions) ToOData

func (DeleteTemplateOperationOptions) ToQuery

type DeleteTemplateOperationResponse

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

type DeviceManagementIntentOperationPredicate

type DeviceManagementIntentOperationPredicate struct {
}

func (DeviceManagementIntentOperationPredicate) Matches

type DeviceManagementTemplateOperationPredicate

type DeviceManagementTemplateOperationPredicate struct {
}

func (DeviceManagementTemplateOperationPredicate) Matches

type GetTemplateOperationOptions

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

func DefaultGetTemplateOperationOptions

func DefaultGetTemplateOperationOptions() GetTemplateOperationOptions

func (GetTemplateOperationOptions) ToHeaders

func (GetTemplateOperationOptions) ToOData

func (GetTemplateOperationOptions) ToQuery

type GetTemplateOperationResponse

type GetTemplateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.DeviceManagementTemplate
}

type GetTemplatesCountOperationOptions

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

func DefaultGetTemplatesCountOperationOptions

func DefaultGetTemplatesCountOperationOptions() GetTemplatesCountOperationOptions

func (GetTemplatesCountOperationOptions) ToHeaders

func (GetTemplatesCountOperationOptions) ToOData

func (GetTemplatesCountOperationOptions) ToQuery

type GetTemplatesCountOperationResponse

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

type ListTemplateImportOffice365DeviceConfigurationPoliciesCompleteResult

type ListTemplateImportOffice365DeviceConfigurationPoliciesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.DeviceManagementIntent
}

type ListTemplateImportOffice365DeviceConfigurationPoliciesCustomPager

type ListTemplateImportOffice365DeviceConfigurationPoliciesCustomPager struct {
	NextLink *odata.Link `json:"@odata.nextLink"`
}

type ListTemplateImportOffice365DeviceConfigurationPoliciesOperationOptions

type ListTemplateImportOffice365DeviceConfigurationPoliciesOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Skip      *int64
	Top       *int64
}

func (ListTemplateImportOffice365DeviceConfigurationPoliciesOperationOptions) ToHeaders

func (ListTemplateImportOffice365DeviceConfigurationPoliciesOperationOptions) ToOData

func (ListTemplateImportOffice365DeviceConfigurationPoliciesOperationOptions) ToQuery

type ListTemplateImportOffice365DeviceConfigurationPoliciesOperationResponse

type ListTemplateImportOffice365DeviceConfigurationPoliciesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.DeviceManagementIntent
}

type ListTemplatesCompleteResult

type ListTemplatesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.DeviceManagementTemplate
}

type ListTemplatesCustomPager

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

type ListTemplatesOperationOptions

type ListTemplatesOperationOptions 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 DefaultListTemplatesOperationOptions

func DefaultListTemplatesOperationOptions() ListTemplatesOperationOptions

func (ListTemplatesOperationOptions) ToHeaders

func (ListTemplatesOperationOptions) ToOData

func (ListTemplatesOperationOptions) ToQuery

type ListTemplatesOperationResponse

type ListTemplatesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.DeviceManagementTemplate
}

type TemplateClient

type TemplateClient struct {
	Client *msgraph.Client
}

func NewTemplateClientWithBaseURI

func NewTemplateClientWithBaseURI(sdkApi sdkEnv.Api) (*TemplateClient, error)

func (TemplateClient) CreateTemplate

CreateTemplate - Create new navigation property to templates for deviceManagement

func (TemplateClient) CreateTemplateInstance

CreateTemplateInstance - Invoke action createInstance

func (TemplateClient) DeleteTemplate

DeleteTemplate - Delete navigation property templates for deviceManagement

func (TemplateClient) GetTemplate

GetTemplate - Get templates from deviceManagement. The available templates

func (TemplateClient) GetTemplatesCount

GetTemplatesCount - Get the number of the resource

func (TemplateClient) ListTemplateImportOffice365DeviceConfigurationPolicies

ListTemplateImportOffice365DeviceConfigurationPolicies - Invoke action importOffice365DeviceConfigurationPolicies

func (TemplateClient) ListTemplateImportOffice365DeviceConfigurationPoliciesComplete

ListTemplateImportOffice365DeviceConfigurationPoliciesComplete retrieves all the results into a single object

func (TemplateClient) ListTemplateImportOffice365DeviceConfigurationPoliciesCompleteMatchingPredicate

ListTemplateImportOffice365DeviceConfigurationPoliciesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TemplateClient) ListTemplates

ListTemplates - Get templates from deviceManagement. The available templates

func (TemplateClient) ListTemplatesComplete

ListTemplatesComplete retrieves all the results into a single object

func (TemplateClient) ListTemplatesCompleteMatchingPredicate

func (c TemplateClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, options ListTemplatesOperationOptions, predicate DeviceManagementTemplateOperationPredicate) (result ListTemplatesCompleteResult, err error)

ListTemplatesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TemplateClient) UpdateTemplate

UpdateTemplate - Update the navigation property templates in deviceManagement

type UpdateTemplateOperationOptions

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

func DefaultUpdateTemplateOperationOptions

func DefaultUpdateTemplateOperationOptions() UpdateTemplateOperationOptions

func (UpdateTemplateOperationOptions) ToHeaders

func (UpdateTemplateOperationOptions) ToOData

func (UpdateTemplateOperationOptions) ToQuery

type UpdateTemplateOperationResponse

type UpdateTemplateOperationResponse 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