associations

package
v0.20240315.1103122 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/associations Documentation

The associations SDK allows for interaction with the Azure Resource Manager Service customproviders (API Version 2018-09-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/associations"

Client Initialization

client := associations.NewAssociationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AssociationsClient.CreateOrUpdate

ctx := context.TODO()
id := associations.NewScopedAssociationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "associationValue")

payload := associations.Association{
	// ...
}


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

Example Usage: AssociationsClient.Delete

ctx := context.TODO()
id := associations.NewScopedAssociationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "associationValue")

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

Example Usage: AssociationsClient.Get

ctx := context.TODO()
id := associations.NewScopedAssociationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "associationValue")

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: AssociationsClient.ListAll

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination
items, err := client.ListAllComplete(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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateScopedAssociationID

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

ValidateScopedAssociationID checks that 'input' can be parsed as a Scoped Association ID

Types

type Association

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

type AssociationOperationPredicate

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

func (AssociationOperationPredicate) Matches

type AssociationProperties

type AssociationProperties struct {
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	TargetResourceId  *string            `json:"targetResourceId,omitempty"`
}

type AssociationsClient

type AssociationsClient struct {
	Client *resourcemanager.Client
}

func NewAssociationsClientWithBaseURI

func NewAssociationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociationsClient, error)

func (AssociationsClient) CreateOrUpdate

CreateOrUpdate ...

func (AssociationsClient) CreateOrUpdateThenPoll

func (c AssociationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ScopedAssociationId, input Association) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AssociationsClient) Delete

Delete ...

func (AssociationsClient) DeleteThenPoll

func (c AssociationsClient) DeleteThenPoll(ctx context.Context, id ScopedAssociationId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AssociationsClient) Get

Get ...

func (AssociationsClient) ListAll

ListAll ...

func (AssociationsClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (AssociationsClient) ListAllCompleteMatchingPredicate

func (c AssociationsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate AssociationOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Association
}

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Association
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateRunning   ProvisioningState = "Running"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type ScopedAssociationId

type ScopedAssociationId struct {
	Scope           string
	AssociationName string
}

ScopedAssociationId is a struct representing the Resource ID for a Scoped Association

func NewScopedAssociationID

func NewScopedAssociationID(scope string, associationName string) ScopedAssociationId

NewScopedAssociationID returns a new ScopedAssociationId struct

func ParseScopedAssociationID

func ParseScopedAssociationID(input string) (*ScopedAssociationId, error)

ParseScopedAssociationID parses 'input' into a ScopedAssociationId

func ParseScopedAssociationIDInsensitively

func ParseScopedAssociationIDInsensitively(input string) (*ScopedAssociationId, error)

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

func (*ScopedAssociationId) FromParseResult

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

func (ScopedAssociationId) ID

func (id ScopedAssociationId) ID() string

ID returns the formatted Scoped Association ID

func (ScopedAssociationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Association ID

func (ScopedAssociationId) String

func (id ScopedAssociationId) String() string

String returns a human-readable description of this Scoped Association ID

Jump to

Keyboard shortcuts

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