armguestconfiguration

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 7

README

Azure Guest Configuration Module for Go

PkgGoDev

The armguestconfiguration module provides operations for working with Azure Guest Configuration.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Guest Configuration module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Guest Configuration. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Guest Configuration module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armguestconfiguration.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armguestconfiguration.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAssignmentsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Guest Configuration label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionAfterReboot

type ActionAfterReboot string

ActionAfterReboot - Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration

const (
	ActionAfterRebootContinueConfiguration ActionAfterReboot = "ContinueConfiguration"
	ActionAfterRebootStopConfiguration     ActionAfterReboot = "StopConfiguration"
)

func PossibleActionAfterRebootValues

func PossibleActionAfterRebootValues() []ActionAfterReboot

PossibleActionAfterRebootValues returns the possible values for the ActionAfterReboot const type.

type Assignment added in v0.2.0

type Assignment struct {
	// Region where the VM is located.
	Location *string

	// Name of the guest configuration assignment.
	Name *string

	// Properties of the Guest configuration assignment.
	Properties *AssignmentProperties

	// READ-ONLY; ARM resource id of the guest configuration assignment.
	ID *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

Assignment - Guest configuration assignment is an association between a machine and guest configuration.

func (Assignment) MarshalJSON added in v1.1.0

func (a Assignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Assignment.

func (*Assignment) UnmarshalJSON added in v1.1.0

func (a *Assignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Assignment.

type AssignmentInfo

type AssignmentInfo struct {
	// Information about the configuration.
	Configuration *ConfigurationInfo

	// READ-ONLY; Name of the guest configuration assignment.
	Name *string
}

AssignmentInfo - Information about the guest configuration assignment.

func (AssignmentInfo) MarshalJSON added in v1.1.0

func (a AssignmentInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentInfo.

func (*AssignmentInfo) UnmarshalJSON added in v1.1.0

func (a *AssignmentInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentInfo.

type AssignmentList added in v0.2.0

type AssignmentList struct {
	// Result of the list guest configuration assignment operation.
	Value []*Assignment
}

AssignmentList - The response of the list guest configuration assignment operation.

func (AssignmentList) MarshalJSON added in v0.2.0

func (a AssignmentList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentList.

func (*AssignmentList) UnmarshalJSON added in v1.1.0

func (a *AssignmentList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentList.

type AssignmentProperties added in v0.2.0

type AssignmentProperties struct {
	// The source which initiated the guest configuration assignment. Ex: Azure Policy
	Context *string

	// The guest configuration to assign.
	GuestConfiguration *Navigation

	// Last reported guest configuration assignment report.
	LatestAssignmentReport *CommonAssignmentReport

	// The list of VM Compliance data for VMSS
	VmssVMList []*VMSSVMInfo

	// READ-ONLY; Combined hash of the configuration package and parameters.
	AssignmentHash *string

	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; Date and time when last compliance status was checked.
	LastComplianceStatusChecked *time.Time

	// READ-ONLY; Id of the latest report for the guest configuration assignment.
	LatestReportID *string

	// READ-ONLY; parameter hash for the guest configuration assignment.
	ParameterHash *string

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Type of the resource - VMSS / VM
	ResourceType *string

	// READ-ONLY; VM resource Id.
	TargetResourceID *string
}

AssignmentProperties - Guest configuration assignment properties.

func (AssignmentProperties) MarshalJSON added in v0.2.0

func (a AssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentProperties.

func (*AssignmentProperties) UnmarshalJSON added in v0.2.0

func (a *AssignmentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentProperties.

type AssignmentReport

type AssignmentReport struct {
	// Properties of the guest configuration report.
	Properties *AssignmentReportProperties

	// READ-ONLY; ARM resource id of the report for the guest configuration assignment.
	ID *string

	// READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group.
	Name *string
}

AssignmentReport - Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.

func (AssignmentReport) MarshalJSON

func (a AssignmentReport) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentReport.

func (*AssignmentReport) UnmarshalJSON

func (a *AssignmentReport) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReport.

type AssignmentReportDetails

type AssignmentReportDetails struct {
	// The list of resources for which guest configuration assignment compliance is checked.
	Resources []*AssignmentReportResource

	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; End date and time of the guest configuration assignment compliance status check.
	EndTime *time.Time

	// READ-ONLY; GUID of the report.
	JobID *string

	// READ-ONLY; Type of report, Consistency or Initial
	OperationType *Type

	// READ-ONLY; Start date and time of the guest configuration assignment compliance status check.
	StartTime *time.Time
}

AssignmentReportDetails - Details of the guest configuration assignment report.

func (AssignmentReportDetails) MarshalJSON

func (a AssignmentReportDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentReportDetails.

func (*AssignmentReportDetails) UnmarshalJSON

func (a *AssignmentReportDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportDetails.

type AssignmentReportList added in v0.2.0

type AssignmentReportList struct {
	// List of reports for the guest configuration. Report contains information such as compliance status, reason and more.
	Value []*AssignmentReport
}

AssignmentReportList - List of guest configuration assignment reports.

func (AssignmentReportList) MarshalJSON added in v0.2.0

func (a AssignmentReportList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentReportList.

func (*AssignmentReportList) UnmarshalJSON added in v1.1.0

func (a *AssignmentReportList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportList.

type AssignmentReportProperties added in v0.2.0

type AssignmentReportProperties struct {
	// Configuration details of the guest configuration assignment.
	Assignment *AssignmentInfo

	// Details of the assignment report.
	Details *AssignmentReportDetails

	// Information about the VM.
	VM *VMInfo

	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; End date and time of the guest configuration assignment compliance status check.
	EndTime *time.Time

	// READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group.
	ReportID *string

	// READ-ONLY; Start date and time of the guest configuration assignment compliance status check.
	StartTime *time.Time

	// READ-ONLY; Azure resource Id of the VMSS.
	VmssResourceID *string
}

AssignmentReportProperties - Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.

func (AssignmentReportProperties) MarshalJSON added in v0.2.0

func (a AssignmentReportProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentReportProperties.

func (*AssignmentReportProperties) UnmarshalJSON added in v0.2.0

func (a *AssignmentReportProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportProperties.

type AssignmentReportResource

type AssignmentReportResource struct {
	// Compliance reason and reason code for a resource.
	Reasons []*AssignmentReportResourceComplianceReason

	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; Properties of a guest configuration assignment resource.
	Properties any

	// READ-ONLY; Name of the guest configuration assignment resource setting.
	ResourceID *string
}

AssignmentReportResource - The guest configuration assignment resource.

func (AssignmentReportResource) MarshalJSON

func (a AssignmentReportResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssignmentReportResource.

func (*AssignmentReportResource) UnmarshalJSON added in v1.1.0

func (a *AssignmentReportResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportResource.

type AssignmentReportResourceComplianceReason

type AssignmentReportResourceComplianceReason struct {
	// READ-ONLY; Code for the compliance of the guest configuration assignment resource.
	Code *string

	// READ-ONLY; Reason for the compliance of the guest configuration assignment resource.
	Phrase *string
}

AssignmentReportResourceComplianceReason - Reason and code for the compliance of the guest configuration assignment resource.

func (AssignmentReportResourceComplianceReason) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type AssignmentReportResourceComplianceReason.

func (*AssignmentReportResourceComplianceReason) UnmarshalJSON added in v1.1.0

func (a *AssignmentReportResourceComplianceReason) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportResourceComplianceReason.

type AssignmentReportsClient added in v0.2.0

type AssignmentReportsClient struct {
	// contains filtered or unexported fields
}

AssignmentReportsClient contains the methods for the GuestConfigurationAssignmentReports group. Don't use this type directly, use NewAssignmentReportsClient() instead.

func NewAssignmentReportsClient added in v0.2.0

func NewAssignmentReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentReportsClient, error)

NewAssignmentReportsClient creates a new instance of AssignmentReportsClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentReportsClient) Get added in v0.2.0

func (client *AssignmentReportsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, vmName string, options *AssignmentReportsClientGetOptions) (AssignmentReportsClientGetResponse, error)

Get - Get a report for the guest configuration assignment, by reportId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • reportID - The GUID for the guest configuration assignment report.
  • vmName - The name of the virtual machine.
  • options - AssignmentReportsClientGetOptions contains the optional parameters for the AssignmentReportsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignmentReportById.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentReportsClient().Get(ctx, "myResourceGroupName", "AuditSecureProtocol", "7367cbb8-ae99-47d0-a33b-a283564d2cb1", "myvm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssignmentReport = armguestconfiguration.AssignmentReport{
	// 	Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	Properties: &armguestconfiguration.AssignmentReportProperties{
	// 		Assignment: &armguestconfiguration.AssignmentInfo{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			Configuration: &armguestconfiguration.ConfigurationInfo{
	// 				Name: to.Ptr("AuditSecureProtocol"),
	// 				Version: to.Ptr("1.0.0.0"),
	// 			},
	// 		},
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		VM: &armguestconfiguration.VMInfo{
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm"),
	// 			UUID: to.Ptr("vmuuid"),
	// 		},
	// 		Details: &armguestconfiguration.AssignmentReportDetails{
	// 			ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 			JobID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			OperationType: to.Ptr(armguestconfiguration.TypeConsistency),
	// 			Resources: []*armguestconfiguration.AssignmentReportResource{
	// 				{
	// 					ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 					Properties: map[string]any{
	// 						"ConfigurationName": "IsWebServerSecure",
	// 						"DependsOn": nil,
	// 						"IsSingleInstance": "Yes",
	// 						"ModuleName": "SecureProtocolWebServer",
	// 						"ModuleVersion": "1.0.0.3",
	// 						"Protocols":[]any{
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 2.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 3.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "PCT 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "Multi-Protocol Unified Hello",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.1",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.2",
	// 							},
	// 						},
	// 						"PsDscRunAsCredential": nil,
	// 						"Reasons": nil,
	// 						"ResourceId": "[SecureWebServer]s1",
	// 						"SourceInfo": nil,
	// 					},
	// 					Reasons: []*armguestconfiguration.AssignmentReportResourceComplianceReason{
	// 						{
	// 							Code: to.Ptr("DSC::RESOURCE::SUCCESS"),
	// 							Phrase: to.Ptr("Operation successful."),
	// 					}},
	// 			}},
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*AssignmentReportsClient) List added in v0.2.0

func (client *AssignmentReportsClient) List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, vmName string, options *AssignmentReportsClientListOptions) (AssignmentReportsClientListResponse, error)

List - List all reports for the guest configuration assignment, latest report first. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • vmName - The name of the virtual machine.
  • options - AssignmentReportsClientListOptions contains the optional parameters for the AssignmentReportsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllGuestConfigurationAssignmentReports.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentReportsClient().List(ctx, "myResourceGroupName", "AuditSecureProtocol", "myVMName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssignmentReportList = armguestconfiguration.AssignmentReportList{
	// 	Value: []*armguestconfiguration.AssignmentReport{
	// 		{
	// 			Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			Properties: &armguestconfiguration.AssignmentReportProperties{
	// 				Assignment: &armguestconfiguration.AssignmentInfo{
	// 					Name: to.Ptr("AuditSecureProtocol"),
	// 					Configuration: &armguestconfiguration.ConfigurationInfo{
	// 						Name: to.Ptr("AuditSecureProtocol"),
	// 					},
	// 				},
	// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 				ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 				VM: &armguestconfiguration.VMInfo{
	// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm"),
	// 					UUID: to.Ptr("vmuuid"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 			Properties: &armguestconfiguration.AssignmentReportProperties{
	// 				Assignment: &armguestconfiguration.AssignmentInfo{
	// 					Name: to.Ptr("AuditSecureProtocol"),
	// 					Configuration: &armguestconfiguration.ConfigurationInfo{
	// 						Name: to.Ptr("AuditSecureProtocol"),
	// 					},
	// 				},
	// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:14:13.000Z"); return t}()),
	// 				ReportID: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:13:53.000Z"); return t}()),
	// 				VM: &armguestconfiguration.VMInfo{
	// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm"),
	// 					UUID: to.Ptr("vmuuid"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type AssignmentReportsClientGetOptions added in v0.2.0

type AssignmentReportsClientGetOptions struct {
}

AssignmentReportsClientGetOptions contains the optional parameters for the AssignmentReportsClient.Get method.

type AssignmentReportsClientGetResponse added in v0.2.0

type AssignmentReportsClientGetResponse struct {
	// Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.
	AssignmentReport
}

AssignmentReportsClientGetResponse contains the response from method AssignmentReportsClient.Get.

type AssignmentReportsClientListOptions added in v0.2.0

type AssignmentReportsClientListOptions struct {
}

AssignmentReportsClientListOptions contains the optional parameters for the AssignmentReportsClient.List method.

type AssignmentReportsClientListResponse added in v0.2.0

type AssignmentReportsClientListResponse struct {
	// List of guest configuration assignment reports.
	AssignmentReportList
}

AssignmentReportsClientListResponse contains the response from method AssignmentReportsClient.List.

type AssignmentReportsVMSSClient added in v1.0.0

type AssignmentReportsVMSSClient struct {
	// contains filtered or unexported fields
}

AssignmentReportsVMSSClient contains the methods for the GuestConfigurationAssignmentReportsVMSS group. Don't use this type directly, use NewAssignmentReportsVMSSClient() instead.

func NewAssignmentReportsVMSSClient added in v1.0.0

func NewAssignmentReportsVMSSClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentReportsVMSSClient, error)

NewAssignmentReportsVMSSClient creates a new instance of AssignmentReportsVMSSClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentReportsVMSSClient) Get added in v1.0.0

Get - Get a report for the VMSS guest configuration assignment, by reportId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmssName - The name of the virtual machine scale set.
  • name - The guest configuration assignment name.
  • id - The GUID for the guest configuration assignment report.
  • options - AssignmentReportsVMSSClientGetOptions contains the optional parameters for the AssignmentReportsVMSSClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignmentReportById.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentReportsVMSSClient().Get(ctx, "myResourceGroupName", "myvmss", "AuditSecureProtocol", "7367cbb8-ae99-47d0-a33b-a283564d2cb1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssignmentReport = armguestconfiguration.AssignmentReport{
	// 	Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myvmss/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	Properties: &armguestconfiguration.AssignmentReportProperties{
	// 		Assignment: &armguestconfiguration.AssignmentInfo{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			Configuration: &armguestconfiguration.ConfigurationInfo{
	// 				Name: to.Ptr("AuditSecureProtocol"),
	// 				Version: to.Ptr("1.0.0.0"),
	// 			},
	// 		},
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		VM: &armguestconfiguration.VMInfo{
	// 			ID: to.Ptr("/subscriptions/mySubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myvmss/virtualMachines/1"),
	// 			UUID: to.Ptr("vmuuid"),
	// 		},
	// 		Details: &armguestconfiguration.AssignmentReportDetails{
	// 			ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 			JobID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			OperationType: to.Ptr(armguestconfiguration.TypeConsistency),
	// 			Resources: []*armguestconfiguration.AssignmentReportResource{
	// 				{
	// 					ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 					Properties: map[string]any{
	// 						"ConfigurationName": "IsWebServerSecure",
	// 						"DependsOn": nil,
	// 						"IsSingleInstance": "Yes",
	// 						"ModuleName": "SecureProtocolWebServer",
	// 						"ModuleVersion": "1.0.0.3",
	// 						"Protocols":[]any{
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 2.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 3.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "PCT 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "Multi-Protocol Unified Hello",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.1",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.2",
	// 							},
	// 						},
	// 						"PsDscRunAsCredential": nil,
	// 						"Reasons": nil,
	// 						"ResourceId": "[SecureWebServer]s1",
	// 						"SourceInfo": nil,
	// 					},
	// 					Reasons: []*armguestconfiguration.AssignmentReportResourceComplianceReason{
	// 						{
	// 							Code: to.Ptr("DSC::RESOURCE::SUCCESS"),
	// 							Phrase: to.Ptr("Operation successful."),
	// 					}},
	// 			}},
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*AssignmentReportsVMSSClient) NewListPager added in v1.0.0

NewListPager - List all reports for the VMSS guest configuration assignment, latest report first.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmssName - The name of the virtual machine scale set.
  • name - The guest configuration assignment name.
  • options - AssignmentReportsVMSSClientListOptions contains the optional parameters for the AssignmentReportsVMSSClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllVMSSGuestConfigurationAssignmentReports.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssignmentReportsVMSSClient().NewListPager("myResourceGroupName", "myVMSSName", "AuditSecureProtocol", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentReportList = armguestconfiguration.AssignmentReportList{
		// 	Value: []*armguestconfiguration.AssignmentReport{
		// 		{
		// 			Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
		// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
		// 			Properties: &armguestconfiguration.AssignmentReportProperties{
		// 				Assignment: &armguestconfiguration.AssignmentInfo{
		// 					Name: to.Ptr("AuditSecureProtocol"),
		// 					Configuration: &armguestconfiguration.ConfigurationInfo{
		// 						Name: to.Ptr("AuditSecureProtocol"),
		// 					},
		// 				},
		// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
		// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
		// 				ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
		// 				VM: &armguestconfiguration.VMInfo{
		// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/virtualMachines/1"),
		// 					UUID: to.Ptr("vmuuid"),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
		// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
		// 			Properties: &armguestconfiguration.AssignmentReportProperties{
		// 				Assignment: &armguestconfiguration.AssignmentInfo{
		// 					Name: to.Ptr("AuditSecureProtocol"),
		// 					Configuration: &armguestconfiguration.ConfigurationInfo{
		// 						Name: to.Ptr("AuditSecureProtocol"),
		// 					},
		// 				},
		// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
		// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:14:13.000Z"); return t}()),
		// 				ReportID: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:13:53.000Z"); return t}()),
		// 				VM: &armguestconfiguration.VMInfo{
		// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/virtualMachines/1"),
		// 					UUID: to.Ptr("vmuuid"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type AssignmentReportsVMSSClientGetOptions added in v1.0.0

type AssignmentReportsVMSSClientGetOptions struct {
}

AssignmentReportsVMSSClientGetOptions contains the optional parameters for the AssignmentReportsVMSSClient.Get method.

type AssignmentReportsVMSSClientGetResponse added in v1.0.0

type AssignmentReportsVMSSClientGetResponse struct {
	// Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.
	AssignmentReport
}

AssignmentReportsVMSSClientGetResponse contains the response from method AssignmentReportsVMSSClient.Get.

type AssignmentReportsVMSSClientListOptions added in v1.0.0

type AssignmentReportsVMSSClientListOptions struct {
}

AssignmentReportsVMSSClientListOptions contains the optional parameters for the AssignmentReportsVMSSClient.NewListPager method.

type AssignmentReportsVMSSClientListResponse added in v1.0.0

type AssignmentReportsVMSSClientListResponse struct {
	// List of guest configuration assignment reports.
	AssignmentReportList
}

AssignmentReportsVMSSClientListResponse contains the response from method AssignmentReportsVMSSClient.NewListPager.

type AssignmentType

type AssignmentType string

AssignmentType - Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor.

const (
	AssignmentTypeApplyAndAutoCorrect  AssignmentType = "ApplyAndAutoCorrect"
	AssignmentTypeApplyAndMonitor      AssignmentType = "ApplyAndMonitor"
	AssignmentTypeAudit                AssignmentType = "Audit"
	AssignmentTypeDeployAndAutoCorrect AssignmentType = "DeployAndAutoCorrect"
)

func PossibleAssignmentTypeValues

func PossibleAssignmentTypeValues() []AssignmentType

PossibleAssignmentTypeValues returns the possible values for the AssignmentType const type.

type AssignmentsClient added in v0.2.0

type AssignmentsClient struct {
	// contains filtered or unexported fields
}

AssignmentsClient contains the methods for the GuestConfigurationAssignments group. Don't use this type directly, use NewAssignmentsClient() instead.

func NewAssignmentsClient added in v0.2.0

func NewAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentsClient, error)

NewAssignmentsClient creates a new instance of AssignmentsClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentsClient) CreateOrUpdate added in v0.2.0

func (client *AssignmentsClient) CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, resourceGroupName string, vmName string, parameters Assignment, options *AssignmentsClientCreateOrUpdateOptions) (AssignmentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates an association between a VM and guest configuration If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • guestConfigurationAssignmentName - Name of the guest configuration assignment.
  • resourceGroupName - The resource group name.
  • vmName - The name of the virtual machine.
  • parameters - Parameters supplied to the create or update guest configuration assignment.
  • options - AssignmentsClientCreateOrUpdateOptions contains the optional parameters for the AssignmentsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentsClient().CreateOrUpdate(ctx, "NotInstalledApplicationForWindows", "myResourceGroupName", "myVMName", armguestconfiguration.Assignment{
		Name:     to.Ptr("NotInstalledApplicationForWindows"),
		Location: to.Ptr("westcentralus"),
		Properties: &armguestconfiguration.AssignmentProperties{
			Context: to.Ptr("Azure policy"),
			GuestConfiguration: &armguestconfiguration.Navigation{
				Name:           to.Ptr("NotInstalledApplicationForWindows"),
				AssignmentType: to.Ptr(armguestconfiguration.AssignmentTypeApplyAndAutoCorrect),
				ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
					{
						Name:  to.Ptr("[InstalledApplication]NotInstalledApplicationResource1;Name"),
						Value: to.Ptr("NotePad,sql"),
					}},
				ContentHash: to.Ptr("123contenthash"),
				ContentURI:  to.Ptr("https://thisisfake/pacakge"),
				Version:     to.Ptr("1.*"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("NotInstalledApplicationForWindows"),
	// 	ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/NotInstalledApplicationForWindows"),
	// 	Location: to.Ptr("westcentralus"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusPending),
	// 		Context: to.Ptr("Azure policy"),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("NotInstalledApplicationForWindows"),
	// 			AssignmentSource: to.Ptr("AzurePolicy"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 				{
	// 					Name: to.Ptr("[InstalledApplication]NotInstalledApplicationResource1;Name"),
	// 					Value: to.Ptr("NotePad,sql"),
	// 			}},
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AssignmentsClient) Delete added in v0.2.0

func (client *AssignmentsClient) Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, vmName string, options *AssignmentsClientDeleteOptions) (AssignmentsClientDeleteResponse, error)

Delete - Delete a guest configuration assignment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - Name of the guest configuration assignment
  • vmName - The name of the virtual machine.
  • options - AssignmentsClientDeleteOptions contains the optional parameters for the AssignmentsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewAssignmentsClient().Delete(ctx, "myResourceGroupName", "SecureProtocol", "myVMName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AssignmentsClient) Get added in v0.2.0

func (client *AssignmentsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, vmName string, options *AssignmentsClientGetOptions) (AssignmentsClientGetResponse, error)

Get - Get information about a guest configuration assignment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • vmName - The name of the virtual machine.
  • options - AssignmentsClientGetOptions contains the optional parameters for the AssignmentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentsClient().Get(ctx, "myResourceGroupName", "SecureProtocol", "myVMName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("AuditSecureProtocol"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol"),
	// 	Location: to.Ptr("centraluseuap"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		AssignmentHash: to.Ptr("E0D8941DD713F284284561648C00C18FA76C8602943C7CD38AFD73B56AE4C35F.E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"),
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 			},
	// 			ContentHash: to.Ptr("content hash"),
	// 			ContentURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/builtinconfig/AuditSecureProtocol/AuditSecureProtocol_1.0.0.3.zip"),
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		LastComplianceStatusChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		LatestReportID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AssignmentsClient) NewListPager added in v0.4.0

func (client *AssignmentsClient) NewListPager(resourceGroupName string, vmName string, options *AssignmentsClientListOptions) *runtime.Pager[AssignmentsClientListResponse]

NewListPager - List all guest configuration assignments for a virtual machine.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmName - The name of the virtual machine.
  • options - AssignmentsClientListOptions contains the optional parameters for the AssignmentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listGuestConfigurationAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssignmentsClient().NewListPager("myResourceGroupName", "myVMName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentList = armguestconfiguration.AssignmentList{
		// }
	}
}
Output:

func (*AssignmentsClient) NewRGListPager added in v0.4.0

func (client *AssignmentsClient) NewRGListPager(resourceGroupName string, options *AssignmentsClientRGListOptions) *runtime.Pager[AssignmentsClientRGListResponse]

NewRGListPager - List all guest configuration assignments for a resource group.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • options - AssignmentsClientRGListOptions contains the optional parameters for the AssignmentsClient.NewRGListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listRGGuestConfigurationAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssignmentsClient().NewRGListPager("myResourceGroupName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentList = armguestconfiguration.AssignmentList{
		// }
	}
}
Output:

func (*AssignmentsClient) NewSubscriptionListPager added in v0.4.0

NewSubscriptionListPager - List all guest configuration assignments for a subscription.

Generated from API version 2022-01-25

  • options - AssignmentsClientSubscriptionListOptions contains the optional parameters for the AssignmentsClient.NewSubscriptionListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listSubGuestConfigurationAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssignmentsClient().NewSubscriptionListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentList = armguestconfiguration.AssignmentList{
		// }
	}
}
Output:

type AssignmentsClientCreateOrUpdateOptions added in v0.2.0

type AssignmentsClientCreateOrUpdateOptions struct {
}

AssignmentsClientCreateOrUpdateOptions contains the optional parameters for the AssignmentsClient.CreateOrUpdate method.

type AssignmentsClientCreateOrUpdateResponse added in v0.2.0

type AssignmentsClientCreateOrUpdateResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

AssignmentsClientCreateOrUpdateResponse contains the response from method AssignmentsClient.CreateOrUpdate.

type AssignmentsClientDeleteOptions added in v0.2.0

type AssignmentsClientDeleteOptions struct {
}

AssignmentsClientDeleteOptions contains the optional parameters for the AssignmentsClient.Delete method.

type AssignmentsClientDeleteResponse added in v0.2.0

type AssignmentsClientDeleteResponse struct {
}

AssignmentsClientDeleteResponse contains the response from method AssignmentsClient.Delete.

type AssignmentsClientGetOptions added in v0.2.0

type AssignmentsClientGetOptions struct {
}

AssignmentsClientGetOptions contains the optional parameters for the AssignmentsClient.Get method.

type AssignmentsClientGetResponse added in v0.2.0

type AssignmentsClientGetResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

AssignmentsClientGetResponse contains the response from method AssignmentsClient.Get.

type AssignmentsClientListOptions added in v0.2.0

type AssignmentsClientListOptions struct {
}

AssignmentsClientListOptions contains the optional parameters for the AssignmentsClient.NewListPager method.

type AssignmentsClientListResponse added in v0.2.0

type AssignmentsClientListResponse struct {
	// The response of the list guest configuration assignment operation.
	AssignmentList
}

AssignmentsClientListResponse contains the response from method AssignmentsClient.NewListPager.

type AssignmentsClientRGListOptions added in v0.2.0

type AssignmentsClientRGListOptions struct {
}

AssignmentsClientRGListOptions contains the optional parameters for the AssignmentsClient.NewRGListPager method.

type AssignmentsClientRGListResponse added in v0.2.0

type AssignmentsClientRGListResponse struct {
	// The response of the list guest configuration assignment operation.
	AssignmentList
}

AssignmentsClientRGListResponse contains the response from method AssignmentsClient.NewRGListPager.

type AssignmentsClientSubscriptionListOptions added in v0.2.0

type AssignmentsClientSubscriptionListOptions struct {
}

AssignmentsClientSubscriptionListOptions contains the optional parameters for the AssignmentsClient.NewSubscriptionListPager method.

type AssignmentsClientSubscriptionListResponse added in v0.2.0

type AssignmentsClientSubscriptionListResponse struct {
	// The response of the list guest configuration assignment operation.
	AssignmentList
}

AssignmentsClientSubscriptionListResponse contains the response from method AssignmentsClient.NewSubscriptionListPager.

type AssignmentsVMSSClient added in v1.0.0

type AssignmentsVMSSClient struct {
	// contains filtered or unexported fields
}

AssignmentsVMSSClient contains the methods for the GuestConfigurationAssignmentsVMSS group. Don't use this type directly, use NewAssignmentsVMSSClient() instead.

func NewAssignmentsVMSSClient added in v1.0.0

func NewAssignmentsVMSSClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssignmentsVMSSClient, error)

NewAssignmentsVMSSClient creates a new instance of AssignmentsVMSSClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssignmentsVMSSClient) Delete added in v1.0.0

func (client *AssignmentsVMSSClient) Delete(ctx context.Context, resourceGroupName string, vmssName string, name string, options *AssignmentsVMSSClientDeleteOptions) (AssignmentsVMSSClientDeleteResponse, error)

Delete - Delete a guest configuration assignment for VMSS If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmssName - The name of the virtual machine scale set.
  • name - The guest configuration assignment name.
  • options - AssignmentsVMSSClientDeleteOptions contains the optional parameters for the AssignmentsVMSSClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationVMSSAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentsVMSSClient().Delete(ctx, "myResourceGroupName", "myVMSSName", "SecureProtocol", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("AuditSecureProtocol"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol"),
	// 	Location: to.Ptr("centraluseuap"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		AssignmentHash: to.Ptr("E0D8941DD713F284284561648C00C18FA76C8602943C7CD38AFD73B56AE4C35F.E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"),
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 			},
	// 			ContentHash: to.Ptr("content hash"),
	// 			ContentURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/builtinconfig/AuditSecureProtocol/AuditSecureProtocol_1.0.0.3.zip"),
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		LastComplianceStatusChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 		ResourceType: to.Ptr("VMSS"),
	// 	},
	// }
}
Output:

func (*AssignmentsVMSSClient) Get added in v1.0.0

func (client *AssignmentsVMSSClient) Get(ctx context.Context, resourceGroupName string, vmssName string, name string, options *AssignmentsVMSSClientGetOptions) (AssignmentsVMSSClientGetResponse, error)

Get - Get information about a guest configuration assignment for VMSS If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmssName - The name of the virtual machine scale set.
  • name - The guest configuration assignment name.
  • options - AssignmentsVMSSClientGetOptions contains the optional parameters for the AssignmentsVMSSClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssignmentsVMSSClient().Get(ctx, "myResourceGroupName", "myVMSSName", "SecureProtocol", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("AuditSecureProtocol"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachineScaleSets/myVMSSName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol"),
	// 	Location: to.Ptr("centraluseuap"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		AssignmentHash: to.Ptr("E0D8941DD713F284284561648C00C18FA76C8602943C7CD38AFD73B56AE4C35F.E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"),
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 			},
	// 			ContentHash: to.Ptr("content hash"),
	// 			ContentURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/builtinconfig/AuditSecureProtocol/AuditSecureProtocol_1.0.0.3.zip"),
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		LastComplianceStatusChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 		ResourceType: to.Ptr("VMSS"),
	// 	},
	// }
}
Output:

func (*AssignmentsVMSSClient) NewListPager added in v1.0.0

func (client *AssignmentsVMSSClient) NewListPager(resourceGroupName string, vmssName string, options *AssignmentsVMSSClientListOptions) *runtime.Pager[AssignmentsVMSSClientListResponse]

NewListPager - List all guest configuration assignments for VMSS.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • vmssName - The name of the virtual machine scale set.
  • options - AssignmentsVMSSClientListOptions contains the optional parameters for the AssignmentsVMSSClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listVMSSGuestConfigurationAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssignmentsVMSSClient().NewListPager("myResourceGroupName", "myVMSSName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentList = armguestconfiguration.AssignmentList{
		// }
	}
}
Output:

type AssignmentsVMSSClientDeleteOptions added in v1.0.0

type AssignmentsVMSSClientDeleteOptions struct {
}

AssignmentsVMSSClientDeleteOptions contains the optional parameters for the AssignmentsVMSSClient.Delete method.

type AssignmentsVMSSClientDeleteResponse added in v1.0.0

type AssignmentsVMSSClientDeleteResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

AssignmentsVMSSClientDeleteResponse contains the response from method AssignmentsVMSSClient.Delete.

type AssignmentsVMSSClientGetOptions added in v1.0.0

type AssignmentsVMSSClientGetOptions struct {
}

AssignmentsVMSSClientGetOptions contains the optional parameters for the AssignmentsVMSSClient.Get method.

type AssignmentsVMSSClientGetResponse added in v1.0.0

type AssignmentsVMSSClientGetResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

AssignmentsVMSSClientGetResponse contains the response from method AssignmentsVMSSClient.Get.

type AssignmentsVMSSClientListOptions added in v1.0.0

type AssignmentsVMSSClientListOptions struct {
}

AssignmentsVMSSClientListOptions contains the optional parameters for the AssignmentsVMSSClient.NewListPager method.

type AssignmentsVMSSClientListResponse added in v1.0.0

type AssignmentsVMSSClientListResponse struct {
	// The response of the list guest configuration assignment operation.
	AssignmentList
}

AssignmentsVMSSClientListResponse contains the response from method AssignmentsVMSSClient.NewListPager.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAssignmentReportsClient added in v1.1.0

func (c *ClientFactory) NewAssignmentReportsClient() *AssignmentReportsClient

NewAssignmentReportsClient creates a new instance of AssignmentReportsClient.

func (*ClientFactory) NewAssignmentReportsVMSSClient added in v1.1.0

func (c *ClientFactory) NewAssignmentReportsVMSSClient() *AssignmentReportsVMSSClient

NewAssignmentReportsVMSSClient creates a new instance of AssignmentReportsVMSSClient.

func (*ClientFactory) NewAssignmentsClient added in v1.1.0

func (c *ClientFactory) NewAssignmentsClient() *AssignmentsClient

NewAssignmentsClient creates a new instance of AssignmentsClient.

func (*ClientFactory) NewAssignmentsVMSSClient added in v1.1.0

func (c *ClientFactory) NewAssignmentsVMSSClient() *AssignmentsVMSSClient

NewAssignmentsVMSSClient creates a new instance of AssignmentsVMSSClient.

func (*ClientFactory) NewHCRPAssignmentReportsClient added in v1.1.0

func (c *ClientFactory) NewHCRPAssignmentReportsClient() *HCRPAssignmentReportsClient

NewHCRPAssignmentReportsClient creates a new instance of HCRPAssignmentReportsClient.

func (*ClientFactory) NewHCRPAssignmentsClient added in v1.1.0

func (c *ClientFactory) NewHCRPAssignmentsClient() *HCRPAssignmentsClient

NewHCRPAssignmentsClient creates a new instance of HCRPAssignmentsClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

type CommonAssignmentReport added in v0.2.0

type CommonAssignmentReport struct {
	// Configuration details of the guest configuration assignment.
	Assignment *AssignmentInfo

	// The list of resources for which guest configuration assignment compliance is checked.
	Resources []*AssignmentReportResource

	// Information about the VM.
	VM *VMInfo

	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; End date and time of the guest configuration assignment compliance status check.
	EndTime *time.Time

	// READ-ONLY; ARM resource id of the report for the guest configuration assignment.
	ID *string

	// READ-ONLY; Type of report, Consistency or Initial
	OperationType *Type

	// READ-ONLY; GUID that identifies the guest configuration assignment report under a subscription, resource group.
	ReportID *string

	// READ-ONLY; Start date and time of the guest configuration assignment compliance status check.
	StartTime *time.Time
}

func (CommonAssignmentReport) MarshalJSON added in v0.2.0

func (c CommonAssignmentReport) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonAssignmentReport.

func (*CommonAssignmentReport) UnmarshalJSON added in v0.2.0

func (c *CommonAssignmentReport) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommonAssignmentReport.

type ComplianceStatus

type ComplianceStatus string

ComplianceStatus - A value indicating compliance status of the machine for the assigned guest configuration.

const (
	ComplianceStatusCompliant    ComplianceStatus = "Compliant"
	ComplianceStatusNonCompliant ComplianceStatus = "NonCompliant"
	ComplianceStatusPending      ComplianceStatus = "Pending"
)

func PossibleComplianceStatusValues

func PossibleComplianceStatusValues() []ComplianceStatus

PossibleComplianceStatusValues returns the possible values for the ComplianceStatus const type.

type ConfigurationInfo

type ConfigurationInfo struct {
	// READ-ONLY; Name of the configuration.
	Name *string

	// READ-ONLY; Version of the configuration.
	Version *string
}

ConfigurationInfo - Information about the configuration.

func (ConfigurationInfo) MarshalJSON added in v1.1.0

func (c ConfigurationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConfigurationInfo.

func (*ConfigurationInfo) UnmarshalJSON added in v1.1.0

func (c *ConfigurationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationInfo.

type ConfigurationMode

type ConfigurationMode string

ConfigurationMode - Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.

const (
	ConfigurationModeApplyAndAutoCorrect ConfigurationMode = "ApplyAndAutoCorrect"
	ConfigurationModeApplyAndMonitor     ConfigurationMode = "ApplyAndMonitor"
	ConfigurationModeApplyOnly           ConfigurationMode = "ApplyOnly"
)

func PossibleConfigurationModeValues

func PossibleConfigurationModeValues() []ConfigurationMode

PossibleConfigurationModeValues returns the possible values for the ConfigurationMode const type.

type ConfigurationParameter

type ConfigurationParameter struct {
	// Name of the configuration parameter.
	Name *string

	// Value of the configuration parameter.
	Value *string
}

ConfigurationParameter - Represents a configuration parameter.

func (ConfigurationParameter) MarshalJSON added in v1.1.0

func (c ConfigurationParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConfigurationParameter.

func (*ConfigurationParameter) UnmarshalJSON added in v1.1.0

func (c *ConfigurationParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationParameter.

type ConfigurationSetting

type ConfigurationSetting struct {
	// READ-ONLY; Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration
	// and StopConfiguration
	ActionAfterReboot *ActionAfterReboot

	// READ-ONLY; If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target
	// node. Otherwise, false
	AllowModuleOverwrite *bool

	// READ-ONLY; Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible
	// values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect.
	ConfigurationMode *ConfigurationMode

	// READ-ONLY; How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode
	// property is set to ApplyOnly. The default value is 15.
	ConfigurationModeFrequencyMins *float32

	// READ-ONLY; Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise,
	// you will have to manually reboot the node for any configuration that requires it.
	// The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as
	// Windows Installer), combine this setting with the xPendingReboot module.
	RebootIfNeeded *bool

	// READ-ONLY; The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value
	// is ignored if the LCM is not configured in pull mode. The default value is 30.
	RefreshFrequencyMins *float32
}

ConfigurationSetting - Configuration setting of LCM (Local Configuration Manager).

func (ConfigurationSetting) MarshalJSON added in v1.1.0

func (c ConfigurationSetting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConfigurationSetting.

func (*ConfigurationSetting) UnmarshalJSON added in v1.1.0

func (c *ConfigurationSetting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationSetting.

type CreatedByType added in v1.0.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v1.0.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type ErrorResponse

type ErrorResponse struct {
	Error *ErrorResponseError
}

ErrorResponse - Error response of an operation failure

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseError

type ErrorResponseError struct {
	// Error code.
	Code *string

	// Detail error message indicating why the operation failed.
	Message *string
}

func (ErrorResponseError) MarshalJSON added in v1.1.0

func (e ErrorResponseError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponseError.

func (*ErrorResponseError) UnmarshalJSON added in v1.1.0

func (e *ErrorResponseError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseError.

type HCRPAssignmentReportsClient added in v0.2.0

type HCRPAssignmentReportsClient struct {
	// contains filtered or unexported fields
}

HCRPAssignmentReportsClient contains the methods for the GuestConfigurationHCRPAssignmentReports group. Don't use this type directly, use NewHCRPAssignmentReportsClient() instead.

func NewHCRPAssignmentReportsClient added in v0.2.0

func NewHCRPAssignmentReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCRPAssignmentReportsClient, error)

NewHCRPAssignmentReportsClient creates a new instance of HCRPAssignmentReportsClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*HCRPAssignmentReportsClient) Get added in v0.2.0

func (client *HCRPAssignmentReportsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, reportID string, machineName string, options *HCRPAssignmentReportsClientGetOptions) (HCRPAssignmentReportsClientGetResponse, error)

Get - Get a report for the guest configuration assignment, by reportId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • reportID - The GUID for the guest configuration assignment report.
  • machineName - The name of the ARC machine.
  • options - HCRPAssignmentReportsClientGetOptions contains the optional parameters for the HCRPAssignmentReportsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignmentReportById.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHCRPAssignmentReportsClient().Get(ctx, "myResourceGroupName", "AuditSecureProtocol", "7367cbb8-ae99-47d0-a33b-a283564d2cb1", "myMachineName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssignmentReport = armguestconfiguration.AssignmentReport{
	// 	Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 	Properties: &armguestconfiguration.AssignmentReportProperties{
	// 		Assignment: &armguestconfiguration.AssignmentInfo{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			Configuration: &armguestconfiguration.ConfigurationInfo{
	// 				Name: to.Ptr("AuditSecureProtocol"),
	// 				Version: to.Ptr("1.0.0.0"),
	// 			},
	// 		},
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		VM: &armguestconfiguration.VMInfo{
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName"),
	// 			UUID: to.Ptr("vmuuid"),
	// 		},
	// 		Details: &armguestconfiguration.AssignmentReportDetails{
	// 			ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 			JobID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			OperationType: to.Ptr(armguestconfiguration.TypeConsistency),
	// 			Resources: []*armguestconfiguration.AssignmentReportResource{
	// 				{
	// 					ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 					Properties: map[string]any{
	// 						"ConfigurationName": "IsWebServerSecure",
	// 						"DependsOn": nil,
	// 						"IsSingleInstance": "Yes",
	// 						"ModuleName": "SecureProtocolWebServer",
	// 						"ModuleVersion": "1.0.0.3",
	// 						"Protocols":[]any{
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 2.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "SSL 3.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "PCT 1.0",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "Multi-Protocol Unified Hello",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.1",
	// 							},
	// 							map[string]any{
	// 								"Ensure": "Absent",
	// 								"Protocol": "TLS 1.2",
	// 							},
	// 						},
	// 						"PsDscRunAsCredential": nil,
	// 						"Reasons": nil,
	// 						"ResourceId": "[SecureWebServer]s1",
	// 						"SourceInfo": nil,
	// 					},
	// 					Reasons: []*armguestconfiguration.AssignmentReportResourceComplianceReason{
	// 						{
	// 							Code: to.Ptr("DSC::RESOURCE::SUCCESS"),
	// 							Phrase: to.Ptr("Operation successful."),
	// 					}},
	// 			}},
	// 			StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*HCRPAssignmentReportsClient) List added in v0.2.0

func (client *HCRPAssignmentReportsClient) List(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string, options *HCRPAssignmentReportsClientListOptions) (HCRPAssignmentReportsClientListResponse, error)

List - List all reports for the guest configuration assignment, latest report first. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • machineName - The name of the ARC machine.
  • options - HCRPAssignmentReportsClientListOptions contains the optional parameters for the HCRPAssignmentReportsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllGuestConfigurationHCRPAssignmentReports.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHCRPAssignmentReportsClient().List(ctx, "myResourceGroupName", "AuditSecureProtocol", "myMachineName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AssignmentReportList = armguestconfiguration.AssignmentReportList{
	// 	Value: []*armguestconfiguration.AssignmentReport{
	// 		{
	// 			Name: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 			Properties: &armguestconfiguration.AssignmentReportProperties{
	// 				Assignment: &armguestconfiguration.AssignmentInfo{
	// 					Name: to.Ptr("AuditSecureProtocol"),
	// 					Configuration: &armguestconfiguration.ConfigurationInfo{
	// 						Name: to.Ptr("AuditSecureProtocol"),
	// 					},
	// 				},
	// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 				ReportID: to.Ptr("7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:13:53.000Z"); return t}()),
	// 				VM: &armguestconfiguration.VMInfo{
	// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName"),
	// 					UUID: to.Ptr("vmuuid"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 			ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 			Properties: &armguestconfiguration.AssignmentReportProperties{
	// 				Assignment: &armguestconfiguration.AssignmentInfo{
	// 					Name: to.Ptr("AuditSecureProtocol"),
	// 					Configuration: &armguestconfiguration.ConfigurationInfo{
	// 						Name: to.Ptr("AuditSecureProtocol"),
	// 					},
	// 				},
	// 				ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:14:13.000Z"); return t}()),
	// 				ReportID: to.Ptr("41ee2caf-48f9-4999-a793-82ec7c6beb2c"),
	// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T20:13:53.000Z"); return t}()),
	// 				VM: &armguestconfiguration.VMInfo{
	// 					ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName"),
	// 					UUID: to.Ptr("vmuuid"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type HCRPAssignmentReportsClientGetOptions added in v0.2.0

type HCRPAssignmentReportsClientGetOptions struct {
}

HCRPAssignmentReportsClientGetOptions contains the optional parameters for the HCRPAssignmentReportsClient.Get method.

type HCRPAssignmentReportsClientGetResponse added in v0.2.0

type HCRPAssignmentReportsClientGetResponse struct {
	// Report for the guest configuration assignment. Report contains information such as compliance status, reason, and more.
	AssignmentReport
}

HCRPAssignmentReportsClientGetResponse contains the response from method HCRPAssignmentReportsClient.Get.

type HCRPAssignmentReportsClientListOptions added in v0.2.0

type HCRPAssignmentReportsClientListOptions struct {
}

HCRPAssignmentReportsClientListOptions contains the optional parameters for the HCRPAssignmentReportsClient.List method.

type HCRPAssignmentReportsClientListResponse added in v0.2.0

type HCRPAssignmentReportsClientListResponse struct {
	// List of guest configuration assignment reports.
	AssignmentReportList
}

HCRPAssignmentReportsClientListResponse contains the response from method HCRPAssignmentReportsClient.List.

type HCRPAssignmentsClient added in v0.2.0

type HCRPAssignmentsClient struct {
	// contains filtered or unexported fields
}

HCRPAssignmentsClient contains the methods for the GuestConfigurationHCRPAssignments group. Don't use this type directly, use NewHCRPAssignmentsClient() instead.

func NewHCRPAssignmentsClient added in v0.2.0

func NewHCRPAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCRPAssignmentsClient, error)

NewHCRPAssignmentsClient creates a new instance of HCRPAssignmentsClient with the specified values.

  • subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*HCRPAssignmentsClient) CreateOrUpdate added in v0.2.0

func (client *HCRPAssignmentsClient) CreateOrUpdate(ctx context.Context, guestConfigurationAssignmentName string, resourceGroupName string, machineName string, parameters Assignment, options *HCRPAssignmentsClientCreateOrUpdateOptions) (HCRPAssignmentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates an association between a ARC machine and guest configuration If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • guestConfigurationAssignmentName - Name of the guest configuration assignment.
  • resourceGroupName - The resource group name.
  • machineName - The name of the ARC machine.
  • parameters - Parameters supplied to the create or update guest configuration assignment.
  • options - HCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the HCRPAssignmentsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHCRPAssignmentsClient().CreateOrUpdate(ctx, "NotInstalledApplicationForWindows", "myResourceGroupName", "myMachineName", armguestconfiguration.Assignment{
		Name:     to.Ptr("NotInstalledApplicationForWindows"),
		Location: to.Ptr("westcentralus"),
		Properties: &armguestconfiguration.AssignmentProperties{
			Context: to.Ptr("Azure policy"),
			GuestConfiguration: &armguestconfiguration.Navigation{
				Name:           to.Ptr("NotInstalledApplicationForWindows"),
				AssignmentType: to.Ptr(armguestconfiguration.AssignmentTypeApplyAndAutoCorrect),
				ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
					{
						Name:  to.Ptr("[InstalledApplication]NotInstalledApplicationResource1;Name"),
						Value: to.Ptr("NotePad,sql"),
					}},
				ContentHash: to.Ptr("123contenthash"),
				ContentURI:  to.Ptr("https://thisisfake/pacakge"),
				Version:     to.Ptr("1.*"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("NotInstalledApplicationForWindows"),
	// 	ID: to.Ptr("/subscriptions/mysubscriptionid/resourceGroups/myResourceGroupName/providers/HybridRP.Compute/virtualMachines/myvm/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/NotInstalledApplicationForWindows"),
	// 	Location: to.Ptr("westcentralus"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		AssignmentHash: to.Ptr("abcdr453g"),
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusPending),
	// 		Context: to.Ptr("Azure policy"),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("NotInstalledApplicationForWindows"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 				{
	// 					Name: to.Ptr("[InstalledApplication]NotInstalledApplicationResource1;Name"),
	// 					Value: to.Ptr("NotePad,sql"),
	// 			}},
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		LatestReportID: to.Ptr("a2a64e5d-a1a9-4344-a866-fb9e1541f723"),
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*HCRPAssignmentsClient) Delete added in v0.2.0

func (client *HCRPAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string, options *HCRPAssignmentsClientDeleteOptions) (HCRPAssignmentsClientDeleteResponse, error)

Delete - Delete a guest configuration assignment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - Name of the guest configuration assignment
  • machineName - The name of the ARC machine.
  • options - HCRPAssignmentsClientDeleteOptions contains the optional parameters for the HCRPAssignmentsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewHCRPAssignmentsClient().Delete(ctx, "myResourceGroupName", "SecureProtocol", "myMachineName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*HCRPAssignmentsClient) Get added in v0.2.0

func (client *HCRPAssignmentsClient) Get(ctx context.Context, resourceGroupName string, guestConfigurationAssignmentName string, machineName string, options *HCRPAssignmentsClientGetOptions) (HCRPAssignmentsClientGetResponse, error)

Get - Get information about a guest configuration assignment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • guestConfigurationAssignmentName - The guest configuration assignment name.
  • machineName - The name of the ARC machine.
  • options - HCRPAssignmentsClientGetOptions contains the optional parameters for the HCRPAssignmentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewHCRPAssignmentsClient().Get(ctx, "myResourceGroupName", "SecureProtocol", "myMachineName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Assignment = armguestconfiguration.Assignment{
	// 	Name: to.Ptr("AuditSecureProtocol"),
	// 	ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol"),
	// 	Location: to.Ptr("centraluseuap"),
	// 	Properties: &armguestconfiguration.AssignmentProperties{
	// 		AssignmentHash: to.Ptr("E0D8941DD713F284284561648C00C18FA76C8602943C7CD38AFD73B56AE4C35F.E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"),
	// 		ComplianceStatus: to.Ptr(armguestconfiguration.ComplianceStatusCompliant),
	// 		GuestConfiguration: &armguestconfiguration.Navigation{
	// 			Name: to.Ptr("AuditSecureProtocol"),
	// 			ConfigurationParameter: []*armguestconfiguration.ConfigurationParameter{
	// 			},
	// 			ContentHash: to.Ptr("content hash"),
	// 			ContentURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/builtinconfig/AuditSecureProtocol/AuditSecureProtocol_1.0.0.3.zip"),
	// 			Version: to.Ptr("1.0.0.3"),
	// 		},
	// 		LastComplianceStatusChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-29T22:14:13.000Z"); return t}()),
	// 		LatestReportID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/AuditSecureProtocol/reports/7367cbb8-ae99-47d0-a33b-a283564d2cb1"),
	// 		ProvisioningState: to.Ptr(armguestconfiguration.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*HCRPAssignmentsClient) NewListPager added in v0.4.0

func (client *HCRPAssignmentsClient) NewListPager(resourceGroupName string, machineName string, options *HCRPAssignmentsClientListOptions) *runtime.Pager[HCRPAssignmentsClientListResponse]

NewListPager - List all guest configuration assignments for an ARC machine.

Generated from API version 2022-01-25

  • resourceGroupName - The resource group name.
  • machineName - The name of the ARC machine.
  • options - HCRPAssignmentsClientListOptions contains the optional parameters for the HCRPAssignmentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listGuestConfigurationHCRPAssignments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewHCRPAssignmentsClient().NewListPager("myResourceGroupName", "myMachineName", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssignmentList = armguestconfiguration.AssignmentList{
		// }
	}
}
Output:

type HCRPAssignmentsClientCreateOrUpdateOptions added in v0.2.0

type HCRPAssignmentsClientCreateOrUpdateOptions struct {
}

HCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the HCRPAssignmentsClient.CreateOrUpdate method.

type HCRPAssignmentsClientCreateOrUpdateResponse added in v0.2.0

type HCRPAssignmentsClientCreateOrUpdateResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

HCRPAssignmentsClientCreateOrUpdateResponse contains the response from method HCRPAssignmentsClient.CreateOrUpdate.

type HCRPAssignmentsClientDeleteOptions added in v0.2.0

type HCRPAssignmentsClientDeleteOptions struct {
}

HCRPAssignmentsClientDeleteOptions contains the optional parameters for the HCRPAssignmentsClient.Delete method.

type HCRPAssignmentsClientDeleteResponse added in v0.2.0

type HCRPAssignmentsClientDeleteResponse struct {
}

HCRPAssignmentsClientDeleteResponse contains the response from method HCRPAssignmentsClient.Delete.

type HCRPAssignmentsClientGetOptions added in v0.2.0

type HCRPAssignmentsClientGetOptions struct {
}

HCRPAssignmentsClientGetOptions contains the optional parameters for the HCRPAssignmentsClient.Get method.

type HCRPAssignmentsClientGetResponse added in v0.2.0

type HCRPAssignmentsClientGetResponse struct {
	// Guest configuration assignment is an association between a machine and guest configuration.
	Assignment
}

HCRPAssignmentsClientGetResponse contains the response from method HCRPAssignmentsClient.Get.

type HCRPAssignmentsClientListOptions added in v0.2.0

type HCRPAssignmentsClientListOptions struct {
}

HCRPAssignmentsClientListOptions contains the optional parameters for the HCRPAssignmentsClient.NewListPager method.

type HCRPAssignmentsClientListResponse added in v0.2.0

type HCRPAssignmentsClientListResponse struct {
	// The response of the list guest configuration assignment operation.
	AssignmentList
}

HCRPAssignmentsClientListResponse contains the response from method HCRPAssignmentsClient.NewListPager.

type Kind

type Kind string

Kind - Kind of the guest configuration. For example:DSC

const (
	KindDSC Kind = "DSC"
)

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns the possible values for the Kind const type.

type Navigation struct {
	// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect
	// and ApplyAndMonitor.
	AssignmentType *AssignmentType

	// The configuration parameters for the guest configuration.
	ConfigurationParameter []*ConfigurationParameter

	// The protected configuration parameters for the guest configuration.
	ConfigurationProtectedParameter []*ConfigurationParameter

	// Combined hash of the guest configuration package and configuration parameters.
	ContentHash *string

	// Uri of the storage where guest configuration package is uploaded.
	ContentURI *string

	// Kind of the guest configuration. For example:DSC
	Kind *Kind

	// Name of the guest configuration.
	Name *string

	// Version of the guest configuration.
	Version *string

	// READ-ONLY; Specifies the origin of the configuration.
	AssignmentSource *string

	// READ-ONLY; The configuration setting for the guest configuration.
	ConfigurationSetting *ConfigurationSetting

	// READ-ONLY; Specifies the content type of the configuration. Possible values could be Builtin or Custom.
	ContentType *string
}

Navigation - Guest configuration is an artifact that encapsulates DSC configuration and its dependencies. The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other dependencies like modules.

func (n Navigation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Navigation.

func (n *Navigation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Navigation.

type Operation

type Operation struct {
	// Provider, Resource, Operation and description values.
	Display *OperationDisplay

	// Operation name: For ex. providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/write or read
	Name *string

	// Provider, Resource, Operation and description values.
	Properties *OperationProperties
}

Operation - GuestConfiguration REST API operation

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// Description about operation.
	Description *string

	// Operation type: Read, write, delete, etc.
	Operation *string

	// Service provider: Microsoft.GuestConfiguration
	Provider *string

	// Resource on which the operation is performed: For ex.
	Resource *string
}

OperationDisplay - Provider, Resource, Operation and description values.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// List of Automation operations supported by the Automation resource provider.
	Value []*Operation
}

OperationList - The response model for the list of Automation operations

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v1.1.0

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationProperties

type OperationProperties struct {
	// Service provider: Microsoft.GuestConfiguration
	StatusCode *string
}

OperationProperties - Provider, Resource, Operation and description values.

func (OperationProperties) MarshalJSON added in v1.1.0

func (o OperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

func (o *OperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists all of the available GuestConfiguration REST API operations.

Generated from API version 2022-01-25

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/guestconfiguration/armguestconfiguration"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armguestconfiguration.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armguestconfiguration.OperationList{
		// 	Value: []*armguestconfiguration.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/write"),
		// 			Display: &armguestconfiguration.OperationDisplay{
		// 				Description: to.Ptr("Create new guest configuration assignment."),
		// 				Operation: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/write"),
		// 				Provider: to.Ptr("Microsoft Guest Configuration"),
		// 				Resource: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.GuestConfiguration/register/action"),
		// 			Display: &armguestconfiguration.OperationDisplay{
		// 				Description: to.Ptr("Registers the subscription for the Microsoft.GuestConfiguration resource provider."),
		// 				Operation: to.Ptr("Registers the feature for Microsoft.GuestConfiguration."),
		// 				Provider: to.Ptr("Microsoft Guest Configuration"),
		// 				Resource: to.Ptr("Register"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/read"),
		// 			Display: &armguestconfiguration.OperationDisplay{
		// 				Description: to.Ptr("Get guest configuration assignment."),
		// 				Operation: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/read"),
		// 				Provider: to.Ptr("Microsoft Guest Configuration"),
		// 				Resource: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/reports/read"),
		// 			Display: &armguestconfiguration.OperationDisplay{
		// 				Description: to.Ptr("Get guest configuration assignment report."),
		// 				Operation: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments/reports/read"),
		// 				Provider: to.Ptr("Microsoft Guest Configuration"),
		// 				Resource: to.Ptr("Microsoft.GuestConfiguration/guestConfigurationAssignments"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// The response model for the list of Automation operations
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioning state, which only appears in the response.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreated   ProvisioningState = "Created"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// Region where the VM is located.
	Location *string

	// Name of the guest configuration assignment.
	Name *string

	// READ-ONLY; ARM resource id of the guest configuration assignment.
	ID *string

	// READ-ONLY; The type of the resource.
	Type *string
}

ProxyResource - ARM proxy resource.

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type Resource

type Resource struct {
	// Region where the VM is located.
	Location *string

	// Name of the guest configuration assignment.
	Name *string

	// READ-ONLY; ARM resource id of the guest configuration assignment.
	ID *string

	// READ-ONLY; The type of the resource.
	Type *string
}

Resource - The core properties of ARM resources

func (Resource) MarshalJSON added in v1.1.0

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SystemData added in v1.0.0

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON added in v1.0.0

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v1.0.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Type

type Type string

Type - Type of report, Consistency or Initial

const (
	TypeConsistency Type = "Consistency"
	TypeInitial     Type = "Initial"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type VMInfo

type VMInfo struct {
	// READ-ONLY; Azure resource Id of the VM.
	ID *string

	// READ-ONLY; UUID(Universally Unique Identifier) of the VM.
	UUID *string
}

VMInfo - Information about the VM.

func (VMInfo) MarshalJSON added in v1.1.0

func (v VMInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMInfo.

func (*VMInfo) UnmarshalJSON added in v1.1.0

func (v *VMInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMInfo.

type VMSSVMInfo

type VMSSVMInfo struct {
	// READ-ONLY; A value indicating compliance status of the machine for the assigned guest configuration.
	ComplianceStatus *ComplianceStatus

	// READ-ONLY; Date and time when last compliance status was checked.
	LastComplianceChecked *time.Time

	// READ-ONLY; Id of the latest report for the guest configuration assignment.
	LatestReportID *string

	// READ-ONLY; UUID of the VM.
	VMID *string

	// READ-ONLY; Azure resource Id of the VM.
	VMResourceID *string
}

VMSSVMInfo - Information about VMSS VM

func (VMSSVMInfo) MarshalJSON

func (v VMSSVMInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMSSVMInfo.

func (*VMSSVMInfo) UnmarshalJSON

func (v *VMSSVMInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMSSVMInfo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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