jobagents

package
v0.20240122.1052955 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

The jobagents SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-11-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/sql/2021-11-01/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.NewSqlServerID("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

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) FromParseResult added in v0.20231127.1171502

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

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(sdkApi sdkEnv.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

ListByServer ...

func (JobAgentsClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (JobAgentsClient) ListByServerCompleteMatchingPredicate

func (c JobAgentsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id commonids.SqlServerId, 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 {
	LatestHttpResponse *http.Response
	Items              []JobAgent
}

type ListByServerOperationResponse

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

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