fluxconfiguration

package
v0.20230622.1085613 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-03-01/fluxconfiguration Documentation

The fluxconfiguration SDK allows for interaction with the Azure Resource Manager Service kubernetesconfiguration (API Version 2022-03-01).

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/kubernetesconfiguration/2022-03-01/fluxconfiguration"

Client Initialization

client := fluxconfiguration.NewFluxConfigurationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FluxConfigurationClient.CreateOrUpdate

ctx := context.TODO()
id := fluxconfiguration.NewFluxConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "clusterResourceValue", "clusterValue", "fluxConfigurationValue")

payload := fluxconfiguration.FluxConfiguration{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: FluxConfigurationClient.Delete

ctx := context.TODO()
id := fluxconfiguration.NewFluxConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "clusterResourceValue", "clusterValue", "fluxConfigurationValue")

if err := client.DeleteThenPoll(ctx, id, fluxconfiguration.DefaultDeleteOperationOptions()); err != nil {
	// handle the error
}

Example Usage: FluxConfigurationClient.Get

ctx := context.TODO()
id := fluxconfiguration.NewFluxConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "clusterResourceValue", "clusterValue", "fluxConfigurationValue")

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: FluxConfigurationClient.List

ctx := context.TODO()
id := fluxconfiguration.NewProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "clusterResourceValue", "clusterValue")

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

Example Usage: FluxConfigurationClient.Update

ctx := context.TODO()
id := fluxconfiguration.NewFluxConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "providerValue", "clusterResourceValue", "clusterValue", "fluxConfigurationValue")

