productsubscription

package
v0.20231205.1181718 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productsubscription Documentation

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

Client Initialization

client := productsubscription.NewProductSubscriptionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProductSubscriptionClient.List

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

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

func PossibleValuesForSubscriptionState() []string

func ValidateProductID

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

ValidateProductID checks that 'input' can be parsed as a Product ID

Types

type ListCompleteResult

type ListCompleteResult struct {
	Items []SubscriptionContract
}

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230801.1071415

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230801.1071415

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230801.1071415

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SubscriptionContract
}

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 added in v0.20231127.1171502

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 ProductSubscriptionClient

type ProductSubscriptionClient struct {
	Client *resourcemanager.Client
}

func NewProductSubscriptionClientWithBaseURI

func NewProductSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductSubscriptionClient, error)

func (ProductSubscriptionClient) List

List ...

func (ProductSubscriptionClient) ListComplete

ListComplete retrieves all the results into a single object

func (ProductSubscriptionClient) ListCompleteMatchingPredicate

func (c ProductSubscriptionClient) ListCompleteMatchingPredicate(ctx context.Context, id ProductId, options ListOperationOptions, predicate SubscriptionContractOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SubscriptionContract

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

type SubscriptionContractOperationPredicate

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

func (SubscriptionContractOperationPredicate) Matches

type SubscriptionContractProperties

type SubscriptionContractProperties struct {
	AllowTracing     *bool             `json:"allowTracing,omitempty"`
	CreatedDate      *string           `json:"createdDate,omitempty"`
	DisplayName      *string           `json:"displayName,omitempty"`
	EndDate          *string           `json:"endDate,omitempty"`
	ExpirationDate   *string           `json:"expirationDate,omitempty"`
	NotificationDate *string           `json:"notificationDate,omitempty"`
	OwnerId          *string           `json:"ownerId,omitempty"`
	PrimaryKey       *string           `json:"primaryKey,omitempty"`
	Scope            string            `json:"scope"`
	SecondaryKey     *string           `json:"secondaryKey,omitempty"`
	StartDate        *string           `json:"startDate,omitempty"`
	State            SubscriptionState `json:"state"`
	StateComment     *string           `json:"stateComment,omitempty"`
}

func (*SubscriptionContractProperties) GetCreatedDateAsTime

func (o *SubscriptionContractProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*SubscriptionContractProperties) GetEndDateAsTime

func (o *SubscriptionContractProperties) GetEndDateAsTime() (*time.Time, error)

func (*SubscriptionContractProperties) GetExpirationDateAsTime

func (o *SubscriptionContractProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*SubscriptionContractProperties) GetNotificationDateAsTime

func (o *SubscriptionContractProperties) GetNotificationDateAsTime() (*time.Time, error)

func (*SubscriptionContractProperties) GetStartDateAsTime

func (o *SubscriptionContractProperties) GetStartDateAsTime() (*time.Time, error)

func (*SubscriptionContractProperties) SetCreatedDateAsTime

func (o *SubscriptionContractProperties) SetCreatedDateAsTime(input time.Time)

func (*SubscriptionContractProperties) SetEndDateAsTime

func (o *SubscriptionContractProperties) SetEndDateAsTime(input time.Time)

func (*SubscriptionContractProperties) SetExpirationDateAsTime

func (o *SubscriptionContractProperties) SetExpirationDateAsTime(input time.Time)

func (*SubscriptionContractProperties) SetNotificationDateAsTime

func (o *SubscriptionContractProperties) SetNotificationDateAsTime(input time.Time)

func (*SubscriptionContractProperties) SetStartDateAsTime

func (o *SubscriptionContractProperties) SetStartDateAsTime(input time.Time)

type SubscriptionState

type SubscriptionState string
const (
	SubscriptionStateActive    SubscriptionState = "active"
	SubscriptionStateCancelled SubscriptionState = "cancelled"
	SubscriptionStateExpired   SubscriptionState = "expired"
	SubscriptionStateRejected  SubscriptionState = "rejected"
	SubscriptionStateSubmitted SubscriptionState = "submitted"
	SubscriptionStateSuspended SubscriptionState = "suspended"
)

func (*SubscriptionState) UnmarshalJSON added in v0.20230801.1071415

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

Jump to

Keyboard shortcuts

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