armautomanage

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 16 Imported by: 3

README

Azure Automanage Module for Go

PkgGoDev

The armautomanage module provides operations for working with Azure Automanage.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Automanage module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Automanage. 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.

Clients

Azure Automanage modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armautomanage.NewReportsClient(<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,
    },
}
client, err := armautomanage.NewReportsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Automanage 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 ActionType added in v0.2.0

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues added in v0.2.0

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AssignmentReportProperties added in v0.2.0

type AssignmentReportProperties struct {
	// End time of the configuration profile assignment processing.
	EndTime *string `json:"endTime,omitempty"`

	// Start time of the configuration profile assignment processing.
	StartTime *string `json:"startTime,omitempty"`

	// READ-ONLY; The configurationProfile linked to the assignment.
	ConfigurationProfile *string `json:"configurationProfile,omitempty" azure:"ro"`

	// READ-ONLY; Duration of the configuration profile assignment processing.
	Duration *string `json:"duration,omitempty" azure:"ro"`

	// READ-ONLY; Error message, if any, returned by the configuration profile assignment processing.
	Error *ErrorDetail `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; Last modified time of the configuration profile assignment processing.
	LastModifiedTime *string `json:"lastModifiedTime,omitempty" azure:"ro"`

	// READ-ONLY; Version of the report format
	ReportFormatVersion *string `json:"reportFormatVersion,omitempty" azure:"ro"`

	// READ-ONLY; List of resources processed by the configuration profile assignment.
	Resources []*ReportResource `json:"resources,omitempty" azure:"ro"`

	// READ-ONLY; The status of the configuration profile assignment.
	Status *string `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; Type of the configuration profile assignment processing (Initial/Consistency).
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssignmentReportProperties - Data related to the report detail.

func (AssignmentReportProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AssignmentReportProperties.

type BestPractice added in v0.2.0

type BestPractice struct {
	// Properties of the best practice.
	Properties *ConfigurationProfileProperties `json:"properties,omitempty"`

	// READ-ONLY; The fully qualified ID for the best practice. For example, /providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the best practice. For example, azureBestPracticesProduction
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. For example, Microsoft.Automanage/bestPractices
	Type *string `json:"type,omitempty" azure:"ro"`
}

BestPractice - Definition of the Automanage best practice.

type BestPracticeList added in v0.2.0

type BestPracticeList struct {
	// Result of the list best practice operation.
	Value []*BestPractice `json:"value,omitempty"`
}

BestPracticeList - The response of the list best practice operation.

type BestPracticesClient added in v0.2.0

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

BestPracticesClient contains the methods for the BestPractices group. Don't use this type directly, use NewBestPracticesClient() instead.

func NewBestPracticesClient added in v0.2.0

func NewBestPracticesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BestPracticesClient, error)

NewBestPracticesClient creates a new instance of BestPracticesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BestPracticesClient) Get added in v0.2.0

Get - Get information about a Automanage best practice If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview bestPracticeName - The Automanage best practice name. options - BestPracticesClientGetOptions contains the optional parameters for the BestPracticesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getBestPractice.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewBestPracticesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"azureBestPracticesProduction",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BestPracticesClient) NewListByTenantPager added in v0.4.0

NewListByTenantPager - Retrieve a list of Automanage best practices If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - BestPracticesClientListByTenantOptions contains the optional parameters for the BestPracticesClient.ListByTenant method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listBestPracticesByTenant.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewBestPracticesClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByTenantPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type BestPracticesClientGetOptions added in v0.2.0

type BestPracticesClientGetOptions struct {
}

BestPracticesClientGetOptions contains the optional parameters for the BestPracticesClient.Get method.

type BestPracticesClientGetResponse added in v0.2.0

type BestPracticesClientGetResponse struct {
	BestPractice
}

BestPracticesClientGetResponse contains the response from method BestPracticesClient.Get.

type BestPracticesClientListByTenantOptions added in v0.2.0

type BestPracticesClientListByTenantOptions struct {
}

BestPracticesClientListByTenantOptions contains the optional parameters for the BestPracticesClient.ListByTenant method.

type BestPracticesClientListByTenantResponse added in v0.2.0

type BestPracticesClientListByTenantResponse struct {
	BestPracticeList
}

BestPracticesClientListByTenantResponse contains the response from method BestPracticesClient.ListByTenant.

type BestPracticesVersionsClient added in v0.2.0

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

BestPracticesVersionsClient contains the methods for the BestPracticesVersions group. Don't use this type directly, use NewBestPracticesVersionsClient() instead.

func NewBestPracticesVersionsClient added in v0.2.0

func NewBestPracticesVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BestPracticesVersionsClient, error)

NewBestPracticesVersionsClient creates a new instance of BestPracticesVersionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*BestPracticesVersionsClient) Get added in v0.2.0

Get - Get information about a Automanage best practice version If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview bestPracticeName - The Automanage best practice name. versionName - The Automanage best practice version name. options - BestPracticesVersionsClientGetOptions contains the optional parameters for the BestPracticesVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getBestPracticeVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewBestPracticesVersionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"azureBestPracticesProduction",
		"version1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*BestPracticesVersionsClient) NewListByTenantPager added in v0.4.0

