backend

package
v0.20240209.1164150 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/backend Documentation

The backend SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-03-01-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-sdk/resource-manager/apimanagement/2023-03-01-preview/backend"

Client Initialization

client := backend.NewBackendClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BackendClient.CreateOrUpdate

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

payload := backend.BackendContract{
	// ...
}


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

Example Usage: BackendClient.Delete

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

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

Example Usage: BackendClient.Get

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

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

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

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: BackendClient.ListByService

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

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

Example Usage: BackendClient.Update

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

payload := backend.BackendUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload, backend.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 PossibleValuesForBackendProtocol

func PossibleValuesForBackendProtocol() []string

func ValidateBackendID

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

ValidateBackendID checks that 'input' can be parsed as a Backend 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 BackendAuthorizationHeaderCredentials

type BackendAuthorizationHeaderCredentials struct {
	Parameter string `json:"parameter"`
	Scheme    string `json:"scheme"`
}

type BackendCircuitBreaker

type BackendCircuitBreaker struct {
	Rules *[]CircuitBreakerRule `json:"rules,omitempty"`
}

type BackendClient

type BackendClient struct {
	Client *resourcemanager.Client
}

func NewBackendClientWithBaseURI

func NewBackendClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendClient, error)

func (BackendClient) CreateOrUpdate

CreateOrUpdate ...

func (BackendClient) Delete

Delete ...

func (BackendClient) Get

func (c BackendClient) Get(ctx context.Context, id BackendId) (result GetOperationResponse, err error)

Get ...

func (BackendClient) GetEntityTag

func (c BackendClient) GetEntityTag(ctx context.Context, id BackendId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (BackendClient) ListByService

ListByService ...

func (BackendClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (BackendClient) ListByServiceCompleteMatchingPredicate

func (c BackendClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate BackendContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BackendClient) Update

Update ...

type BackendContract

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

type BackendContractOperationPredicate

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

func (BackendContractOperationPredicate) Matches

type BackendContractProperties

type BackendContractProperties struct {
	CircuitBreaker *BackendCircuitBreaker      `json:"circuitBreaker,omitempty"`
	Credentials    *BackendCredentialsContract `json:"credentials,omitempty"`
	Description    *string                     `json:"description,omitempty"`
	Properties     *BackendProperties          `json:"properties,omitempty"`
	Protocol       BackendProtocol             `json:"protocol"`
	Proxy          *BackendProxyContract       `json:"proxy,omitempty"`
	ResourceId     *string                     `json:"resourceId,omitempty"`
	Title          *string                     `json:"title,omitempty"`
	Tls            *BackendTlsProperties       `json:"tls,omitempty"`
	Url            string                      `json:"url"`
}

type BackendCredentialsContract

type BackendCredentialsContract struct {
	Authorization  *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"`
	Certificate    *[]string                              `json:"certificate,omitempty"`
	CertificateIds *[]string                              `json:"certificateIds,omitempty"`
	Header         *map[string][]string                   `json:"header,omitempty"`
	Query          *map[string][]string                   `json:"query,omitempty"`
}

type BackendId

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

BackendId is a struct representing the Resource ID for a Backend

func NewBackendID

func NewBackendID(subscriptionId string, resourceGroupName string, serviceName string, backendId string) BackendId

NewBackendID returns a new BackendId struct

func ParseBackendID

func ParseBackendID(input string) (*BackendId, error)

ParseBackendID parses 'input' into a BackendId

func ParseBackendIDInsensitively

func ParseBackendIDInsensitively(input string) (*BackendId, error)

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

func (*BackendId) FromParseResult

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

func (BackendId) ID

func (id BackendId) ID() string

ID returns the formatted Backend ID

func (BackendId) Segments

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

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

func (BackendId) String

func (id BackendId) String() string

String returns a human-readable description of this Backend ID

type BackendProperties

type BackendProperties struct {
	ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"`
}

type BackendProtocol

type BackendProtocol string
const (
	BackendProtocolHTTP BackendProtocol = "http"
	BackendProtocolSoap BackendProtocol = "soap"
)

func (*BackendProtocol) UnmarshalJSON

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

type BackendProxyContract

type BackendProxyContract struct {
	Password *string `json:"password,omitempty"`
	Url      string  `json:"url"`
	Username *string `json:"username,omitempty"`
}

type BackendServiceFabricClusterProperties

type BackendServiceFabricClusterProperties struct {
	ClientCertificateId           *string                `json:"clientCertificateId,omitempty"`
	ClientCertificatethumbprint   *string                `json:"clientCertificatethumbprint,omitempty"`
	ManagementEndpoints           []string               `json:"managementEndpoints"`
	MaxPartitionResolutionRetries *int64                 `json:"maxPartitionResolutionRetries,omitempty"`
	ServerCertificateThumbprints  *[]string              `json:"serverCertificateThumbprints,omitempty"`
	ServerX509Names               *[]X509CertificateName `json:"serverX509Names,omitempty"`
}

type BackendTlsProperties

type BackendTlsProperties struct {
	ValidateCertificateChain *bool `json:"validateCertificateChain,omitempty"`
	ValidateCertificateName  *bool `json:"validateCertificateName,omitempty"`
}

type BackendUpdateParameterProperties

type BackendUpdateParameterProperties struct {
	CircuitBreaker *BackendCircuitBreaker      `json:"circuitBreaker,omitempty"`
	Credentials    *BackendCredentialsContract `json:"credentials,omitempty"`
	Description    *string                     `json:"description,omitempty"`
	Properties     *BackendProperties          `json:"properties,omitempty"`
	Protocol       *BackendProtocol            `json:"protocol,omitempty"`
	Proxy          *BackendProxyContract       `json:"proxy,omitempty"`
	ResourceId     *string                     `json:"resourceId,omitempty"`
	Title          *string                     `json:"title,omitempty"`
	Tls            *BackendTlsProperties       `json:"tls,omitempty"`
	Url            *string                     `json:"url,omitempty"`
}

type BackendUpdateParameters

type BackendUpdateParameters struct {
	Properties *BackendUpdateParameterProperties `json:"properties,omitempty"`
}

type CircuitBreakerFailureCondition

type CircuitBreakerFailureCondition struct {
	Count            *int64                    `json:"count,omitempty"`
	ErrorReasons     *[]string                 `json:"errorReasons,omitempty"`
	Interval         *string                   `json:"interval,omitempty"`
	Percentage       *int64                    `json:"percentage,omitempty"`
	StatusCodeRanges *[]FailureStatusCodeRange `json:"statusCodeRanges,omitempty"`
}

type CircuitBreakerRule

type CircuitBreakerRule struct {
	FailureCondition *CircuitBreakerFailureCondition `json:"failureCondition,omitempty"`
	Name             *string                         `json:"name,omitempty"`
	TripDuration     *string                         `json:"tripDuration,omitempty"`
}

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BackendContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type FailureStatusCodeRange

type FailureStatusCodeRange struct {
	Max *int64 `json:"max,omitempty"`
	Min *int64 `json:"min,omitempty"`
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BackendContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BackendContract
}

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) FromParseResult

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

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

func (UpdateOperationOptions) ToHeaders

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

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

type X509CertificateName

type X509CertificateName struct {
	IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"`
	Name                        *string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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