firewallrules

package
v0.20241205.1102105 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/firewallrules Documentation

The firewallrules SDK allows for interaction with Azure Resource Manager mongocluster (API Version 2024-07-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/mongocluster/2024-07-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", "mongoClusterName", "firewallRuleName")

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


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

Example Usage: FirewallRulesClient.Delete

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

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

Example Usage: FirewallRulesClient.Get

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

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.ListByMongoCluster

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

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

func PossibleValuesForProvisioningState() []string

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 ValidateMongoClusterID

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

ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FirewallRule
}

type DeleteOperationResponse

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

type FirewallRule

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

type FirewallRuleId

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

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

func NewFirewallRuleID

func NewFirewallRuleID(subscriptionId string, resourceGroupName string, mongoClusterName 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) FromParseResult

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

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 FirewallRuleOperationPredicate

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

func (FirewallRuleOperationPredicate) Matches

type FirewallRuleProperties

type FirewallRuleProperties struct {
	EndIPAddress      string             `json:"endIpAddress"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	StartIPAddress    string             `json:"startIpAddress"`
}

type FirewallRulesClient

type FirewallRulesClient struct {
	Client *resourcemanager.Client
}

func NewFirewallRulesClientWithBaseURI

func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error)

func (FirewallRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (FirewallRulesClient) CreateOrUpdateThenPoll

func (c FirewallRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallRuleId, input FirewallRule) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (FirewallRulesClient) Delete

Delete ...

func (FirewallRulesClient) DeleteThenPoll

func (c FirewallRulesClient) DeleteThenPoll(ctx context.Context, id FirewallRuleId) error

DeleteThenPoll performs Delete then polls until it's completed

func (FirewallRulesClient) Get

Get ...

func (FirewallRulesClient) ListByMongoCluster

func (c FirewallRulesClient) ListByMongoCluster(ctx context.Context, id MongoClusterId) (result ListByMongoClusterOperationResponse, err error)

ListByMongoCluster ...

func (FirewallRulesClient) ListByMongoClusterComplete

ListByMongoClusterComplete retrieves all the results into a single object

func (FirewallRulesClient) ListByMongoClusterCompleteMatchingPredicate

func (c FirewallRulesClient) ListByMongoClusterCompleteMatchingPredicate(ctx context.Context, id MongoClusterId, predicate FirewallRuleOperationPredicate) (result ListByMongoClusterCompleteResult, err error)

ListByMongoClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GetOperationResponse

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

type ListByMongoClusterCompleteResult

type ListByMongoClusterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []FirewallRule
}

type ListByMongoClusterCustomPager

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

type ListByMongoClusterOperationResponse

type ListByMongoClusterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]FirewallRule
}

type MongoClusterId

type MongoClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	MongoClusterName  string
}

MongoClusterId is a struct representing the Resource ID for a Mongo Cluster

func NewMongoClusterID

func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId

NewMongoClusterID returns a new MongoClusterId struct

func ParseMongoClusterID

func ParseMongoClusterID(input string) (*MongoClusterId, error)

ParseMongoClusterID parses 'input' into a MongoClusterId

func ParseMongoClusterIDInsensitively

func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error)

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

func (*MongoClusterId) FromParseResult

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

func (MongoClusterId) ID

func (id MongoClusterId) ID() string

ID returns the formatted Mongo Cluster ID

func (MongoClusterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID

func (MongoClusterId) String

func (id MongoClusterId) String() string

String returns a human-readable description of this Mongo Cluster ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled   ProvisioningState = "Canceled"
	ProvisioningStateDropping   ProvisioningState = "Dropping"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	ProvisioningStateSucceeded  ProvisioningState = "Succeeded"
	ProvisioningStateUpdating   ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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