workloadnetworksegments

package
v0.20241212.1154051 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/workloadnetworksegments Documentation

The workloadnetworksegments SDK allows for interaction with Azure Resource Manager vmware (API Version 2023-09-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/vmware/2023-09-01/workloadnetworksegments"

Client Initialization

client := workloadnetworksegments.NewWorkloadNetworkSegmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WorkloadNetworkSegmentsClient.WorkloadNetworksCreateSegments

ctx := context.TODO()
id := workloadnetworksegments.NewSegmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "segmentId")

payload := workloadnetworksegments.WorkloadNetworkSegment{
	// ...
}


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

Example Usage: WorkloadNetworkSegmentsClient.WorkloadNetworksDeleteSegment

ctx := context.TODO()
id := workloadnetworksegments.NewSegmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "segmentId")

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

Example Usage: WorkloadNetworkSegmentsClient.WorkloadNetworksGetSegment

ctx := context.TODO()
id := workloadnetworksegments.NewSegmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "segmentId")

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

Example Usage: WorkloadNetworkSegmentsClient.WorkloadNetworksListSegments

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

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

Example Usage: WorkloadNetworkSegmentsClient.WorkloadNetworksUpdateSegments

ctx := context.TODO()
id := workloadnetworksegments.NewSegmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudName", "segmentId")

payload := workloadnetworksegments.WorkloadNetworkSegment{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForSegmentStatusEnum

func PossibleValuesForSegmentStatusEnum() []string

func PossibleValuesForWorkloadNetworkSegmentProvisioningState

func PossibleValuesForWorkloadNetworkSegmentProvisioningState() []string

func ValidatePrivateCloudID

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

ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID

func ValidateSegmentID

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

ValidateSegmentID checks that 'input' can be parsed as a Segment ID

Types

type PrivateCloudId

type PrivateCloudId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
}

PrivateCloudId is a struct representing the Resource ID for a Private Cloud

func NewPrivateCloudID

func NewPrivateCloudID(subscriptionId string, resourceGroupName string, privateCloudName string) PrivateCloudId

NewPrivateCloudID returns a new PrivateCloudId struct

func ParsePrivateCloudID

func ParsePrivateCloudID(input string) (*PrivateCloudId, error)

ParsePrivateCloudID parses 'input' into a PrivateCloudId

func ParsePrivateCloudIDInsensitively

func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error)

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

func (*PrivateCloudId) FromParseResult

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

func (PrivateCloudId) ID

func (id PrivateCloudId) ID() string

ID returns the formatted Private Cloud ID

func (PrivateCloudId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID

func (PrivateCloudId) String

func (id PrivateCloudId) String() string

String returns a human-readable description of this Private Cloud ID

type SegmentId

type SegmentId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	SegmentId         string
}

SegmentId is a struct representing the Resource ID for a Segment

func NewSegmentID

func NewSegmentID(subscriptionId string, resourceGroupName string, privateCloudName string, segmentId string) SegmentId

NewSegmentID returns a new SegmentId struct

func ParseSegmentID

func ParseSegmentID(input string) (*SegmentId, error)

ParseSegmentID parses 'input' into a SegmentId

func ParseSegmentIDInsensitively

func ParseSegmentIDInsensitively(input string) (*SegmentId, error)

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

func (*SegmentId) FromParseResult

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

func (SegmentId) ID

func (id SegmentId) ID() string

ID returns the formatted Segment ID

