credential

package
v0.20240524.1090207 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/credential Documentation

The credential SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2020-01-13-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/automation/2020-01-13-preview/credential"

Client Initialization

client := credential.NewCredentialClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CredentialClient.CreateOrUpdate

ctx := context.TODO()
id := credential.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "credentialValue")

payload := credential.CredentialCreateOrUpdateParameters{
	// ...
}


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: CredentialClient.Delete

ctx := context.TODO()
id := credential.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "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: CredentialClient.Get

ctx := context.TODO()
id := credential.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "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: CredentialClient.ListByAutomationAccount

ctx := context.TODO()
id := credential.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: CredentialClient.Update

ctx := context.TODO()
id := credential.NewCredentialID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "credentialValue")

payload := credential.CredentialUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAutomationAccountID

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

ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID

func ValidateCredentialID

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

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

Types

type AutomationAccountId

type AutomationAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
}

AutomationAccountId is a struct representing the Resource ID for a Automation Account

func NewAutomationAccountID

func NewAutomationAccountID(subscriptionId string, resourceGroupName string, automationAccountName string) AutomationAccountId

NewAutomationAccountID returns a new AutomationAccountId struct

func ParseAutomationAccountID

func ParseAutomationAccountID(input string) (*AutomationAccountId, error)

ParseAutomationAccountID parses 'input' into a AutomationAccountId

func ParseAutomationAccountIDInsensitively

func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, error)

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

func (*AutomationAccountId) FromParseResult

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

func (AutomationAccountId) ID

func (id AutomationAccountId) ID() string

ID returns the formatted Automation Account ID

func (AutomationAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Automation Account ID

func (AutomationAccountId) String

func (id AutomationAccountId) String() string

String returns a human-readable description of this Automation Account ID

type CreateOrUpdateOperationResponse

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

type Credential

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

type CredentialClient

type CredentialClient struct {
	Client *resourcemanager.Client
}

func NewCredentialClientWithBaseURI

func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error)

func (CredentialClient) CreateOrUpdate

CreateOrUpdate ...

func (CredentialClient) Delete

Delete ...

func (CredentialClient) Get

Get ...

func (CredentialClient) ListByAutomationAccount

func (c CredentialClient) ListByAutomationAccount(ctx context.Context, id AutomationAccountId) (result ListByAutomationAccountOperationResponse, err error)

ListByAutomationAccount ...

func (CredentialClient) ListByAutomationAccountComplete

ListByAutomationAccountComplete retrieves all the results into a single object

func (CredentialClient) ListByAutomationAccountCompleteMatchingPredicate

func (c CredentialClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, predicate CredentialOperationPredicate) (result ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CredentialClient) Update

Update ...

type CredentialCreateOrUpdateParameters

type CredentialCreateOrUpdateParameters struct {
	Name       string                             `json:"name"`
	Properties CredentialCreateOrUpdateProperties `json:"properties"`
}

type CredentialCreateOrUpdateProperties

type CredentialCreateOrUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	Password    string  `json:"password"`
	UserName    string  `json:"userName"`
}

type CredentialId

type CredentialId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	CredentialName        string
}

CredentialId is a struct representing the Resource ID for a Credential

func NewCredentialID

func NewCredentialID(subscriptionId string, resourceGroupName string, automationAccountName 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 CredentialOperationPredicate

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

func (CredentialOperationPredicate) Matches

func (p CredentialOperationPredicate) Matches(input Credential) bool

type CredentialProperties

type CredentialProperties struct {
	CreationTime     *string `json:"creationTime,omitempty"`
	Description      *string `json:"description,omitempty"`
	LastModifiedTime *string `json:"lastModifiedTime,omitempty"`
	UserName         *string `json:"userName,omitempty"`
}

func (*CredentialProperties) GetCreationTimeAsTime

func (o *CredentialProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*CredentialProperties) GetLastModifiedTimeAsTime

func (o *CredentialProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*CredentialProperties) SetCreationTimeAsTime

func (o *CredentialProperties) SetCreationTimeAsTime(input time.Time)

func (*CredentialProperties) SetLastModifiedTimeAsTime

func (o *CredentialProperties) SetLastModifiedTimeAsTime(input time.Time)

type CredentialUpdateParameters

type CredentialUpdateParameters struct {
	Name       *string                     `json:"name,omitempty"`
	Properties *CredentialUpdateProperties `json:"properties,omitempty"`
}

type CredentialUpdateProperties

type CredentialUpdateProperties struct {
	Description *string `json:"description,omitempty"`
	Password    *string `json:"password,omitempty"`
	UserName    *string `json:"userName,omitempty"`
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Credential
}

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Credential
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Credential
}

Jump to

Keyboard shortcuts

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