apigateway

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: 16 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apigateway Documentation

The apigateway SDK allows for interaction with Azure Resource Manager apimanagement (API Version 2024-05-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apigateway"

Client Initialization

client := apigateway.NewApiGatewayClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiGatewayClient.CreateOrUpdate

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

payload := apigateway.ApiManagementGatewayResource{
	// ...
}


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

Example Usage: ApiGatewayClient.Delete

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

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

Example Usage: ApiGatewayClient.Get

ctx := context.TODO()
id := apigateway.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: ApiGatewayClient.List

ctx := context.TODO()
id := commonids.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: ApiGatewayClient.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: ApiGatewayClient.Update

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

payload := apigateway.ApiManagementGatewayUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForApiGatewaySkuType

func PossibleValuesForApiGatewaySkuType() []string

func PossibleValuesForVirtualNetworkType

func PossibleValuesForVirtualNetworkType() []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 ApiGatewayClient

type ApiGatewayClient struct {
	Client *resourcemanager.Client
}

func NewApiGatewayClientWithBaseURI

func NewApiGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiGatewayClient, error)

func (ApiGatewayClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiGatewayClient) CreateOrUpdateThenPoll

func (c ApiGatewayClient) CreateOrUpdateThenPoll(ctx context.Context, id GatewayId, input ApiManagementGatewayResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ApiGatewayClient) Delete

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

Delete ...

func (ApiGatewayClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (ApiGatewayClient) Get

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

Get ...

func (ApiGatewayClient) List

List ...

func (ApiGatewayClient) ListByResourceGroup

ListByResourceGroup ...

func (ApiGatewayClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ApiGatewayClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ApiGatewayClient) ListComplete

ListComplete retrieves all the results into a single object

func (ApiGatewayClient) ListCompleteMatchingPredicate

func (c ApiGatewayClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApiManagementGatewayResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ApiGatewayClient) Update

Update ...

func (ApiGatewayClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type ApiGatewaySkuType

type ApiGatewaySkuType string
const (
	ApiGatewaySkuTypeStandard                 ApiGatewaySkuType = "Standard"
	ApiGatewaySkuTypeWorkspaceGatewayPremium  ApiGatewaySkuType = "WorkspaceGatewayPremium"
	ApiGatewaySkuTypeWorkspaceGatewayStandard ApiGatewaySkuType = "WorkspaceGatewayStandard"
)

func (*ApiGatewaySkuType) UnmarshalJSON

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

type ApiManagementGatewayBaseProperties

type ApiManagementGatewayBaseProperties struct {
	Backend                 *BackendConfiguration    `json:"backend,omitempty"`
	ConfigurationApi        *GatewayConfigurationApi `json:"configurationApi,omitempty"`
	CreatedAtUtc            *string                  `json:"createdAtUtc,omitempty"`
	Frontend                *FrontendConfiguration   `json:"frontend,omitempty"`
	ProvisioningState       *string                  `json:"provisioningState,omitempty"`
	TargetProvisioningState *string                  `json:"targetProvisioningState,omitempty"`
	VirtualNetworkType      *VirtualNetworkType      `json:"virtualNetworkType,omitempty"`
}

func (*ApiManagementGatewayBaseProperties) GetCreatedAtUtcAsTime

func (o *ApiManagementGatewayBaseProperties) GetCreatedAtUtcAsTime() (*time.Time, error)

func (*ApiManagementGatewayBaseProperties) SetCreatedAtUtcAsTime

func (o *ApiManagementGatewayBaseProperties) SetCreatedAtUtcAsTime(input time.Time)

type ApiManagementGatewayResource

type ApiManagementGatewayResource struct {
	Etag       *string                            `json:"etag,omitempty"`
	Id         *string                            `json:"id,omitempty"`
	Location   string                             `json:"location"`
	Name       *string                            `json:"name,omitempty"`
	Properties ApiManagementGatewayBaseProperties `json:"properties"`
	Sku        ApiManagementGatewaySkuProperties  `json:"sku"`
	SystemData *systemdata.SystemData             `json:"systemData,omitempty"`
	Tags       *map[string]string                 `json:"tags,omitempty"`
	Type       *string                            `json:"type,omitempty"`
}

type ApiManagementGatewayResourceOperationPredicate

type ApiManagementGatewayResourceOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ApiManagementGatewayResourceOperationPredicate) Matches

type ApiManagementGatewaySkuProperties

type ApiManagementGatewaySkuProperties struct {
	Capacity *int64            `json:"capacity,omitempty"`
	Name     ApiGatewaySkuType `json:"name"`
}

type ApiManagementGatewaySkuPropertiesForPatch

type ApiManagementGatewaySkuPropertiesForPatch struct {
	Capacity *int64             `json:"capacity,omitempty"`
	Name     *ApiGatewaySkuType `json:"name,omitempty"`
}

type ApiManagementGatewayUpdateParameters

type ApiManagementGatewayUpdateParameters struct {
	Etag       *string                                    `json:"etag,omitempty"`
	Id         *string                                    `json:"id,omitempty"`
	Name       *string                                    `json:"name,omitempty"`
	Properties *ApiManagementGatewayBaseProperties        `json:"properties,omitempty"`
	Sku        *ApiManagementGatewaySkuPropertiesForPatch `json:"sku,omitempty"`
	Tags       *map[string]string                         `json:"tags,omitempty"`
	Type       *string                                    `json:"type,omitempty"`
}

type BackendConfiguration

type BackendConfiguration struct {
	Subnet *BackendSubnetConfiguration `json:"subnet,omitempty"`
}

type BackendSubnetConfiguration

type BackendSubnetConfiguration struct {
	Id *string `json:"id,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type FrontendConfiguration

type FrontendConfiguration struct {
	DefaultHostname *string `json:"defaultHostname,omitempty"`
}

type GatewayConfigurationApi

type GatewayConfigurationApi struct {
	Hostname *string `json:"hostname,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 GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

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        *[]ApiManagementGatewayResource
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ApiManagementGatewayResource
}

type ListCustomPager

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ApiManagementGatewayResource
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApiManagementGatewayResource
}

type VirtualNetworkType

type VirtualNetworkType string
const (
	VirtualNetworkTypeExternal VirtualNetworkType = "External"
	VirtualNetworkTypeInternal VirtualNetworkType = "Internal"
	VirtualNetworkTypeNone     VirtualNetworkType = "None"
)

func (*VirtualNetworkType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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