customresourceprovider

package
v0.20240527.1094340 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

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

Client Initialization

client := customresourceprovider.NewCustomResourceProviderClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CustomResourceProviderClient.CreateOrUpdate

ctx := context.TODO()
id := customresourceprovider.NewResourceProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceProviderValue")

payload := customresourceprovider.CustomRPManifest{
	// ...
}


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

Example Usage: CustomResourceProviderClient.Delete

ctx := context.TODO()
id := customresourceprovider.NewResourceProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceProviderValue")

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

Example Usage: CustomResourceProviderClient.Get

ctx := context.TODO()
id := customresourceprovider.NewResourceProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceProviderValue")

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: CustomResourceProviderClient.ListByResourceGroup

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

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

Example Usage: CustomResourceProviderClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: CustomResourceProviderClient.Update

ctx := context.TODO()
id := customresourceprovider.NewResourceProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "resourceProviderValue")

payload := customresourceprovider.ResourceProvidersUpdate{
	// ...
}


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 PossibleValuesForActionRouting

func PossibleValuesForActionRouting() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForResourceTypeRouting

func PossibleValuesForResourceTypeRouting() []string

func PossibleValuesForValidationType

func PossibleValuesForValidationType() []string

func ValidateResourceProviderID

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

ValidateResourceProviderID checks that 'input' can be parsed as a Resource Provider ID

Types

type ActionRouting

type ActionRouting string
const (
	ActionRoutingProxy ActionRouting = "Proxy"
)

func (*ActionRouting) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

type CustomRPActionRouteDefinition

type CustomRPActionRouteDefinition struct {
	Endpoint    string         `json:"endpoint"`
	Name        string         `json:"name"`
	RoutingType *ActionRouting `json:"routingType,omitempty"`
}

type CustomRPManifest

type CustomRPManifest struct {
	Id         *string                     `json:"id,omitempty"`
	Location   string                      `json:"location"`
	Name       *string                     `json:"name,omitempty"`
	Properties *CustomRPManifestProperties `json:"properties,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type CustomRPManifestOperationPredicate

type CustomRPManifestOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (CustomRPManifestOperationPredicate) Matches

type CustomRPManifestProperties

type CustomRPManifestProperties struct {
	Actions           *[]CustomRPActionRouteDefinition       `json:"actions,omitempty"`
	ProvisioningState *ProvisioningState                     `json:"provisioningState,omitempty"`
	ResourceTypes     *[]CustomRPResourceTypeRouteDefinition `json:"resourceTypes,omitempty"`
	Validations       *[]CustomRPValidations                 `json:"validations,omitempty"`
}

type CustomRPResourceTypeRouteDefinition

type CustomRPResourceTypeRouteDefinition struct {
	Endpoint    string               `json:"endpoint"`
	Name        string               `json:"name"`
	RoutingType *ResourceTypeRouting `json:"routingType,omitempty"`
}

type CustomRPValidations

type CustomRPValidations struct {
	Specification  string          `json:"specification"`
	ValidationType *ValidationType `json:"validationType,omitempty"`
}

type CustomResourceProviderClient

type CustomResourceProviderClient struct {
	Client *resourcemanager.Client
}

func NewCustomResourceProviderClientWithBaseURI

func NewCustomResourceProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomResourceProviderClient, error)

func (CustomResourceProviderClient) CreateOrUpdate

CreateOrUpdate ...

func (CustomResourceProviderClient) CreateOrUpdateThenPoll

func (c CustomResourceProviderClient) CreateOrUpdateThenPoll(ctx context.Context, id ResourceProviderId, input CustomRPManifest) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CustomResourceProviderClient) Delete

Delete ...

func (CustomResourceProviderClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (CustomResourceProviderClient) Get

Get ...

func (CustomResourceProviderClient) ListByResourceGroup

ListByResourceGroup ...

func (CustomResourceProviderClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (CustomResourceProviderClient) ListByResourceGroupCompleteMatchingPredicate

func (c CustomResourceProviderClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CustomRPManifestOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CustomResourceProviderClient) ListBySubscription

ListBySubscription ...

func (CustomResourceProviderClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (CustomResourceProviderClient) ListBySubscriptionCompleteMatchingPredicate

func (c CustomResourceProviderClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CustomRPManifestOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CustomResourceProviderClient) Update

Update ...

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CustomRPManifest
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CustomRPManifest
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CustomRPManifest
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CustomRPManifest
}

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 ResourceProviderId

type ResourceProviderId struct {
	SubscriptionId       string
	ResourceGroupName    string
	ResourceProviderName string
}

ResourceProviderId is a struct representing the Resource ID for a Resource Provider

func NewResourceProviderID

func NewResourceProviderID(subscriptionId string, resourceGroupName string, resourceProviderName string) ResourceProviderId

NewResourceProviderID returns a new ResourceProviderId struct

func ParseResourceProviderID

func ParseResourceProviderID(input string) (*ResourceProviderId, error)

ParseResourceProviderID parses 'input' into a ResourceProviderId

func ParseResourceProviderIDInsensitively

func ParseResourceProviderIDInsensitively(input string) (*ResourceProviderId, error)

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

func (*ResourceProviderId) FromParseResult

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

func (ResourceProviderId) ID

func (id ResourceProviderId) ID() string

ID returns the formatted Resource Provider ID

func (ResourceProviderId) Segments

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

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

func (ResourceProviderId) String

func (id ResourceProviderId) String() string

String returns a human-readable description of this Resource Provider ID

type ResourceProvidersUpdate

type ResourceProvidersUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ResourceTypeRouting

type ResourceTypeRouting string
const (
	ResourceTypeRoutingProxy      ResourceTypeRouting = "Proxy"
	ResourceTypeRoutingProxyCache ResourceTypeRouting = "Proxy,Cache"
)

func (*ResourceTypeRouting) UnmarshalJSON

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

type UpdateOperationResponse

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

type ValidationType

type ValidationType string
const (
	ValidationTypeSwagger ValidationType = "Swagger"
)

func (*ValidationType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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