features

package
v0.20231205.1100042 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features Documentation

The features SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2021-07-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/resources/2021-07-01/features"

Client Initialization

client := features.NewFeaturesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FeaturesClient.Get

ctx := context.TODO()
id := features.NewFeatureID("12345678-1234-9876-4563-123456789012", "providerValue", "featureValue")

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

ctx := context.TODO()
id := features.NewProviders2ID("12345678-1234-9876-4563-123456789012", "providerValue")

// 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: FeaturesClient.ListAll

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

// 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
}

Example Usage: FeaturesClient.Register

ctx := context.TODO()
id := features.NewFeatureID("12345678-1234-9876-4563-123456789012", "providerValue", "featureValue")

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: FeaturesClient.Unregister

ctx := context.TODO()
id := features.NewFeatureID("12345678-1234-9876-4563-123456789012", "providerValue", "featureValue")

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 ValidateFeatureID

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

ValidateFeatureID checks that 'input' can be parsed as a Feature ID

func ValidateProviders2ID

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

ValidateProviders2ID checks that 'input' can be parsed as a Providers 2 ID

Types

type FeatureId

type FeatureId struct {
	SubscriptionId string
	ProviderName   string
	FeatureName    string
}

FeatureId is a struct representing the Resource ID for a Feature

func NewFeatureID

func NewFeatureID(subscriptionId string, providerName string, featureName string) FeatureId

NewFeatureID returns a new FeatureId struct

func ParseFeatureID

func ParseFeatureID(input string) (*FeatureId, error)

ParseFeatureID parses 'input' into a FeatureId

func ParseFeatureIDInsensitively

func ParseFeatureIDInsensitively(input string) (*FeatureId, error)

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

func (*FeatureId) FromParseResult added in v0.20231127.1171502

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

func (FeatureId) ID

func (id FeatureId) ID() string

ID returns the formatted Feature ID

func (FeatureId) Segments

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

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

func (FeatureId) String

func (id FeatureId) String() string

String returns a human-readable description of this Feature ID

type FeatureProperties

type FeatureProperties struct {
	State *string `json:"state,omitempty"`
}

type FeatureResult

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

type FeatureResultOperationPredicate

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

func (FeatureResultOperationPredicate) Matches

type FeaturesClient

type FeaturesClient struct {
	Client *resourcemanager.Client
}

func NewFeaturesClientWithBaseURI

func NewFeaturesClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesClient, error)

func (FeaturesClient) Get

func (c FeaturesClient) Get(ctx context.Context, id FeatureId) (result GetOperationResponse, err error)

Get ...

func (FeaturesClient) List

func (c FeaturesClient) List(ctx context.Context, id Providers2Id) (result ListOperationResponse, err error)

List ...

func (FeaturesClient) ListAll

ListAll ...

func (FeaturesClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (FeaturesClient) ListAllCompleteMatchingPredicate

func (c FeaturesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FeatureResultOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FeaturesClient) ListComplete

ListComplete retrieves all the results into a single object

func (FeaturesClient) ListCompleteMatchingPredicate

func (c FeaturesClient) ListCompleteMatchingPredicate(ctx context.Context, id Providers2Id, predicate FeatureResultOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FeaturesClient) Register

func (c FeaturesClient) Register(ctx context.Context, id FeatureId) (result RegisterOperationResponse, err error)

Register ...

func (FeaturesClient) Unregister

func (c FeaturesClient) Unregister(ctx context.Context, id FeatureId) (result UnregisterOperationResponse, err error)

Unregister ...

type GetOperationResponse

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	Items []FeatureResult
}

type ListAllOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []FeatureResult
}

type ListOperationResponse

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

type Providers2Id

type Providers2Id struct {
	SubscriptionId string
	ProviderName   string
}

Providers2Id is a struct representing the Resource ID for a Providers 2

func NewProviders2ID

func NewProviders2ID(subscriptionId string, providerName string) Providers2Id

NewProviders2ID returns a new Providers2Id struct

func ParseProviders2ID

func ParseProviders2ID(input string) (*Providers2Id, error)

ParseProviders2ID parses 'input' into a Providers2Id

func ParseProviders2IDInsensitively

func ParseProviders2IDInsensitively(input string) (*Providers2Id, error)

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

func (*Providers2Id) FromParseResult added in v0.20231127.1171502

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

func (Providers2Id) ID

func (id Providers2Id) ID() string

ID returns the formatted Providers 2 ID

func (Providers2Id) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Providers 2 ID

func (Providers2Id) String

func (id Providers2Id) String() string

String returns a human-readable description of this Providers 2 ID

type RegisterOperationResponse

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

type UnregisterOperationResponse

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

Jump to

Keyboard shortcuts

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