product

package
v0.20240130.1054849 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

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

Example Usage: ProductClient.WorkspaceProductCreateOrUpdate

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

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


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

Example Usage: ProductClient.WorkspaceProductDelete

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

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

Example Usage: ProductClient.WorkspaceProductGet

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

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

Example Usage: ProductClient.WorkspaceProductGetEntityTag

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

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

Example Usage: ProductClient.WorkspaceProductListByService

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

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

Example Usage: ProductClient.WorkspaceProductUpdate

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

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


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

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

func ValidateWorkspaceProductID

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

ValidateWorkspaceProductID checks that 'input' can be parsed as a Workspace Product 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        *ProductContract
}

type DeleteOperationOptions

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

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

type GetOperationResponse

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

type ListByServiceCompleteResult

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

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	ExpandGroups *bool
	Filter       *string
	Skip         *int64
	Tags         *string
	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        *[]ProductContract
}

type ProductClient

type ProductClient struct {
	Client *resourcemanager.Client
}

func NewProductClientWithBaseURI

func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error)

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 the results into a single object

func (ProductClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductClient) Update

Update ...

func (ProductClient) WorkspaceProductCreateOrUpdate

WorkspaceProductCreateOrUpdate ...

func (ProductClient) WorkspaceProductDelete

WorkspaceProductDelete ...

func (ProductClient) WorkspaceProductGet

func (c ProductClient) WorkspaceProductGet(ctx context.Context, id WorkspaceProductId) (result WorkspaceProductGetOperationResponse, err error)

WorkspaceProductGet ...

func (ProductClient) WorkspaceProductGetEntityTag

func (c ProductClient) WorkspaceProductGetEntityTag(ctx context.Context, id WorkspaceProductId) (result WorkspaceProductGetEntityTagOperationResponse, err error)

WorkspaceProductGetEntityTag ...

func (ProductClient) WorkspaceProductListByService

WorkspaceProductListByService ...

func (ProductClient) WorkspaceProductListByServiceComplete

WorkspaceProductListByServiceComplete retrieves all the results into a single object

func (ProductClient) WorkspaceProductListByServiceCompleteMatchingPredicate

func (c ProductClient) WorkspaceProductListByServiceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options WorkspaceProductListByServiceOperationOptions, predicate ProductContractOperationPredicate) (result WorkspaceProductListByServiceCompleteResult, err error)

WorkspaceProductListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProductClient) WorkspaceProductUpdate

WorkspaceProductUpdate ...

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

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

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

func (*ProductState) UnmarshalJSON

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

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) 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        *ProductContract
}

type WorkspaceId

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

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceProductCreateOrUpdateOperationOptions

type WorkspaceProductCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceProductCreateOrUpdateOperationOptions

func DefaultWorkspaceProductCreateOrUpdateOperationOptions() WorkspaceProductCreateOrUpdateOperationOptions

func (WorkspaceProductCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceProductCreateOrUpdateOperationOptions) ToOData

func (WorkspaceProductCreateOrUpdateOperationOptions) ToQuery

type WorkspaceProductCreateOrUpdateOperationResponse

type WorkspaceProductCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ProductContract
}

type WorkspaceProductDeleteOperationOptions

type WorkspaceProductDeleteOperationOptions struct {
	DeleteSubscriptions *bool
	IfMatch             *string
}

func DefaultWorkspaceProductDeleteOperationOptions

func DefaultWorkspaceProductDeleteOperationOptions() WorkspaceProductDeleteOperationOptions

func (WorkspaceProductDeleteOperationOptions) ToHeaders

func (WorkspaceProductDeleteOperationOptions) ToOData

func (WorkspaceProductDeleteOperationOptions) ToQuery

type WorkspaceProductDeleteOperationResponse

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

type WorkspaceProductGetEntityTagOperationResponse

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

type WorkspaceProductGetOperationResponse

type WorkspaceProductGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ProductContract
}

type WorkspaceProductId

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

WorkspaceProductId is a struct representing the Resource ID for a Workspace Product

func NewWorkspaceProductID

func NewWorkspaceProductID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, productId string) WorkspaceProductId

NewWorkspaceProductID returns a new WorkspaceProductId struct

func ParseWorkspaceProductID

func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error)

ParseWorkspaceProductID parses 'input' into a WorkspaceProductId

func ParseWorkspaceProductIDInsensitively

func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, error)

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

func (*WorkspaceProductId) FromParseResult

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

func (WorkspaceProductId) ID

func (id WorkspaceProductId) ID() string

ID returns the formatted Workspace Product ID

func (WorkspaceProductId) Segments

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

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

func (WorkspaceProductId) String

func (id WorkspaceProductId) String() string

String returns a human-readable description of this Workspace Product ID

type WorkspaceProductListByServiceCompleteResult

type WorkspaceProductListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ProductContract
}

type WorkspaceProductListByServiceOperationOptions

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

func DefaultWorkspaceProductListByServiceOperationOptions

func DefaultWorkspaceProductListByServiceOperationOptions() WorkspaceProductListByServiceOperationOptions

func (WorkspaceProductListByServiceOperationOptions) ToHeaders

func (WorkspaceProductListByServiceOperationOptions) ToOData

func (WorkspaceProductListByServiceOperationOptions) ToQuery

type WorkspaceProductListByServiceOperationResponse

type WorkspaceProductListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ProductContract
}

type WorkspaceProductUpdateOperationOptions

type WorkspaceProductUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceProductUpdateOperationOptions

func DefaultWorkspaceProductUpdateOperationOptions() WorkspaceProductUpdateOperationOptions

func (WorkspaceProductUpdateOperationOptions) ToHeaders

func (WorkspaceProductUpdateOperationOptions) ToOData

func (WorkspaceProductUpdateOperationOptions) ToQuery

type WorkspaceProductUpdateOperationResponse

type WorkspaceProductUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ProductContract
}

Jump to

Keyboard shortcuts

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