forwardingrules

package
v0.20240313.1132601 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules Documentation

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

Client Initialization

client := forwardingrules.NewForwardingRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ForwardingRulesClient.CreateOrUpdate

ctx := context.TODO()
id := forwardingrules.NewForwardingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsForwardingRulesetValue", "forwardingRuleValue")

payload := forwardingrules.ForwardingRule{
	// ...
}


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

Example Usage: ForwardingRulesClient.Delete

ctx := context.TODO()
id := forwardingrules.NewForwardingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsForwardingRulesetValue", "forwardingRuleValue")

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

Example Usage: ForwardingRulesClient.Get

ctx := context.TODO()
id := forwardingrules.NewForwardingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsForwardingRulesetValue", "forwardingRuleValue")

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

ctx := context.TODO()
id := forwardingrules.NewDnsForwardingRulesetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsForwardingRulesetValue")

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

Example Usage: ForwardingRulesClient.Update

ctx := context.TODO()
id := forwardingrules.NewForwardingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsForwardingRulesetValue", "forwardingRuleValue")

payload := forwardingrules.ForwardingRulePatch{
	// ...
}


read, err := client.Update(ctx, id, payload, forwardingrules.DefaultUpdateOperationOptions())
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 PossibleValuesForForwardingRuleState

func PossibleValuesForForwardingRuleState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateDnsForwardingRulesetID

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

ValidateDnsForwardingRulesetID checks that 'input' can be parsed as a Dns Forwarding Ruleset ID

func ValidateForwardingRuleID

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

ValidateForwardingRuleID checks that 'input' can be parsed as a Forwarding Rule ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ForwardingRule
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type DnsForwardingRulesetId

type DnsForwardingRulesetId struct {
	SubscriptionId           string
	ResourceGroupName        string
	DnsForwardingRulesetName string
}

DnsForwardingRulesetId is a struct representing the Resource ID for a Dns Forwarding Ruleset

func NewDnsForwardingRulesetID

func NewDnsForwardingRulesetID(subscriptionId string, resourceGroupName string, dnsForwardingRulesetName string) DnsForwardingRulesetId

NewDnsForwardingRulesetID returns a new DnsForwardingRulesetId struct

func ParseDnsForwardingRulesetID

func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error)

ParseDnsForwardingRulesetID parses 'input' into a DnsForwardingRulesetId

func ParseDnsForwardingRulesetIDInsensitively

func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRulesetId, error)

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

func (*DnsForwardingRulesetId) FromParseResult

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

func (DnsForwardingRulesetId) ID

ID returns the formatted Dns Forwarding Ruleset ID

func (DnsForwardingRulesetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dns Forwarding Ruleset ID

func (DnsForwardingRulesetId) String

func (id DnsForwardingRulesetId) String() string

String returns a human-readable description of this Dns Forwarding Ruleset ID

type ForwardingRule

type ForwardingRule struct {
	Etag       *string                  `json:"etag,omitempty"`
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties ForwardingRuleProperties `json:"properties"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type ForwardingRuleId

type ForwardingRuleId struct {
	SubscriptionId           string
	ResourceGroupName        string
	DnsForwardingRulesetName string
	ForwardingRuleName       string
}

ForwardingRuleId is a struct representing the Resource ID for a Forwarding Rule

func NewForwardingRuleID

func NewForwardingRuleID(subscriptionId string, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string) ForwardingRuleId

NewForwardingRuleID returns a new ForwardingRuleId struct

func ParseForwardingRuleID

func ParseForwardingRuleID(input string) (*ForwardingRuleId, error)

ParseForwardingRuleID parses 'input' into a ForwardingRuleId

func ParseForwardingRuleIDInsensitively

func ParseForwardingRuleIDInsensitively(input string) (*ForwardingRuleId, error)

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

func (*ForwardingRuleId) FromParseResult

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

func (ForwardingRuleId) ID

func (id ForwardingRuleId) ID() string

ID returns the formatted Forwarding Rule ID

func (ForwardingRuleId) Segments

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

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

func (ForwardingRuleId) String

func (id ForwardingRuleId) String() string

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

type ForwardingRuleOperationPredicate

type ForwardingRuleOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (ForwardingRuleOperationPredicate) Matches

type ForwardingRulePatch

type ForwardingRulePatch struct {
	Properties *ForwardingRulePatchProperties `json:"properties,omitempty"`
}

type ForwardingRulePatchProperties

type ForwardingRulePatchProperties struct {
	ForwardingRuleState *ForwardingRuleState `json:"forwardingRuleState,omitempty"`
	Metadata            *map[string]string   `json:"metadata,omitempty"`
	TargetDnsServers    *[]TargetDnsServer   `json:"targetDnsServers,omitempty"`
}

type ForwardingRuleProperties

type ForwardingRuleProperties struct {
	DomainName          string               `json:"domainName"`
	ForwardingRuleState *ForwardingRuleState `json:"forwardingRuleState,omitempty"`
	Metadata            *map[string]string   `json:"metadata,omitempty"`
	ProvisioningState   *ProvisioningState   `json:"provisioningState,omitempty"`
	TargetDnsServers    []TargetDnsServer    `json:"targetDnsServers"`
}

type ForwardingRuleState

type ForwardingRuleState string
const (
	ForwardingRuleStateDisabled ForwardingRuleState = "Disabled"
	ForwardingRuleStateEnabled  ForwardingRuleState = "Enabled"
)

func (*ForwardingRuleState) UnmarshalJSON

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

type ForwardingRulesClient

type ForwardingRulesClient struct {
	Client *resourcemanager.Client
}

func NewForwardingRulesClientWithBaseURI

func NewForwardingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ForwardingRulesClient, error)

func (ForwardingRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (ForwardingRulesClient) Delete

Delete ...

func (ForwardingRulesClient) Get

Get ...

func (ForwardingRulesClient) List

List ...

func (ForwardingRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (ForwardingRulesClient) ListCompleteMatchingPredicate

func (c ForwardingRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id DnsForwardingRulesetId, options ListOperationOptions, predicate ForwardingRuleOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ForwardingRulesClient) Update

Update ...

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ForwardingRule
}

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ForwardingRule
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type TargetDnsServer

type TargetDnsServer struct {
	IPAddress string `json:"ipAddress"`
	Port      *int64 `json:"port,omitempty"`
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

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

func (UpdateOperationOptions) ToOData

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

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ForwardingRule
}

Jump to

Keyboard shortcuts

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