gatewayapi

package
v0.20240402.1064951 Latest Latest
Warning

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

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

README

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

The gatewayapi 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/gatewayapi"

Client Initialization

client := gatewayapi.NewGatewayApiClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GatewayApiClient.CreateOrUpdate

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

payload := gatewayapi.AssociationContract{
	// ...
}


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

Example Usage: GatewayApiClient.Delete

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

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

Example Usage: GatewayApiClient.GetEntityTag

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

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForApiType

func PossibleValuesForApiType() []string

func PossibleValuesForBearerTokenSendingMethods

func PossibleValuesForBearerTokenSendingMethods() []string

func PossibleValuesForProtocol

func PossibleValuesForProtocol() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForVersioningScheme

func PossibleValuesForVersioningScheme() []string

func ValidateGatewayApiID

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

ValidateGatewayApiID checks that 'input' can be parsed as a Gateway Api ID

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 ApiContactInformation

type ApiContactInformation struct {
	Email *string `json:"email,omitempty"`
	Name  *string `json:"name,omitempty"`
	Url   *string `json:"url,omitempty"`
}

type ApiContract

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

type ApiContractOperationPredicate

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

func (ApiContractOperationPredicate) Matches

type ApiContractProperties

type ApiContractProperties struct {
	ApiRevision                   *string                                `json:"apiRevision,omitempty"`
	ApiRevisionDescription        *string                                `json:"apiRevisionDescription,omitempty"`
	ApiVersion                    *string                                `json:"apiVersion,omitempty"`
	ApiVersionDescription         *string                                `json:"apiVersionDescription,omitempty"`
	ApiVersionSet                 *ApiVersionSetContractDetails          `json:"apiVersionSet,omitempty"`
	ApiVersionSetId               *string                                `json:"apiVersionSetId,omitempty"`
	AuthenticationSettings        *AuthenticationSettingsContract        `json:"authenticationSettings,omitempty"`
	Contact                       *ApiContactInformation                 `json:"contact,omitempty"`
	Description                   *string                                `json:"description,omitempty"`
	DisplayName                   *string                                `json:"displayName,omitempty"`
	IsCurrent                     *bool                                  `json:"isCurrent,omitempty"`
	IsOnline                      *bool                                  `json:"isOnline,omitempty"`
	License                       *ApiLicenseInformation                 `json:"license,omitempty"`
	Path                          string                                 `json:"path"`
	Protocols                     *[]Protocol                            `json:"protocols,omitempty"`
	ServiceUrl                    *string                                `json:"serviceUrl,omitempty"`
	SourceApiId                   *string                                `json:"sourceApiId,omitempty"`
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`
	SubscriptionRequired          *bool                                  `json:"subscriptionRequired,omitempty"`
	TermsOfServiceUrl             *string                                `json:"termsOfServiceUrl,omitempty"`
	Type                          *ApiType                               `json:"type,omitempty"`
}

type ApiLicenseInformation

type ApiLicenseInformation struct {
	Name *string `json:"name,omitempty"`
	Url  *string `json:"url,omitempty"`
}

type ApiType

type ApiType string
const (
	ApiTypeGraphql   ApiType = "graphql"
	ApiTypeHTTP      ApiType = "http"
	ApiTypeOdata     ApiType = "odata"
	ApiTypeSoap      ApiType = "soap"
	ApiTypeWebsocket ApiType = "websocket"
)

func (*ApiType) UnmarshalJSON

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

type ApiVersionSetContractDetails

type ApiVersionSetContractDetails struct {
	Description       *string           `json:"description,omitempty"`
	Id                *string           `json:"id,omitempty"`
	Name              *string           `json:"name,omitempty"`
	VersionHeaderName *string           `json:"versionHeaderName,omitempty"`
	VersionQueryName  *string           `json:"versionQueryName,omitempty"`
	VersioningScheme  *VersioningScheme `json:"versioningScheme,omitempty"`
}

type AssociationContract

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

type AssociationContractProperties

type AssociationContractProperties struct {
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type AuthenticationSettingsContract

type AuthenticationSettingsContract struct {
	OAuth2                       *OAuth2AuthenticationSettingsContract   `json:"oAuth2,omitempty"`
	OAuth2AuthenticationSettings *[]OAuth2AuthenticationSettingsContract `json:"oAuth2AuthenticationSettings,omitempty"`
	Openid                       *OpenIdAuthenticationSettingsContract   `json:"openid,omitempty"`
	OpenidAuthenticationSettings *[]OpenIdAuthenticationSettingsContract `json:"openidAuthenticationSettings,omitempty"`
}

type BearerTokenSendingMethods

type BearerTokenSendingMethods string
const (
	BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
	BearerTokenSendingMethodsQuery               BearerTokenSendingMethods = "query"
)

func (*BearerTokenSendingMethods) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GatewayApiClient

type GatewayApiClient struct {
	Client *resourcemanager.Client
}

func NewGatewayApiClientWithBaseURI

func NewGatewayApiClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayApiClient, error)

func (GatewayApiClient) CreateOrUpdate

CreateOrUpdate ...

func (GatewayApiClient) Delete

Delete ...

func (GatewayApiClient) GetEntityTag

func (c GatewayApiClient) GetEntityTag(ctx context.Context, id GatewayApiId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (GatewayApiClient) ListByService

ListByService ...

func (GatewayApiClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (GatewayApiClient) ListByServiceCompleteMatchingPredicate

func (c GatewayApiClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id GatewayId, options ListByServiceOperationOptions, predicate ApiContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GatewayApiId

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

GatewayApiId is a struct representing the Resource ID for a Gateway Api

func NewGatewayApiID

func NewGatewayApiID(subscriptionId string, resourceGroupName string, serviceName string, gatewayId string, apiId string) GatewayApiId

NewGatewayApiID returns a new GatewayApiId struct

func ParseGatewayApiID

func ParseGatewayApiID(input string) (*GatewayApiId, error)

ParseGatewayApiID parses 'input' into a GatewayApiId

func ParseGatewayApiIDInsensitively

func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error)

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

func (*GatewayApiId) FromParseResult

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

func (GatewayApiId) ID

func (id GatewayApiId) ID() string

ID returns the formatted Gateway Api ID

func (GatewayApiId) Segments

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

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

func (GatewayApiId) String

func (id GatewayApiId) String() string

String returns a human-readable description of this Gateway Api ID

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

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

type ListByServiceCompleteResult

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

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

type OAuth2AuthenticationSettingsContract

type OAuth2AuthenticationSettingsContract struct {
	AuthorizationServerId *string `json:"authorizationServerId,omitempty"`
	Scope                 *string `json:"scope,omitempty"`
}

type OpenIdAuthenticationSettingsContract

type OpenIdAuthenticationSettingsContract struct {
	BearerTokenSendingMethods *[]BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`
	OpenidProviderId          *string                      `json:"openidProviderId,omitempty"`
}

type Protocol

type Protocol string
const (
	ProtocolHTTP  Protocol = "http"
	ProtocolHTTPS Protocol = "https"
	ProtocolWs    Protocol = "ws"
	ProtocolWss   Protocol = "wss"
)

func (*Protocol) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCreated ProvisioningState = "created"
)

func (*ProvisioningState) UnmarshalJSON

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

type SubscriptionKeyParameterNamesContract

type SubscriptionKeyParameterNamesContract struct {
	Header *string `json:"header,omitempty"`
	Query  *string `json:"query,omitempty"`
}

type VersioningScheme

type VersioningScheme string
const (
	VersioningSchemeHeader  VersioningScheme = "Header"
	VersioningSchemeQuery   VersioningScheme = "Query"
	VersioningSchemeSegment VersioningScheme = "Segment"
)

func (*VersioningScheme) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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