pricings

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: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2022-03-01/pricings Documentation

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

Client Initialization

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

Example Usage: PricingsClient.Get

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

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

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

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

Example Usage: PricingsClient.Update

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

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


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

Types

type GetOperationResponse

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PricingList
}

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) FromParseResult

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

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 PricingList

type PricingList struct {
	Value []Pricing `json:"value"`
}

type PricingProperties

type PricingProperties struct {
	Deprecated             *bool       `json:"deprecated,omitempty"`
	FreeTrialRemainingTime *string     `json:"freeTrialRemainingTime,omitempty"`
	PricingTier            PricingTier `json:"pricingTier"`
	ReplacedBy             *[]string   `json:"replacedBy,omitempty"`
	SubPlan                *string     `json:"subPlan,omitempty"`
}

type PricingTier

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

func (*PricingTier) UnmarshalJSON added in v0.20240228.1142829

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

type PricingsClient

type PricingsClient struct {
	Client *resourcemanager.Client
}

func NewPricingsClientWithBaseURI

func NewPricingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PricingsClient, error)

func (PricingsClient) Get

func (c PricingsClient) Get(ctx context.Context, id PricingId) (result GetOperationResponse, err error)

Get ...

func (PricingsClient) List

List ...

func (PricingsClient) Update

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

Update ...

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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