rulesets

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rulesets Documentation

The rulesets SDK allows for interaction with Azure Resource Manager cdn (API Version 2024-02-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/cdn/2024-02-01/rulesets"

Client Initialization

client := rulesets.NewRuleSetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RuleSetsClient.Create

ctx := context.TODO()
id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "ruleSetName")

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

Example Usage: RuleSetsClient.Delete

ctx := context.TODO()
id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "ruleSetName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: RuleSetsClient.Get

ctx := context.TODO()
id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "ruleSetName")

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: RuleSetsClient.ListByProfile

ctx := context.TODO()
id := rulesets.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName")

// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination
items, err := client.ListByProfileComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: RuleSetsClient.ListResourceUsage

ctx := context.TODO()
id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "ruleSetName")

// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination
items, err := client.ListResourceUsageComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAfdProvisioningState

func PossibleValuesForAfdProvisioningState() []string

func PossibleValuesForDeploymentStatus

func PossibleValuesForDeploymentStatus() []string

func PossibleValuesForUsageUnit

func PossibleValuesForUsageUnit() []string

func ValidateProfileID

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

ValidateProfileID checks that 'input' can be parsed as a Profile ID

func ValidateRuleSetID

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

ValidateRuleSetID checks that 'input' can be parsed as a Rule Set ID

Types

type AfdProvisioningState

type AfdProvisioningState string
const (
	AfdProvisioningStateCreating  AfdProvisioningState = "Creating"
	AfdProvisioningStateDeleting  AfdProvisioningState = "Deleting"
	AfdProvisioningStateFailed    AfdProvisioningState = "Failed"
	AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded"
	AfdProvisioningStateUpdating  AfdProvisioningState = "Updating"
)

func (*AfdProvisioningState) UnmarshalJSON

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

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RuleSet
}

type DeleteOperationResponse

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

type DeploymentStatus

type DeploymentStatus string
const (
	DeploymentStatusFailed     DeploymentStatus = "Failed"
	DeploymentStatusInProgress DeploymentStatus = "InProgress"
	DeploymentStatusNotStarted DeploymentStatus = "NotStarted"
	DeploymentStatusSucceeded  DeploymentStatus = "Succeeded"
)

func (*DeploymentStatus) UnmarshalJSON

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

type GetOperationResponse

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

type ListByProfileCompleteResult

type ListByProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []RuleSet
}

type ListByProfileCustomPager

type ListByProfileCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByProfileCustomPager) NextPageLink() *odata.Link

type ListByProfileOperationResponse

type ListByProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]RuleSet
}

type ListResourceUsageCompleteResult

type ListResourceUsageCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Usage
}

type ListResourceUsageCustomPager

type ListResourceUsageCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link

type ListResourceUsageOperationResponse

type ListResourceUsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Usage
}

type ProfileId

type ProfileId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
}

ProfileId is a struct representing the Resource ID for a Profile

func NewProfileID

func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId

NewProfileID returns a new ProfileId struct

func ParseProfileID

func ParseProfileID(input string) (*ProfileId, error)

ParseProfileID parses 'input' into a ProfileId

func ParseProfileIDInsensitively

func ParseProfileIDInsensitively(input string) (*ProfileId, error)

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

func (*ProfileId) FromParseResult

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

func (ProfileId) ID

func (id ProfileId) ID() string

ID returns the formatted Profile ID

func (ProfileId) Segments

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

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

func (ProfileId) String

func (id ProfileId) String() string

String returns a human-readable description of this Profile ID

type RuleSet

type RuleSet struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *RuleSetProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type RuleSetId

type RuleSetId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	RuleSetName       string
}

RuleSetId is a struct representing the Resource ID for a Rule Set

func NewRuleSetID

func NewRuleSetID(subscriptionId string, resourceGroupName string, profileName string, ruleSetName string) RuleSetId

