pricings

package
v0.20241128.1112539 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

The pricings SDK allows for interaction with Azure Resource Manager 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("scopeId", "pricingName")

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("scopeId", "pricingName")

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("scopeId")

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("scopeId", "pricingName")

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

func (*Code) UnmarshalJSON added in v0.20240228.1142829

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type Enforce

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

func (*Enforce) UnmarshalJSON added in v0.20240228.1142829

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

type Extension

type Extension struct {
	AdditionalExtensionProperties *map[string]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
	OData        *odata.OData
	Model        *Pricing
}

type Inherited

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

func (*Inherited) UnmarshalJSON added in v0.20240228.1142829

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

type IsEnabled

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

func (*IsEnabled) UnmarshalJSON added in v0.20240228.1142829

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240228.1142829

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20240228.1142829

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20240228.1142829

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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"
)

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

func (*ResourcesCoverageStatus) UnmarshalJSON added in v0.20240228.1142829

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

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
	OData        *odata.OData
	Model        *Pricing
}

Jump to

Keyboard shortcuts

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