apioperation

package
v0.20230217.1150808 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

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

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

Client Initialization

client := apioperation.NewApiOperationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiOperationClient.CreateOrUpdate

ctx := context.TODO()
id := apioperation.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

payload := apioperation.OperationContract{
	// ...
}


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

Example Usage: ApiOperationClient.Delete

ctx := context.TODO()
id := apioperation.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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

Example Usage: ApiOperationClient.Get

ctx := context.TODO()
id := apioperation.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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

ctx := context.TODO()
id := apioperation.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

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: ApiOperationClient.ListByApi

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

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

Example Usage: ApiOperationClient.Update

ctx := context.TODO()
id := apioperation.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue", "operationIdValue")

payload := apioperation.OperationUpdateContract{
	// ...
}


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

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

ValidateApiID checks that 'input' can be parsed as a Api ID

func ValidateOperationID

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

ValidateOperationID checks that 'input' can be parsed as a Operation ID

Types

type ApiId

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

ApiId is a struct representing the Resource ID for a Api

func NewApiID

func NewApiID(subscriptionId string, resourceGroupName string, serviceName string, apiId string) ApiId

NewApiID returns a new ApiId struct

func ParseApiID

func ParseApiID(input string) (*ApiId, error)

ParseApiID parses 'input' into a ApiId

func ParseApiIDInsensitively

func ParseApiIDInsensitively(input string) (*ApiId, error)

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

func (ApiId) ID

func (id ApiId) ID() string

ID returns the formatted Api ID

func (ApiId) Segments

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

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

func (ApiId) String

func (id ApiId) String() string

String returns a human-readable description of this Api ID

type ApiOperationClient

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

func NewApiOperationClientWithBaseURI

func NewApiOperationClientWithBaseURI(endpoint string) ApiOperationClient

func (ApiOperationClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiOperationClient) Delete

Delete ...

func (ApiOperationClient) Get

Get ...

func (ApiOperationClient) GetEntityTag

func (c ApiOperationClient) GetEntityTag(ctx context.Context, id OperationId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (ApiOperationClient) ListByApi

ListByApi ...

func (ApiOperationClient) ListByApiComplete

ListByApiComplete retrieves all of the results into a single object

func (ApiOperationClient) ListByApiCompleteMatchingPredicate

func (c ApiOperationClient) ListByApiCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListByApiOperationOptions, predicate OperationContractOperationPredicate) (resp ListByApiCompleteResult, err error)

ListByApiCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ApiOperationClient) Update

Update ...

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByApiCompleteResult

type ListByApiCompleteResult struct {
	Items []OperationContract
}

type ListByApiOperationOptions

type ListByApiOperationOptions struct {
	Filter *string
	Skip   *int64
	Tags   *string
	Top    *int64
}

func DefaultListByApiOperationOptions

func DefaultListByApiOperationOptions() ListByApiOperationOptions

type ListByApiOperationResponse

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

func (ListByApiOperationResponse) HasMore

func (r ListByApiOperationResponse) HasMore() bool

func (ListByApiOperationResponse) LoadMore

type OperationContract

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

type OperationContractOperationPredicate

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

func (OperationContractOperationPredicate) Matches

type OperationContractProperties

type OperationContractProperties struct {
	Description        *string              `json:"description,omitempty"`
	DisplayName        string               `json:"displayName"`
	Method             string               `json:"method"`
	Policies           *string              `json:"policies,omitempty"`
	Request            *RequestContract     `json:"request,omitempty"`
	Responses          *[]ResponseContract  `json:"responses,omitempty"`
	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
	UrlTemplate        string               `json:"urlTemplate"`
}

type OperationId

type OperationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ApiId             string
	OperationId       string
}

OperationId is a struct representing the Resource ID for a Operation

func NewOperationID

func NewOperationID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, operationId string) OperationId

NewOperationID returns a new OperationId struct

func ParseOperationID

func ParseOperationID(input string) (*OperationId, error)

ParseOperationID parses 'input' into a OperationId

func ParseOperationIDInsensitively

func ParseOperationIDInsensitively(input string) (*OperationId, error)

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

func (OperationId) ID

func (id OperationId) ID() string

ID returns the formatted Operation ID

func (OperationId) Segments

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

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

func (OperationId) String

func (id OperationId) String() string

String returns a human-readable description of this Operation ID

type OperationUpdateContract

type OperationUpdateContract struct {
	Properties *OperationUpdateContractProperties `json:"properties,omitempty"`
}

type OperationUpdateContractProperties

type OperationUpdateContractProperties struct {
	Description        *string              `json:"description,omitempty"`
	DisplayName        *string              `json:"displayName,omitempty"`
	Method             *string              `json:"method,omitempty"`
	Policies           *string              `json:"policies,omitempty"`
	Request            *RequestContract     `json:"request,omitempty"`
	Responses          *[]ResponseContract  `json:"responses,omitempty"`
	TemplateParameters *[]ParameterContract `json:"templateParameters,omitempty"`
	UrlTemplate        *string              `json:"urlTemplate,omitempty"`
}

type ParameterContract

type ParameterContract struct {
	DefaultValue *string                              `json:"defaultValue,omitempty"`
	Description  *string                              `json:"description,omitempty"`
	Examples     *map[string]ParameterExampleContract `json:"examples,omitempty"`
	Name         string                               `json:"name"`
	Required     *bool                                `json:"required,omitempty"`
	SchemaId     *string                              `json:"schemaId,omitempty"`
	Type         string                               `json:"type"`
	TypeName     *string                              `json:"typeName,omitempty"`
	Values       *[]string                            `json:"values,omitempty"`
}

type ParameterExampleContract

type ParameterExampleContract struct {
	Description   *string      `json:"description,omitempty"`
	ExternalValue *string      `json:"externalValue,omitempty"`
	Summary       *string      `json:"summary,omitempty"`
	Value         *interface{} `json:"value,omitempty"`
}

type RepresentationContract

type RepresentationContract struct {
	ContentType    string                               `json:"contentType"`
	Examples       *map[string]ParameterExampleContract `json:"examples,omitempty"`
	FormParameters *[]ParameterContract                 `json:"formParameters,omitempty"`
	SchemaId       *string                              `json:"schemaId,omitempty"`
	TypeName       *string                              `json:"typeName,omitempty"`
}

type RequestContract

type RequestContract struct {
	Description     *string                   `json:"description,omitempty"`
	Headers         *[]ParameterContract      `json:"headers,omitempty"`
	QueryParameters *[]ParameterContract      `json:"queryParameters,omitempty"`
	Representations *[]RepresentationContract `json:"representations,omitempty"`
}

type ResponseContract

type ResponseContract struct {
	Description     *string                   `json:"description,omitempty"`
	Headers         *[]ParameterContract      `json:"headers,omitempty"`
	Representations *[]RepresentationContract `json:"representations,omitempty"`
	StatusCode      int64                     `json:"statusCode"`
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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