apiversions

package
v0.20240903.1131440 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/apiversions Documentation

The apiversions SDK allows for interaction with the Azure Resource Manager Service apicenter (API Version 2024-03-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/apicenter/2024-03-01/apiversions"

Client Initialization

client := apiversions.NewApiVersionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiVersionsClient.CreateOrUpdate

ctx := context.TODO()
id := apiversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "versionValue")

payload := apiversions.ApiVersion{
	// ...
}


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: ApiVersionsClient.Delete

ctx := context.TODO()
id := apiversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "versionValue")

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: ApiVersionsClient.Get

ctx := context.TODO()
id := apiversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "versionValue")

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: ApiVersionsClient.Head

ctx := context.TODO()
id := apiversions.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "versionValue")

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

Example Usage: ApiVersionsClient.List

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

// alternatively `client.List(ctx, id, apiversions.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, apiversions.DefaultListOperationOptions())
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 PossibleValuesForLifecycleStage

func PossibleValuesForLifecycleStage() []string

func ValidateApiID

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

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

func ValidateVersionID

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

ValidateVersionID checks that 'input' can be parsed as a Version ID

Types

type ApiId

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

ApiId is a struct representing the Resource ID for a Api

func NewApiID

func NewApiID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName string, apiName 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) FromParseResult

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

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 ApiVersion

type ApiVersion struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ApiVersionProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ApiVersionOperationPredicate

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

func (ApiVersionOperationPredicate) Matches

func (p ApiVersionOperationPredicate) Matches(input ApiVersion) bool

type ApiVersionProperties

type ApiVersionProperties struct {
	LifecycleStage LifecycleStage `json:"lifecycleStage"`
	Title          string         `json:"title"`
}

type ApiVersionsClient

type ApiVersionsClient struct {
	Client *resourcemanager.Client
}

func NewApiVersionsClientWithBaseURI

func NewApiVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionsClient, error)

func (ApiVersionsClient) CreateOrUpdate

func (c ApiVersionsClient) CreateOrUpdate(ctx context.Context, id VersionId, input ApiVersion) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ApiVersionsClient) Delete

func (c ApiVersionsClient) Delete(ctx context.Context, id VersionId) (result DeleteOperationResponse, err error)

Delete ...

func (ApiVersionsClient) Get

Get ...

func (ApiVersionsClient) Head

func (c ApiVersionsClient) Head(ctx context.Context, id VersionId) (result HeadOperationResponse, err error)

Head ...

func (ApiVersionsClient) List

List ...

func (ApiVersionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ApiVersionsClient) ListCompleteMatchingPredicate

func (c ApiVersionsClient) ListCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListOperationOptions, predicate ApiVersionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type HeadOperationResponse

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

type LifecycleStage

type LifecycleStage string
const (
	LifecycleStageDeprecated  LifecycleStage = "deprecated"
	LifecycleStageDesign      LifecycleStage = "design"
	LifecycleStageDevelopment LifecycleStage = "development"
	LifecycleStagePreview     LifecycleStage = "preview"
	LifecycleStageProduction  LifecycleStage = "production"
	LifecycleStageRetired     LifecycleStage = "retired"
	LifecycleStageTesting     LifecycleStage = "testing"
)

func (*LifecycleStage) UnmarshalJSON

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ApiVersion
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ApiVersion
}

type VersionId

type VersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceName     string
	ApiName           string
	VersionName       string
}

VersionId is a struct representing the Resource ID for a Version

func NewVersionID

func NewVersionID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName string, apiName string, versionName string) VersionId

NewVersionID returns a new VersionId struct

func ParseVersionID

func ParseVersionID(input string) (*VersionId, error)

ParseVersionID parses 'input' into a VersionId

func ParseVersionIDInsensitively

func ParseVersionIDInsensitively(input string) (*VersionId, error)

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

func (*VersionId) FromParseResult

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

func (VersionId) ID

func (id VersionId) ID() string

ID returns the formatted Version ID

func (VersionId) Segments

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

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

func (VersionId) String

func (id VersionId) String() string

String returns a human-readable description of this Version ID

Jump to

Keyboard shortcuts

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