runbookdraft

package
v0.20240409.1113035 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

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 []byte

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRunbookID

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

ValidateRunbookID checks that 'input' can be parsed as a Runbook ID

Types

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 GetContentOperationResponse

type GetContentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *string
}

type GetOperationResponse

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

type ReplaceContentOperationResponse

type ReplaceContentOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

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

type RunbookDraftClient struct {
	Client *resourcemanager.Client
}

func NewRunbookDraftClientWithBaseURI

func NewRunbookDraftClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookDraftClient, error)

func (RunbookDraftClient) Get

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 []byte) (result ReplaceContentOperationResponse, err error)

ReplaceContent ...

func (RunbookDraftClient) ReplaceContentThenPoll

func (c RunbookDraftClient) ReplaceContentThenPoll(ctx context.Context, id RunbookId, input []byte) 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

func ParseRunbookID(input string) (*RunbookId, error)

ParseRunbookID parses 'input' into a RunbookId

func ParseRunbookIDInsensitively

func ParseRunbookIDInsensitively(input string) (*RunbookId, error)

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) FromParseResult

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

func (RunbookId) ID

func (id RunbookId) ID() string

ID returns the formatted Runbook ID

func (RunbookId) Segments

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

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

func (RunbookId) String

func (id RunbookId) String() string

String returns a human-readable description of this Runbook ID

type RunbookParameter

type RunbookParameter struct {
	DefaultValue *string `json:"defaultValue,omitempty"`
	IsMandatory  *bool   `json:"isMandatory,omitempty"`
	Position     *int64  `json:"position,omitempty"`
	Type         *string `json:"type,omitempty"`
}

type UndoEditOperationResponse

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

Jump to

Keyboard shortcuts

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