gateway

package
v0.20221026.1165012 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/gateway Documentation

The gateway SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-08-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/apimanagement/2021-08-01/gateway"

Client Initialization

client := gateway.NewGatewayClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GatewayClient.CreateOrUpdate

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

payload := gateway.GatewayContract{
	// ...
}


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

Example Usage: GatewayClient.Delete

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

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

Example Usage: GatewayClient.Get

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

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: GatewayClient.GetEntityTag

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

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

Example Usage: GatewayClient.ListByService

ctx := context.TODO()
id := gateway.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

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

Example Usage: GatewayClient.Update

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

payload := gateway.GatewayContract{
	// ...
}


read, err := client.Update(ctx, id, payload, gateway.DefaultUpdateOperationOptions())
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 ValidateGatewayID

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

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

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *GatewayContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GatewayClient

type GatewayClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewGatewayClientWithBaseURI

func NewGatewayClientWithBaseURI(endpoint string) GatewayClient

func (GatewayClient) CreateOrUpdate

CreateOrUpdate ...

func (GatewayClient) Delete

Delete ...

func (GatewayClient) Get

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

Get ...

func (GatewayClient) GetEntityTag

func (c GatewayClient) GetEntityTag(ctx context.Context, id GatewayId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (GatewayClient) ListByService

ListByService ...

func (GatewayClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (GatewayClient) ListByServiceCompleteMatchingPredicate

func (c GatewayClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate GatewayContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (GatewayClient) Update

Update ...

type GatewayContract

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

type GatewayContractOperationPredicate

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

func (GatewayContractOperationPredicate) Matches

type GatewayContractProperties

type GatewayContractProperties struct {
	Description  *string                       `json:"description,omitempty"`
	LocationData *ResourceLocationDataContract `json:"locationData,omitempty"`
}

type GatewayId

type GatewayId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	GatewayId         string
}

GatewayId is a struct representing the Resource ID for a Gateway

func NewGatewayID

func NewGatewayID(subscriptionId string, resourceGroupName string, serviceName string, gatewayId 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) 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 GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *GatewayContract
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []GatewayContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]GatewayContract
	// contains filtered or unexported fields
}

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ResourceLocationDataContract

type ResourceLocationDataContract struct {
	City            *string `json:"city,omitempty"`
	CountryOrRegion *string `json:"countryOrRegion,omitempty"`
	District        *string `json:"district,omitempty"`
	Name            string  `json:"name"`
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *GatewayContract
}

Jump to

Keyboard shortcuts

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