schema

package
v0.20230425.1021638 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

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

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

Client Initialization

client := schema.NewSchemaClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SchemaClient.GlobalSchemaCreateOrUpdate

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

payload := schema.GlobalSchemaContract{
	// ...
}


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

Example Usage: SchemaClient.GlobalSchemaDelete

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

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

Example Usage: SchemaClient.GlobalSchemaGet

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

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

Example Usage: SchemaClient.GlobalSchemaGetEntityTag

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

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

Example Usage: SchemaClient.GlobalSchemaListByService

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

// alternatively `client.GlobalSchemaListByService(ctx, id, schema.DefaultGlobalSchemaListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.GlobalSchemaListByServiceComplete(ctx, id, schema.DefaultGlobalSchemaListByServiceOperationOptions())
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 PossibleValuesForSchemaType

func PossibleValuesForSchemaType() []string

func ValidateSchemaID

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

ValidateSchemaID checks that 'input' can be parsed as a Schema 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 GlobalSchemaContract

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

type GlobalSchemaContractOperationPredicate

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

func (GlobalSchemaContractOperationPredicate) Matches

type GlobalSchemaContractProperties

type GlobalSchemaContractProperties struct {
	Description *string      `json:"description,omitempty"`
	Document    *interface{} `json:"document,omitempty"`
	SchemaType  SchemaType   `json:"schemaType"`
	Value       *interface{} `json:"value,omitempty"`
}

type GlobalSchemaCreateOrUpdateOperationOptions

type GlobalSchemaCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultGlobalSchemaCreateOrUpdateOperationOptions

func DefaultGlobalSchemaCreateOrUpdateOperationOptions() GlobalSchemaCreateOrUpdateOperationOptions

type GlobalSchemaCreateOrUpdateOperationResponse

type GlobalSchemaCreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GlobalSchemaDeleteOperationOptions

type GlobalSchemaDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultGlobalSchemaDeleteOperationOptions

func DefaultGlobalSchemaDeleteOperationOptions() GlobalSchemaDeleteOperationOptions

type GlobalSchemaDeleteOperationResponse

type GlobalSchemaDeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GlobalSchemaGetEntityTagOperationResponse

type GlobalSchemaGetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GlobalSchemaGetOperationResponse

type GlobalSchemaGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *GlobalSchemaContract
}

type GlobalSchemaListByServiceCompleteResult

type GlobalSchemaListByServiceCompleteResult struct {
	Items []GlobalSchemaContract
}

type GlobalSchemaListByServiceOperationOptions

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

func DefaultGlobalSchemaListByServiceOperationOptions

func DefaultGlobalSchemaListByServiceOperationOptions() GlobalSchemaListByServiceOperationOptions

type GlobalSchemaListByServiceOperationResponse

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

func (GlobalSchemaListByServiceOperationResponse) HasMore

func (GlobalSchemaListByServiceOperationResponse) LoadMore

type SchemaClient

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

func NewSchemaClientWithBaseURI

func NewSchemaClientWithBaseURI(endpoint string) SchemaClient

func (SchemaClient) GlobalSchemaCreateOrUpdate

GlobalSchemaCreateOrUpdate ...

func (SchemaClient) GlobalSchemaCreateOrUpdateThenPoll

func (c SchemaClient) GlobalSchemaCreateOrUpdateThenPoll(ctx context.Context, id SchemaId, input GlobalSchemaContract, options GlobalSchemaCreateOrUpdateOperationOptions) error

GlobalSchemaCreateOrUpdateThenPoll performs GlobalSchemaCreateOrUpdate then polls until it's completed

func (SchemaClient) GlobalSchemaDelete

GlobalSchemaDelete ...

func (SchemaClient) GlobalSchemaGet

func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result GlobalSchemaGetOperationResponse, err error)

GlobalSchemaGet ...

func (SchemaClient) GlobalSchemaGetEntityTag

func (c SchemaClient) GlobalSchemaGetEntityTag(ctx context.Context, id SchemaId) (result GlobalSchemaGetEntityTagOperationResponse, err error)

GlobalSchemaGetEntityTag ...

func (SchemaClient) GlobalSchemaListByService

GlobalSchemaListByService ...

func (SchemaClient) GlobalSchemaListByServiceComplete

GlobalSchemaListByServiceComplete retrieves all of the results into a single object

func (SchemaClient) GlobalSchemaListByServiceCompleteMatchingPredicate

func (c SchemaClient) GlobalSchemaListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options GlobalSchemaListByServiceOperationOptions, predicate GlobalSchemaContractOperationPredicate) (resp GlobalSchemaListByServiceCompleteResult, err error)

GlobalSchemaListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type SchemaId

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

SchemaId is a struct representing the Resource ID for a Schema

func NewSchemaID

func NewSchemaID(subscriptionId string, resourceGroupName string, serviceName string, schemaId string) SchemaId

NewSchemaID returns a new SchemaId struct

func ParseSchemaID

func ParseSchemaID(input string) (*SchemaId, error)

ParseSchemaID parses 'input' into a SchemaId

func ParseSchemaIDInsensitively

func ParseSchemaIDInsensitively(input string) (*SchemaId, error)

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

func (SchemaId) ID

func (id SchemaId) ID() string

ID returns the formatted Schema ID

func (SchemaId) Segments

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

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

func (SchemaId) String

func (id SchemaId) String() string

String returns a human-readable description of this Schema ID

type SchemaType

type SchemaType string
const (
	SchemaTypeJson SchemaType = "json"
	SchemaTypeXml  SchemaType = "xml"
)

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

Jump to

Keyboard shortcuts

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