module

package
v0.20231213.1191308 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module Documentation

The module SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2023-11-01).

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

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module"

Client Initialization

client := module.NewModuleClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ModuleClient.CreateOrUpdate

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

payload := module.ModuleCreateOrUpdateParameters{
	// ...
}


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: ModuleClient.Delete

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

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: ModuleClient.Get

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

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: ModuleClient.ListByAutomationAccount

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

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

Example Usage: ModuleClient.PowerShell72ModuleCreateOrUpdate

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

payload := module.ModuleCreateOrUpdateParameters{
	// ...
}


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

Example Usage: ModuleClient.PowerShell72ModuleDelete

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

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

Example Usage: ModuleClient.PowerShell72ModuleGet

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

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

Example Usage: ModuleClient.PowerShell72ModuleListByAutomationAccount

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

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

Example Usage: ModuleClient.PowerShell72ModuleUpdate

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

payload := module.ModuleUpdateParameters{
	// ...
}


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

Example Usage: ModuleClient.Update

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

payload := module.ModuleUpdateParameters{
	// ...
}


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 PossibleValuesForModuleProvisioningState

func PossibleValuesForModuleProvisioningState() []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

func ValidateModuleID

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

ValidateModuleID checks that 'input' can be parsed as a Module ID

func ValidatePowerShell72ModuleID

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

ValidatePowerShell72ModuleID checks that 'input' can be parsed as a Power Shell 7 2 Module ID

Types

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 added in v0.20231127.1171502

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 ContentHash

