product

package
v0.20230427.1141117 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

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

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

Client Initialization

client := product.NewProductClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProductClient.CreateOrUpdate

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

payload := product.ProductContract{
	// ...
}


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

Example Usage: ProductClient.Delete

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

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

Example Usage: ProductClient.Get

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

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

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

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

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

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

Example Usage: ProductClient.Update

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

payload := product.ProductUpdateParameters{
	// ...
}


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

func PossibleValuesForProductState() []string

func ValidateProductID

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

ValidateProductID checks that 'input' can be parsed as a Product 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

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	DeleteSubscriptions *bool
	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        *ProductContract
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []ProductContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	ExpandGroups *bool
	Filter       *string
	Skip         *int64
	Tags         *string
	Top          *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

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

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ProductClient

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

func NewProductClientWithBaseURI

func NewProductClientWithBaseURI(endpoint string) ProductClient

func (ProductClient) CreateOrUpdate

CreateOrUpdate ...

func (ProductClient) Delete

Delete ...

func (ProductClient) Get

func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperationResponse, err error)

Get ...

func (ProductClient) GetEntityTag

func (c ProductClient) GetEntityTag(ctx context.Context, id ProductId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (ProductClient) ListByService

ListByService ...

func (ProductClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (ProductClient) ListByServiceCompleteMatchingPredicate

func (c ProductClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate ProductContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ProductClient) Update

Update ...

type ProductContract

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

type ProductContractOperationPredicate

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

func (ProductContractOperationPredicate) Matches

type ProductContractProperties

type ProductContractProperties struct {
	ApprovalRequired     *bool         `json:"approvalRequired,omitempty"`
	Description          *string       `json:"description,omitempty"`
	DisplayName          string        `json:"displayName"`
	State                *ProductState `json:"state,omitempty"`
	SubscriptionRequired *bool         `json:"subscriptionRequired,omitempty"`
	SubscriptionsLimit   *int64        `json:"subscriptionsLimit,omitempty"`
	Terms                *string       `json:"terms,omitempty"`
}

type ProductId

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

ProductId is a struct representing the Resource ID for a Product

func NewProductID

func NewProductID(subscriptionId string, resourceGroupName string, serviceName string, productId string) ProductId

NewProductID returns a new ProductId struct

func ParseProductID

func ParseProductID(input string) (*ProductId, error)

ParseProductID parses 'input' into a ProductId

func ParseProductIDInsensitively

func ParseProductIDInsensitively(input string) (*ProductId, error)

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

func (ProductId) ID

func (id ProductId) ID() string

ID returns the formatted Product ID

func (ProductId) Segments

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

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

func (ProductId) String

func (id ProductId) String() string

String returns a human-readable description of this Product ID

type ProductState

type ProductState string
const (
	ProductStateNotPublished ProductState = "notPublished"
	ProductStatePublished    ProductState = "published"
)

type ProductUpdateParameters

type ProductUpdateParameters struct {
	Properties *ProductUpdateProperties `json:"properties,omitempty"`
}

type ProductUpdateProperties

type ProductUpdateProperties struct {
	ApprovalRequired     *bool         `json:"approvalRequired,omitempty"`
	Description          *string       `json:"description,omitempty"`
	DisplayName          *string       `json:"displayName,omitempty"`
	State                *ProductState `json:"state,omitempty"`
	SubscriptionRequired *bool         `json:"subscriptionRequired,omitempty"`
	SubscriptionsLimit   *int64        `json:"subscriptionsLimit,omitempty"`
	Terms                *string       `json:"terms,omitempty"`
}

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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