vipswap

package
v0.20240315.1103122 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-04-01/vipswap Documentation

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

Client Initialization

client := vipswap.NewVipSwapClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VipSwapClient.Create

ctx := context.TODO()
id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue")

payload := vipswap.SwapResource{
	// ...
}


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

Example Usage: VipSwapClient.Get

ctx := context.TODO()
id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue")

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

ctx := context.TODO()
id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue")

read, err := client.List(ctx, id)
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 PossibleValuesForSlotType

func PossibleValuesForSlotType() []string

func ValidateCloudServiceID

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

ValidateCloudServiceID checks that 'input' can be parsed as a Cloud Service ID

Types

type CloudServiceId

type CloudServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	CloudServiceName  string
}

CloudServiceId is a struct representing the Resource ID for a Cloud Service

func NewCloudServiceID

func NewCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) CloudServiceId

NewCloudServiceID returns a new CloudServiceId struct

func ParseCloudServiceID

func ParseCloudServiceID(input string) (*CloudServiceId, error)

ParseCloudServiceID parses 'input' into a CloudServiceId

func ParseCloudServiceIDInsensitively

func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error)

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

func (*CloudServiceId) FromParseResult

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

func (CloudServiceId) ID

func (id CloudServiceId) ID() string

ID returns the formatted Cloud Service ID

func (CloudServiceId) Segments

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

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

func (CloudServiceId) String

func (id CloudServiceId) String() string

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

type CreateOperationResponse

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

type GetOperationResponse

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SwapResourceListResult
}

type SlotType

type SlotType string
const (
	SlotTypeProduction SlotType = "Production"
	SlotTypeStaging    SlotType = "Staging"
)

func (*SlotType) UnmarshalJSON

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

type SwapResource

type SwapResource struct {
	Id         *string                 `json:"id,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *SwapResourceProperties `json:"properties,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type SwapResourceListResult

type SwapResourceListResult struct {
	Value *[]SwapResource `json:"value,omitempty"`
}

type SwapResourceProperties

type SwapResourceProperties struct {
	SlotType *SlotType `json:"slotType,omitempty"`
}

type VipSwapClient

type VipSwapClient struct {
	Client *resourcemanager.Client
}

func NewVipSwapClientWithBaseURI

func NewVipSwapClientWithBaseURI(sdkApi sdkEnv.Api) (*VipSwapClient, error)

func (VipSwapClient) Create

func (c VipSwapClient) Create(ctx context.Context, id CloudServiceId, input SwapResource) (result CreateOperationResponse, err error)

Create ...

func (VipSwapClient) CreateThenPoll

func (c VipSwapClient) CreateThenPoll(ctx context.Context, id CloudServiceId, input SwapResource) error

CreateThenPoll performs Create then polls until it's completed

func (VipSwapClient) Get

Get ...

func (VipSwapClient) List

List ...

Jump to

Keyboard shortcuts

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