providers

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/providers Documentation

The providers SDK allows for interaction with Azure Resource Manager resources (API Version 2015-11-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/providers"

Client Initialization

client := providers.NewProvidersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProvidersClient.Get

ctx := context.TODO()
id := providers.NewProviderID("12345678-1234-9876-4563-123456789012", "providerName")

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

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

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

Example Usage: ProvidersClient.Register

ctx := context.TODO()
id := providers.NewProviderID("12345678-1234-9876-4563-123456789012", "providerName")

read, err := client.Register(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ProvidersClient.Unregister

ctx := context.TODO()
id := providers.NewProviderID("12345678-1234-9876-4563-123456789012", "providerName")

read, err := client.Unregister(ctx, id)
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 ValidateProviderID

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

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

Types

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Provider
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type Provider

type Provider struct {
	Id                *string                 `json:"id,omitempty"`
	Namespace         *string                 `json:"namespace,omitempty"`
	RegistrationState *string                 `json:"registrationState,omitempty"`
	ResourceTypes     *[]ProviderResourceType `json:"resourceTypes,omitempty"`
}

type ProviderId

type ProviderId struct {
	SubscriptionId string
	ProviderName   string
}

ProviderId is a struct representing the Resource ID for a Provider

func NewProviderID

func NewProviderID(subscriptionId string, providerName 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) FromParseResult

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

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 ProviderOperationPredicate

type ProviderOperationPredicate struct {
	Id                *string
	Namespace         *string
	RegistrationState *string
}

func (ProviderOperationPredicate) Matches

func (p ProviderOperationPredicate) Matches(input Provider) bool

type ProviderResourceType

type ProviderResourceType struct {
	ApiVersions  *[]string          `json:"apiVersions,omitempty"`
	Locations    *[]string          `json:"locations,omitempty"`
	Properties   *map[string]string `json:"properties,omitempty"`
	ResourceType *string            `json:"resourceType,omitempty"`
}

type ProvidersClient

type ProvidersClient struct {
	Client *resourcemanager.Client
}

func NewProvidersClientWithBaseURI

func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error)

func (ProvidersClient) Get

func (c ProvidersClient) Get(ctx context.Context, id ProviderId) (result GetOperationResponse, err error)

Get ...

func (ProvidersClient) List

List ...

func (ProvidersClient) ListComplete

ListComplete retrieves all the results into a single object

func (ProvidersClient) ListCompleteMatchingPredicate

func (c ProvidersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate ProviderOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProvidersClient) Register

func (c ProvidersClient) Register(ctx context.Context, id ProviderId) (result RegisterOperationResponse, err error)

Register ...

func (ProvidersClient) Unregister

func (c ProvidersClient) Unregister(ctx context.Context, id ProviderId) (result UnregisterOperationResponse, err error)

Unregister ...

type RegisterOperationResponse

type RegisterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Provider
}

type UnregisterOperationResponse

type UnregisterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Provider
}

Jump to

Keyboard shortcuts

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