networkgroups

package
v0.20230809.1073815 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-02-01/networkgroups Documentation

The networkgroups SDK allows for interaction with the Azure Resource Manager Service network (API Version 2023-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/network/2023-02-01/networkgroups"

Client Initialization

client := networkgroups.NewNetworkGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NetworkGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue")

payload := networkgroups.NetworkGroup{
	// ...
}


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

Example Usage: NetworkGroupsClient.Delete

ctx := context.TODO()
id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue")

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

Example Usage: NetworkGroupsClient.Get

ctx := context.TODO()
id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue")

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

ctx := context.TODO()
id := networkgroups.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue")

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

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

ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID

func ValidateNetworkManagerID

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

ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *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        *NetworkGroup
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

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 {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []NetworkGroup
}

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        *[]NetworkGroup
}

type NetworkGroup

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

type NetworkGroupId

type NetworkGroupId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkManagerName string
	NetworkGroupName   string
}

NetworkGroupId is a struct representing the Resource ID for a Network Group

func NewNetworkGroupID

func NewNetworkGroupID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string) NetworkGroupId

NewNetworkGroupID returns a new NetworkGroupId struct

func ParseNetworkGroupID

func ParseNetworkGroupID(input string) (*NetworkGroupId, error)

ParseNetworkGroupID parses 'input' into a NetworkGroupId

func ParseNetworkGroupIDInsensitively

func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error)

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

func (NetworkGroupId) ID

func (id NetworkGroupId) ID() string

ID returns the formatted Network Group ID

func (NetworkGroupId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Network Group ID

func (NetworkGroupId) String

func (id NetworkGroupId) String() string

String returns a human-readable description of this Network Group ID

type NetworkGroupOperationPredicate

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

func (NetworkGroupOperationPredicate) Matches

type NetworkGroupProperties

type NetworkGroupProperties struct {
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	ResourceGuid      *string            `json:"resourceGuid,omitempty"`
}

type NetworkGroupsClient

type NetworkGroupsClient struct {
	Client *resourcemanager.Client
}

func NewNetworkGroupsClientWithBaseURI

func NewNetworkGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkGroupsClient, error)

func (NetworkGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (NetworkGroupsClient) Delete

Delete ...

func (NetworkGroupsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (NetworkGroupsClient) Get

Get ...

func (NetworkGroupsClient) List

List ...

func (NetworkGroupsClient) ListComplete

ListComplete retrieves all the results into a single object

func (NetworkGroupsClient) ListCompleteMatchingPredicate

func (c NetworkGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate NetworkGroupOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type NetworkManagerId

type NetworkManagerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	NetworkManagerName string
}

NetworkManagerId is a struct representing the Resource ID for a Network Manager

func NewNetworkManagerID

func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId

NewNetworkManagerID returns a new NetworkManagerId struct

func ParseNetworkManagerID

func ParseNetworkManagerID(input string) (*NetworkManagerId, error)

ParseNetworkManagerID parses 'input' into a NetworkManagerId

func ParseNetworkManagerIDInsensitively

func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error)

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

func (NetworkManagerId) ID

func (id NetworkManagerId) ID() string

ID returns the formatted Network Manager ID

func (NetworkManagerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Network Manager ID

func (NetworkManagerId) String

func (id NetworkManagerId) String() string

String returns a human-readable description of this Network Manager ID

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	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