sourcecontrol

package
v0.20231213.1172325 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/sourcecontrol Documentation

The sourcecontrol SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2022-08-08).

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/2022-08-08/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 added in v0.20231127.1171502

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        *SourceControl
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	Items []SourceControl
}

type ListByAutomationAccountOperationOptions

type ListByAutomationAccountOperationOptions struct {
	Filter *string
}

func DefaultListByAutomationAccountOperationOptions

func DefaultListByAutomationAccountOperationOptions() ListByAutomationAccountOperationOptions

func (ListByAutomationAccountOperationOptions) ToHeaders added in v0.20230216.1112329

func (ListByAutomationAccountOperationOptions) ToOData added in v0.20230216.1112329

func (ListByAutomationAccountOperationOptions) ToQuery added in v0.20230216.1112329

type ListByAutomationAccountOperationResponse

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

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 *resourcemanager.Client
}

func NewSourceControlClientWithBaseURI

func NewSourceControlClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlClient, error)

func (SourceControlClient) CreateOrUpdate

CreateOrUpdate ...

func (SourceControlClient) Delete

Delete ...

func (SourceControlClient) Get

Get ...

func (SourceControlClient) ListByAutomationAccount

ListByAutomationAccount ...

func (SourceControlClient) ListByAutomationAccountComplete

ListByAutomationAccountComplete retrieves all the results into a single object

func (SourceControlClient) ListByAutomationAccountCompleteMatchingPredicate

func (c SourceControlClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, options ListByAutomationAccountOperationOptions, predicate SourceControlOperationPredicate) (result ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies 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 added in v0.20231127.1171502

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

func (*SourceType) UnmarshalJSON added in v0.20230406.1124617

func (s *SourceType) UnmarshalJSON(bytes []byte) error

type TokenType

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

func (*TokenType) UnmarshalJSON added in v0.20230406.1124617

func (s *TokenType) UnmarshalJSON(bytes []byte) error

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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