pricings

package
v0.20231214.1160726 Latest Latest
Warning

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

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

README

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

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

Client Initialization

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

Example Usage: PricingsClient.Delete

ctx := context.TODO()
id := pricings.NewPricingID("scopeIdValue", "pricingValue")

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

Example Usage: PricingsClient.Get

ctx := context.TODO()
id := pricings.NewPricingID("scopeIdValue", "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 := pricings.NewScopeIdID("scopeIdValue")

read, err := client.List(ctx, id, pricings.DefaultListOperationOptions())
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("scopeIdValue", "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 PossibleValuesForEnforce

func PossibleValuesForEnforce() []string

func PossibleValuesForInherited

func PossibleValuesForInherited() []string

func PossibleValuesForIsEnabled

func PossibleValuesForIsEnabled() []string

func PossibleValuesForPricingTier

func PossibleValuesForPricingTier() []string

func PossibleValuesForResourcesCoverageStatus

func PossibleValuesForResourcesCoverageStatus() []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 ValidateScopeIdID

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

ValidateScopeIdID checks that 'input' can be parsed as a Scope Id ID

Types

type Code

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type Enforce

type Enforce string
const (
	EnforceFalse Enforce = "False"
	EnforceTrue  Enforce = "True"
)

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 Inherited

type Inherited string
const (
	InheritedFalse Inherited = "False"
	InheritedTrue  Inherited = "True"
)

type IsEnabled

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

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 {
	ScopeId     string
	PricingName string
}

PricingId is a struct representing the Resource ID for a Pricing

func NewPricingID

func NewPricingID(scopeId 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"`
	Enforce                 *Enforce                 `json:"enforce,omitempty"`
	Extensions              *[]Extension             `json:"extensions,omitempty"`
	FreeTrialRemainingTime  *string                  `json:"freeTrialRemainingTime,omitempty"`
	Inherited               *Inherited               `json:"inherited,omitempty"`
	InheritedFrom           *string                  `json:"inheritedFrom,omitempty"`
	PricingTier             PricingTier              `json:"pricingTier"`
	ReplacedBy              *[]string                `json:"replacedBy,omitempty"`
	ResourcesCoverageStatus *ResourcesCoverageStatus `json:"resourcesCoverageStatus,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) Delete

func (c PricingsClient) Delete(ctx context.Context, id PricingId) (result DeleteOperationResponse, err error)

Delete ...

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 ResourcesCoverageStatus

type ResourcesCoverageStatus string
const (
	ResourcesCoverageStatusFullyCovered     ResourcesCoverageStatus = "FullyCovered"
	ResourcesCoverageStatusNotCovered       ResourcesCoverageStatus = "NotCovered"
	ResourcesCoverageStatusPartiallyCovered ResourcesCoverageStatus = "PartiallyCovered"
)

type ScopeIdId

type ScopeIdId struct {
	ScopeId string
}

ScopeIdId is a struct representing the Resource ID for a Scope Id

func NewScopeIdID

func NewScopeIdID(scopeId string) ScopeIdId

NewScopeIdID returns a new ScopeIdId struct

func ParseScopeIdID

func ParseScopeIdID(input string) (*ScopeIdId, error)

ParseScopeIdID parses 'input' into a ScopeIdId

func ParseScopeIdIDInsensitively

func ParseScopeIdIDInsensitively(input string) (*ScopeIdId, error)

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

func (*ScopeIdId) FromParseResult

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

func (ScopeIdId) ID

func (id ScopeIdId) ID() string

ID returns the formatted Scope Id ID

func (ScopeIdId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scope Id ID

func (ScopeIdId) String

func (id ScopeIdId) String() string

String returns a human-readable description of this Scope Id ID

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