NewListByTenantPager - Retrieve a list of Automanage best practices versions If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview bestPracticeName - The Automanage best practice name. options - BestPracticesVersionsClientListByTenantOptions contains the optional parameters for the BestPracticesVersionsClient.ListByTenant method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listBestPracticesVersionsByTenant.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewBestPracticesVersionsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByTenantPager("azureBestPracticesProduction",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type BestPracticesVersionsClientGetOptions added in v0.2.0

type BestPracticesVersionsClientGetOptions struct {
}

BestPracticesVersionsClientGetOptions contains the optional parameters for the BestPracticesVersionsClient.Get method.

type BestPracticesVersionsClientGetResponse added in v0.2.0

type BestPracticesVersionsClientGetResponse struct {
	BestPractice
}

BestPracticesVersionsClientGetResponse contains the response from method BestPracticesVersionsClient.Get.

type BestPracticesVersionsClientListByTenantOptions added in v0.2.0

type BestPracticesVersionsClientListByTenantOptions struct {
}

BestPracticesVersionsClientListByTenantOptions contains the optional parameters for the BestPracticesVersionsClient.ListByTenant method.

type BestPracticesVersionsClientListByTenantResponse added in v0.2.0

type BestPracticesVersionsClientListByTenantResponse struct {
	BestPracticeList
}

BestPracticesVersionsClientListByTenantResponse contains the response from method BestPracticesVersionsClient.ListByTenant.

type ConfigurationProfile

type ConfigurationProfile struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Properties of the configuration profile.
	Properties *ConfigurationProfileProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ConfigurationProfile - Definition of the configuration profile.

func (ConfigurationProfile) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfile.

type ConfigurationProfileAssignment

type ConfigurationProfileAssignment struct {
	// Properties of the configuration profile assignment.
	Properties *ConfigurationProfileAssignmentProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ConfigurationProfileAssignment - Configuration profile assignment is an association between a VM and automanage profile configuration.

type ConfigurationProfileAssignmentList

type ConfigurationProfileAssignmentList struct {
	// Result of the list configuration profile assignment operation.
	Value []*ConfigurationProfileAssignment `json:"value,omitempty"`
}

ConfigurationProfileAssignmentList - The response of the list configuration profile assignment operation.

type ConfigurationProfileAssignmentProperties

type ConfigurationProfileAssignmentProperties struct {
	// The Automanage configurationProfile ARM Resource URI.
	ConfigurationProfile *string `json:"configurationProfile,omitempty"`

	// The profileOverrides setting for the configuration profile assignment.
	ProfileOverrides map[string]interface{} `json:"profileOverrides,omitempty"`

	// The target VM resource URI
	TargetID *string `json:"targetId,omitempty"`

	// READ-ONLY; The status of onboarding, which only appears in the response.
	Status *string `json:"status,omitempty" azure:"ro"`
}

ConfigurationProfileAssignmentProperties - Automanage configuration profile assignment properties.

func (ConfigurationProfileAssignmentProperties) MarshalJSON added in v0.2.0

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignmentProperties.

type ConfigurationProfileAssignmentsClient

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

ConfigurationProfileAssignmentsClient contains the methods for the ConfigurationProfileAssignments group. Don't use this type directly, use NewConfigurationProfileAssignmentsClient() instead.

func NewConfigurationProfileAssignmentsClient

func NewConfigurationProfileAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileAssignmentsClient, error)

NewConfigurationProfileAssignmentsClient creates a new instance of ConfigurationProfileAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConfigurationProfileAssignmentsClient) CreateOrUpdate added in v0.2.0

CreateOrUpdate - Creates an association between a VM and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. resourceGroupName - The name of the resource group. The name is case insensitive. vmName - The name of the virtual machine. parameters - Parameters supplied to the create or update configuration profile assignment. options - ConfigurationProfileAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileAssignment.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"default",
		"myResourceGroupName",
		"myVMName",
		armautomanage.ConfigurationProfileAssignment{
			Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
				ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfileAssignmentsClient) Delete

Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileAssignmentName - Name of the configuration profile assignment vmName - The name of the virtual machine. options - ConfigurationProfileAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"myResourceGroupName",
		"default",
		"myVMName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) Get

Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileAssignmentName - The configuration profile assignment name. vmName - The name of the virtual machine. options - ConfigurationProfileAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"default",
		"myVMName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfileAssignmentsClient) NewListByClusterNamePager added in v0.5.0