func (SegmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Segment ID

func (SegmentId) String

func (id SegmentId) String() string

String returns a human-readable description of this Segment ID

type SegmentStatusEnum

type SegmentStatusEnum string
const (
	SegmentStatusEnumFAILURE SegmentStatusEnum = "FAILURE"
	SegmentStatusEnumSUCCESS SegmentStatusEnum = "SUCCESS"
)

func (*SegmentStatusEnum) UnmarshalJSON

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

type WorkloadNetworkSegment

type WorkloadNetworkSegment struct {
	Id         *string                           `json:"id,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *WorkloadNetworkSegmentProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData            `json:"systemData,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type WorkloadNetworkSegmentOperationPredicate

type WorkloadNetworkSegmentOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (WorkloadNetworkSegmentOperationPredicate) Matches

type WorkloadNetworkSegmentPortVif

type WorkloadNetworkSegmentPortVif struct {
	PortName *string `json:"portName,omitempty"`
}

type WorkloadNetworkSegmentProperties

type WorkloadNetworkSegmentProperties struct {
	ConnectedGateway  *string                                  `json:"connectedGateway,omitempty"`
	DisplayName       *string                                  `json:"displayName,omitempty"`
	PortVif           *[]WorkloadNetworkSegmentPortVif         `json:"portVif,omitempty"`
	ProvisioningState *WorkloadNetworkSegmentProvisioningState `json:"provisioningState,omitempty"`
	Revision          *int64                                   `json:"revision,omitempty"`
	Status            *SegmentStatusEnum                       `json:"status,omitempty"`
	Subnet            *WorkloadNetworkSegmentSubnet            `json:"subnet,omitempty"`
}

type WorkloadNetworkSegmentProvisioningState

type WorkloadNetworkSegmentProvisioningState string
const (
	WorkloadNetworkSegmentProvisioningStateBuilding  WorkloadNetworkSegmentProvisioningState = "Building"
	WorkloadNetworkSegmentProvisioningStateCanceled  WorkloadNetworkSegmentProvisioningState = "Canceled"
	WorkloadNetworkSegmentProvisioningStateDeleting  WorkloadNetworkSegmentProvisioningState = "Deleting"
	WorkloadNetworkSegmentProvisioningStateFailed    WorkloadNetworkSegmentProvisioningState = "Failed"
	WorkloadNetworkSegmentProvisioningStateSucceeded WorkloadNetworkSegmentProvisioningState = "Succeeded"
	WorkloadNetworkSegmentProvisioningStateUpdating  WorkloadNetworkSegmentProvisioningState = "Updating"
)

func (*WorkloadNetworkSegmentProvisioningState) UnmarshalJSON

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

type WorkloadNetworkSegmentSubnet

type WorkloadNetworkSegmentSubnet struct {
	DhcpRanges     *[]string `json:"dhcpRanges,omitempty"`
	GatewayAddress *string   `json:"gatewayAddress,omitempty"`
}

type WorkloadNetworkSegmentsClient

type WorkloadNetworkSegmentsClient struct {
	Client *resourcemanager.Client
}

func NewWorkloadNetworkSegmentsClientWithBaseURI

func NewWorkloadNetworkSegmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworkSegmentsClient, error)

func (WorkloadNetworkSegmentsClient) WorkloadNetworksCreateSegments

WorkloadNetworksCreateSegments ...

func (WorkloadNetworkSegmentsClient) WorkloadNetworksCreateSegmentsThenPoll

func (c WorkloadNetworkSegmentsClient) WorkloadNetworksCreateSegmentsThenPoll(ctx context.Context, id SegmentId, input WorkloadNetworkSegment) error

WorkloadNetworksCreateSegmentsThenPoll performs WorkloadNetworksCreateSegments then polls until it's completed

func (WorkloadNetworkSegmentsClient) WorkloadNetworksDeleteSegment

func (c WorkloadNetworkSegmentsClient) WorkloadNetworksDeleteSegment(ctx context.Context, id SegmentId) (result WorkloadNetworksDeleteSegmentOperationResponse, err error)

WorkloadNetworksDeleteSegment ...

func (WorkloadNetworkSegmentsClient) WorkloadNetworksDeleteSegmentThenPoll

func (c WorkloadNetworkSegmentsClient) WorkloadNetworksDeleteSegmentThenPoll(ctx context.Context, id SegmentId) error

WorkloadNetworksDeleteSegmentThenPoll performs WorkloadNetworksDeleteSegment then polls until it's completed

func (WorkloadNetworkSegmentsClient) WorkloadNetworksGetSegment

WorkloadNetworksGetSegment ...

func (WorkloadNetworkSegmentsClient) WorkloadNetworksListSegments

WorkloadNetworksListSegments ...

func (WorkloadNetworkSegmentsClient) WorkloadNetworksListSegmentsComplete

WorkloadNetworksListSegmentsComplete retrieves all the results into a single object

func (WorkloadNetworkSegmentsClient) WorkloadNetworksListSegmentsCompleteMatchingPredicate

func (c WorkloadNetworkSegmentsClient) WorkloadNetworksListSegmentsCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate WorkloadNetworkSegmentOperationPredicate) (result WorkloadNetworksListSegmentsCompleteResult, err error)

WorkloadNetworksListSegmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (WorkloadNetworkSegmentsClient) WorkloadNetworksUpdateSegments

WorkloadNetworksUpdateSegments ...

func (WorkloadNetworkSegmentsClient) WorkloadNetworksUpdateSegmentsThenPoll

func (c WorkloadNetworkSegmentsClient) WorkloadNetworksUpdateSegmentsThenPoll(ctx context.Context, id SegmentId, input WorkloadNetworkSegment) error

WorkloadNetworksUpdateSegmentsThenPoll performs WorkloadNetworksUpdateSegments then polls until it's completed

type WorkloadNetworksCreateSegmentsOperationResponse

type WorkloadNetworksCreateSegmentsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *WorkloadNetworkSegment
}

type WorkloadNetworksDeleteSegmentOperationResponse

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

type WorkloadNetworksGetSegmentOperationResponse

type WorkloadNetworksGetSegmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *WorkloadNetworkSegment
}

type WorkloadNetworksListSegmentsCompleteResult

type WorkloadNetworksListSegmentsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []WorkloadNetworkSegment
}

type WorkloadNetworksListSegmentsCustomPager added in v0.20240628.1153531

type WorkloadNetworksListSegmentsCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkloadNetworksListSegmentsOperationResponse

type WorkloadNetworksListSegmentsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]WorkloadNetworkSegment
}

type WorkloadNetworksUpdateSegmentsOperationResponse

type WorkloadNetworksUpdateSegmentsOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *WorkloadNetworkSegment
}

Jump to

Keyboard shortcuts

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