payload := fluxconfiguration.FluxConfigurationPatch{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForFluxComplianceState

func PossibleValuesForFluxComplianceState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForScopeType

func PossibleValuesForScopeType() []string

func PossibleValuesForSourceKindType

func PossibleValuesForSourceKindType() []string

func ValidateFluxConfigurationID

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

ValidateFluxConfigurationID checks that 'input' can be parsed as a Flux Configuration ID

func ValidateProviderID

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

ValidateProviderID checks that 'input' can be parsed as a Provider ID

Types

type BucketDefinition

type BucketDefinition struct {
	AccessKey             *string `json:"accessKey,omitempty"`
	BucketName            *string `json:"bucketName,omitempty"`
	Insecure              *bool   `json:"insecure,omitempty"`
	LocalAuthRef          *string `json:"localAuthRef,omitempty"`
	SyncIntervalInSeconds *int64  `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds      *int64  `json:"timeoutInSeconds,omitempty"`
	Url                   *string `json:"url,omitempty"`
}

type BucketPatchDefinition

type BucketPatchDefinition struct {
	AccessKey             *string `json:"accessKey,omitempty"`
	BucketName            *string `json:"bucketName,omitempty"`
	Insecure              *bool   `json:"insecure,omitempty"`
	LocalAuthRef          *string `json:"localAuthRef,omitempty"`
	SyncIntervalInSeconds *int64  `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds      *int64  `json:"timeoutInSeconds,omitempty"`
	Url                   *string `json:"url,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	ForceDelete *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230508.1101604

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData added in v0.20230508.1101604

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery added in v0.20230508.1101604

type DeleteOperationResponse

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

type FluxComplianceState

type FluxComplianceState string
const (
	FluxComplianceStateCompliant            FluxComplianceState = "Compliant"
	FluxComplianceStateNonNegativeCompliant FluxComplianceState = "Non-Compliant"
	FluxComplianceStatePending              FluxComplianceState = "Pending"
	FluxComplianceStateSuspended            FluxComplianceState = "Suspended"
	FluxComplianceStateUnknown              FluxComplianceState = "Unknown"
)

func (*FluxComplianceState) UnmarshalJSON added in v0.20230508.1101604

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

type FluxConfiguration

type FluxConfiguration struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *FluxConfigurationProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData       `json:"systemData,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type FluxConfigurationClient

type FluxConfigurationClient struct {
	Client *resourcemanager.Client
}

func NewFluxConfigurationClientWithBaseURI

func NewFluxConfigurationClientWithBaseURI(api environments.Api) (*FluxConfigurationClient, error)

func (FluxConfigurationClient) CreateOrUpdate

CreateOrUpdate ...

func (FluxConfigurationClient) CreateOrUpdateThenPoll

func (c FluxConfigurationClient) CreateOrUpdateThenPoll(ctx context.Context, id FluxConfigurationId, input FluxConfiguration) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (FluxConfigurationClient) Delete

Delete ...

func (FluxConfigurationClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (FluxConfigurationClient) Get

Get ...

func (FluxConfigurationClient) List

List ...

func (FluxConfigurationClient) ListComplete

ListComplete retrieves all the results into a single object

func (FluxConfigurationClient) ListCompleteMatchingPredicate

func (c FluxConfigurationClient) ListCompleteMatchingPredicate(ctx context.Context, id ProviderId, predicate FluxConfigurationOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FluxConfigurationClient) Update

Update ...

func (FluxConfigurationClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type FluxConfigurationId

type FluxConfigurationId struct {
	SubscriptionId        string
	ResourceGroupName     string
	ProviderName          string
	ClusterResourceName   string
	ClusterName           string
	FluxConfigurationName string
}

FluxConfigurationId is a struct representing the Resource ID for a Flux Configuration

func NewFluxConfigurationID

func NewFluxConfigurationID(subscriptionId string, resourceGroupName string, providerName string, clusterResourceName string, clusterName string, fluxConfigurationName string) FluxConfigurationId

NewFluxConfigurationID returns a new FluxConfigurationId struct

func ParseFluxConfigurationID

func ParseFluxConfigurationID(input string) (*FluxConfigurationId, error)

ParseFluxConfigurationID parses 'input' into a FluxConfigurationId

func ParseFluxConfigurationIDInsensitively

func ParseFluxConfigurationIDInsensitively(input string) (*FluxConfigurationId, error)

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

func (FluxConfigurationId) ID

func (id FluxConfigurationId) ID() string

ID returns the formatted Flux Configuration ID

func (FluxConfigurationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flux Configuration ID

func (FluxConfigurationId) String

func (id FluxConfigurationId) String() string

String returns a human-readable description of this Flux Configuration ID

type FluxConfigurationOperationPredicate

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

func (FluxConfigurationOperationPredicate) Matches

type FluxConfigurationPatch

type FluxConfigurationPatch struct {
	Properties *FluxConfigurationPatchProperties `json:"properties,omitempty"`
}

type FluxConfigurationPatchProperties

type FluxConfigurationPatchProperties struct {
	Bucket                         *BucketPatchDefinition                   `json:"bucket,omitempty"`
	ConfigurationProtectedSettings *map[string]string                       `json:"configurationProtectedSettings,omitempty"`
	GitRepository                  *GitRepositoryPatchDefinition            `json:"gitRepository,omitempty"`
	Kustomizations                 *map[string]KustomizationPatchDefinition `json:"kustomizations,omitempty"`
	SourceKind                     *SourceKindType                          `json:"sourceKind,omitempty"`
	Suspend                        *bool                                    `json:"suspend,omitempty"`
}

type FluxConfigurationProperties

type FluxConfigurationProperties struct {
	Bucket                         *BucketDefinition                   `json:"bucket,omitempty"`
	ComplianceState                *FluxComplianceState                `json:"complianceState,omitempty"`
	ConfigurationProtectedSettings *map[string]string                  `json:"configurationProtectedSettings,omitempty"`
	ErrorMessage                   *string                             `json:"errorMessage,omitempty"`
	GitRepository                  *GitRepositoryDefinition            `json:"gitRepository,omitempty"`
	Kustomizations                 *map[string]KustomizationDefinition `json:"kustomizations,omitempty"`
	Namespace                      *string                             `json:"namespace,omitempty"`
	ProvisioningState              *ProvisioningState                  `json:"provisioningState,omitempty"`
	RepositoryPublicKey            *string                             `json:"repositoryPublicKey,omitempty"`
	Scope                          *ScopeType                          `json:"scope,omitempty"`
	SourceKind                     *SourceKindType                     `json:"sourceKind,omitempty"`
	SourceSyncedCommitId           *string                             `json:"sourceSyncedCommitId,omitempty"`
	SourceUpdatedAt                *string                             `json:"sourceUpdatedAt,omitempty"`
	StatusUpdatedAt                *string                             `json:"statusUpdatedAt,omitempty"`
	Statuses                       *[]ObjectStatusDefinition           `json:"statuses,omitempty"`
	Suspend                        *bool                               `json:"suspend,omitempty"`
}

func (*FluxConfigurationProperties) GetSourceUpdatedAtAsTime

func (o *FluxConfigurationProperties) GetSourceUpdatedAtAsTime() (*time.Time, error)

func (*FluxConfigurationProperties) GetStatusUpdatedAtAsTime

func (o *FluxConfigurationProperties) GetStatusUpdatedAtAsTime() (*time.Time, error)

func (*FluxConfigurationProperties) SetSourceUpdatedAtAsTime

func (o *FluxConfigurationProperties) SetSourceUpdatedAtAsTime(input time.Time)

func (*FluxConfigurationProperties) SetStatusUpdatedAtAsTime

func (o *FluxConfigurationProperties) SetStatusUpdatedAtAsTime(input time.Time)

type GetOperationResponse

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

type GitRepositoryDefinition

type GitRepositoryDefinition struct {
	HTTPSCACert           *string                  `json:"httpsCACert,omitempty"`
	HTTPSUser             *string                  `json:"httpsUser,omitempty"`
	LocalAuthRef          *string                  `json:"localAuthRef,omitempty"`
	RepositoryRef         *RepositoryRefDefinition `json:"repositoryRef,omitempty"`
	SshKnownHosts         *string                  `json:"sshKnownHosts,omitempty"`
	SyncIntervalInSeconds *int64                   `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds      *int64                   `json:"timeoutInSeconds,omitempty"`
	Url                   *string                  `json:"url,omitempty"`
}

type GitRepositoryPatchDefinition

type GitRepositoryPatchDefinition struct {
	HTTPSCACert           *string                  `json:"httpsCACert,omitempty"`
	HTTPSUser             *string                  `json:"httpsUser,omitempty"`
	LocalAuthRef          *string                  `json:"localAuthRef,omitempty"`
	RepositoryRef         *RepositoryRefDefinition `json:"repositoryRef,omitempty"`
	SshKnownHosts         *string                  `json:"sshKnownHosts,omitempty"`
	SyncIntervalInSeconds *int64                   `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds      *int64                   `json:"timeoutInSeconds,omitempty"`
	Url                   *string                  `json:"url,omitempty"`
}

type HelmReleasePropertiesDefinition

type HelmReleasePropertiesDefinition struct {
	FailureCount        *int64                     `json:"failureCount,omitempty"`
	HelmChartRef        *ObjectReferenceDefinition `json:"helmChartRef,omitempty"`
	InstallFailureCount *int64                     `json:"installFailureCount,omitempty"`
	LastRevisionApplied *int64                     `json:"lastRevisionApplied,omitempty"`
	UpgradeFailureCount *int64                     `json:"upgradeFailureCount,omitempty"`
}

type KustomizationDefinition

type KustomizationDefinition struct {
	DependsOn              *[]string `json:"dependsOn,omitempty"`
	Force                  *bool     `json:"force,omitempty"`
	Name                   *string   `json:"name,omitempty"`
	Path                   *string   `json:"path,omitempty"`
	Prune                  *bool     `json:"prune,omitempty"`
	RetryIntervalInSeconds *int64    `json:"retryIntervalInSeconds,omitempty"`
	SyncIntervalInSeconds  *int64    `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds       *int64    `json:"timeoutInSeconds,omitempty"`
}

type KustomizationPatchDefinition

type KustomizationPatchDefinition struct {
	DependsOn              *[]string `json:"dependsOn,omitempty"`
	Force                  *bool     `json:"force,omitempty"`
	Path                   *string   `json:"path,omitempty"`
	Prune                  *bool     `json:"prune,omitempty"`
	RetryIntervalInSeconds *int64    `json:"retryIntervalInSeconds,omitempty"`
	SyncIntervalInSeconds  *int64    `json:"syncIntervalInSeconds,omitempty"`
	TimeoutInSeconds       *int64    `json:"timeoutInSeconds,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []FluxConfiguration
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]FluxConfiguration
}

type ObjectReferenceDefinition

type ObjectReferenceDefinition struct {
	Name      *string `json:"name,omitempty"`
	Namespace *string `json:"namespace,omitempty"`
}

type ObjectStatusConditionDefinition

type ObjectStatusConditionDefinition struct {
	LastTransitionTime *string `json:"lastTransitionTime,omitempty"`
	Message            *string `json:"message,omitempty"`
	Reason             *string `json:"reason,omitempty"`
	Status             *string `json:"status,omitempty"`
	Type               *string `json:"type,omitempty"`
}

func (*ObjectStatusConditionDefinition) GetLastTransitionTimeAsTime

func (o *ObjectStatusConditionDefinition) GetLastTransitionTimeAsTime() (*time.Time, error)

func (*ObjectStatusConditionDefinition) SetLastTransitionTimeAsTime

func (o *ObjectStatusConditionDefinition) SetLastTransitionTimeAsTime(input time.Time)

type ObjectStatusDefinition

type ObjectStatusDefinition struct {
	AppliedBy             *ObjectReferenceDefinition         `json:"appliedBy,omitempty"`
	ComplianceState       *FluxComplianceState               `json:"complianceState,omitempty"`
	HelmReleaseProperties *HelmReleasePropertiesDefinition   `json:"helmReleaseProperties,omitempty"`
	Kind                  *string                            `json:"kind,omitempty"`
	Name                  *string                            `json:"name,omitempty"`
	Namespace             *string                            `json:"namespace,omitempty"`
	StatusConditions      *[]ObjectStatusConditionDefinition `json:"statusConditions,omitempty"`
}

type ProviderId

type ProviderId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ProviderName        string
	ClusterResourceName string
	ClusterName         string
}

ProviderId is a struct representing the Resource ID for a Provider

func NewProviderID

func NewProviderID(subscriptionId string, resourceGroupName string, providerName string, clusterResourceName string, clusterName string) ProviderId

NewProviderID returns a new ProviderId struct

func ParseProviderID

func ParseProviderID(input string) (*ProviderId, error)

ParseProviderID parses 'input' into a ProviderId

func ParseProviderIDInsensitively

func ParseProviderIDInsensitively(input string) (*ProviderId, error)

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

func (ProviderId) ID

func (id ProviderId) ID() string

ID returns the formatted Provider ID

func (ProviderId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Provider ID

func (ProviderId) String

func (id ProviderId) String() string

String returns a human-readable description of this Provider ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230508.1101604

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

type RepositoryRefDefinition

type RepositoryRefDefinition struct {
	Branch *string `json:"branch,omitempty"`
	Commit *string `json:"commit,omitempty"`
	Semver *string `json:"semver,omitempty"`
	Tag    *string `json:"tag,omitempty"`
}

type ScopeType

type ScopeType string
const (
	ScopeTypeCluster   ScopeType = "cluster"
	ScopeTypeNamespace ScopeType = "namespace"
)

func (*ScopeType) UnmarshalJSON added in v0.20230508.1101604

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

type SourceKindType

type SourceKindType string
const (
	SourceKindTypeBucket        SourceKindType = "Bucket"
	SourceKindTypeGitRepository SourceKindType = "GitRepository"
)

func (*SourceKindType) UnmarshalJSON added in v0.20230508.1101604

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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