metadataschemas

package
v0.20241118.1115603 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/metadataschemas Documentation

The metadataschemas SDK allows for interaction with Azure Resource Manager apicenter (API Version 2024-03-15-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/apicenter/2024-03-15-preview/metadataschemas"

Client Initialization

client := metadataschemas.NewMetadataSchemasClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MetadataSchemasClient.CreateOrUpdate

ctx := context.TODO()
id := metadataschemas.NewMetadataSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "metadataSchemaName")

payload := metadataschemas.MetadataSchema{
	// ...
}


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

ctx := context.TODO()
id := metadataschemas.NewMetadataSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "metadataSchemaName")

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

ctx := context.TODO()
id := metadataschemas.NewMetadataSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "metadataSchemaName")

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

ctx := context.TODO()
id := metadataschemas.NewMetadataSchemaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "metadataSchemaName")

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: MetadataSchemasClient.List

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

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

func PossibleValuesForMetadataAssignmentEntity() []string

func ValidateMetadataSchemaID

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

ValidateMetadataSchemaID checks that 'input' can be parsed as a Metadata Schema 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 CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type HeadOperationResponse

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

type ListCompleteResult

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

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

type MetadataAssignment

type MetadataAssignment struct {
	Deprecated *bool                     `json:"deprecated,omitempty"`
	Entity     *MetadataAssignmentEntity `json:"entity,omitempty"`
	Required   *bool                     `json:"required,omitempty"`
}

type MetadataAssignmentEntity

type MetadataAssignmentEntity string
const (
	MetadataAssignmentEntityApi         MetadataAssignmentEntity = "api"
	MetadataAssignmentEntityDeployment  MetadataAssignmentEntity = "deployment"
	MetadataAssignmentEntityEnvironment MetadataAssignmentEntity = "environment"
)

func (*MetadataAssignmentEntity) UnmarshalJSON

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

type MetadataSchema

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

type MetadataSchemaId

type MetadataSchemaId struct {
	SubscriptionId     string
	ResourceGroupName  string
	ServiceName        string
	MetadataSchemaName string
}

MetadataSchemaId is a struct representing the Resource ID for a Metadata Schema

func NewMetadataSchemaID

func NewMetadataSchemaID(subscriptionId string, resourceGroupName string, serviceName string, metadataSchemaName string) MetadataSchemaId

NewMetadataSchemaID returns a new MetadataSchemaId struct

func ParseMetadataSchemaID

func ParseMetadataSchemaID(input string) (*MetadataSchemaId, error)

ParseMetadataSchemaID parses 'input' into a MetadataSchemaId

func ParseMetadataSchemaIDInsensitively

func ParseMetadataSchemaIDInsensitively(input string) (*MetadataSchemaId, error)

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

func (*MetadataSchemaId) FromParseResult

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

func (MetadataSchemaId) ID

func (id MetadataSchemaId) ID() string

ID returns the formatted Metadata Schema ID

func (MetadataSchemaId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Metadata Schema ID

func (MetadataSchemaId) String

func (id MetadataSchemaId) String() string

String returns a human-readable description of this Metadata Schema ID

type MetadataSchemaOperationPredicate

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

func (MetadataSchemaOperationPredicate) Matches

type MetadataSchemaProperties

type MetadataSchemaProperties struct {
	AssignedTo *[]MetadataAssignment `json:"assignedTo,omitempty"`
	Schema     string                `json:"schema"`
}

type MetadataSchemasClient

type MetadataSchemasClient struct {
	Client *resourcemanager.Client
}

func NewMetadataSchemasClientWithBaseURI

func NewMetadataSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataSchemasClient, error)

func (MetadataSchemasClient) CreateOrUpdate

CreateOrUpdate ...

func (MetadataSchemasClient) Delete

Delete ...

func (MetadataSchemasClient) Get

Get ...

func (MetadataSchemasClient) Head

Head ...

func (MetadataSchemasClient) List

List ...

func (MetadataSchemasClient) ListComplete

ListComplete retrieves all the results into a single object

func (MetadataSchemasClient) ListCompleteMatchingPredicate

func (c MetadataSchemasClient) ListCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListOperationOptions, predicate MetadataSchemaOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

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

Jump to

Keyboard shortcuts

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