sourcecontrol

package
v0.20240125.1115017 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := sourcecontrol.NewSourceControlClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SourceControlClient.CreateOrUpdate

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

payload := sourcecontrol.SourceControlCreateOrUpdateParameters{
	// ...
}


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

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

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: SourceControlClient.Get

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

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: SourceControlClient.ListByAutomationAccount

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

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

Example Usage: SourceControlClient.Update

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

payload := sourcecontrol.SourceControlUpdateParameters{
	// ...
}


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 PossibleValuesForSourceType

func PossibleValuesForSourceType() []string

func PossibleValuesForTokenType

func PossibleValuesForTokenType() []string

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 ValidateSourceControlID

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

ValidateSourceControlID checks that 'input' can be parsed as a Source Control 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
	Model        *SourceControl
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *SourceControl
}

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	Items []SourceControl
}

type ListByAutomationAccountOperationOptions

type ListByAutomationAccountOperationOptions struct {
	Filter *string
}

func DefaultListByAutomationAccountOperationOptions

func DefaultListByAutomationAccountOperationOptions() ListByAutomationAccountOperationOptions

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]SourceControl
	// contains filtered or unexported fields
}

func (ListByAutomationAccountOperationResponse) HasMore

func (ListByAutomationAccountOperationResponse) LoadMore

type SourceControl

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

type SourceControlClient

type SourceControlClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewSourceControlClientWithBaseURI

func NewSourceControlClientWithBaseURI(endpoint string) SourceControlClient

func (SourceControlClient) CreateOrUpdate

CreateOrUpdate ...

func (SourceControlClient) Delete

Delete ...

func (SourceControlClient) Get

Get ...

func (SourceControlClient) ListByAutomationAccount

ListByAutomationAccount ...

func (SourceControlClient) ListByAutomationAccountComplete

ListByAutomationAccountComplete retrieves all of the results into a single object

func (SourceControlClient) ListByAutomationAccountCompleteMatchingPredicate

ListByAutomationAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SourceControlClient) Update

Update ...

type SourceControlCreateOrUpdateParameters

type SourceControlCreateOrUpdateParameters struct {
	Properties SourceControlCreateOrUpdateProperties `json:"properties"`
}

type SourceControlCreateOrUpdateProperties

type SourceControlCreateOrUpdateProperties struct {
	AutoSync       *bool                                 `json:"autoSync,omitempty"`
	Branch         *string                               `json:"branch,omitempty"`
	Description    *string                               `json:"description,omitempty"`
	FolderPath     *string                               `json:"folderPath,omitempty"`
	PublishRunbook *bool                                 `json:"publishRunbook,omitempty"`
	RepoUrl        *string                               `json:"repoUrl,omitempty"`
	SecurityToken  *SourceControlSecurityTokenProperties `json:"securityToken,omitempty"`
	SourceType     *SourceType                           `json:"sourceType,omitempty"`
}

type SourceControlId

type SourceControlId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	SourceControlName     string
}

SourceControlId is a struct representing the Resource ID for a Source Control

func NewSourceControlID

func NewSourceControlID(subscriptionId string, resourceGroupName string, automationAccountName string, sourceControlName string) SourceControlId

NewSourceControlID returns a new SourceControlId struct

func ParseSourceControlID

func ParseSourceControlID(input string) (*SourceControlId, error)

ParseSourceControlID parses 'input' into a SourceControlId

func ParseSourceControlIDInsensitively

func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error)

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

func (*SourceControlId) FromParseResult

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

func (SourceControlId) ID

func (id SourceControlId) ID() string

ID returns the formatted Source Control ID

func (SourceControlId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Source Control ID

func (SourceControlId) String

func (id SourceControlId) String() string

String returns a human-readable description of this Source Control ID

type SourceControlOperationPredicate

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

func (SourceControlOperationPredicate) Matches

type SourceControlProperties

type SourceControlProperties struct {
	AutoSync         *bool       `json:"autoSync,omitempty"`
	Branch           *string     `json:"branch,omitempty"`
	CreationTime     *string     `json:"creationTime,omitempty"`
	Description      *string     `json:"description,omitempty"`
	FolderPath       *string     `json:"folderPath,omitempty"`
	LastModifiedTime *string     `json:"lastModifiedTime,omitempty"`
	PublishRunbook   *bool       `json:"publishRunbook,omitempty"`
	RepoUrl          *string     `json:"repoUrl,omitempty"`
	SourceType       *SourceType `json:"sourceType,omitempty"`
}

func (*SourceControlProperties) GetCreationTimeAsTime

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

func (*SourceControlProperties) GetLastModifiedTimeAsTime

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

func (*SourceControlProperties) SetCreationTimeAsTime

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

func (*SourceControlProperties) SetLastModifiedTimeAsTime

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

type SourceControlSecurityTokenProperties

type SourceControlSecurityTokenProperties struct {
	AccessToken  *string    `json:"accessToken,omitempty"`
	RefreshToken *string    `json:"refreshToken,omitempty"`
	TokenType    *TokenType `json:"tokenType,omitempty"`
}

type SourceControlUpdateParameters

type SourceControlUpdateParameters struct {
	Properties *SourceControlUpdateProperties `json:"properties,omitempty"`
}

type SourceControlUpdateProperties

type SourceControlUpdateProperties struct {
	AutoSync       *bool                                 `json:"autoSync,omitempty"`
	Branch         *string                               `json:"branch,omitempty"`
	Description    *string                               `json:"description,omitempty"`
	FolderPath     *string                               `json:"folderPath,omitempty"`
	PublishRunbook *bool                                 `json:"publishRunbook,omitempty"`
	SecurityToken  *SourceControlSecurityTokenProperties `json:"securityToken,omitempty"`
}

type SourceType

type SourceType string
const (
	SourceTypeGitHub  SourceType = "GitHub"
	SourceTypeVsoGit  SourceType = "VsoGit"
	SourceTypeVsoTfvc SourceType = "VsoTfvc"
)

type TokenType

type TokenType string
const (
	TokenTypeOauth               TokenType = "Oauth"
	TokenTypePersonalAccessToken TokenType = "PersonalAccessToken"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *SourceControl
}

Jump to

Keyboard shortcuts

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