NewRuleSetID returns a new RuleSetId struct

func ParseRuleSetID

func ParseRuleSetID(input string) (*RuleSetId, error)

ParseRuleSetID parses 'input' into a RuleSetId

func ParseRuleSetIDInsensitively

func ParseRuleSetIDInsensitively(input string) (*RuleSetId, error)

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

func (*RuleSetId) FromParseResult

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

func (RuleSetId) ID

func (id RuleSetId) ID() string

ID returns the formatted Rule Set ID

func (RuleSetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Rule Set ID

func (RuleSetId) String

func (id RuleSetId) String() string

String returns a human-readable description of this Rule Set ID

type RuleSetOperationPredicate

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

func (RuleSetOperationPredicate) Matches

func (p RuleSetOperationPredicate) Matches(input RuleSet) bool

type RuleSetProperties

type RuleSetProperties struct {
	DeploymentStatus  *DeploymentStatus     `json:"deploymentStatus,omitempty"`
	ProfileName       *string               `json:"profileName,omitempty"`
	ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"`
}

type RuleSetsClient

type RuleSetsClient struct {
	Client *resourcemanager.Client
}

func NewRuleSetsClientWithBaseURI

func NewRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RuleSetsClient, error)

func (RuleSetsClient) Create

func (c RuleSetsClient) Create(ctx context.Context, id RuleSetId) (result CreateOperationResponse, err error)

Create ...

func (RuleSetsClient) Delete

func (c RuleSetsClient) Delete(ctx context.Context, id RuleSetId) (result DeleteOperationResponse, err error)

Delete ...

func (RuleSetsClient) DeleteThenPoll

func (c RuleSetsClient) DeleteThenPoll(ctx context.Context, id RuleSetId) error

DeleteThenPoll performs Delete then polls until it's completed

func (RuleSetsClient) Get

func (c RuleSetsClient) Get(ctx context.Context, id RuleSetId) (result GetOperationResponse, err error)

Get ...

func (RuleSetsClient) ListByProfile

func (c RuleSetsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error)

ListByProfile ...

func (RuleSetsClient) ListByProfileComplete

func (c RuleSetsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error)

ListByProfileComplete retrieves all the results into a single object

func (RuleSetsClient) ListByProfileCompleteMatchingPredicate

func (c RuleSetsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate RuleSetOperationPredicate) (result ListByProfileCompleteResult, err error)

ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RuleSetsClient) ListResourceUsage

func (c RuleSetsClient) ListResourceUsage(ctx context.Context, id RuleSetId) (result ListResourceUsageOperationResponse, err error)

ListResourceUsage ...

func (RuleSetsClient) ListResourceUsageComplete

func (c RuleSetsClient) ListResourceUsageComplete(ctx context.Context, id RuleSetId) (ListResourceUsageCompleteResult, error)

ListResourceUsageComplete retrieves all the results into a single object

func (RuleSetsClient) ListResourceUsageCompleteMatchingPredicate

func (c RuleSetsClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id RuleSetId, predicate UsageOperationPredicate) (result ListResourceUsageCompleteResult, err error)

ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate

type Usage

type Usage struct {
	CurrentValue int64     `json:"currentValue"`
	Id           *string   `json:"id,omitempty"`
	Limit        int64     `json:"limit"`
	Name         UsageName `json:"name"`
	Unit         UsageUnit `json:"unit"`
}

type UsageName

type UsageName struct {
	LocalizedValue *string `json:"localizedValue,omitempty"`
	Value          *string `json:"value,omitempty"`
}

type UsageOperationPredicate

type UsageOperationPredicate struct {
	CurrentValue *int64
	Id           *string
	Limit        *int64
}

func (UsageOperationPredicate) Matches

func (p UsageOperationPredicate) Matches(input Usage) bool

type UsageUnit

type UsageUnit string
const (
	UsageUnitCount UsageUnit = "Count"
)

func (*UsageUnit) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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