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-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 := virtualnetworks.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 := 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.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 ¶
- func ValidateVirtualNetworkID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type ExtendedLocation
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type ResourcePatch
- type ResourceStatus
- type UpdateOperationResponse
- type VirtualNetwork
- type VirtualNetworkId
- type VirtualNetworkOperationPredicate
- type VirtualNetworkProperties
- type VirtualNetworksClient
- func (c VirtualNetworksClient) Create(ctx context.Context, id VirtualNetworkId, input VirtualNetwork) (result CreateOperationResponse, err error)
- func (c VirtualNetworksClient) CreateThenPoll(ctx context.Context, id VirtualNetworkId, input VirtualNetwork) error
- func (c VirtualNetworksClient) Delete(ctx context.Context, id VirtualNetworkId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c VirtualNetworksClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkId, options DeleteOperationOptions) error
- func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (result GetOperationResponse, err error)
- func (c VirtualNetworksClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c VirtualNetworksClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c VirtualNetworksClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c VirtualNetworksClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c VirtualNetworksClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c VirtualNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, input ResourcePatch) (result UpdateOperationResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateVirtualNetworkID ¶
ValidateVirtualNetworkID checks that 'input' can be parsed as a Virtual Network ID
Types ¶
type CreateOperationResponse ¶
type DeleteOperationOptions ¶
type DeleteOperationOptions struct {
Force *bool
}
func DefaultDeleteOperationOptions ¶
func DefaultDeleteOperationOptions() DeleteOperationOptions
func (DeleteOperationOptions) ToHeaders ¶ added in v0.20230404.1155830
func (o DeleteOperationOptions) ToHeaders() *client.Headers
func (DeleteOperationOptions) ToOData ¶ added in v0.20230404.1155830
func (o DeleteOperationOptions) ToOData() *odata.Query
func (DeleteOperationOptions) ToQuery ¶ added in v0.20230404.1155830
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type ExtendedLocation ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *VirtualNetwork }
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []VirtualNetwork
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]VirtualNetwork }
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []VirtualNetwork
}
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]VirtualNetwork }
type ResourcePatch ¶
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) 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 ¶
func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool
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(api environments.Api) (*VirtualNetworksClient, error)
func (VirtualNetworksClient) Create ¶
func (c VirtualNetworksClient) Create(ctx context.Context, id VirtualNetworkId, input VirtualNetwork) (result CreateOperationResponse, err error)
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 ¶
func (c VirtualNetworksClient) Delete(ctx context.Context, id VirtualNetworkId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
Delete ...
func (VirtualNetworksClient) DeleteThenPoll ¶
func (c VirtualNetworksClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkId, options DeleteOperationOptions) error
DeleteThenPoll performs Delete then polls until it's completed
func (VirtualNetworksClient) Get ¶
func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (result GetOperationResponse, err error)
Get ...
func (VirtualNetworksClient) List ¶
func (c VirtualNetworksClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (VirtualNetworksClient) ListByResourceGroup ¶
func (c VirtualNetworksClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (VirtualNetworksClient) ListByResourceGroupComplete ¶
func (c VirtualNetworksClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c VirtualNetworksClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
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 ¶
func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, input ResourcePatch) (result UpdateOperationResponse, err error)
Update ...