NewListByClusterNamePager - Get list of configuration profile assignments If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. options - ConfigurationProfileAssignmentsClientListByClusterNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByClusterName method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByClusterName.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByClusterNamePager("myResourceGroupName",
		"myClusterName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) NewListByMachineNamePager added in v0.5.0

NewListByMachineNamePager - Get list of configuration profile assignments If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. options - ConfigurationProfileAssignmentsClientListByMachineNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByMachineName method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByMachineName.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByMachineNamePager("myResourceGroupName",
		"myMachineName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Get list of configuration profile assignments under a given subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - ConfigurationProfileAssignmentsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) NewListByVirtualMachinesPager added in v0.5.0

NewListByVirtualMachinesPager - Get list of configuration profile assignments If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. vmName - The name of the virtual machine. options - ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByVirtualMachines method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByVirtualMachines.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByVirtualMachinesPager("myResourceGroupName",
		"myVMName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) NewListPager added in v0.4.0

NewListPager - Get list of configuration profile assignments If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - ConfigurationProfileAssignmentsClientListOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileAssignmentsByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myResourceGroupName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ConfigurationProfileAssignmentsClientCreateOrUpdateOptions added in v0.2.0

type ConfigurationProfileAssignmentsClientCreateOrUpdateOptions struct {
}

ConfigurationProfileAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.CreateOrUpdate method.

type ConfigurationProfileAssignmentsClientCreateOrUpdateResponse added in v0.2.0

type ConfigurationProfileAssignmentsClientCreateOrUpdateResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileAssignmentsClient.CreateOrUpdate.

type ConfigurationProfileAssignmentsClientDeleteOptions added in v0.2.0

type ConfigurationProfileAssignmentsClientDeleteOptions struct {
}

ConfigurationProfileAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Delete method.

type ConfigurationProfileAssignmentsClientDeleteResponse added in v0.2.0

type ConfigurationProfileAssignmentsClientDeleteResponse struct {
}

ConfigurationProfileAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileAssignmentsClient.Delete.

type ConfigurationProfileAssignmentsClientGetOptions added in v0.2.0

type ConfigurationProfileAssignmentsClientGetOptions struct {
}

ConfigurationProfileAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Get method.

type ConfigurationProfileAssignmentsClientGetResponse added in v0.2.0

type ConfigurationProfileAssignmentsClientGetResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileAssignmentsClientGetResponse contains the response from method ConfigurationProfileAssignmentsClient.Get.

type ConfigurationProfileAssignmentsClientListByClusterNameOptions added in v0.5.0

type ConfigurationProfileAssignmentsClientListByClusterNameOptions struct {
}

ConfigurationProfileAssignmentsClientListByClusterNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByClusterName method.

type ConfigurationProfileAssignmentsClientListByClusterNameResponse added in v0.5.0

type ConfigurationProfileAssignmentsClientListByClusterNameResponse struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsClientListByClusterNameResponse contains the response from method ConfigurationProfileAssignmentsClient.ListByClusterName.

type ConfigurationProfileAssignmentsClientListByMachineNameOptions added in v0.5.0

type ConfigurationProfileAssignmentsClientListByMachineNameOptions struct {
}

ConfigurationProfileAssignmentsClientListByMachineNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByMachineName method.

type ConfigurationProfileAssignmentsClientListByMachineNameResponse added in v0.5.0

type ConfigurationProfileAssignmentsClientListByMachineNameResponse struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsClientListByMachineNameResponse contains the response from method ConfigurationProfileAssignmentsClient.ListByMachineName.

type ConfigurationProfileAssignmentsClientListBySubscriptionOptions added in v0.2.0

type ConfigurationProfileAssignmentsClientListBySubscriptionOptions struct {
}

ConfigurationProfileAssignmentsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListBySubscription method.

type ConfigurationProfileAssignmentsClientListBySubscriptionResponse added in v0.2.0

type ConfigurationProfileAssignmentsClientListBySubscriptionResponse struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsClientListBySubscriptionResponse contains the response from method ConfigurationProfileAssignmentsClient.ListBySubscription.

type ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions added in v0.5.0

type ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions struct {
}

ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.ListByVirtualMachines method.

type ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse added in v0.5.0

type ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse contains the response from method ConfigurationProfileAssignmentsClient.ListByVirtualMachines.

type ConfigurationProfileAssignmentsClientListOptions added in v0.2.0

type ConfigurationProfileAssignmentsClientListOptions struct {
}

ConfigurationProfileAssignmentsClientListOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.List method.

type ConfigurationProfileAssignmentsClientListResponse added in v0.2.0

type ConfigurationProfileAssignmentsClientListResponse struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsClientListResponse contains the response from method ConfigurationProfileAssignmentsClient.List.

type ConfigurationProfileHCIAssignmentsClient added in v0.5.0

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

ConfigurationProfileHCIAssignmentsClient contains the methods for the ConfigurationProfileHCIAssignments group. Don't use this type directly, use NewConfigurationProfileHCIAssignmentsClient() instead.

func NewConfigurationProfileHCIAssignmentsClient added in v0.5.0

func NewConfigurationProfileHCIAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileHCIAssignmentsClient, error)

NewConfigurationProfileHCIAssignmentsClient creates a new instance of ConfigurationProfileHCIAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConfigurationProfileHCIAssignmentsClient) CreateOrUpdate added in v0.5.0

CreateOrUpdate - Creates an association between a AzureStackHCI cluster and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. parameters - Parameters supplied to the create or update configuration profile assignment. options - ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileHCIAssignment.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroupName",
		"myClusterName",
		"default",
		armautomanage.ConfigurationProfileAssignment{
			Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
				ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfileHCIAssignmentsClient) Delete added in v0.5.0

Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. configurationProfileAssignmentName - Name of the configuration profile assignment options - ConfigurationProfileHCIAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileHCIAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"myResourceGroupName",
		"myClusterName",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConfigurationProfileHCIAssignmentsClient) Get added in v0.5.0

Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. options - ConfigurationProfileHCIAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileHCIAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCIAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"myClusterName",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions struct {
}

ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate method.

type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate.

type ConfigurationProfileHCIAssignmentsClientDeleteOptions added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientDeleteOptions struct {
}

ConfigurationProfileHCIAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Delete method.

type ConfigurationProfileHCIAssignmentsClientDeleteResponse added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientDeleteResponse struct {
}

ConfigurationProfileHCIAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.Delete.

type ConfigurationProfileHCIAssignmentsClientGetOptions added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientGetOptions struct {
}

ConfigurationProfileHCIAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Get method.

type ConfigurationProfileHCIAssignmentsClientGetResponse added in v0.5.0

type ConfigurationProfileHCIAssignmentsClientGetResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileHCIAssignmentsClientGetResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.Get.

type ConfigurationProfileHCRPAssignmentsClient added in v0.5.0

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

ConfigurationProfileHCRPAssignmentsClient contains the methods for the ConfigurationProfileHCRPAssignments group. Don't use this type directly, use NewConfigurationProfileHCRPAssignmentsClient() instead.

func NewConfigurationProfileHCRPAssignmentsClient added in v0.5.0

func NewConfigurationProfileHCRPAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileHCRPAssignmentsClient, error)

NewConfigurationProfileHCRPAssignmentsClient creates a new instance of ConfigurationProfileHCRPAssignmentsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate added in v0.5.0

