virtualnetworks

package
v0.20240119.1094410 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks Documentation

The virtualnetworks SDK allows for interaction with the Azure Resource Manager Service systemcentervirtualmachinemanager (API Version 2023-10-07).

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/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks"

Client Initialization

client := virtualnetworks.NewVirtualNetworksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualNetworksClient.CreateOrUpdate

ctx := context.TODO()
id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue")

payload := virtualnetworks.VirtualNetwork{
	// ...
}


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

Example Usage: VirtualNetworksClient.Delete

ctx := context.TODO()
id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue")

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

Example Usage: VirtualNetworksClient.Get

ctx := context.TODO()
id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue")

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: VirtualNetworksClient.ListByResourceGroup

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

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

Example Usage: VirtualNetworksClient.ListBySubscription

ctx := context.TODO()
id := virtualnetworks.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: VirtualNetworksClient.Update

ctx := context.TODO()
id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue")

payload := virtualnetworks.ResourcePatch{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForForce

func PossibleValuesForForce() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateVirtualNetworkID

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

ValidateVirtualNetworkID checks that 'input' can be parsed as a Virtual Network ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *Force
}

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 ExtendedLocation

type ExtendedLocation struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type Force

type Force string
const (
	ForceFalse Force = "false"
	ForceTrue  Force = "true"
)

func (*Force) UnmarshalJSON

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualNetwork
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualNetwork
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualNetwork
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualNetwork
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type ResourcePatch

type ResourcePatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateOperationResponse

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

type VirtualNetwork

type VirtualNetwork struct {
	ExtendedLocation ExtendedLocation         `json:"extendedLocation"`
	Id               *string                  `json:"id,omitempty"`
	Location         string                   `json:"location"`
	Name             *string                  `json:"name,omitempty"`
	Properties       VirtualNetworkProperties `json:"properties"`
	SystemData       *systemdata.SystemData   `json:"systemData,omitempty"`
	Tags             *map[string]string       `json:"tags,omitempty"`
	Type             *string                  `json:"type,omitempty"`
}

type VirtualNetworkId

type VirtualNetworkId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualNetworkName string
}

VirtualNetworkId is a struct representing the Resource ID for a Virtual Network

func NewVirtualNetworkID

func NewVirtualNetworkID(subscriptionId string, resourceGroupName string, virtualNetworkName string) VirtualNetworkId

NewVirtualNetworkID returns a new VirtualNetworkId struct

func ParseVirtualNetworkID

func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error)

ParseVirtualNetworkID parses 'input' into a VirtualNetworkId

func ParseVirtualNetworkIDInsensitively

func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error)

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

func (*VirtualNetworkId) FromParseResult added in v0.20231127.1171502

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

func (VirtualNetworkId) ID

func (id VirtualNetworkId) ID() string

ID returns the formatted Virtual Network ID

func (VirtualNetworkId) Segments

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

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

func (VirtualNetworkId) String

func (id VirtualNetworkId) String() string

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

type VirtualNetworkOperationPredicate

type VirtualNetworkOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualNetworkOperationPredicate) Matches

type VirtualNetworkProperties

type VirtualNetworkProperties struct {
	InventoryItemId   *string            `json:"inventoryItemId,omitempty"`
	NetworkName       *string            `json:"networkName,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Uuid              *string            `json:"uuid,omitempty"`
	VMmServerId       *string            `json:"vmmServerId,omitempty"`
}

type VirtualNetworksClient

type VirtualNetworksClient struct {
	Client *resourcemanager.Client
}

func NewVirtualNetworksClientWithBaseURI

func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error)

func (VirtualNetworksClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualNetworksClient) CreateOrUpdateThenPoll

func (c VirtualNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkId, input VirtualNetwork) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualNetworksClient) Delete

Delete ...

func (VirtualNetworksClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualNetworksClient) Get

Get ...

func (VirtualNetworksClient) ListByResourceGroup

ListByResourceGroup ...

func (VirtualNetworksClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VirtualNetworksClient) ListByResourceGroupCompleteMatchingPredicate

func (c VirtualNetworksClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualNetworksClient) ListBySubscription

ListBySubscription ...

func (VirtualNetworksClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (VirtualNetworksClient) ListBySubscriptionCompleteMatchingPredicate

func (c VirtualNetworksClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualNetworksClient) Update

Update ...

func (VirtualNetworksClient) UpdateThenPoll

func (c VirtualNetworksClient) UpdateThenPoll(ctx context.Context, id VirtualNetworkId, input ResourcePatch) error

UpdateThenPoll performs Update then polls until it's completed

Jump to

Keyboard shortcuts

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