pricings

package
v0.20240209.1164150 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

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

func PossibleValuesForCode() []string

func PossibleValuesForIsEnabled

func PossibleValuesForIsEnabled() []string

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 Code

type Code string
const (
	CodeFailed    Code = "Failed"
	CodeSucceeded Code = "Succeeded"
)

type Extension

type Extension struct {
	AdditionalExtensionProperties *interface{}     `json:"additionalExtensionProperties,omitempty"`
	IsEnabled                     IsEnabled        `json:"isEnabled"`
	Name                          string           `json:"name"`
	OperationStatus               *OperationStatus `json:"operationStatus,omitempty"`
}

type GetOperationResponse

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

type IsEnabled

type IsEnabled string
const (
	IsEnabledFalse IsEnabled = "False"
	IsEnabledTrue  IsEnabled = "True"
)

type ListOperationResponse

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

type OperationStatus

type OperationStatus struct {
	Code    *Code   `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

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"`
	EnablementTime         *string      `json:"enablementTime,omitempty"`
	Extensions             *[]Extension `json:"extensions,omitempty"`
	FreeTrialRemainingTime *string      `json:"freeTrialRemainingTime,omitempty"`
	PricingTier            PricingTier  `json:"pricingTier"`
	ReplacedBy             *[]string    `json:"replacedBy,omitempty"`
	SubPlan                *string      `json:"subPlan,omitempty"`
}

func (*PricingProperties) GetEnablementTimeAsTime

func (o *PricingProperties) GetEnablementTimeAsTime() (*time.Time, error)

func (*PricingProperties) SetEnablementTimeAsTime

func (o *PricingProperties) SetEnablementTimeAsTime(input time.Time)

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) 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
	Model        *Pricing
}

Jump to

Keyboard shortcuts

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