CreateOrUpdate - Creates an association between a ARC machine and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported. parameters - Parameters supplied to the create or update configuration profile assignment. options - ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileHCRPAssignment.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"myResourceGroupName",
		"myMachineName",
		"default",
		armautomanage.ConfigurationProfileAssignment{
			Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
				ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfileHCRPAssignmentsClient) Delete added in v0.5.0

Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. configurationProfileAssignmentName - Name of the configuration profile assignment options - ConfigurationProfileHCRPAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"myResourceGroupName",
		"myMachineName",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConfigurationProfileHCRPAssignmentsClient) Get added in v0.5.0

Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. options - ConfigurationProfileHCRPAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfileHCRPAssignmentsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"myMachineName",
		"default",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions struct {
}

ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate method.

type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate.

type ConfigurationProfileHCRPAssignmentsClientDeleteOptions added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientDeleteOptions struct {
}

ConfigurationProfileHCRPAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Delete method.

type ConfigurationProfileHCRPAssignmentsClientDeleteResponse added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientDeleteResponse struct {
}

ConfigurationProfileHCRPAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.Delete.

type ConfigurationProfileHCRPAssignmentsClientGetOptions added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientGetOptions struct {
}

ConfigurationProfileHCRPAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Get method.

type ConfigurationProfileHCRPAssignmentsClientGetResponse added in v0.5.0

type ConfigurationProfileHCRPAssignmentsClientGetResponse struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileHCRPAssignmentsClientGetResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.Get.

type ConfigurationProfileList added in v0.2.0

type ConfigurationProfileList struct {
	// Result of the list ConfigurationProfile operation.
	Value []*ConfigurationProfile `json:"value,omitempty"`
}

ConfigurationProfileList - The response of the list configuration profile operation.

type ConfigurationProfileProperties added in v0.2.0

type ConfigurationProfileProperties struct {
	// configuration dictionary of the configuration profile.
	Configuration interface{} `json:"configuration,omitempty"`

	// overrides of the configuration profile.
	Overrides []interface{} `json:"overrides,omitempty"`
}

ConfigurationProfileProperties - Automanage configuration profile properties.

func (ConfigurationProfileProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileProperties.

type ConfigurationProfileUpdate added in v0.2.0

type ConfigurationProfileUpdate struct {
	// Properties of the configuration profile.
	Properties *ConfigurationProfileProperties `json:"properties,omitempty"`

	// The tags of the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

ConfigurationProfileUpdate - Definition of the configuration profile.

func (ConfigurationProfileUpdate) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileUpdate.

type ConfigurationProfilesClient added in v0.2.0

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

ConfigurationProfilesClient contains the methods for the ConfigurationProfiles group. Don't use this type directly, use NewConfigurationProfilesClient() instead.

func NewConfigurationProfilesClient added in v0.2.0

func NewConfigurationProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfilesClient, error)

NewConfigurationProfilesClient creates a new instance of ConfigurationProfilesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConfigurationProfilesClient) CreateOrUpdate added in v0.2.0

