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-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 := associations.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 ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateScopedAssociationID(input interface{}, key string) (warnings []string, errors []error)
- type Association
- type AssociationOperationPredicate
- type AssociationProperties
- type AssociationsClient
- func (c AssociationsClient) CreateOrUpdate(ctx context.Context, id ScopedAssociationId, input Association) (result CreateOrUpdateOperationResponse, err error)
- func (c AssociationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ScopedAssociationId, input Association) error
- func (c AssociationsClient) Delete(ctx context.Context, id ScopedAssociationId) (result DeleteOperationResponse, err error)
- func (c AssociationsClient) DeleteThenPoll(ctx context.Context, id ScopedAssociationId) error
- func (c AssociationsClient) Get(ctx context.Context, id ScopedAssociationId) (result GetOperationResponse, err error)
- func (c AssociationsClient) ListAll(ctx context.Context, id commonids.ScopeId) (result ListAllOperationResponse, err error)
- func (c AssociationsClient) ListAllComplete(ctx context.Context, id commonids.ScopeId) (ListAllCompleteResult, error)
- func (c AssociationsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, ...) (result ListAllCompleteResult, err error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ListAllCompleteResult
- type ListAllOperationResponse
- type ProvisioningState
- type ScopedAssociationId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateScopedAssociationID ¶
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 ¶
func (AssociationOperationPredicate) Matches ¶
func (p AssociationOperationPredicate) Matches(input Association) bool
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 ¶
func (c AssociationsClient) CreateOrUpdate(ctx context.Context, id ScopedAssociationId, input Association) (result CreateOrUpdateOperationResponse, err error)
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 ¶
func (c AssociationsClient) Delete(ctx context.Context, id ScopedAssociationId) (result DeleteOperationResponse, err error)
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 ¶
func (c AssociationsClient) Get(ctx context.Context, id ScopedAssociationId) (result GetOperationResponse, err error)
Get ...
func (AssociationsClient) ListAll ¶
func (c AssociationsClient) ListAll(ctx context.Context, id commonids.ScopeId) (result ListAllOperationResponse, err error)
ListAll ...
func (AssociationsClient) ListAllComplete ¶
func (c AssociationsClient) ListAllComplete(ctx context.Context, id commonids.ScopeId) (ListAllCompleteResult, error)
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 DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Association }
type ListAllCompleteResult ¶
type ListAllCompleteResult struct {
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 ¶ added in v0.20230411.1183115
func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error
type ScopedAssociationId ¶
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) 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