testjob

package
v0.20230901.1170029 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/testjob Documentation

The testjob SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2022-08-08).

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/2022-08-08/testjob"

Client Initialization

client := testjob.NewTestJobClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TestJobClient.Create

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

payload := testjob.TestJobCreateParameters{
	// ...
}


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

Example Usage: TestJobClient.Get

ctx := context.TODO()
id := testjob.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: TestJobClient.Resume

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

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

Example Usage: TestJobClient.Stop

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

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

Example Usage: TestJobClient.Suspend

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

read, err := client.Suspend(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 CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TestJob
}

type GetOperationResponse

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

type ResumeOperationResponse

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

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

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

type SuspendOperationResponse

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

type TestJob

type TestJob struct {
	CreationTime           *string            `json:"creationTime,omitempty"`
	EndTime                *string            `json:"endTime,omitempty"`
	Exception              *string            `json:"exception,omitempty"`
	LastModifiedTime       *string            `json:"lastModifiedTime,omitempty"`
	LastStatusModifiedTime *string            `json:"lastStatusModifiedTime,omitempty"`
	LogActivityTrace       *int64             `json:"logActivityTrace,omitempty"`
	Parameters             *map[string]string `json:"parameters,omitempty"`
	RunOn                  *string            `json:"runOn,omitempty"`
	StartTime              *string            `json:"startTime,omitempty"`
	Status                 *string            `json:"status,omitempty"`
	StatusDetails          *string            `json:"statusDetails,omitempty"`
}

func (*TestJob) GetCreationTimeAsTime

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

func (*TestJob) GetEndTimeAsTime

func (o *TestJob) GetEndTimeAsTime() (*time.Time, error)

func (*TestJob) GetLastModifiedTimeAsTime

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

func (*TestJob) GetLastStatusModifiedTimeAsTime

func (o *TestJob) GetLastStatusModifiedTimeAsTime() (*time.Time, error)

func (*TestJob) GetStartTimeAsTime

func (o *TestJob) GetStartTimeAsTime() (*time.Time, error)

func (*TestJob) SetCreationTimeAsTime

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

func (*TestJob) SetEndTimeAsTime

func (o *TestJob) SetEndTimeAsTime(input time.Time)

func (*TestJob) SetLastModifiedTimeAsTime

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

func (*TestJob) SetLastStatusModifiedTimeAsTime

func (o *TestJob) SetLastStatusModifiedTimeAsTime(input time.Time)

func (*TestJob) SetStartTimeAsTime

func (o *TestJob) SetStartTimeAsTime(input time.Time)

type TestJobClient

type TestJobClient struct {
	Client *resourcemanager.Client
}

func NewTestJobClientWithBaseURI

func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error)

func (TestJobClient) Create

Create ...

func (TestJobClient) Get

func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperationResponse, err error)

Get ...

func (TestJobClient) Resume

func (c TestJobClient) Resume(ctx context.Context, id RunbookId) (result ResumeOperationResponse, err error)

Resume ...

func (TestJobClient) Stop

func (c TestJobClient) Stop(ctx context.Context, id RunbookId) (result StopOperationResponse, err error)

Stop ...

func (TestJobClient) Suspend

func (c TestJobClient) Suspend(ctx context.Context, id RunbookId) (result SuspendOperationResponse, err error)

Suspend ...

type TestJobCreateParameters

type TestJobCreateParameters struct {
	Parameters *map[string]string `json:"parameters,omitempty"`
	RunOn      *string            `json:"runOn,omitempty"`
}

Jump to

Keyboard shortcuts

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