gateways

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/gateways Documentation

The gateways SDK allows for interaction with Azure Resource Manager hybridcompute (API Version 2024-05-20-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/hybridcompute/2024-05-20-preview/gateways"

Client Initialization

client := gateways.NewGatewaysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GatewaysClient.CreateOrUpdate

ctx := context.TODO()
id := gateways.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "gatewayName")

payload := gateways.Gateway{
	// ...
}


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

Example Usage: GatewaysClient.Delete

ctx := context.TODO()
id := gateways.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "gatewayName")

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

Example Usage: GatewaysClient.Get

ctx := context.TODO()
id := gateways.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "gatewayName")

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: GatewaysClient.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: GatewaysClient.ListBySubscription

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

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

Example Usage: GatewaysClient.Update

ctx := context.TODO()
id := gateways.NewGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "gatewayName")

payload := gateways.GatewayUpdate{
	// ...
}


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 PossibleValuesForGatewayType

func PossibleValuesForGatewayType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateGatewayID

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

ValidateGatewayID checks that 'input' can be parsed as a Gateway ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Gateway
}

type DeleteOperationResponse

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

type Gateway

type Gateway struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *GatewayProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type GatewayId

type GatewayId struct {
	SubscriptionId    string
	ResourceGroupName string
	GatewayName       string
}

GatewayId is a struct representing the Resource ID for a Gateway

func NewGatewayID

func NewGatewayID(subscriptionId string, resourceGroupName string, gatewayName string) GatewayId

NewGatewayID returns a new GatewayId struct

func ParseGatewayID

func ParseGatewayID(input string) (*GatewayId, error)

ParseGatewayID parses 'input' into a GatewayId

func ParseGatewayIDInsensitively

func ParseGatewayIDInsensitively(input string) (*GatewayId, error)

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

func (*GatewayId) FromParseResult

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

func (GatewayId) ID

func (id GatewayId) ID() string

ID returns the formatted Gateway ID

func (GatewayId) Segments

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

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

func (GatewayId) String

func (id GatewayId) String() string

String returns a human-readable description of this Gateway ID

type GatewayOperationPredicate

type GatewayOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (GatewayOperationPredicate) Matches

func (p GatewayOperationPredicate) Matches(input Gateway) bool

type GatewayProperties

type GatewayProperties struct {
	AllowedFeatures   *[]string          `json:"allowedFeatures,omitempty"`
	GatewayEndpoint   *string            `json:"gatewayEndpoint,omitempty"`
	GatewayId         *string            `json:"gatewayId,omitempty"`
	GatewayType       *GatewayType       `json:"gatewayType,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type GatewayType

type GatewayType string
const (
	GatewayTypePublic GatewayType = "Public"
)

func (*GatewayType) UnmarshalJSON

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

type GatewayUpdate

type GatewayUpdate struct {
	Properties *GatewayUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type GatewayUpdateProperties

type GatewayUpdateProperties struct {
	AllowedFeatures *[]string `json:"allowedFeatures,omitempty"`
}

type GatewaysClient

type GatewaysClient struct {
	Client *resourcemanager.Client
}

func NewGatewaysClientWithBaseURI

func NewGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewaysClient, error)

func (GatewaysClient) CreateOrUpdate

func (c GatewaysClient) CreateOrUpdate(ctx context.Context, id GatewayId, input Gateway) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (GatewaysClient) CreateOrUpdateThenPoll

func (c GatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id GatewayId, input Gateway) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (GatewaysClient) Delete

func (c GatewaysClient) Delete(ctx context.Context, id GatewayId) (result DeleteOperationResponse, err error)

Delete ...

func (GatewaysClient) DeleteThenPoll

func (c GatewaysClient) DeleteThenPoll(ctx context.Context, id GatewayId) error

DeleteThenPoll performs Delete then polls until it's completed

func (GatewaysClient) Get

func (c GatewaysClient) Get(ctx context.Context, id GatewayId) (result GetOperationResponse, err error)

Get ...

func (GatewaysClient) ListByResourceGroup

ListByResourceGroup ...

func (GatewaysClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (GatewaysClient) ListByResourceGroupCompleteMatchingPredicate

func (c GatewaysClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate GatewayOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GatewaysClient) ListBySubscription

ListBySubscription ...

func (GatewaysClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (GatewaysClient) ListBySubscriptionCompleteMatchingPredicate

func (c GatewaysClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate GatewayOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GatewaysClient) Update

func (c GatewaysClient) Update(ctx context.Context, id GatewayId, input GatewayUpdate) (result UpdateOperationResponse, err error)

Update ...

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Gateway
}

type ListByResourceGroupCustomPager

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Gateway
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Gateway
}

type ListBySubscriptionCustomPager

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Gateway
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleted   ProvisioningState = "Deleted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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