armautomanage

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 14 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 := armautomanage.NewConfigurationProfilePreferencesClient(<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{
    Host: arm.AzureChina,
}
client := armautomanage.NewConfigurationProfilePreferencesClient(<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 Account

type Account struct {
	TrackedResource
	// The identity of the Automanage account.
	Identity *AccountIdentity `json:"identity,omitempty"`
}

Account - Definition of the Automanage account.

func (Account) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Account.

type AccountIdentity

type AccountIdentity struct {
	// The type of identity used for the Automanage account. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity.
	Type *ResourceIdentityType `json:"type,omitempty"`

	// READ-ONLY; The principal id of Automanage account identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id associated with the Automanage account.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

AccountIdentity - Identity for the Automanage account.

type AccountList

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

AccountList - The response of the list Account operation.

func (AccountList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountList.

type AccountUpdate

type AccountUpdate struct {
	UpdateResource
	// The identity of the Automanage account.
	Identity *AccountIdentity `json:"identity,omitempty"`
}

AccountUpdate - Definition of the Automanage account.

func (AccountUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountUpdate.

type AccountsClient

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

AccountsClient contains the methods for the Accounts group. Don't use this type directly, use NewAccountsClient() instead.

func NewAccountsClient

func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AccountsClient

NewAccountsClient creates a new instance of AccountsClient with the specified values.

func (*AccountsClient) CreateOrUpdate

func (client *AccountsClient) CreateOrUpdate(ctx context.Context, accountName string, resourceGroupName string, parameters Account, options *AccountsCreateOrUpdateOptions) (AccountsCreateOrUpdateResponse, error)

CreateOrUpdate - Creates an Automanage Account If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/createOrUpdateAccount.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<account-name>",
		"<resource-group-name>",
		armautomanage.Account{
			TrackedResource: armautomanage.TrackedResource{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"Organization": to.StringPtr("Administration"),
				},
			},
			Identity: &armautomanage.AccountIdentity{
				Type: armautomanage.ResourceIdentityTypeSystemAssigned.ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Account.ID: %s\n", *res.ID)
}
Output:

func (*AccountsClient) Delete

func (client *AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsDeleteOptions) (AccountsDeleteResponse, error)

Delete - Delete a Automanage account If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/deleteAccount.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<account-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*AccountsClient) Get

func (client *AccountsClient) Get(ctx context.Context, accountName string, resourceGroupName string, options *AccountsGetOptions) (AccountsGetResponse, error)

Get - Get information about a Automanage account If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/getAccount.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<account-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Account.ID: %s\n", *res.ID)
}
Output:

func (*AccountsClient) ListByResourceGroup

func (client *AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, options *AccountsListByResourceGroupOptions) (AccountsListByResourceGroupResponse, error)

ListByResourceGroup - Retrieve a list of Automanage accounts within a given resource group If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/listAccountsByResourceGroup.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	_, err = client.ListByResourceGroup(ctx,
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*AccountsClient) ListBySubscription

ListBySubscription - Retrieve a list of Automanage accounts within a subscription If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/listAccountsBySubscription.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	_, err = client.ListBySubscription(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*AccountsClient) Update

func (client *AccountsClient) Update(ctx context.Context, accountName string, resourceGroupName string, parameters AccountUpdate, options *AccountsUpdateOptions) (AccountsUpdateResponse, error)

Update - Updates an Automanage Account If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/updateAccount.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 := armautomanage.NewAccountsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<account-name>",
		"<resource-group-name>",
		armautomanage.AccountUpdate{
			UpdateResource: armautomanage.UpdateResource{
				Tags: map[string]*string{
					"Organization": to.StringPtr("Administration"),
				},
			},
			Identity: &armautomanage.AccountIdentity{
				Type: armautomanage.ResourceIdentityTypeSystemAssigned.ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Account.ID: %s\n", *res.ID)
}
Output:

type AccountsCreateOrUpdateOptions

type AccountsCreateOrUpdateOptions struct {
}

AccountsCreateOrUpdateOptions contains the optional parameters for the Accounts.CreateOrUpdate method.

type AccountsCreateOrUpdateResponse

type AccountsCreateOrUpdateResponse struct {
	AccountsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsCreateOrUpdateResponse contains the response from method Accounts.CreateOrUpdate.

type AccountsCreateOrUpdateResult

type AccountsCreateOrUpdateResult struct {
	Account
}

AccountsCreateOrUpdateResult contains the result from method Accounts.CreateOrUpdate.

type AccountsDeleteOptions

type AccountsDeleteOptions struct {
}

AccountsDeleteOptions contains the optional parameters for the Accounts.Delete method.

type AccountsDeleteResponse

type AccountsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsDeleteResponse contains the response from method Accounts.Delete.

type AccountsGetOptions

type AccountsGetOptions struct {
}

AccountsGetOptions contains the optional parameters for the Accounts.Get method.

type AccountsGetResponse

type AccountsGetResponse struct {
	AccountsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsGetResponse contains the response from method Accounts.Get.

type AccountsGetResult

type AccountsGetResult struct {
	Account
}

AccountsGetResult contains the result from method Accounts.Get.

type AccountsListByResourceGroupOptions

type AccountsListByResourceGroupOptions struct {
}

AccountsListByResourceGroupOptions contains the optional parameters for the Accounts.ListByResourceGroup method.

type AccountsListByResourceGroupResponse

type AccountsListByResourceGroupResponse struct {
	AccountsListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsListByResourceGroupResponse contains the response from method Accounts.ListByResourceGroup.

type AccountsListByResourceGroupResult

type AccountsListByResourceGroupResult struct {
	AccountList
}

AccountsListByResourceGroupResult contains the result from method Accounts.ListByResourceGroup.

type AccountsListBySubscriptionOptions

type AccountsListBySubscriptionOptions struct {
}

AccountsListBySubscriptionOptions contains the optional parameters for the Accounts.ListBySubscription method.

type AccountsListBySubscriptionResponse

type AccountsListBySubscriptionResponse struct {
	AccountsListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsListBySubscriptionResponse contains the response from method Accounts.ListBySubscription.

type AccountsListBySubscriptionResult

type AccountsListBySubscriptionResult struct {
	AccountList
}

AccountsListBySubscriptionResult contains the result from method Accounts.ListBySubscription.

type AccountsUpdateOptions

type AccountsUpdateOptions struct {
}

AccountsUpdateOptions contains the optional parameters for the Accounts.Update method.

type AccountsUpdateResponse

type AccountsUpdateResponse struct {
	AccountsUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AccountsUpdateResponse contains the response from method Accounts.Update.

type AccountsUpdateResult

type AccountsUpdateResult struct {
	Account
}

AccountsUpdateResult contains the result from method Accounts.Update.

type ConfigurationProfile

type ConfigurationProfile string

ConfigurationProfile - A value indicating configuration profile.

const (
	ConfigurationProfileAzureVirtualMachineBestPracticesDevTest    ConfigurationProfile = "Azure virtual machine best practices – Dev/Test"
	ConfigurationProfileAzureVirtualMachineBestPracticesProduction ConfigurationProfile = "Azure virtual machine best practices – Production"
)

func PossibleConfigurationProfileValues

func PossibleConfigurationProfileValues() []ConfigurationProfile

PossibleConfigurationProfileValues returns the possible values for the ConfigurationProfile const type.

func (ConfigurationProfile) ToPtr

ToPtr returns a *ConfigurationProfile pointing to the current value.

type ConfigurationProfileAssignment

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

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

func (ConfigurationProfileAssignment) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignment.

type ConfigurationProfileAssignmentCompliance

type ConfigurationProfileAssignmentCompliance struct {
	// READ-ONLY; The state of compliance, which only appears in the response.
	UpdateStatus *UpdateStatus `json:"updateStatus,omitempty" azure:"ro"`
}

ConfigurationProfileAssignmentCompliance - The compliance status for the configuration profile assignment.

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.

func (ConfigurationProfileAssignmentList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignmentList.

type ConfigurationProfileAssignmentProperties

type ConfigurationProfileAssignmentProperties struct {
	// The Automanage account ARM Resource URI
	AccountID *string `json:"accountId,omitempty"`

	// The configuration setting for the configuration profile.
	Compliance *ConfigurationProfileAssignmentCompliance `json:"compliance,omitempty"`

	// A value indicating configuration profile.
	ConfigurationProfile *ConfigurationProfile `json:"configurationProfile,omitempty"`

	// The configuration profile custom preferences ARM resource URI
	ConfigurationProfilePreferenceID *string `json:"configurationProfilePreferenceId,omitempty"`

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

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

ConfigurationProfileAssignmentProperties - Automanage configuration profile assignment properties.

type ConfigurationProfileAssignmentsBeginCreateOrUpdateOptions

type ConfigurationProfileAssignmentsBeginCreateOrUpdateOptions struct {
}

ConfigurationProfileAssignmentsBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignments.BeginCreateOrUpdate method.

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

NewConfigurationProfileAssignmentsClient creates a new instance of ConfigurationProfileAssignmentsClient with the specified values.

func (*ConfigurationProfileAssignmentsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates an association between a VM and Automanage configuration profile If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/createOrUpdateConfigurationProfileAssignment.json

package main

import (
	"context"
	"log"

	"time"

	"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 := armautomanage.NewConfigurationProfileAssignmentsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<configuration-profile-assignment-name>",
		"<resource-group-name>",
		"<vm-name>",
		armautomanage.ConfigurationProfileAssignment{
			Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
				AccountID:                        to.StringPtr("<account-id>"),
				ConfigurationProfile:             armautomanage.ConfigurationProfileAzureVirtualMachineBestPracticesProduction.ToPtr(),
				ConfigurationProfilePreferenceID: to.StringPtr("<configuration-profile-preference-id>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ConfigurationProfileAssignment.ID: %s\n", *res.ID)
}
Output:

func (*ConfigurationProfileAssignmentsClient) Delete

func (client *ConfigurationProfileAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ConfigurationProfileAssignmentsDeleteOptions) (ConfigurationProfileAssignmentsDeleteResponse, error)

Delete - Delete a configuration profile assignment If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-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 := armautomanage.NewConfigurationProfileAssignmentsClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<configuration-profile-assignment-name>",
		"<vm-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) Get

func (client *ConfigurationProfileAssignmentsClient) Get(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ConfigurationProfileAssignmentsGetOptions) (ConfigurationProfileAssignmentsGetResponse, error)

Get - Get information about a configuration profile assignment If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-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 := armautomanage.NewConfigurationProfileAssignmentsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<configuration-profile-assignment-name>",
		"<vm-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ConfigurationProfileAssignment.ID: %s\n", *res.ID)
}
Output:

func (*ConfigurationProfileAssignmentsClient) List

List - Get list of configuration profile assignments If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/listConfigurationProfileAssignments.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 := armautomanage.NewConfigurationProfileAssignmentsClient("<subscription-id>", cred, nil)
	_, err = client.List(ctx,
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ConfigurationProfileAssignmentsClient) ListBySubscription

ListBySubscription - Get list of configuration profile assignments under a given subscription If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-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 := armautomanage.NewConfigurationProfileAssignmentsClient("<subscription-id>", cred, nil)
	_, err = client.ListBySubscription(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type ConfigurationProfileAssignmentsCreateOrUpdatePoller

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

ConfigurationProfileAssignmentsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*ConfigurationProfileAssignmentsCreateOrUpdatePoller) Done

Done returns true if the LRO has reached a terminal state.

func (*ConfigurationProfileAssignmentsCreateOrUpdatePoller) FinalResponse

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ConfigurationProfileAssignmentsCreateOrUpdateResponse will be returned.

func (*ConfigurationProfileAssignmentsCreateOrUpdatePoller) Poll

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ConfigurationProfileAssignmentsCreateOrUpdatePoller) ResumeToken

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse

type ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ConfigurationProfileAssignmentsCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse contains the response from method ConfigurationProfileAssignments.CreateOrUpdate.

func (ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse) PollUntilDone

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse) Resume

Resume rehydrates a ConfigurationProfileAssignmentsCreateOrUpdatePollerResponse from the provided client and resume token.

type ConfigurationProfileAssignmentsCreateOrUpdateResponse

type ConfigurationProfileAssignmentsCreateOrUpdateResponse struct {
	ConfigurationProfileAssignmentsCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsCreateOrUpdateResponse contains the response from method ConfigurationProfileAssignments.CreateOrUpdate.

type ConfigurationProfileAssignmentsCreateOrUpdateResult

type ConfigurationProfileAssignmentsCreateOrUpdateResult struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileAssignmentsCreateOrUpdateResult contains the result from method ConfigurationProfileAssignments.CreateOrUpdate.

type ConfigurationProfileAssignmentsDeleteOptions

type ConfigurationProfileAssignmentsDeleteOptions struct {
}

ConfigurationProfileAssignmentsDeleteOptions contains the optional parameters for the ConfigurationProfileAssignments.Delete method.

type ConfigurationProfileAssignmentsDeleteResponse

type ConfigurationProfileAssignmentsDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsDeleteResponse contains the response from method ConfigurationProfileAssignments.Delete.

type ConfigurationProfileAssignmentsGetOptions

type ConfigurationProfileAssignmentsGetOptions struct {
}

ConfigurationProfileAssignmentsGetOptions contains the optional parameters for the ConfigurationProfileAssignments.Get method.

type ConfigurationProfileAssignmentsGetResponse

type ConfigurationProfileAssignmentsGetResponse struct {
	ConfigurationProfileAssignmentsGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsGetResponse contains the response from method ConfigurationProfileAssignments.Get.

type ConfigurationProfileAssignmentsGetResult

type ConfigurationProfileAssignmentsGetResult struct {
	ConfigurationProfileAssignment
}

ConfigurationProfileAssignmentsGetResult contains the result from method ConfigurationProfileAssignments.Get.

type ConfigurationProfileAssignmentsListBySubscriptionOptions

type ConfigurationProfileAssignmentsListBySubscriptionOptions struct {
}

ConfigurationProfileAssignmentsListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignments.ListBySubscription method.

type ConfigurationProfileAssignmentsListBySubscriptionResponse

type ConfigurationProfileAssignmentsListBySubscriptionResponse struct {
	ConfigurationProfileAssignmentsListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsListBySubscriptionResponse contains the response from method ConfigurationProfileAssignments.ListBySubscription.

type ConfigurationProfileAssignmentsListBySubscriptionResult

type ConfigurationProfileAssignmentsListBySubscriptionResult struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsListBySubscriptionResult contains the result from method ConfigurationProfileAssignments.ListBySubscription.

type ConfigurationProfileAssignmentsListOptions

type ConfigurationProfileAssignmentsListOptions struct {
}

ConfigurationProfileAssignmentsListOptions contains the optional parameters for the ConfigurationProfileAssignments.List method.

type ConfigurationProfileAssignmentsListResponse

type ConfigurationProfileAssignmentsListResponse struct {
	ConfigurationProfileAssignmentsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfileAssignmentsListResponse contains the response from method ConfigurationProfileAssignments.List.

type ConfigurationProfileAssignmentsListResult

type ConfigurationProfileAssignmentsListResult struct {
	ConfigurationProfileAssignmentList
}

ConfigurationProfileAssignmentsListResult contains the result from method ConfigurationProfileAssignments.List.

type ConfigurationProfilePreference

type ConfigurationProfilePreference struct {
	TrackedResource
	// Properties of the configuration profile preference.
	Properties *ConfigurationProfilePreferenceProperties `json:"properties,omitempty"`
}

ConfigurationProfilePreference - Definition of the configuration profile preference.

func (ConfigurationProfilePreference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfilePreference.

type ConfigurationProfilePreferenceAntiMalware

type ConfigurationProfilePreferenceAntiMalware struct {
	// Enables or disables Real Time Protection
	EnableRealTimeProtection *EnableRealTimeProtection `json:"enableRealTimeProtection,omitempty"`

	// Extensions, Paths and Processes that must be excluded from scan
	Exclusions map[string]interface{} `json:"exclusions,omitempty"`

	// Enables or disables a periodic scan for antimalware
	RunScheduledScan *RunScheduledScan `json:"runScheduledScan,omitempty"`

	// Schedule scan settings day
	ScanDay *string `json:"scanDay,omitempty"`

	// Schedule scan settings time
	ScanTimeInMinutes *string `json:"scanTimeInMinutes,omitempty"`

	// Type of scheduled scan
	ScanType *ScanType `json:"scanType,omitempty"`
}

ConfigurationProfilePreferenceAntiMalware - Automanage configuration profile Antimalware preferences.

type ConfigurationProfilePreferenceList

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

ConfigurationProfilePreferenceList - The response of the list ConfigurationProfilePreference operation.

func (ConfigurationProfilePreferenceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfilePreferenceList.

type ConfigurationProfilePreferenceProperties

type ConfigurationProfilePreferenceProperties struct {
	// The custom preferences for Azure Antimalware.
	AntiMalware *ConfigurationProfilePreferenceAntiMalware `json:"antiMalware,omitempty"`

	// The custom preferences for Azure VM Backup.
	VMBackup *ConfigurationProfilePreferenceVMBackup `json:"vmBackup,omitempty"`
}

ConfigurationProfilePreferenceProperties - Automanage configuration profile preference properties.

type ConfigurationProfilePreferenceUpdate

type ConfigurationProfilePreferenceUpdate struct {
	UpdateResource
	// Properties of the configuration profile preference.
	Properties *ConfigurationProfilePreferenceProperties `json:"properties,omitempty"`
}

ConfigurationProfilePreferenceUpdate - Definition of the configuration profile preference.

func (ConfigurationProfilePreferenceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationProfilePreferenceUpdate.

type ConfigurationProfilePreferenceVMBackup

type ConfigurationProfilePreferenceVMBackup struct {
	// Instant RP retention policy range in days
	InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`

	// Retention policy with the details on backup copy retention ranges.
	RetentionPolicy *string `json:"retentionPolicy,omitempty"`

	// Backup schedule specified as part of backup policy.
	SchedulePolicy *string `json:"schedulePolicy,omitempty"`

	// TimeZone optional input as string. For example: Pacific Standard Time
	TimeZone *string `json:"timeZone,omitempty"`
}

ConfigurationProfilePreferenceVMBackup - Automanage configuration profile VM Backup preferences.

type ConfigurationProfilePreferencesClient

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

ConfigurationProfilePreferencesClient contains the methods for the ConfigurationProfilePreferences group. Don't use this type directly, use NewConfigurationProfilePreferencesClient() instead.

func NewConfigurationProfilePreferencesClient

func NewConfigurationProfilePreferencesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ConfigurationProfilePreferencesClient

NewConfigurationProfilePreferencesClient creates a new instance of ConfigurationProfilePreferencesClient with the specified values.

func (*ConfigurationProfilePreferencesClient) CreateOrUpdate

CreateOrUpdate - Creates a configuration profile preference If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/createOrUpdateConfigurationProfilePreference.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<configuration-profile-preference-name>",
		"<resource-group-name>",
		armautomanage.ConfigurationProfilePreference{
			TrackedResource: armautomanage.TrackedResource{
				Location: to.StringPtr("<location>"),
				Tags: map[string]*string{
					"Organization": to.StringPtr("Administration"),
				},
			},
			Properties: &armautomanage.ConfigurationProfilePreferenceProperties{
				AntiMalware: &armautomanage.ConfigurationProfilePreferenceAntiMalware{
					EnableRealTimeProtection: armautomanage.EnableRealTimeProtectionTrue.ToPtr(),
				},
				VMBackup: &armautomanage.ConfigurationProfilePreferenceVMBackup{
					TimeZone: to.StringPtr("<time-zone>"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ConfigurationProfilePreference.ID: %s\n", *res.ID)
}
Output:

func (*ConfigurationProfilePreferencesClient) Delete

Delete - Delete a configuration profile preference If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/deleteConfigurationProfilePreference.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<configuration-profile-preference-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ConfigurationProfilePreferencesClient) Get

func (client *ConfigurationProfilePreferencesClient) Get(ctx context.Context, configurationProfilePreferenceName string, resourceGroupName string, options *ConfigurationProfilePreferencesGetOptions) (ConfigurationProfilePreferencesGetResponse, error)

Get - Get information about a configuration profile preference If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/getConfigurationProfilePreference.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<configuration-profile-preference-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ConfigurationProfilePreference.ID: %s\n", *res.ID)
}
Output:

func (*ConfigurationProfilePreferencesClient) ListByResourceGroup

ListByResourceGroup - Retrieve a list of configuration profile preferences within a given resource group If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/listConfigurationProfilePreferencesByResourceGroup.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	_, err = client.ListByResourceGroup(ctx,
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ConfigurationProfilePreferencesClient) ListBySubscription

ListBySubscription - Retrieve a list of configuration profile preferences within a subscription If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/listConfigurationProfilePreferencesBySubscription.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	_, err = client.ListBySubscription(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ConfigurationProfilePreferencesClient) Update

Update - Updates a configuration profile preference If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-30-preview/examples/updateConfigurationProfilePreference.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 := armautomanage.NewConfigurationProfilePreferencesClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<configuration-profile-preference-name>",
		"<resource-group-name>",
		armautomanage.ConfigurationProfilePreferenceUpdate{
			UpdateResource: armautomanage.UpdateResource{
				Tags: map[string]*string{
					"Organization": to.StringPtr("Administration"),
				},
			},
			Properties: &armautomanage.ConfigurationProfilePreferenceProperties{
				AntiMalware: &armautomanage.ConfigurationProfilePreferenceAntiMalware{
					EnableRealTimeProtection: armautomanage.EnableRealTimeProtectionTrue.ToPtr(),
				},
				VMBackup: &armautomanage.ConfigurationProfilePreferenceVMBackup{
					TimeZone: to.StringPtr("<time-zone>"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("ConfigurationProfilePreference.ID: %s\n", *res.ID)
}
Output:

type ConfigurationProfilePreferencesCreateOrUpdateOptions

type ConfigurationProfilePreferencesCreateOrUpdateOptions struct {
}

ConfigurationProfilePreferencesCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilePreferences.CreateOrUpdate method.

type ConfigurationProfilePreferencesCreateOrUpdateResponse

type ConfigurationProfilePreferencesCreateOrUpdateResponse struct {
	ConfigurationProfilePreferencesCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesCreateOrUpdateResponse contains the response from method ConfigurationProfilePreferences.CreateOrUpdate.

type ConfigurationProfilePreferencesCreateOrUpdateResult

type ConfigurationProfilePreferencesCreateOrUpdateResult struct {
	ConfigurationProfilePreference
}

ConfigurationProfilePreferencesCreateOrUpdateResult contains the result from method ConfigurationProfilePreferences.CreateOrUpdate.

type ConfigurationProfilePreferencesDeleteOptions

type ConfigurationProfilePreferencesDeleteOptions struct {
}

ConfigurationProfilePreferencesDeleteOptions contains the optional parameters for the ConfigurationProfilePreferences.Delete method.

type ConfigurationProfilePreferencesDeleteResponse

type ConfigurationProfilePreferencesDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesDeleteResponse contains the response from method ConfigurationProfilePreferences.Delete.

type ConfigurationProfilePreferencesGetOptions

type ConfigurationProfilePreferencesGetOptions struct {
}

ConfigurationProfilePreferencesGetOptions contains the optional parameters for the ConfigurationProfilePreferences.Get method.

type ConfigurationProfilePreferencesGetResponse

type ConfigurationProfilePreferencesGetResponse struct {
	ConfigurationProfilePreferencesGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesGetResponse contains the response from method ConfigurationProfilePreferences.Get.

type ConfigurationProfilePreferencesGetResult

type ConfigurationProfilePreferencesGetResult struct {
	ConfigurationProfilePreference
}

ConfigurationProfilePreferencesGetResult contains the result from method ConfigurationProfilePreferences.Get.

type ConfigurationProfilePreferencesListByResourceGroupOptions

type ConfigurationProfilePreferencesListByResourceGroupOptions struct {
}

ConfigurationProfilePreferencesListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilePreferences.ListByResourceGroup method.

type ConfigurationProfilePreferencesListByResourceGroupResponse

type ConfigurationProfilePreferencesListByResourceGroupResponse struct {
	ConfigurationProfilePreferencesListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesListByResourceGroupResponse contains the response from method ConfigurationProfilePreferences.ListByResourceGroup.

type ConfigurationProfilePreferencesListByResourceGroupResult

type ConfigurationProfilePreferencesListByResourceGroupResult struct {
	ConfigurationProfilePreferenceList
}

ConfigurationProfilePreferencesListByResourceGroupResult contains the result from method ConfigurationProfilePreferences.ListByResourceGroup.

type ConfigurationProfilePreferencesListBySubscriptionOptions

type ConfigurationProfilePreferencesListBySubscriptionOptions struct {
}

ConfigurationProfilePreferencesListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilePreferences.ListBySubscription method.

type ConfigurationProfilePreferencesListBySubscriptionResponse

type ConfigurationProfilePreferencesListBySubscriptionResponse struct {
	ConfigurationProfilePreferencesListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesListBySubscriptionResponse contains the response from method ConfigurationProfilePreferences.ListBySubscription.

type ConfigurationProfilePreferencesListBySubscriptionResult

type ConfigurationProfilePreferencesListBySubscriptionResult struct {
	ConfigurationProfilePreferenceList
}

ConfigurationProfilePreferencesListBySubscriptionResult contains the result from method ConfigurationProfilePreferences.ListBySubscription.

type ConfigurationProfilePreferencesUpdateOptions

type ConfigurationProfilePreferencesUpdateOptions struct {
}

ConfigurationProfilePreferencesUpdateOptions contains the optional parameters for the ConfigurationProfilePreferences.Update method.

type ConfigurationProfilePreferencesUpdateResponse

type ConfigurationProfilePreferencesUpdateResponse struct {
	ConfigurationProfilePreferencesUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ConfigurationProfilePreferencesUpdateResponse contains the response from method ConfigurationProfilePreferences.Update.

type ConfigurationProfilePreferencesUpdateResult

type ConfigurationProfilePreferencesUpdateResult struct {
	ConfigurationProfilePreference
}

ConfigurationProfilePreferencesUpdateResult contains the result from method ConfigurationProfilePreferences.Update.

type EnableRealTimeProtection

type EnableRealTimeProtection string

EnableRealTimeProtection - Enables or disables Real Time Protection

const (
	EnableRealTimeProtectionFalse EnableRealTimeProtection = "False"
	EnableRealTimeProtectionTrue  EnableRealTimeProtection = "True"
)

func PossibleEnableRealTimeProtectionValues

func PossibleEnableRealTimeProtectionValues() []EnableRealTimeProtection

PossibleEnableRealTimeProtectionValues returns the possible values for the EnableRealTimeProtection const type.

func (EnableRealTimeProtection) ToPtr

ToPtr returns a *EnableRealTimeProtection pointing to the current value.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info map[string]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.
	InnerError *ErrorDetail `json:"error,omitempty"`
	// contains filtered or unexported fields
}

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.). Implements the error and azcore.HTTPResponse interfaces.

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

Error implements the error interface for type ErrorResponse. The contents of the error text are not contractual and subject to change.

type Operation

type Operation struct {
	// Provider, Resource, Operation and description values.
	Display *OperationDisplay `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *string `json:"isDataAction,omitempty"`

	// Operation name: For ex. providers/Microsoft.Automanage/configurationProfileAssignments/write or read
	Name *string `json:"name,omitempty"`

	// Provider, Resource, Operation and description values.
	Properties *OperationProperties `json:"properties,omitempty"`
}

Operation - Automanage REST API operation

type OperationDisplay

type OperationDisplay struct {
	// Description about operation.
	Description *string `json:"description,omitempty"`

	// Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`

	// Service provider: Microsoft.Automanage
	Provider *string `json:"provider,omitempty"`

	// Resource on which the operation is performed: For ex.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - Provider, Resource, Operation and description values.

type OperationList

type OperationList struct {
	// List of Automanage operations supported by the Automanage resource provider.
	Value []*Operation `json:"value,omitempty"`
}

OperationList - The response model for the list of Automanage operations

func (OperationList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationList.

type OperationProperties

type OperationProperties struct {
	// Service provider: Microsoft.Automanage
	StatusCode *string `json:"statusCode,omitempty"`
}

OperationProperties - Provider, Resource, Operation and description values.

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

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

func (*OperationsClient) List

List - Lists all of the available Automanage REST API operations. If the operation fails it returns the *ErrorResponse error type.

Example

x-ms-original-file: specification/automanage/resource-manager/Microsoft.Automanage/preview/2020-06-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 := armautomanage.NewOperationsClient(cred, nil)
	_, err = client.List(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type OperationsListOptions

type OperationsListOptions struct {
}

OperationsListOptions contains the optional parameters for the Operations.List method.

type OperationsListResponse

type OperationsListResponse struct {
	OperationsListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationsListResponse contains the response from method Operations.List.

type OperationsListResult

type OperationsListResult struct {
	OperationList
}

OperationsListResult contains the result from method Operations.List.

type ProvisioningState

type ProvisioningState string

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

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

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

func (ProvisioningState) ToPtr

ToPtr returns a *ProvisioningState pointing to the current value.

type ProxyResource

type ProxyResource struct {
	Resource
}

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

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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of identity used for the Automanage account. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity.

const (
	ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
	ResourceIdentityTypeNone           ResourceIdentityType = "None"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

func (ResourceIdentityType) ToPtr

ToPtr returns a *ResourceIdentityType pointing to the current value.

type RunScheduledScan

type RunScheduledScan string

RunScheduledScan - Enables or disables a periodic scan for antimalware

const (
	RunScheduledScanFalse RunScheduledScan = "False"
	RunScheduledScanTrue  RunScheduledScan = "True"
)

func PossibleRunScheduledScanValues

func PossibleRunScheduledScanValues() []RunScheduledScan

PossibleRunScheduledScanValues returns the possible values for the RunScheduledScan const type.

func (RunScheduledScan) ToPtr

ToPtr returns a *RunScheduledScan pointing to the current value.

type ScanType

type ScanType string

ScanType - Type of scheduled scan

const (
	ScanTypeFull  ScanType = "Full"
	ScanTypeQuick ScanType = "Quick"
)

func PossibleScanTypeValues

func PossibleScanTypeValues() []ScanType

PossibleScanTypeValues returns the possible values for the ScanType const type.

func (ScanType) ToPtr

func (c ScanType) ToPtr() *ScanType

ToPtr returns a *ScanType pointing to the current value.

type TrackedResource

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

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

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.

type UpdateStatus

type UpdateStatus string

UpdateStatus - The state of compliance, which only appears in the response.

const (
	UpdateStatusCreated   UpdateStatus = "Created"
	UpdateStatusFailed    UpdateStatus = "Failed"
	UpdateStatusSucceeded UpdateStatus = "Succeeded"
)

func PossibleUpdateStatusValues

func PossibleUpdateStatusValues() []UpdateStatus

PossibleUpdateStatusValues returns the possible values for the UpdateStatus const type.

func (UpdateStatus) ToPtr

func (c UpdateStatus) ToPtr() *UpdateStatus

ToPtr returns a *UpdateStatus pointing to the current value.

Jump to

Keyboard shortcuts

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