README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/jobcredentials
Documentation
The jobcredentials
SDK allows for interaction with the Azure Resource Manager Service sql
(API Version 2021-02-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/2021-02-01-preview/jobcredentials"
Client Initialization
client := jobcredentials.NewJobCredentialsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: JobCredentialsClient.CreateOrUpdate
ctx := context.TODO()
id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue")
payload := jobcredentials.JobCredential{
// ...
}
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: JobCredentialsClient.Delete
ctx := context.TODO()
id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue")
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: JobCredentialsClient.Get
ctx := context.TODO()
id := jobcredentials.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "credentialValue")
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: JobCredentialsClient.ListByAgent
ctx := context.TODO()
id := jobcredentials.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 ValidateCredentialID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateJobAgentID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type CredentialId
- type DeleteOperationResponse
- type GetOperationResponse
- type JobAgentId
- type JobCredential
- type JobCredentialOperationPredicate
- type JobCredentialProperties
- type JobCredentialsClient
- func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialId, input JobCredential) (result CreateOrUpdateOperationResponse, err error)
- func (c JobCredentialsClient) Delete(ctx context.Context, id CredentialId) (result DeleteOperationResponse, err error)
- func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result GetOperationResponse, err error)
- func (c JobCredentialsClient) ListByAgent(ctx context.Context, id JobAgentId) (result ListByAgentOperationResponse, err error)
- func (c JobCredentialsClient) ListByAgentComplete(ctx context.Context, id JobAgentId) (ListByAgentCompleteResult, error)
- func (c JobCredentialsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, predicate JobCredentialOperationPredicate) (result ListByAgentCompleteResult, err error)
- type ListByAgentCompleteResult
- type ListByAgentOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCredentialID ¶
ValidateCredentialID checks that 'input' can be parsed as a Credential ID
func ValidateJobAgentID ¶
ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID
Types ¶
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *JobCredential }
type CredentialId ¶
type CredentialId struct { SubscriptionId string ResourceGroupName string ServerName string JobAgentName string CredentialName string }
CredentialId is a struct representing the Resource ID for a Credential
func NewCredentialID ¶
func NewCredentialID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, credentialName string) CredentialId
NewCredentialID returns a new CredentialId struct
func ParseCredentialID ¶
func ParseCredentialID(input string) (*CredentialId, error)
ParseCredentialID parses 'input' into a CredentialId
func ParseCredentialIDInsensitively ¶
func ParseCredentialIDInsensitively(input string) (*CredentialId, error)
ParseCredentialIDInsensitively parses 'input' case-insensitively into a CredentialId note: this method should only be used for API response data and not user input
func (CredentialId) Segments ¶
func (id CredentialId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Credential ID
func (CredentialId) String ¶
func (id CredentialId) String() string
String returns a human-readable description of this Credential ID
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *JobCredential }
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 JobCredential ¶
type JobCredential struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *JobCredentialProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type JobCredentialOperationPredicate ¶
func (JobCredentialOperationPredicate) Matches ¶
func (p JobCredentialOperationPredicate) Matches(input JobCredential) bool
type JobCredentialProperties ¶
type JobCredentialsClient ¶
type JobCredentialsClient struct {
Client *resourcemanager.Client
}
func NewJobCredentialsClientWithBaseURI ¶
func NewJobCredentialsClientWithBaseURI(api environments.Api) (*JobCredentialsClient, error)
func (JobCredentialsClient) CreateOrUpdate ¶
func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialId, input JobCredential) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (JobCredentialsClient) Delete ¶
func (c JobCredentialsClient) Delete(ctx context.Context, id CredentialId) (result DeleteOperationResponse, err error)
Delete ...
func (JobCredentialsClient) Get ¶
func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result GetOperationResponse, err error)
Get ...
func (JobCredentialsClient) ListByAgent ¶
func (c JobCredentialsClient) ListByAgent(ctx context.Context, id JobAgentId) (result ListByAgentOperationResponse, err error)
ListByAgent ...
func (JobCredentialsClient) ListByAgentComplete ¶
func (c JobCredentialsClient) ListByAgentComplete(ctx context.Context, id JobAgentId) (ListByAgentCompleteResult, error)
ListByAgentComplete retrieves all the results into a single object
func (JobCredentialsClient) ListByAgentCompleteMatchingPredicate ¶
func (c JobCredentialsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, predicate JobCredentialOperationPredicate) (result ListByAgentCompleteResult, err error)
ListByAgentCompleteMatchingPredicate retrieves all the results and then applies the predicate
type ListByAgentCompleteResult ¶
type ListByAgentCompleteResult struct {
Items []JobCredential
}
type ListByAgentOperationResponse ¶
type ListByAgentOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]JobCredential }