README
¶
github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/runbookdraft
Documentation
The runbookdraft
SDK allows for interaction with the Azure Resource Manager Service automation
(API Version 2019-06-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/2019-06-01/runbookdraft"
Client Initialization
client := runbookdraft.NewRunbookDraftClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: RunbookDraftClient.Get
ctx := context.TODO()
id := runbookdraft.NewRunbookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "runbookValue")
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: RunbookDraftClient.GetContent
ctx := context.TODO()
id := runbookdraft.NewRunbookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "runbookValue")
read, err := client.GetContent(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: RunbookDraftClient.ReplaceContent
ctx := context.TODO()
id := runbookdraft.NewRunbookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "runbookValue")
var payload interface{}
if err := client.ReplaceContentThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: RunbookDraftClient.UndoEdit
ctx := context.TODO()
id := runbookdraft.NewRunbookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "runbookValue")
read, err := client.UndoEdit(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation
¶
Index ¶
- func ValidateRunbookID(input interface{}, key string) (warnings []string, errors []error)
- type ContentHash
- type ContentLink
- type GetContentOperationResponse
- type GetOperationResponse
- type ReplaceContentOperationResponse
- type RunbookDraft
- type RunbookDraftClient
- func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOperationResponse, err error)
- func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (result GetContentOperationResponse, err error)
- func (c RunbookDraftClient) ReplaceContent(ctx context.Context, id RunbookId, input interface{}) (result ReplaceContentOperationResponse, err error)
- func (c RunbookDraftClient) ReplaceContentThenPoll(ctx context.Context, id RunbookId, input interface{}) error
- func (c RunbookDraftClient) UndoEdit(ctx context.Context, id RunbookId) (result UndoEditOperationResponse, err error)
- type RunbookId
- type RunbookParameter
- type UndoEditOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRunbookID ¶
ValidateRunbookID checks that 'input' can be parsed as a Runbook ID
Types ¶
type ContentHash ¶
type ContentLink ¶
type ContentLink struct { ContentHash *ContentHash `json:"contentHash,omitempty"` Uri *string `json:"uri,omitempty"` Version *string `json:"version,omitempty"` }
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response Model *RunbookDraft }
type ReplaceContentOperationResponse ¶
type ReplaceContentOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type RunbookDraft ¶
type RunbookDraft struct { CreationTime *string `json:"creationTime,omitempty"` DraftContentLink *ContentLink `json:"draftContentLink,omitempty"` InEdit *bool `json:"inEdit,omitempty"` LastModifiedTime *string `json:"lastModifiedTime,omitempty"` OutputTypes *[]string `json:"outputTypes,omitempty"` Parameters *map[string]RunbookParameter `json:"parameters,omitempty"` }
func (*RunbookDraft) GetCreationTimeAsTime ¶
func (o *RunbookDraft) GetCreationTimeAsTime() (*time.Time, error)
func (*RunbookDraft) GetLastModifiedTimeAsTime ¶
func (o *RunbookDraft) GetLastModifiedTimeAsTime() (*time.Time, error)
func (*RunbookDraft) SetCreationTimeAsTime ¶
func (o *RunbookDraft) SetCreationTimeAsTime(input time.Time)
func (*RunbookDraft) SetLastModifiedTimeAsTime ¶
func (o *RunbookDraft) SetLastModifiedTimeAsTime(input time.Time)
type RunbookDraftClient ¶
func NewRunbookDraftClientWithBaseURI ¶
func NewRunbookDraftClientWithBaseURI(endpoint string) RunbookDraftClient
func (RunbookDraftClient) Get ¶
func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOperationResponse, err error)
Get ...
func (RunbookDraftClient) GetContent ¶
func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (result GetContentOperationResponse, err error)
GetContent ...
func (RunbookDraftClient) ReplaceContent ¶
func (c RunbookDraftClient) ReplaceContent(ctx context.Context, id RunbookId, input interface{}) (result ReplaceContentOperationResponse, err error)
ReplaceContent ...
func (RunbookDraftClient) ReplaceContentThenPoll ¶
func (c RunbookDraftClient) ReplaceContentThenPoll(ctx context.Context, id RunbookId, input interface{}) error
ReplaceContentThenPoll performs ReplaceContent then polls until it's completed
func (RunbookDraftClient) UndoEdit ¶
func (c RunbookDraftClient) UndoEdit(ctx context.Context, id RunbookId) (result UndoEditOperationResponse, err error)
UndoEdit ...
type RunbookId ¶
type RunbookId struct { SubscriptionId string ResourceGroupName string AutomationAccountName string RunbookName string }
RunbookId is a struct representing the Resource ID for a Runbook
func NewRunbookID ¶
func NewRunbookID(subscriptionId string, resourceGroupName string, automationAccountName string, runbookName string) RunbookId
NewRunbookID returns a new RunbookId struct
func ParseRunbookID ¶
ParseRunbookID parses 'input' into a RunbookId
func ParseRunbookIDInsensitively ¶
ParseRunbookIDInsensitively parses 'input' case-insensitively into a RunbookId note: this method should only be used for API response data and not user input
func (RunbookId) Segments ¶
func (id RunbookId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Runbook ID