jobcredentials

package
v0.20240425.1122754 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobcredentials Documentation

The jobcredentials SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-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/2023-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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCredentialID

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

ValidateCredentialID checks that 'input' can be parsed as a Credential ID

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 {
	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) FromParseResult

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

func (CredentialId) ID

func (id CredentialId) ID() string

ID returns the formatted Credential ID

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 DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

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) FromParseResult

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 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

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

func (JobCredentialOperationPredicate) Matches

type JobCredentialProperties

type JobCredentialProperties struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

type JobCredentialsClient

type JobCredentialsClient struct {
	Client *resourcemanager.Client
}

func NewJobCredentialsClientWithBaseURI

func NewJobCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobCredentialsClient, error)

func (JobCredentialsClient) CreateOrUpdate

CreateOrUpdate ...

func (JobCredentialsClient) Delete

Delete ...

func (JobCredentialsClient) Get

Get ...

func (JobCredentialsClient) ListByAgent

ListByAgent ...

func (JobCredentialsClient) ListByAgentComplete

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 {
	LatestHttpResponse *http.Response
	Items              []JobCredential
}

type ListByAgentOperationResponse

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

Jump to

Keyboard shortcuts

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