apirelease

package
v0.20220915.1151935 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

README

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

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

Client Initialization

client := apirelease.NewApiReleaseClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApiReleaseClient.CreateOrUpdate

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

payload := apirelease.ApiReleaseContract{
	// ...
}


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

Example Usage: ApiReleaseClient.Delete

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

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

Example Usage: ApiReleaseClient.Get

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

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

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

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

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

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

Example Usage: ApiReleaseClient.Update

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

payload := apirelease.ApiReleaseContract{
	// ...
}


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

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

ValidateReleaseID checks that 'input' can be parsed as a Release 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 ApiReleaseClient

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

func NewApiReleaseClientWithBaseURI

func NewApiReleaseClientWithBaseURI(endpoint string) ApiReleaseClient

func (ApiReleaseClient) CreateOrUpdate

CreateOrUpdate ...

func (ApiReleaseClient) Delete

Delete ...

func (ApiReleaseClient) Get

func (c ApiReleaseClient) Get(ctx context.Context, id ReleaseId) (result GetOperationResponse, err error)

Get ...

func (ApiReleaseClient) GetEntityTag

func (c ApiReleaseClient) GetEntityTag(ctx context.Context, id ReleaseId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (ApiReleaseClient) ListByService

ListByService ...

func (ApiReleaseClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (ApiReleaseClient) ListByServiceCompleteMatchingPredicate

func (c ApiReleaseClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListByServiceOperationOptions, predicate ApiReleaseContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ApiReleaseClient) Update

Update ...

type ApiReleaseContract

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

type ApiReleaseContractOperationPredicate

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

func (ApiReleaseContractOperationPredicate) Matches

type ApiReleaseContractProperties

type ApiReleaseContractProperties struct {
	ApiId           *string `json:"apiId,omitempty"`
	CreatedDateTime *string `json:"createdDateTime,omitempty"`
	Notes           *string `json:"notes,omitempty"`
	UpdatedDateTime *string `json:"updatedDateTime,omitempty"`
}

func (*ApiReleaseContractProperties) GetCreatedDateTimeAsTime

func (o *ApiReleaseContractProperties) GetCreatedDateTimeAsTime() (*time.Time, error)

func (*ApiReleaseContractProperties) GetUpdatedDateTimeAsTime

func (o *ApiReleaseContractProperties) GetUpdatedDateTimeAsTime() (*time.Time, error)

func (*ApiReleaseContractProperties) SetCreatedDateTimeAsTime

func (o *ApiReleaseContractProperties) SetCreatedDateTimeAsTime(input time.Time)

func (*ApiReleaseContractProperties) SetUpdatedDateTimeAsTime

func (o *ApiReleaseContractProperties) SetUpdatedDateTimeAsTime(input time.Time)

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []ApiReleaseContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

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

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ReleaseId

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

ReleaseId is a struct representing the Resource ID for a Release

func NewReleaseID

func NewReleaseID(subscriptionId string, resourceGroupName string, serviceName string, apiId string, releaseId string) ReleaseId

NewReleaseID returns a new ReleaseId struct

func ParseReleaseID

func ParseReleaseID(input string) (*ReleaseId, error)

ParseReleaseID parses 'input' into a ReleaseId

func ParseReleaseIDInsensitively

func ParseReleaseIDInsensitively(input string) (*ReleaseId, error)

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

func (ReleaseId) ID

func (id ReleaseId) ID() string

ID returns the formatted Release ID

func (ReleaseId) Segments

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

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

func (ReleaseId) String

func (id ReleaseId) String() string

String returns a human-readable description of this Release ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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