firewallrules

package
v0.20230213.1235936 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/redis/2022-06-01/firewallrules Documentation

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

Client Initialization

client := firewallrules.NewFirewallRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FirewallRulesClient.CreateOrUpdate

ctx := context.TODO()
id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

payload := firewallrules.RedisFirewallRule{
	// ...
}


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

Example Usage: FirewallRulesClient.Delete

ctx := context.TODO()
id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

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: FirewallRulesClient.Get

ctx := context.TODO()
id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue", "firewallRuleValue")

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

ctx := context.TODO()
id := firewallrules.NewRediID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(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 ValidateFirewallRuleID

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

ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID

func ValidateRediID

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

ValidateRediID checks that 'input' can be parsed as a Redi ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *RedisFirewallRule
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type FirewallRuleId

type FirewallRuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	RedisName         string
	FirewallRuleName  string
}

FirewallRuleId is a struct representing the Resource ID for a Firewall Rule

func NewFirewallRuleID

func NewFirewallRuleID(subscriptionId string, resourceGroupName string, redisName string, firewallRuleName string) FirewallRuleId

NewFirewallRuleID returns a new FirewallRuleId struct

func ParseFirewallRuleID

func ParseFirewallRuleID(input string) (*FirewallRuleId, error)

ParseFirewallRuleID parses 'input' into a FirewallRuleId

func ParseFirewallRuleIDInsensitively

func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error)

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

func (FirewallRuleId) ID

func (id FirewallRuleId) ID() string

ID returns the formatted Firewall Rule ID

func (FirewallRuleId) Segments

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

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

func (FirewallRuleId) String

func (id FirewallRuleId) String() string

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

type FirewallRulesClient

type FirewallRulesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewFirewallRulesClientWithBaseURI

func NewFirewallRulesClientWithBaseURI(endpoint string) FirewallRulesClient

func (FirewallRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (FirewallRulesClient) Delete

Delete ...

func (FirewallRulesClient) Get

Get ...

func (FirewallRulesClient) List

List ...

func (FirewallRulesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (FirewallRulesClient) ListCompleteMatchingPredicate

func (c FirewallRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id RediId, predicate RedisFirewallRuleOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []RedisFirewallRule
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]RedisFirewallRule
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type RediId

type RediId struct {
	SubscriptionId    string
	ResourceGroupName string
	RedisName         string
}

RediId is a struct representing the Resource ID for a Redi

func NewRediID

func NewRediID(subscriptionId string, resourceGroupName string, redisName string) RediId

NewRediID returns a new RediId struct

func ParseRediID

func ParseRediID(input string) (*RediId, error)

ParseRediID parses 'input' into a RediId

func ParseRediIDInsensitively

func ParseRediIDInsensitively(input string) (*RediId, error)

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

func (RediId) ID

func (id RediId) ID() string

ID returns the formatted Redi ID

func (RediId) Segments

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

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

func (RediId) String

func (id RediId) String() string

String returns a human-readable description of this Redi ID

type RedisFirewallRule

type RedisFirewallRule struct {
	Id         *string                     `json:"id,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties RedisFirewallRuleProperties `json:"properties"`
	Type       *string                     `json:"type,omitempty"`
}

type RedisFirewallRuleOperationPredicate

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

func (RedisFirewallRuleOperationPredicate) Matches

type RedisFirewallRuleProperties

type RedisFirewallRuleProperties struct {
	EndIP   string `json:"endIP"`
	StartIP string `json:"startIP"`
}

Jump to

Keyboard shortcuts

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