automationaccount

package
v0.20240320.1000025 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/automationaccount Documentation

The automationaccount SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2015-10-31).

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

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/automationaccount"

Client Initialization

client := automationaccount.NewAutomationAccountClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AutomationAccountClient.CreateOrUpdate

ctx := context.TODO()
id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

payload := automationaccount.AutomationAccountCreateOrUpdateParameters{
	// ...
}


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

Example Usage: AutomationAccountClient.Delete

ctx := context.TODO()
id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: AutomationAccountClient.Get

ctx := context.TODO()
id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: AutomationAccountClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AutomationAccountClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

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

Example Usage: AutomationAccountClient.Update

ctx := context.TODO()
id := automationaccount.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

payload := automationaccount.AutomationAccountUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAutomationAccountState

func PossibleValuesForAutomationAccountState() []string

func PossibleValuesForSkuNameEnum

func PossibleValuesForSkuNameEnum() []string

func ValidateAutomationAccountID

func ValidateAutomationAccountID(input interface{}, key string) (warnings []string, errors []error)

ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID

Types

type AutomationAccount

type AutomationAccount struct {
	Etag       *string                      `json:"etag,omitempty"`
	Id         *string                      `json:"id,omitempty"`
	Location   *string                      `json:"location,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *AutomationAccountProperties `json:"properties,omitempty"`
	Tags       *map[string]string           `json:"tags,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type AutomationAccountClient

type AutomationAccountClient struct {
	Client *resourcemanager.Client
}

func NewAutomationAccountClientWithBaseURI

func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error)

func (AutomationAccountClient) CreateOrUpdate

CreateOrUpdate ...

func (AutomationAccountClient) Delete

Delete ...

func (AutomationAccountClient) Get

Get ...

func (AutomationAccountClient) List

List ...

func (AutomationAccountClient) ListByResourceGroup

ListByResourceGroup ...

func (AutomationAccountClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (AutomationAccountClient) ListByResourceGroupCompleteMatchingPredicate

func (c AutomationAccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AutomationAccountOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AutomationAccountClient) ListComplete

ListComplete retrieves all the results into a single object

func (AutomationAccountClient) ListCompleteMatchingPredicate

func (c AutomationAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AutomationAccountOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AutomationAccountClient) Update

Update ...

type AutomationAccountCreateOrUpdateParameters

type AutomationAccountCreateOrUpdateParameters struct {
	Location   *string                                    `json:"location,omitempty"`
	Name       *string                                    `json:"name,omitempty"`
	Properties *AutomationAccountCreateOrUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string                         `json:"tags,omitempty"`
}

type AutomationAccountCreateOrUpdateProperties

type AutomationAccountCreateOrUpdateProperties struct {
	Sku *Sku `json:"sku,omitempty"`
}

type AutomationAccountId

type AutomationAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
}

AutomationAccountId is a struct representing the Resource ID for a Automation Account

func NewAutomationAccountID

func NewAutomationAccountID(subscriptionId string, resourceGroupName string, automationAccountName string) AutomationAccountId

NewAutomationAccountID returns a new AutomationAccountId struct

func ParseAutomationAccountID

func ParseAutomationAccountID(input string) (*AutomationAccountId, error)

ParseAutomationAccountID parses 'input' into a AutomationAccountId

func ParseAutomationAccountIDInsensitively

func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, error)

ParseAutomationAccountIDInsensitively parses 'input' case-insensitively into a AutomationAccountId note: this method should only be used for API response data and not user input

func (*AutomationAccountId) FromParseResult

func (id *AutomationAccountId) FromParseResult(input resourceids.ParseResult) error

func (AutomationAccountId) ID

func (id AutomationAccountId) ID() string

ID returns the formatted Automation Account ID

func (AutomationAccountId) Segments

func (id AutomationAccountId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Automation Account ID

func (AutomationAccountId) String

func (id AutomationAccountId) String() string

String returns a human-readable description of this Automation Account ID

type AutomationAccountOperationPredicate

type AutomationAccountOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (AutomationAccountOperationPredicate) Matches

type AutomationAccountProperties

type AutomationAccountProperties struct {
	CreationTime     *string                 `json:"creationTime,omitempty"`
	Description      *string                 `json:"description,omitempty"`
	LastModifiedBy   *string                 `json:"lastModifiedBy,omitempty"`
	LastModifiedTime *string                 `json:"lastModifiedTime,omitempty"`
	Sku              *Sku                    `json:"sku,omitempty"`
	State            *AutomationAccountState `json:"state,omitempty"`
}

func (*AutomationAccountProperties) GetCreationTimeAsTime

func (o *AutomationAccountProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*AutomationAccountProperties) GetLastModifiedTimeAsTime

func (o *AutomationAccountProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*AutomationAccountProperties) SetCreationTimeAsTime

func (o *AutomationAccountProperties) SetCreationTimeAsTime(input time.Time)

func (*AutomationAccountProperties) SetLastModifiedTimeAsTime

func (o *AutomationAccountProperties) SetLastModifiedTimeAsTime(input time.Time)

type AutomationAccountState

type AutomationAccountState string
const (
	AutomationAccountStateOk          AutomationAccountState = "Ok"
	AutomationAccountStateSuspended   AutomationAccountState = "Suspended"
	AutomationAccountStateUnavailable AutomationAccountState = "Unavailable"
)

func (*AutomationAccountState) UnmarshalJSON added in v0.20240209.1164150

func (s *AutomationAccountState) UnmarshalJSON(bytes []byte) error

type AutomationAccountUpdateParameters

type AutomationAccountUpdateParameters struct {
	Location   *string                            `json:"location,omitempty"`
	Name       *string                            `json:"name,omitempty"`
	Properties *AutomationAccountUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string                 `json:"tags,omitempty"`
}

type AutomationAccountUpdateProperties

type AutomationAccountUpdateProperties struct {
	Sku *Sku `json:"sku,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AutomationAccount
}

type DeleteOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AutomationAccount
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AutomationAccount
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AutomationAccount
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AutomationAccount
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AutomationAccount
}

type Sku

type Sku struct {
	Capacity *int64      `json:"capacity,omitempty"`
	Family   *string     `json:"family,omitempty"`
	Name     SkuNameEnum `json:"name"`
}

type SkuNameEnum

type SkuNameEnum string
const (
	SkuNameEnumBasic SkuNameEnum = "Basic"
	SkuNameEnumFree  SkuNameEnum = "Free"
)

func (*SkuNameEnum) UnmarshalJSON added in v0.20240209.1164150

func (s *SkuNameEnum) UnmarshalJSON(bytes []byte) error

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AutomationAccount
}

Jump to

Keyboard shortcuts

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