apiwiki

package
v0.20230217.1120527 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: 1

README

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

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

Client Initialization

client := apiwiki.NewApiWikiClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiWikiClient.CreateOrUpdate

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

payload := apiwiki.WikiContract{
	// ...
}


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

Example Usage: ApiWikiClient.Delete

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

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

Example Usage: ApiWikiClient.Get

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

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

ctx := context.TODO()
id := apiwiki.NewApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "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: ApiWikiClient.List

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

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

Example Usage: ApiWikiClient.Update

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

payload := apiwiki.WikiUpdateContract{
	// ...
}


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

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 ApiWikiClient

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

func NewApiWikiClientWithBaseURI

func NewApiWikiClientWithBaseURI(endpoint string) ApiWikiClient

func (ApiWikiClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiWikiClient) Delete

func (c ApiWikiClient) Delete(ctx context.Context, id ApiId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (ApiWikiClient) Get

func (c ApiWikiClient) Get(ctx context.Context, id ApiId) (result GetOperationResponse, err error)

Get ...

func (ApiWikiClient) GetEntityTag

func (c ApiWikiClient) GetEntityTag(ctx context.Context, id ApiId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (ApiWikiClient) List

func (c ApiWikiClient) List(ctx context.Context, id ApiId) (resp ListOperationResponse, err error)

List ...

func (ApiWikiClient) ListComplete

func (c ApiWikiClient) ListComplete(ctx context.Context, id ApiId) (ListCompleteResult, error)

ListComplete retrieves all of the results into a single object

func (ApiWikiClient) ListCompleteMatchingPredicate

func (c ApiWikiClient) ListCompleteMatchingPredicate(ctx context.Context, id ApiId, predicate WikiContractOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ApiWikiClient) Update

Update ...

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

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        *WikiContract
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []WikiContract
}

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

type WikiContract

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

type WikiContractOperationPredicate

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

func (WikiContractOperationPredicate) Matches

type WikiContractProperties

type WikiContractProperties struct {
	Documents *[]WikiDocumentationContract `json:"documents,omitempty"`
}

type WikiDocumentationContract

type WikiDocumentationContract struct {
	DocumentationId *string `json:"documentationId,omitempty"`
}

type WikiUpdateContract

type WikiUpdateContract struct {
	Properties *WikiContractProperties `json:"properties,omitempty"`
}

Jump to

Keyboard shortcuts

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