pricings

package
v0.20230731.1154533 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2017-08-01-preview/pricings Documentation

The pricings SDK allows for interaction with the Azure Resource Manager Service security (API Version 2017-08-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/security/2017-08-01-preview/pricings"

Client Initialization

client := pricings.NewPricingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PricingsClient.CreateOrUpdateResourceGroupPricing

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

payload := pricings.Pricing{
	// ...
}


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

Example Usage: PricingsClient.GetResourceGroupPricing

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

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

Example Usage: PricingsClient.GetSubscriptionPricing

ctx := context.TODO()
id := pricings.NewPricingID("12345678-1234-9876-4563-123456789012", "pricingValue")

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

Example Usage: PricingsClient.List

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

// 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: PricingsClient.ListByResourceGroup

ctx := context.TODO()
id := pricings.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: PricingsClient.UpdateSubscriptionPricing

ctx := context.TODO()
id := pricings.NewPricingID("12345678-1234-9876-4563-123456789012", "pricingValue")

payload := pricings.Pricing{
	// ...
}


read, err := client.UpdateSubscriptionPricing(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 PossibleValuesForPricingTier

func PossibleValuesForPricingTier() []string

func ValidatePricingID

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

ValidatePricingID checks that 'input' can be parsed as a Pricing ID

func ValidateProviderPricingID

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

ValidateProviderPricingID checks that 'input' can be parsed as a Provider Pricing ID

Types

type CreateOrUpdateResourceGroupPricingOperationResponse

type CreateOrUpdateResourceGroupPricingOperationResponse struct {
	HttpResponse *http.Response
	Model        *Pricing
}

type GetResourceGroupPricingOperationResponse

type GetResourceGroupPricingOperationResponse struct {
	HttpResponse *http.Response
	Model        *Pricing
}

type GetSubscriptionPricingOperationResponse

type GetSubscriptionPricingOperationResponse struct {
	HttpResponse *http.Response
	Model        *Pricing
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Pricing
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Pricing
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Pricing
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Pricing
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type Pricing

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

type PricingId

type PricingId struct {
	SubscriptionId string
	PricingName    string
}

PricingId is a struct representing the Resource ID for a Pricing

func NewPricingID

func NewPricingID(subscriptionId string, pricingName string) PricingId

NewPricingID returns a new PricingId struct

func ParsePricingID

func ParsePricingID(input string) (*PricingId, error)

ParsePricingID parses 'input' into a PricingId

func ParsePricingIDInsensitively

func ParsePricingIDInsensitively(input string) (*PricingId, error)

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

func (PricingId) ID

func (id PricingId) ID() string

ID returns the formatted Pricing ID

func (PricingId) Segments

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

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

func (PricingId) String

func (id PricingId) String() string

String returns a human-readable description of this Pricing ID

type PricingOperationPredicate

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

func (PricingOperationPredicate) Matches

func (p PricingOperationPredicate) Matches(input Pricing) bool

type PricingProperties

type PricingProperties struct {
	PricingTier PricingTier `json:"pricingTier"`
}

type PricingTier

type PricingTier string
const (
	PricingTierFree     PricingTier = "Free"
	PricingTierStandard PricingTier = "Standard"
)

type PricingsClient

type PricingsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewPricingsClientWithBaseURI

func NewPricingsClientWithBaseURI(endpoint string) PricingsClient

func (PricingsClient) CreateOrUpdateResourceGroupPricing

func (c PricingsClient) CreateOrUpdateResourceGroupPricing(ctx context.Context, id ProviderPricingId, input Pricing) (result CreateOrUpdateResourceGroupPricingOperationResponse, err error)

CreateOrUpdateResourceGroupPricing ...

func (PricingsClient) GetResourceGroupPricing

func (c PricingsClient) GetResourceGroupPricing(ctx context.Context, id ProviderPricingId) (result GetResourceGroupPricingOperationResponse, err error)

GetResourceGroupPricing ...

func (PricingsClient) GetSubscriptionPricing

func (c PricingsClient) GetSubscriptionPricing(ctx context.Context, id PricingId) (result GetSubscriptionPricingOperationResponse, err error)

GetSubscriptionPricing ...

func (PricingsClient) List

List ...

func (PricingsClient) ListByResourceGroup

ListByResourceGroup ...

func (PricingsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (PricingsClient) ListByResourceGroupCompleteMatchingPredicate

func (c PricingsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PricingOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (PricingsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (PricingsClient) ListCompleteMatchingPredicate

func (c PricingsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PricingOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (PricingsClient) UpdateSubscriptionPricing

func (c PricingsClient) UpdateSubscriptionPricing(ctx context.Context, id PricingId, input Pricing) (result UpdateSubscriptionPricingOperationResponse, err error)

UpdateSubscriptionPricing ...

type ProviderPricingId

type ProviderPricingId struct {
	SubscriptionId    string
	ResourceGroupName string
	PricingName       string
}

ProviderPricingId is a struct representing the Resource ID for a Provider Pricing

func NewProviderPricingID

func NewProviderPricingID(subscriptionId string, resourceGroupName string, pricingName string) ProviderPricingId

NewProviderPricingID returns a new ProviderPricingId struct

func ParseProviderPricingID

func ParseProviderPricingID(input string) (*ProviderPricingId, error)

ParseProviderPricingID parses 'input' into a ProviderPricingId

func ParseProviderPricingIDInsensitively

func ParseProviderPricingIDInsensitively(input string) (*ProviderPricingId, error)

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

func (ProviderPricingId) ID

func (id ProviderPricingId) ID() string

ID returns the formatted Provider Pricing ID

func (ProviderPricingId) Segments

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

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

func (ProviderPricingId) String

func (id ProviderPricingId) String() string

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

type UpdateSubscriptionPricingOperationResponse

type UpdateSubscriptionPricingOperationResponse struct {
	HttpResponse *http.Response
	Model        *Pricing
}

Jump to

Keyboard shortcuts

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