jobagents

package
v0.20230728.1082317 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/jobagents Documentation

The jobagents SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2022-11-01-preview).

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/sql/2022-11-01-preview/jobagents"

Client Initialization

client := jobagents.NewJobAgentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobAgentsClient.CreateOrUpdate

ctx := context.TODO()
id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue")

payload := jobagents.JobAgent{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: JobAgentsClient.Delete

ctx := context.TODO()
id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: JobAgentsClient.Get

ctx := context.TODO()
id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue")

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: JobAgentsClient.ListByServer

ctx := context.TODO()
id := jobagents.NewServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue")

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

Example Usage: JobAgentsClient.Update

ctx := context.TODO()
id := jobagents.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue")

payload := jobagents.JobAgentUpdate{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForJobAgentState

func PossibleValuesForJobAgentState() []string

func ValidateJobAgentID

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

ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type JobAgent

type JobAgent struct {
	Id         *string             `json:"id,omitempty"`
	Location   string              `json:"location"`
	Name       *string             `json:"name,omitempty"`
	Properties *JobAgentProperties `json:"properties,omitempty"`
	Sku        *Sku                `json:"sku,omitempty"`
	Tags       *map[string]string  `json:"tags,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type JobAgentId

type JobAgentId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
}

JobAgentId is a struct representing the Resource ID for a Job Agent

func NewJobAgentID

func NewJobAgentID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string) JobAgentId

NewJobAgentID returns a new JobAgentId struct

func ParseJobAgentID

func ParseJobAgentID(input string) (*JobAgentId, error)

ParseJobAgentID parses 'input' into a JobAgentId

func ParseJobAgentIDInsensitively

func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error)

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

func (JobAgentId) ID

func (id JobAgentId) ID() string

ID returns the formatted Job Agent ID

func (JobAgentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Job Agent ID

func (JobAgentId) String

func (id JobAgentId) String() string

String returns a human-readable description of this Job Agent ID

type JobAgentOperationPredicate

type JobAgentOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (JobAgentOperationPredicate) Matches

func (p JobAgentOperationPredicate) Matches(input JobAgent) bool

type JobAgentProperties

type JobAgentProperties struct {
	DatabaseId string         `json:"databaseId"`
	State      *JobAgentState `json:"state,omitempty"`
}

type JobAgentState

type JobAgentState string
const (
	JobAgentStateCreating JobAgentState = "Creating"
	JobAgentStateDeleting JobAgentState = "Deleting"
	JobAgentStateDisabled JobAgentState = "Disabled"
	JobAgentStateReady    JobAgentState = "Ready"
	JobAgentStateUpdating JobAgentState = "Updating"
)

func (*JobAgentState) UnmarshalJSON

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

type JobAgentUpdate

type JobAgentUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type JobAgentsClient

type JobAgentsClient struct {
	Client *resourcemanager.Client
}

func NewJobAgentsClientWithBaseURI

func NewJobAgentsClientWithBaseURI(api environments.Api) (*JobAgentsClient, error)

func (JobAgentsClient) CreateOrUpdate

func (c JobAgentsClient) CreateOrUpdate(ctx context.Context, id JobAgentId, input JobAgent) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (JobAgentsClient) CreateOrUpdateThenPoll

func (c JobAgentsClient) CreateOrUpdateThenPoll(ctx context.Context, id JobAgentId, input JobAgent) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (JobAgentsClient) Delete

func (c JobAgentsClient) Delete(ctx context.Context, id JobAgentId) (result DeleteOperationResponse, err error)

Delete ...

func (JobAgentsClient) DeleteThenPoll

func (c JobAgentsClient) DeleteThenPoll(ctx context.Context, id JobAgentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (JobAgentsClient) Get

func (c JobAgentsClient) Get(ctx context.Context, id JobAgentId) (result GetOperationResponse, err error)

Get ...

func (JobAgentsClient) ListByServer

func (c JobAgentsClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error)

ListByServer ...

func (JobAgentsClient) ListByServerComplete

func (c JobAgentsClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error)

ListByServerComplete retrieves all the results into a single object

func (JobAgentsClient) ListByServerCompleteMatchingPredicate

func (c JobAgentsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate JobAgentOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (JobAgentsClient) Update

func (c JobAgentsClient) Update(ctx context.Context, id JobAgentId, input JobAgentUpdate) (result UpdateOperationResponse, err error)

Update ...

func (JobAgentsClient) UpdateThenPoll

func (c JobAgentsClient) UpdateThenPoll(ctx context.Context, id JobAgentId, input JobAgentUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []JobAgent
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobAgent
}

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

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

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

type Sku

type Sku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Family   *string `json:"family,omitempty"`
	Name     string  `json:"name"`
	Size     *string `json:"size,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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