README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2017-03-01-preview/jobtargetgroups
Documentation
The jobtargetgroups
SDK allows for interaction with the Azure Resource Manager Service sql
(API Version 2017-03-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/2017-03-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 ¶
- func PossibleValuesForJobTargetGroupMembershipType() []string
- func PossibleValuesForJobTargetType() []string
- func ValidateJobAgentID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateTargetGroupID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type JobAgentId
- type JobTarget
- type JobTargetGroup
- type JobTargetGroupMembershipType
- type JobTargetGroupOperationPredicate
- type JobTargetGroupProperties
- type JobTargetGroupsClient
- func (c JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, id TargetGroupId, input JobTargetGroup) (result CreateOrUpdateOperationResponse, err error)
- func (c JobTargetGroupsClient) Delete(ctx context.Context, id TargetGroupId) (result DeleteOperationResponse, err error)
- func (c JobTargetGroupsClient) Get(ctx context.Context, id TargetGroupId) (result GetOperationResponse, err error)
- func (c JobTargetGroupsClient) ListByAgent(ctx context.Context, id JobAgentId) (result ListByAgentOperationResponse, err error)
- func (c JobTargetGroupsClient) ListByAgentComplete(ctx context.Context, id JobAgentId) (ListByAgentCompleteResult, error)
- func (c JobTargetGroupsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, predicate JobTargetGroupOperationPredicate) (result ListByAgentCompleteResult, err error)
- type JobTargetType
- type ListByAgentCompleteResult
- type ListByAgentOperationResponse
- type TargetGroupId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForJobTargetGroupMembershipType ¶
func PossibleValuesForJobTargetGroupMembershipType() []string
func PossibleValuesForJobTargetType ¶
func PossibleValuesForJobTargetType() []string
func ValidateJobAgentID ¶
ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID
func ValidateTargetGroupID ¶
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 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) 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 ¶
func (JobTargetGroupOperationPredicate) Matches ¶
func (p JobTargetGroupOperationPredicate) Matches(input JobTargetGroup) bool
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 ¶
func (c JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, id TargetGroupId, input JobTargetGroup) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (JobTargetGroupsClient) Delete ¶
func (c JobTargetGroupsClient) Delete(ctx context.Context, id TargetGroupId) (result DeleteOperationResponse, err error)
Delete ...
func (JobTargetGroupsClient) Get ¶
func (c JobTargetGroupsClient) Get(ctx context.Context, id TargetGroupId) (result GetOperationResponse, err error)
Get ...
func (JobTargetGroupsClient) ListByAgent ¶
func (c JobTargetGroupsClient) ListByAgent(ctx context.Context, id JobAgentId) (result ListByAgentOperationResponse, err error)
ListByAgent ...
func (JobTargetGroupsClient) ListByAgentComplete ¶
func (c JobTargetGroupsClient) ListByAgentComplete(ctx context.Context, id JobAgentId) (ListByAgentCompleteResult, error)
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