virtualnetworks

package
v0.20240320.1105218 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks Documentation

The virtualnetworks SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2022-01-10-preview).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks"

Client Initialization

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

Example Usage: VirtualNetworksClient.Create

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

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


if err := client.CreateThenPoll(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.List

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

// 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
}

Example Usage: VirtualNetworksClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.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.Update

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

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


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

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualNetwork
}

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 ExtendedLocation

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

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 ListCompleteResult

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

type ListOperationResponse

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

type ResourcePatch

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

type ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type UpdateOperationResponse

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

type VirtualNetwork

type VirtualNetwork struct {
	ExtendedLocation *ExtendedLocation        `json:"extendedLocation,omitempty"`
	Id               *string                  `json:"id,omitempty"`
	Kind             *string                  `json:"kind,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

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
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualNetworkOperationPredicate) Matches

type VirtualNetworkProperties

type VirtualNetworkProperties struct {
	CustomResourceName *string           `json:"customResourceName,omitempty"`
	InventoryItemId    *string           `json:"inventoryItemId,omitempty"`
	MoName             *string           `json:"moName,omitempty"`
	MoRefId            *string           `json:"moRefId,omitempty"`
	ProvisioningState  *string           `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus `json:"statuses,omitempty"`
	Uuid               *string           `json:"uuid,omitempty"`
	VCenterId          *string           `json:"vCenterId,omitempty"`
}

type VirtualNetworksClient

type VirtualNetworksClient struct {
	Client *resourcemanager.Client
}

func NewVirtualNetworksClientWithBaseURI

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

func (VirtualNetworksClient) Create

Create ...

func (VirtualNetworksClient) CreateThenPoll

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

CreateThenPoll performs Create 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) List

List ...

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) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualNetworksClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualNetworksClient) Update

Update ...

Jump to

Keyboard shortcuts

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