type ContentHash struct {
	Algorithm string `json:"algorithm"`
	Value     string `json:"value"`
}
type ContentLink struct {
	ContentHash *ContentHash `json:"contentHash,omitempty"`
	Uri         *string      `json:"uri,omitempty"`
	Version     *string      `json:"version,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	Items []Module
}

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Module
}

type Module

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

type ModuleClient

type ModuleClient struct {
	Client *resourcemanager.Client
}

func NewModuleClientWithBaseURI

func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error)

func (ModuleClient) CreateOrUpdate

CreateOrUpdate ...

func (ModuleClient) Delete

func (c ModuleClient) Delete(ctx context.Context, id ModuleId) (result DeleteOperationResponse, err error)

Delete ...

func (ModuleClient) Get

func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperationResponse, err error)

Get ...

func (ModuleClient) ListByAutomationAccount

func (c ModuleClient) ListByAutomationAccount(ctx context.Context, id AutomationAccountId) (result ListByAutomationAccountOperationResponse, err error)

ListByAutomationAccount ...

func (ModuleClient) ListByAutomationAccountComplete

func (c ModuleClient) ListByAutomationAccountComplete(ctx context.Context, id AutomationAccountId) (ListByAutomationAccountCompleteResult, error)

ListByAutomationAccountComplete retrieves all the results into a single object

func (ModuleClient) ListByAutomationAccountCompleteMatchingPredicate

func (c ModuleClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, predicate ModuleOperationPredicate) (result ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ModuleClient) PowerShell72ModuleCreateOrUpdate

PowerShell72ModuleCreateOrUpdate ...

func (ModuleClient) PowerShell72ModuleDelete

func (c ModuleClient) PowerShell72ModuleDelete(ctx context.Context, id PowerShell72ModuleId) (result PowerShell72ModuleDeleteOperationResponse, err error)

PowerShell72ModuleDelete ...

func (ModuleClient) PowerShell72ModuleGet

func (c ModuleClient) PowerShell72ModuleGet(ctx context.Context, id PowerShell72ModuleId) (result PowerShell72ModuleGetOperationResponse, err error)

PowerShell72ModuleGet ...

func (ModuleClient) PowerShell72ModuleListByAutomationAccount

func (c ModuleClient) PowerShell72ModuleListByAutomationAccount(ctx context.Context, id AutomationAccountId) (result PowerShell72ModuleListByAutomationAccountOperationResponse, err error)

PowerShell72ModuleListByAutomationAccount ...

func (ModuleClient) PowerShell72ModuleListByAutomationAccountComplete

func (c ModuleClient) PowerShell72ModuleListByAutomationAccountComplete(ctx context.Context, id AutomationAccountId) (PowerShell72ModuleListByAutomationAccountCompleteResult, error)

PowerShell72ModuleListByAutomationAccountComplete retrieves all the results into a single object

func (ModuleClient) PowerShell72ModuleListByAutomationAccountCompleteMatchingPredicate

func (c ModuleClient) PowerShell72ModuleListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, predicate ModuleOperationPredicate) (result PowerShell72ModuleListByAutomationAccountCompleteResult, err error)

PowerShell72ModuleListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ModuleClient) PowerShell72ModuleUpdate

PowerShell72ModuleUpdate ...

func (ModuleClient) Update

Update ...

type ModuleCreateOrUpdateParameters

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

type ModuleCreateOrUpdateProperties

type ModuleCreateOrUpdateProperties struct {
	ContentLink ContentLink `json:"contentLink"`
}

type ModuleErrorInfo

type ModuleErrorInfo struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type ModuleId

type ModuleId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	ModuleName            string
}

ModuleId is a struct representing the Resource ID for a Module

func NewModuleID

func NewModuleID(subscriptionId string, resourceGroupName string, automationAccountName string, moduleName string) ModuleId

NewModuleID returns a new ModuleId struct

func ParseModuleID

func ParseModuleID(input string) (*ModuleId, error)

ParseModuleID parses 'input' into a ModuleId

func ParseModuleIDInsensitively

func ParseModuleIDInsensitively(input string) (*ModuleId, error)

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

func (*ModuleId) FromParseResult added in v0.20231127.1171502

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

func (ModuleId) ID

func (id ModuleId) ID() string

ID returns the formatted Module ID

func (ModuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Module ID

func (ModuleId) String

func (id ModuleId) String() string

String returns a human-readable description of this Module ID

type ModuleOperationPredicate

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

func (ModuleOperationPredicate) Matches

func (p ModuleOperationPredicate) Matches(input Module) bool

type ModuleProperties

type ModuleProperties struct {
	ActivityCount     *int64                   `json:"activityCount,omitempty"`
	ContentLink       *ContentLink             `json:"contentLink,omitempty"`
	CreationTime      *string                  `json:"creationTime,omitempty"`
	Description       *string                  `json:"description,omitempty"`
	Error             *ModuleErrorInfo         `json:"error,omitempty"`
	IsComposite       *bool                    `json:"isComposite,omitempty"`
	IsGlobal          *bool                    `json:"isGlobal,omitempty"`
	LastModifiedTime  *string                  `json:"lastModifiedTime,omitempty"`
	ProvisioningState *ModuleProvisioningState `json:"provisioningState,omitempty"`
	SizeInBytes       *int64                   `json:"sizeInBytes,omitempty"`
	Version           *string                  `json:"version,omitempty"`
}

func (*ModuleProperties) GetCreationTimeAsTime

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

func (*ModuleProperties) GetLastModifiedTimeAsTime

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

func (*ModuleProperties) SetCreationTimeAsTime

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

func (*ModuleProperties) SetLastModifiedTimeAsTime

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

type ModuleProvisioningState

type ModuleProvisioningState string
const (
	ModuleProvisioningStateActivitiesStored            ModuleProvisioningState = "ActivitiesStored"
	ModuleProvisioningStateCanceled                    ModuleProvisioningState = "Canceled"
	ModuleProvisioningStateConnectionTypeImported      ModuleProvisioningState = "ConnectionTypeImported"
	ModuleProvisioningStateContentDownloaded           ModuleProvisioningState = "ContentDownloaded"
	ModuleProvisioningStateContentRetrieved            ModuleProvisioningState = "ContentRetrieved"
	ModuleProvisioningStateContentStored               ModuleProvisioningState = "ContentStored"
	ModuleProvisioningStateContentValidated            ModuleProvisioningState = "ContentValidated"
	ModuleProvisioningStateCreated                     ModuleProvisioningState = "Created"
	ModuleProvisioningStateCreating                    ModuleProvisioningState = "Creating"
	ModuleProvisioningStateFailed                      ModuleProvisioningState = "Failed"
	ModuleProvisioningStateModuleDataStored            ModuleProvisioningState = "ModuleDataStored"
	ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete"
	ModuleProvisioningStateRunningImportModuleRunbook  ModuleProvisioningState = "RunningImportModuleRunbook"
	ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook"
	ModuleProvisioningStateSucceeded                   ModuleProvisioningState = "Succeeded"
	ModuleProvisioningStateUpdating                    ModuleProvisioningState = "Updating"
)

func (*ModuleProvisioningState) UnmarshalJSON

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

type ModuleUpdateParameters

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

type ModuleUpdateProperties

type ModuleUpdateProperties struct {
	ContentLink *ContentLink `json:"contentLink,omitempty"`
}

type PowerShell72ModuleCreateOrUpdateOperationResponse

type PowerShell72ModuleCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Module
}

type PowerShell72ModuleDeleteOperationResponse

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

type PowerShell72ModuleGetOperationResponse

type PowerShell72ModuleGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Module
}

type PowerShell72ModuleId

type PowerShell72ModuleId struct {
	SubscriptionId         string
	ResourceGroupName      string
	AutomationAccountName  string
	PowerShell72ModuleName string
}

PowerShell72ModuleId is a struct representing the Resource ID for a Power Shell 7 2 Module

func NewPowerShell72ModuleID

func NewPowerShell72ModuleID(subscriptionId string, resourceGroupName string, automationAccountName string, powerShell72ModuleName string) PowerShell72ModuleId

NewPowerShell72ModuleID returns a new PowerShell72ModuleId struct

func ParsePowerShell72ModuleID

func ParsePowerShell72ModuleID(input string) (*PowerShell72ModuleId, error)

ParsePowerShell72ModuleID parses 'input' into a PowerShell72ModuleId

func ParsePowerShell72ModuleIDInsensitively

func ParsePowerShell72ModuleIDInsensitively(input string) (*PowerShell72ModuleId, error)

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

func (*PowerShell72ModuleId) FromParseResult added in v0.20231127.1171502

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

func (PowerShell72ModuleId) ID

func (id PowerShell72ModuleId) ID() string

ID returns the formatted Power Shell 7 2 Module ID

func (PowerShell72ModuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Power Shell 7 2 Module ID

func (PowerShell72ModuleId) String

func (id PowerShell72ModuleId) String() string

String returns a human-readable description of this Power Shell 7 2 Module ID

type PowerShell72ModuleListByAutomationAccountCompleteResult

type PowerShell72ModuleListByAutomationAccountCompleteResult struct {
	Items []Module
}

type PowerShell72ModuleListByAutomationAccountOperationResponse

type PowerShell72ModuleListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Module
}

type PowerShell72ModuleUpdateOperationResponse

type PowerShell72ModuleUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Module
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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