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 ¶
- func ValidateRunbookID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type GetOperationResponse
- type ResumeOperationResponse
- type RunbookId
- type StopOperationResponse
- type SuspendOperationResponse
- type TestJob
- func (o *TestJob) GetCreationTimeAsTime() (*time.Time, error)
- func (o *TestJob) GetEndTimeAsTime() (*time.Time, error)
- func (o *TestJob) GetLastModifiedTimeAsTime() (*time.Time, error)
- func (o *TestJob) GetLastStatusModifiedTimeAsTime() (*time.Time, error)
- func (o *TestJob) GetStartTimeAsTime() (*time.Time, error)
- func (o *TestJob) SetCreationTimeAsTime(input time.Time)
- func (o *TestJob) SetEndTimeAsTime(input time.Time)
- func (o *TestJob) SetLastModifiedTimeAsTime(input time.Time)
- func (o *TestJob) SetLastStatusModifiedTimeAsTime(input time.Time)
- func (o *TestJob) SetStartTimeAsTime(input time.Time)
- type TestJobClient
- func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCreateParameters) (result CreateOperationResponse, err error)
- func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperationResponse, err error)
- func (c TestJobClient) Resume(ctx context.Context, id RunbookId) (result ResumeOperationResponse, err error)
- func (c TestJobClient) Stop(ctx context.Context, id RunbookId) (result StopOperationResponse, err error)
- func (c TestJobClient) Suspend(ctx context.Context, id RunbookId) (result SuspendOperationResponse, err error)
- type TestJobCreateParameters
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 CreateOperationResponse ¶
type GetOperationResponse ¶
type ResumeOperationResponse ¶
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) FromParseResult ¶
func (id *RunbookId) FromParseResult(input resourceids.ParseResult) error
func (RunbookId) Segments ¶
func (id RunbookId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Runbook ID
type StopOperationResponse ¶
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 (*TestJob) GetLastModifiedTimeAsTime ¶
func (*TestJob) GetLastStatusModifiedTimeAsTime ¶
func (*TestJob) SetCreationTimeAsTime ¶
func (*TestJob) SetEndTimeAsTime ¶
func (*TestJob) SetLastModifiedTimeAsTime ¶
func (*TestJob) SetLastStatusModifiedTimeAsTime ¶
func (*TestJob) SetStartTimeAsTime ¶
type TestJobClient ¶
type TestJobClient struct {
Client *resourcemanager.Client
}
func NewTestJobClientWithBaseURI ¶
func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error)
func (TestJobClient) Create ¶
func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCreateParameters) (result CreateOperationResponse, err error)
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 ...