documentationresource

package
v0.20240131.1120756 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

README

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

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

Client Initialization

client := documentationresource.NewDocumentationResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DocumentationResourceClient.CreateOrUpdate

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

payload := documentationresource.DocumentationContract{
	// ...
}


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

Example Usage: DocumentationResourceClient.Delete

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

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

Example Usage: DocumentationResourceClient.Get

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

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

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

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

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

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

Example Usage: DocumentationResourceClient.Update

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

payload := documentationresource.DocumentationUpdateContract{
	// ...
}


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

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

ValidateDocumentationID checks that 'input' can be parsed as a Documentation 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 CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type DocumentationContract

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

type DocumentationContractOperationPredicate

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

func (DocumentationContractOperationPredicate) Matches

type DocumentationContractProperties

type DocumentationContractProperties struct {
	Content *string `json:"content,omitempty"`
	Title   *string `json:"title,omitempty"`
}

type DocumentationId

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

DocumentationId is a struct representing the Resource ID for a Documentation

func NewDocumentationID

func NewDocumentationID(subscriptionId string, resourceGroupName string, serviceName string, documentationId string) DocumentationId

NewDocumentationID returns a new DocumentationId struct

func ParseDocumentationID

func ParseDocumentationID(input string) (*DocumentationId, error)

ParseDocumentationID parses 'input' into a DocumentationId

func ParseDocumentationIDInsensitively

func ParseDocumentationIDInsensitively(input string) (*DocumentationId, error)

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

func (*DocumentationId) FromParseResult

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

func (DocumentationId) ID

func (id DocumentationId) ID() string

ID returns the formatted Documentation ID

func (DocumentationId) Segments

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

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

func (DocumentationId) String

func (id DocumentationId) String() string

String returns a human-readable description of this Documentation ID

type DocumentationResourceClient

type DocumentationResourceClient struct {
	Client *resourcemanager.Client
}

func NewDocumentationResourceClientWithBaseURI

func NewDocumentationResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*DocumentationResourceClient, error)

func (DocumentationResourceClient) CreateOrUpdate

CreateOrUpdate ...

func (DocumentationResourceClient) Delete

Delete ...

func (DocumentationResourceClient) Get

Get ...

func (DocumentationResourceClient) GetEntityTag

GetEntityTag ...

func (DocumentationResourceClient) ListByService

ListByService ...

func (DocumentationResourceClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (DocumentationResourceClient) ListByServiceCompleteMatchingPredicate

func (c DocumentationResourceClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate DocumentationContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DocumentationResourceClient) Update

Update ...

type DocumentationUpdateContract

type DocumentationUpdateContract struct {
	Properties *DocumentationContractProperties `json:"properties,omitempty"`
}

type GetEntityTagOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DocumentationContract
}

type ListByServiceCompleteResult

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

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

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

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

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

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

func (UpdateOperationOptions) ToOData

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

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DocumentationContract
}

Jump to

Keyboard shortcuts

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