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 ¶
- func PossibleValuesForSlotType() []string
- func ValidateCloudServiceID(input interface{}, key string) (warnings []string, errors []error)
- type CloudServiceId
- type CreateOperationResponse
- type GetOperationResponse
- type ListOperationResponse
- type SlotType
- type SwapResource
- type SwapResourceListResult
- type SwapResourceProperties
- type VipSwapClient
- func (c VipSwapClient) Create(ctx context.Context, id CloudServiceId, input SwapResource) (result CreateOperationResponse, err error)
- func (c VipSwapClient) CreateThenPoll(ctx context.Context, id CloudServiceId, input SwapResource) error
- func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOperationResponse, err error)
- func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result ListOperationResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForSlotType ¶
func PossibleValuesForSlotType() []string
func ValidateCloudServiceID ¶
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) 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 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 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 ¶
func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOperationResponse, err error)
Get ...
func (VipSwapClient) List ¶
func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result ListOperationResponse, err error)
List ...