jobtargetgroups

package
v0.20230823.1052657 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

The jobtargetgroups 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/jobtargetgroups"

Client Initialization

client := jobtargetgroups.NewJobTargetGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobTargetGroupsClient.CreateOrUpdate

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

payload := jobtargetgroups.JobTargetGroup{
	// ...
}


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

Example Usage: JobTargetGroupsClient.Delete

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

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

Example Usage: JobTargetGroupsClient.Get

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

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: JobTargetGroupsClient.ListByAgent

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForJobTargetGroupMembershipType

func PossibleValuesForJobTargetGroupMembershipType() []string

func PossibleValuesForJobTargetType

func PossibleValuesForJobTargetType() []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 ValidateTargetGroupID

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

ValidateTargetGroupID checks that 'input' can be parsed as a Target Group ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *JobTargetGroup
}

type DeleteOperationResponse

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

type GetOperationResponse

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

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 JobTarget

type JobTarget struct {
	DatabaseName      *string                       `json:"databaseName,omitempty"`
	ElasticPoolName   *string                       `json:"elasticPoolName,omitempty"`
	MembershipType    *JobTargetGroupMembershipType `json:"membershipType,omitempty"`
	RefreshCredential *string                       `json:"refreshCredential,omitempty"`
	ServerName        *string                       `json:"serverName,omitempty"`
	ShardMapName      *string                       `json:"shardMapName,omitempty"`
	Type              JobTargetType                 `json:"type"`
}

type JobTargetGroup

type JobTargetGroup struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *JobTargetGroupProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type JobTargetGroupMembershipType

type JobTargetGroupMembershipType string
const (
	JobTargetGroupMembershipTypeExclude JobTargetGroupMembershipType = "Exclude"
	JobTargetGroupMembershipTypeInclude JobTargetGroupMembershipType = "Include"
)

func (*JobTargetGroupMembershipType) UnmarshalJSON

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

type JobTargetGroupOperationPredicate

type JobTargetGroupOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (JobTargetGroupOperationPredicate) Matches

type JobTargetGroupProperties

type JobTargetGroupProperties struct {
	Members []JobTarget `json:"members"`
}

type JobTargetGroupsClient

type JobTargetGroupsClient struct {
	Client *resourcemanager.Client
}

func NewJobTargetGroupsClientWithBaseURI

func NewJobTargetGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetGroupsClient, error)

func (JobTargetGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (JobTargetGroupsClient) Delete

Delete ...

func (JobTargetGroupsClient) Get

Get ...

func (JobTargetGroupsClient) ListByAgent

ListByAgent ...

func (JobTargetGroupsClient) ListByAgentComplete

ListByAgentComplete retrieves all the results into a single object

func (JobTargetGroupsClient) ListByAgentCompleteMatchingPredicate

func (c JobTargetGroupsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, predicate JobTargetGroupOperationPredicate) (result ListByAgentCompleteResult, err error)

ListByAgentCompleteMatchingPredicate retrieves all the results and then applies the predicate

type JobTargetType

type JobTargetType string
const (
	JobTargetTypeSqlDatabase    JobTargetType = "SqlDatabase"
	JobTargetTypeSqlElasticPool JobTargetType = "SqlElasticPool"
	JobTargetTypeSqlServer      JobTargetType = "SqlServer"
	JobTargetTypeSqlShardMap    JobTargetType = "SqlShardMap"
	JobTargetTypeTargetGroup    JobTargetType = "TargetGroup"
)

func (*JobTargetType) UnmarshalJSON

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

type ListByAgentCompleteResult

type ListByAgentCompleteResult struct {
	Items []JobTargetGroup
}

type ListByAgentOperationResponse

type ListByAgentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobTargetGroup
}

type TargetGroupId

type TargetGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	TargetGroupName   string
}

TargetGroupId is a struct representing the Resource ID for a Target Group

func NewTargetGroupID

func NewTargetGroupID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string) TargetGroupId

NewTargetGroupID returns a new TargetGroupId struct

func ParseTargetGroupID

func ParseTargetGroupID(input string) (*TargetGroupId, error)

ParseTargetGroupID parses 'input' into a TargetGroupId

func ParseTargetGroupIDInsensitively

func ParseTargetGroupIDInsensitively(input string) (*TargetGroupId, error)

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

func (TargetGroupId) ID

func (id TargetGroupId) ID() string

ID returns the formatted Target Group ID

func (TargetGroupId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Target Group ID

func (TargetGroupId) String

func (id TargetGroupId) String() string

String returns a human-readable description of this Target Group ID

Jump to

Keyboard shortcuts

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