CreateOrUpdate - Creates a configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - Name of the configuration profile. resourceGroupName - The name of the resource group. The name is case insensitive. parameters - Parameters supplied to create or update configuration profile. options - ConfigurationProfilesClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfile.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"customConfigurationProfile",
		"myResourceGroupName",
		armautomanage.ConfigurationProfile{
			Location: to.Ptr("East US"),
			Tags: map[string]*string{
				"Organization": to.Ptr("Administration"),
			},
			Properties: &armautomanage.ConfigurationProfileProperties{
				Configuration: map[string]interface{}{
					"Antimalware/Enable":                false,
					"AzureSecurityCenter/Enable":        true,
					"Backup/Enable":                     false,
					"BootDiagnostics/Enable":            true,
					"ChangeTrackingAndInventory/Enable": true,
					"GuestConfiguration/Enable":         true,
					"LogAnalytics/Enable":               true,
					"UpdateManagement/Enable":           true,
					"VMInsights/Enable":                 true,
				},
				Overrides: []interface{}{
					map[string]interface{}{
						"if": map[string]interface{}{
							"equals": "eastus",
							"field":  "$.location",
						},
						"priority": float64(100),
						"then": map[string]interface{}{
							"LogAnalytics/Enable":      true,
							"LogAnalytics/Reprovision": true,
							"LogAnalytics/Workspace":   "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/eastus",
						},
					},
					map[string]interface{}{
						"if": map[string]interface{}{
							"equals": "centralcanada",
							"field":  "$.location",
						},
						"priority": float64(200),
						"then": map[string]interface{}{
							"LogAnalytics/Enable":      true,
							"LogAnalytics/Reprovision": true,
							"LogAnalytics/Workspace":   "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/centralcanada",
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfilesClient) Delete added in v0.2.0

func (client *ConfigurationProfilesClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileName string, options *ConfigurationProfilesClientDeleteOptions) (ConfigurationProfilesClientDeleteResponse, error)

Delete - Delete a configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileName - Name of the configuration profile options - ConfigurationProfilesClientDeleteOptions contains the optional parameters for the ConfigurationProfilesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rg",
		"customConfigurationProfile",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConfigurationProfilesClient) Get added in v0.2.0

func (client *ConfigurationProfilesClient) Get(ctx context.Context, configurationProfileName string, resourceGroupName string, options *ConfigurationProfilesClientGetOptions) (ConfigurationProfilesClientGetResponse, error)

Get - Get information about a configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - The configuration profile name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ConfigurationProfilesClientGetOptions contains the optional parameters for the ConfigurationProfilesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfile.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"customConfigurationProfile",
		"myResourceGroupName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfilesClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - Retrieve a list of configuration profile within a given resource group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - ConfigurationProfilesClientListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfilesByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroupName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfilesClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Retrieve a list of configuration profile within a subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - ConfigurationProfilesClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilesClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfilesBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfilesClient) Update added in v0.2.0

Update - Updates a configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - Name of the configuration profile. resourceGroupName - The name of the resource group. The name is case insensitive. parameters - Parameters supplied to update configuration profile. options - ConfigurationProfilesClientUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/updateConfigurationProfile.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"customConfigurationProfile",
		"myResourceGroupName",
		armautomanage.ConfigurationProfileUpdate{
			Tags: map[string]*string{
				"Organization": to.Ptr("Administration"),
			},
			Properties: &armautomanage.ConfigurationProfileProperties{
				Configuration: map[string]interface{}{
					"Antimalware/Enable":                false,
					"AzureSecurityCenter/Enable":        true,
					"Backup/Enable":                     false,
					"BootDiagnostics/Enable":            true,
					"ChangeTrackingAndInventory/Enable": true,
					"GuestConfiguration/Enable":         true,
					"LogAnalytics/Enable":               true,
					"UpdateManagement/Enable":           true,
					"VMInsights/Enable":                 true,
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConfigurationProfilesClientCreateOrUpdateOptions added in v0.2.0

type ConfigurationProfilesClientCreateOrUpdateOptions struct {
}

ConfigurationProfilesClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.CreateOrUpdate method.

type ConfigurationProfilesClientCreateOrUpdateResponse added in v0.2.0

type ConfigurationProfilesClientCreateOrUpdateResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesClientCreateOrUpdateResponse contains the response from method ConfigurationProfilesClient.CreateOrUpdate.

type ConfigurationProfilesClientDeleteOptions added in v0.2.0

type ConfigurationProfilesClientDeleteOptions struct {
}

ConfigurationProfilesClientDeleteOptions contains the optional parameters for the ConfigurationProfilesClient.Delete method.

type ConfigurationProfilesClientDeleteResponse added in v0.2.0

type ConfigurationProfilesClientDeleteResponse struct {
}

ConfigurationProfilesClientDeleteResponse contains the response from method ConfigurationProfilesClient.Delete.

type ConfigurationProfilesClientGetOptions added in v0.2.0

type ConfigurationProfilesClientGetOptions struct {
}

ConfigurationProfilesClientGetOptions contains the optional parameters for the ConfigurationProfilesClient.Get method.

type ConfigurationProfilesClientGetResponse added in v0.2.0

type ConfigurationProfilesClientGetResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesClientGetResponse contains the response from method ConfigurationProfilesClient.Get.

type ConfigurationProfilesClientListByResourceGroupOptions added in v0.2.0

type ConfigurationProfilesClientListByResourceGroupOptions struct {
}

ConfigurationProfilesClientListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilesClient.ListByResourceGroup method.

type ConfigurationProfilesClientListByResourceGroupResponse added in v0.2.0

type ConfigurationProfilesClientListByResourceGroupResponse struct {
	ConfigurationProfileList
}

ConfigurationProfilesClientListByResourceGroupResponse contains the response from method ConfigurationProfilesClient.ListByResourceGroup.

type ConfigurationProfilesClientListBySubscriptionOptions added in v0.2.0

type ConfigurationProfilesClientListBySubscriptionOptions struct {
}

ConfigurationProfilesClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilesClient.ListBySubscription method.

type ConfigurationProfilesClientListBySubscriptionResponse added in v0.2.0

type ConfigurationProfilesClientListBySubscriptionResponse struct {
	ConfigurationProfileList
}

ConfigurationProfilesClientListBySubscriptionResponse contains the response from method ConfigurationProfilesClient.ListBySubscription.

type ConfigurationProfilesClientUpdateOptions added in v0.2.0

type ConfigurationProfilesClientUpdateOptions struct {
}

ConfigurationProfilesClientUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.Update method.

type ConfigurationProfilesClientUpdateResponse added in v0.2.0

type ConfigurationProfilesClientUpdateResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesClientUpdateResponse contains the response from method ConfigurationProfilesClient.Update.

type ConfigurationProfilesVersionsClient added in v0.2.0

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

ConfigurationProfilesVersionsClient contains the methods for the ConfigurationProfilesVersions group. Don't use this type directly, use NewConfigurationProfilesVersionsClient() instead.

func NewConfigurationProfilesVersionsClient added in v0.2.0

func NewConfigurationProfilesVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfilesVersionsClient, error)

NewConfigurationProfilesVersionsClient creates a new instance of ConfigurationProfilesVersionsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ConfigurationProfilesVersionsClient) CreateOrUpdate added in v0.2.0

CreateOrUpdate - Creates a configuration profile version If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - Name of the configuration profile. versionName - The configuration profile version name. resourceGroupName - The name of the resource group. The name is case insensitive. parameters - Parameters supplied to create or update configuration profile. options - ConfigurationProfilesVersionsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/createOrUpdateConfigurationProfileVersion.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"customConfigurationProfile",
		"version1",
		"myResourceGroupName",
		armautomanage.ConfigurationProfile{
			Location: to.Ptr("East US"),
			Tags: map[string]*string{
				"Organization": to.Ptr("Administration"),
			},
			Properties: &armautomanage.ConfigurationProfileProperties{
				Configuration: map[string]interface{}{
					"Antimalware/Enable":                false,
					"AzureSecurityCenter/Enable":        true,
					"Backup/Enable":                     false,
					"BootDiagnostics/Enable":            true,
					"ChangeTrackingAndInventory/Enable": true,
					"GuestConfiguration/Enable":         true,
					"LogAnalytics/Enable":               true,
					"UpdateManagement/Enable":           true,
					"VMInsights/Enable":                 true,
				},
				Overrides: []interface{}{
					map[string]interface{}{
						"if": map[string]interface{}{
							"equals": "eastus",
							"field":  "$.location",
						},
						"priority": float64(100),
						"then": map[string]interface{}{
							"LogAnalytics/Enable":      true,
							"LogAnalytics/Reprovision": true,
							"LogAnalytics/Workspace":   "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/eastus",
						},
					},
					map[string]interface{}{
						"if": map[string]interface{}{
							"equals": "centralcanada",
							"field":  "$.location",
						},
						"priority": float64(200),
						"then": map[string]interface{}{
							"LogAnalytics/Enable":      true,
							"LogAnalytics/Reprovision": true,
							"LogAnalytics/Workspace":   "/subscriptions/abc/resourceGroups/xyz/providers/Microsoft.La/Workspaces/centralcanada",
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfilesVersionsClient) Delete added in v0.2.0

Delete - Delete a configuration profile version If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileName - Name of the configuration profile versionName - The configuration profile version name. options - ConfigurationProfilesVersionsClientDeleteOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/deleteConfigurationProfileVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesVersionsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"rg",
		"customConfigurationProfile",
		"version1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConfigurationProfilesVersionsClient) Get added in v0.2.0

Get - Get information about a configuration profile version If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - The configuration profile name. versionName - The configuration profile version name. resourceGroupName - The name of the resource group. The name is case insensitive. options - ConfigurationProfilesVersionsClientGetOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getConfigurationProfileVersion.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"customConfigurationProfile",
		"version1",
		"myResourceGroupName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ConfigurationProfilesVersionsClient) NewListChildResourcesPager added in v0.4.0

NewListChildResourcesPager - Retrieve a list of configuration profile version for a configuration profile If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - Name of the configuration profile. resourceGroupName - The name of the resource group. The name is case insensitive. options - ConfigurationProfilesVersionsClientListChildResourcesOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.ListChildResources method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listConfigurationProfileVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListChildResourcesPager("customConfigurationProfile",
		"myResourceGroupName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ConfigurationProfilesVersionsClient) Update added in v0.2.0

Update - Updates a configuration profile version If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview configurationProfileName - Name of the configuration profile. versionName - The configuration profile version name. resourceGroupName - The name of the resource group. The name is case insensitive. parameters - Parameters supplied to update configuration profile. options - ConfigurationProfilesVersionsClientUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/updateConfigurationProfileVersion.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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewConfigurationProfilesVersionsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"customConfigurationProfile",
		"version1",
		"myResourceGroupName",
		armautomanage.ConfigurationProfileUpdate{
			Tags: map[string]*string{
				"Organization": to.Ptr("Administration"),
			},
			Properties: &armautomanage.ConfigurationProfileProperties{
				Configuration: map[string]interface{}{
					"Antimalware/Enable":                false,
					"AzureSecurityCenter/Enable":        true,
					"Backup/Enable":                     false,
					"BootDiagnostics/Enable":            true,
					"ChangeTrackingAndInventory/Enable": true,
					"GuestConfiguration/Enable":         true,
					"LogAnalytics/Enable":               true,
					"UpdateManagement/Enable":           true,
					"VMInsights/Enable":                 true,
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ConfigurationProfilesVersionsClientCreateOrUpdateOptions added in v0.2.0

type ConfigurationProfilesVersionsClientCreateOrUpdateOptions struct {
}

ConfigurationProfilesVersionsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.CreateOrUpdate method.

type ConfigurationProfilesVersionsClientCreateOrUpdateResponse added in v0.2.0

type ConfigurationProfilesVersionsClientCreateOrUpdateResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesVersionsClientCreateOrUpdateResponse contains the response from method ConfigurationProfilesVersionsClient.CreateOrUpdate.

type ConfigurationProfilesVersionsClientDeleteOptions added in v0.2.0

type ConfigurationProfilesVersionsClientDeleteOptions struct {
}

ConfigurationProfilesVersionsClientDeleteOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Delete method.

type ConfigurationProfilesVersionsClientDeleteResponse added in v0.2.0

type ConfigurationProfilesVersionsClientDeleteResponse struct {
}

ConfigurationProfilesVersionsClientDeleteResponse contains the response from method ConfigurationProfilesVersionsClient.Delete.

type ConfigurationProfilesVersionsClientGetOptions added in v0.2.0

type ConfigurationProfilesVersionsClientGetOptions struct {
}

ConfigurationProfilesVersionsClientGetOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Get method.

type ConfigurationProfilesVersionsClientGetResponse added in v0.2.0

type ConfigurationProfilesVersionsClientGetResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesVersionsClientGetResponse contains the response from method ConfigurationProfilesVersionsClient.Get.

type ConfigurationProfilesVersionsClientListChildResourcesOptions added in v0.2.0

type ConfigurationProfilesVersionsClientListChildResourcesOptions struct {
}

ConfigurationProfilesVersionsClientListChildResourcesOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.ListChildResources method.

type ConfigurationProfilesVersionsClientListChildResourcesResponse added in v0.2.0

type ConfigurationProfilesVersionsClientListChildResourcesResponse struct {
	ConfigurationProfileList
}

ConfigurationProfilesVersionsClientListChildResourcesResponse contains the response from method ConfigurationProfilesVersionsClient.ListChildResources.

type ConfigurationProfilesVersionsClientUpdateOptions added in v0.2.0

type ConfigurationProfilesVersionsClientUpdateOptions struct {
}

ConfigurationProfilesVersionsClientUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Update method.

type ConfigurationProfilesVersionsClientUpdateResponse added in v0.2.0

type ConfigurationProfilesVersionsClientUpdateResponse struct {
	ConfigurationProfile
}

ConfigurationProfilesVersionsClientUpdateResponse contains the response from method ConfigurationProfilesVersionsClient.Update.

type CreatedByType added in v0.2.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 v0.2.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

type HCIReportsClient added in v0.5.0

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

HCIReportsClient contains the methods for the HCIReports group. Don't use this type directly, use NewHCIReportsClient() instead.

func NewHCIReportsClient added in v0.5.0

func NewHCIReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCIReportsClient, error)

NewHCIReportsClient creates a new instance of HCIReportsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*HCIReportsClient) Get added in v0.5.0

func (client *HCIReportsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, configurationProfileAssignmentName string, reportName string, options *HCIReportsClientGetOptions) (HCIReportsClientGetResponse, error)

Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. reportName - The report name. options - HCIReportsClientGetOptions contains the optional parameters for the HCIReportsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getHCIReport.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewHCIReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"myClusterName",
		"default",
		"b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*HCIReportsClient) NewListByConfigurationProfileAssignmentsPager added in v0.5.0

func (client *HCIReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, clusterName string, configurationProfileAssignmentName string, options *HCIReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[HCIReportsClientListByConfigurationProfileAssignmentsResponse]

NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. clusterName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. options - HCIReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCIReportsClient.ListByConfigurationProfileAssignments method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileHCIAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewHCIReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName",
		"myClusterName",
		"default",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type HCIReportsClientGetOptions added in v0.5.0

type HCIReportsClientGetOptions struct {
}

HCIReportsClientGetOptions contains the optional parameters for the HCIReportsClient.Get method.

type HCIReportsClientGetResponse added in v0.5.0

type HCIReportsClientGetResponse struct {
	Report
}

HCIReportsClientGetResponse contains the response from method HCIReportsClient.Get.

type HCIReportsClientListByConfigurationProfileAssignmentsOptions added in v0.5.0

type HCIReportsClientListByConfigurationProfileAssignmentsOptions struct {
}

HCIReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCIReportsClient.ListByConfigurationProfileAssignments method.

type HCIReportsClientListByConfigurationProfileAssignmentsResponse added in v0.5.0

type HCIReportsClientListByConfigurationProfileAssignmentsResponse struct {
	ReportList
}

HCIReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method HCIReportsClient.ListByConfigurationProfileAssignments.

type HCRPReportsClient added in v0.5.0

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

HCRPReportsClient contains the methods for the HCRPReports group. Don't use this type directly, use NewHCRPReportsClient() instead.

func NewHCRPReportsClient added in v0.5.0

func NewHCRPReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCRPReportsClient, error)

NewHCRPReportsClient creates a new instance of HCRPReportsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*HCRPReportsClient) Get added in v0.5.0

func (client *HCRPReportsClient) Get(ctx context.Context, resourceGroupName string, machineName string, configurationProfileAssignmentName string, reportName string, options *HCRPReportsClientGetOptions) (HCRPReportsClientGetResponse, error)

Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. reportName - The report name. options - HCRPReportsClientGetOptions contains the optional parameters for the HCRPReportsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getHCRPReport.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewHCRPReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"myMachineName",
		"default",
		"b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*HCRPReportsClient) NewListByConfigurationProfileAssignmentsPager added in v0.5.0

func (client *HCRPReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, machineName string, configurationProfileAssignmentName string, options *HCRPReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[HCRPReportsClientListByConfigurationProfileAssignmentsResponse]

NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. machineName - The name of the Arc machine. configurationProfileAssignmentName - The configuration profile assignment name. options - HCRPReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCRPReportsClient.ListByConfigurationProfileAssignments method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileHCRPAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewHCRPReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName",
		"myMachineName",
		"default",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type HCRPReportsClientGetOptions added in v0.5.0

type HCRPReportsClientGetOptions struct {
}

HCRPReportsClientGetOptions contains the optional parameters for the HCRPReportsClient.Get method.

type HCRPReportsClientGetResponse added in v0.5.0

type HCRPReportsClientGetResponse struct {
	Report
}

HCRPReportsClientGetResponse contains the response from method HCRPReportsClient.Get.

type HCRPReportsClientListByConfigurationProfileAssignmentsOptions added in v0.5.0

type HCRPReportsClientListByConfigurationProfileAssignmentsOptions struct {
}

HCRPReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCRPReportsClient.ListByConfigurationProfileAssignments method.

type HCRPReportsClientListByConfigurationProfileAssignmentsResponse added in v0.5.0

type HCRPReportsClientListByConfigurationProfileAssignmentsResponse struct {
	ReportList
}

HCRPReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method HCRPReportsClient.ListByConfigurationProfileAssignments.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType `json:"actionType,omitempty" azure:"ro"`

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"`

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin `json:"origin,omitempty" azure:"ro"`
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - Localized display information for this particular operation.

type OperationListResult added in v0.2.0

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

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 Automanage REST API operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/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/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type Origin added in v0.2.0

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues added in v0.2.0

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

type Report added in v0.2.0

type Report struct {
	// The properties for the report.
	Properties *AssignmentReportProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Report - Definition of the report.

type ReportList added in v0.2.0

type ReportList struct {
	// Result of the list report operation.
	Value []*Report `json:"value,omitempty"`
}

ReportList - The response of the list report operation.

type ReportResource added in v0.2.0

type ReportResource struct {
	// READ-ONLY; Error message, if any, returned when deploying the resource.
	Error *ErrorDetail `json:"error,omitempty" azure:"ro"`

	// READ-ONLY; ARM id of the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Name of the resource.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Status of the resource.
	Status *string `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; Type of the resource.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ReportResource - Details about the resource processed by the configuration profile assignment

type ReportsClient added in v0.2.0

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

ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.

func NewReportsClient added in v0.2.0

func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error)

NewReportsClient creates a new instance of ReportsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ReportsClient) Get added in v0.2.0

func (client *ReportsClient) Get(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, reportName string, vmName string, options *ReportsClientGetOptions) (ReportsClientGetResponse, error)

Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileAssignmentName - The configuration profile assignment name. reportName - The report name. vmName - The name of the virtual machine. options - ReportsClientGetOptions contains the optional parameters for the ReportsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getReport.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroupName",
		"default",
		"b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4",
		"myVMName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ReportsClient) NewListByConfigurationProfileAssignmentsPager added in v0.4.0

func (client *ReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[ReportsClientListByConfigurationProfileAssignmentsResponse]

NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview resourceGroupName - The name of the resource group. The name is case insensitive. configurationProfileAssignmentName - The configuration profile assignment name. vmName - The name of the virtual machine. options - ReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the ReportsClient.ListByConfigurationProfileAssignments method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listReportsByconfigurationProfileAssignment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewReportsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByConfigurationProfileAssignmentsPager("myResourceGroupName",
		"default",
		"myVMName",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ReportsClientGetOptions added in v0.2.0

type ReportsClientGetOptions struct {
}

ReportsClientGetOptions contains the optional parameters for the ReportsClient.Get method.

type ReportsClientGetResponse added in v0.2.0

type ReportsClientGetResponse struct {
	Report
}

ReportsClientGetResponse contains the response from method ReportsClient.Get.

type ReportsClientListByConfigurationProfileAssignmentsOptions added in v0.2.0

type ReportsClientListByConfigurationProfileAssignmentsOptions struct {
}

ReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the ReportsClient.ListByConfigurationProfileAssignments method.

type ReportsClientListByConfigurationProfileAssignmentsResponse added in v0.2.0

type ReportsClientListByConfigurationProfileAssignmentsResponse struct {
	ReportList
}

ReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method ReportsClient.ListByConfigurationProfileAssignments.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type ServicePrincipal added in v0.3.0

type ServicePrincipal struct {
	// The Service Principal properties for the subscription
	Properties *ServicePrincipalProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ServicePrincipal - The Service Principal Id for the subscription.

type ServicePrincipalListResult added in v0.3.0

type ServicePrincipalListResult struct {
	// The list of servicePrincipals.
	Value []*ServicePrincipal `json:"value,omitempty"`
}

ServicePrincipalListResult - The list of ServicePrincipals.

type ServicePrincipalProperties added in v0.3.0

type ServicePrincipalProperties struct {
	// READ-ONLY; Returns the contributor RBAC Role exist or not for the Service Principal Id.
	AuthorizationSet *bool `json:"authorizationSet,omitempty" azure:"ro"`

	// READ-ONLY; The Service Principal Id for the subscription.
	ServicePrincipalID *string `json:"servicePrincipalId,omitempty" azure:"ro"`
}

ServicePrincipalProperties - The Service Principal properties for the subscription.

type ServicePrincipalsClient added in v0.3.0

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

ServicePrincipalsClient contains the methods for the ServicePrincipals group. Don't use this type directly, use NewServicePrincipalsClient() instead.

func NewServicePrincipalsClient added in v0.3.0

func NewServicePrincipalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicePrincipalsClient, error)

NewServicePrincipalsClient creates a new instance of ServicePrincipalsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ServicePrincipalsClient) Get added in v0.3.0

Get - Get the Automanage AAD first party Application Service Principal details for the subscription id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - ServicePrincipalsClientGetOptions contains the optional parameters for the ServicePrincipalsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/getServicePrincipal.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewServicePrincipalsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ServicePrincipalsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Get the Automanage AAD first party Application Service Principal details for the subscription id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-04-30-preview options - ServicePrincipalsClientListBySubscriptionOptions contains the optional parameters for the ServicePrincipalsClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/automanage/resource-manager/Microsoft.Automanage/preview/2021-04-30-preview/examples/listServicePrincipalBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armautomanage.NewServicePrincipalsClient("mySubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ServicePrincipalsClientGetOptions added in v0.3.0

type ServicePrincipalsClientGetOptions struct {
}

ServicePrincipalsClientGetOptions contains the optional parameters for the ServicePrincipalsClient.Get method.

type ServicePrincipalsClientGetResponse added in v0.3.0

type ServicePrincipalsClientGetResponse struct {
	ServicePrincipal
}

ServicePrincipalsClientGetResponse contains the response from method ServicePrincipalsClient.Get.

type ServicePrincipalsClientListBySubscriptionOptions added in v0.3.0

type ServicePrincipalsClientListBySubscriptionOptions struct {
}

ServicePrincipalsClientListBySubscriptionOptions contains the optional parameters for the ServicePrincipalsClient.ListBySubscription method.

type ServicePrincipalsClientListBySubscriptionResponse added in v0.3.0

type ServicePrincipalsClientListBySubscriptionResponse struct {
	ServicePrincipalListResult
}

ServicePrincipalsClientListBySubscriptionResponse contains the response from method ServicePrincipalsClient.ListBySubscription.

type SystemData added in v0.2.0

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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

func (SystemData) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type UpdateResource

type UpdateResource struct {
	// The tags of the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

UpdateResource - Represents an update resource

func (UpdateResource) MarshalJSON

func (u UpdateResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateResource.

Jump to

Keyboard shortcuts

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