usersubscription

package
v0.20230424.1134911 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := usersubscription.NewUserSubscriptionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UserSubscriptionClient.List

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

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

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

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

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

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

type UserId

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

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, serviceName string, userId string) UserId

NewUserID returns a new UserId struct

func ParseUserID

func ParseUserID(input string) (*UserId, error)

ParseUserID parses 'input' into a UserId

func ParseUserIDInsensitively

func ParseUserIDInsensitively(input string) (*UserId, error)

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

func (UserId) ID

func (id UserId) ID() string

ID returns the formatted User ID

func (UserId) Segments

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

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

func (UserId) String

func (id UserId) String() string

String returns a human-readable description of this User ID

type UserSubscriptionClient

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

func NewUserSubscriptionClientWithBaseURI

func NewUserSubscriptionClientWithBaseURI(endpoint string) UserSubscriptionClient

func (UserSubscriptionClient) List

List ...

func (UserSubscriptionClient) ListComplete

ListComplete retrieves all of the results into a single object

func (UserSubscriptionClient) ListCompleteMatchingPredicate

func (c UserSubscriptionClient) ListCompleteMatchingPredicate(ctx context.Context, id UserId, options ListOperationOptions, predicate SubscriptionContractOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

Jump to

Keyboard shortcuts

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