backend

package
v0.20231004.1141559 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend Documentation

The backend SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2022-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/2022-08-01/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 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 {
	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) 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 added in v0.20230801.1071415

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 {
	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 CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230801.1071415

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 added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToOData added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToQuery added in v0.20230801.1071415

type DeleteOperationResponse

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

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 {
	Items []BackendContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToOData added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToQuery added in v0.20230801.1071415

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) 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 added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToOData added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToQuery added in v0.20230801.1071415

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