README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiproduct
Documentation
The apiproduct
SDK allows for interaction with the Azure Resource Manager Service apimanagement
(API Version 2022-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/2022-08-01/apiproduct"
Client Initialization
client := apiproduct.NewApiProductClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ApiProductClient.ListByApis
ctx := context.TODO()
id := apiproduct.NewApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "apiIdValue")
// alternatively `client.ListByApis(ctx, id, apiproduct.DefaultListByApisOperationOptions())` can be used to do batched pagination
items, err := client.ListByApisComplete(ctx, id, apiproduct.DefaultListByApisOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func PossibleValuesForProductState() []string
- func ValidateApiID(input interface{}, key string) (warnings []string, errors []error)
- type ApiId
- type ApiProductClient
- func (c ApiProductClient) ListByApis(ctx context.Context, id ApiId, options ListByApisOperationOptions) (result ListByApisOperationResponse, err error)
- func (c ApiProductClient) ListByApisComplete(ctx context.Context, id ApiId, options ListByApisOperationOptions) (ListByApisCompleteResult, error)
- func (c ApiProductClient) ListByApisCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListByApisOperationOptions, ...) (result ListByApisCompleteResult, err error)
- type ListByApisCompleteResult
- type ListByApisOperationOptions
- type ListByApisOperationResponse
- type ProductContract
- type ProductContractOperationPredicate
- type ProductContractProperties
- type ProductState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProductState ¶
func PossibleValuesForProductState() []string
func ValidateApiID ¶
ValidateApiID checks that 'input' can be parsed as a Api 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 ¶
ParseApiID parses 'input' into a ApiId
func ParseApiIDInsensitively ¶
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) Segments ¶
func (id ApiId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Api ID
type ApiProductClient ¶
type ApiProductClient struct {
Client *resourcemanager.Client
}
func NewApiProductClientWithBaseURI ¶
func NewApiProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiProductClient, error)
func (ApiProductClient) ListByApis ¶
func (c ApiProductClient) ListByApis(ctx context.Context, id ApiId, options ListByApisOperationOptions) (result ListByApisOperationResponse, err error)
ListByApis ...
func (ApiProductClient) ListByApisComplete ¶
func (c ApiProductClient) ListByApisComplete(ctx context.Context, id ApiId, options ListByApisOperationOptions) (ListByApisCompleteResult, error)
ListByApisComplete retrieves all the results into a single object
func (ApiProductClient) ListByApisCompleteMatchingPredicate ¶
func (c ApiProductClient) ListByApisCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListByApisOperationOptions, predicate ProductContractOperationPredicate) (result ListByApisCompleteResult, err error)
ListByApisCompleteMatchingPredicate retrieves all the results and then applies the predicate
type ListByApisCompleteResult ¶
type ListByApisCompleteResult struct { LatestHttpResponse *http.Response Items []ProductContract }
type ListByApisOperationOptions ¶
func DefaultListByApisOperationOptions ¶
func DefaultListByApisOperationOptions() ListByApisOperationOptions
func (ListByApisOperationOptions) ToHeaders ¶
func (o ListByApisOperationOptions) ToHeaders() *client.Headers
func (ListByApisOperationOptions) ToOData ¶
func (o ListByApisOperationOptions) ToOData() *odata.Query
func (ListByApisOperationOptions) ToQuery ¶
func (o ListByApisOperationOptions) ToQuery() *client.QueryParams
type ListByApisOperationResponse ¶
type ListByApisOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]ProductContract }
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 ¶
func (ProductContractOperationPredicate) Matches ¶
func (p ProductContractOperationPredicate) Matches(input ProductContract) bool
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 ProductState ¶
type ProductState string
const ( ProductStateNotPublished ProductState = "notPublished" ProductStatePublished ProductState = "published" )
func (*ProductState) UnmarshalJSON ¶
func (s *ProductState) UnmarshalJSON(bytes []byte) error