subscriptions

package
v0.20230510.1131358 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-12-01/subscriptions Documentation

The subscriptions SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2022-12-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/resources/2022-12-01/subscriptions"

Client Initialization

client := subscriptions.NewSubscriptionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SubscriptionsClient.CheckZonePeers

ctx := context.TODO()
id := subscriptions.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := subscriptions.CheckZonePeersRequest{
	// ...
}


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

Example Usage: SubscriptionsClient.Get

ctx := context.TODO()
id := subscriptions.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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: SubscriptionsClient.List

ctx := context.TODO()


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

Example Usage: SubscriptionsClient.ListLocations

ctx := context.TODO()
id := subscriptions.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

read, err := client.ListLocations(ctx, id, subscriptions.DefaultListLocationsOperationOptions())
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 PossibleValuesForLocationType

func PossibleValuesForLocationType() []string

func PossibleValuesForRegionCategory

func PossibleValuesForRegionCategory() []string

func PossibleValuesForRegionType

func PossibleValuesForRegionType() []string

func PossibleValuesForSpendingLimit

func PossibleValuesForSpendingLimit() []string

func PossibleValuesForSubscriptionState

func PossibleValuesForSubscriptionState() []string

Types

type AvailabilityZoneMappings

type AvailabilityZoneMappings struct {
	LogicalZone  *string `json:"logicalZone,omitempty"`
	PhysicalZone *string `json:"physicalZone,omitempty"`
}

type AvailabilityZonePeers

type AvailabilityZonePeers struct {
	AvailabilityZone *string  `json:"availabilityZone,omitempty"`
	Peers            *[]Peers `json:"peers,omitempty"`
}

type CheckZonePeersOperationResponse

type CheckZonePeersOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckZonePeersResult
}

type CheckZonePeersRequest

type CheckZonePeersRequest struct {
	Location        *string   `json:"location,omitempty"`
	SubscriptionIds *[]string `json:"subscriptionIds,omitempty"`
}

type CheckZonePeersResult

type CheckZonePeersResult struct {
	AvailabilityZonePeers *[]AvailabilityZonePeers `json:"availabilityZonePeers,omitempty"`
	Location              *string                  `json:"location,omitempty"`
	SubscriptionId        *string                  `json:"subscriptionId,omitempty"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Subscription
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Subscription
}

type ListLocationsOperationOptions

type ListLocationsOperationOptions struct {
	IncludeExtendedLocations *bool
}

func DefaultListLocationsOperationOptions

func DefaultListLocationsOperationOptions() ListLocationsOperationOptions

type ListLocationsOperationResponse

type ListLocationsOperationResponse struct {
	HttpResponse *http.Response
	Model        *LocationListResult
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Subscription
	// 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 Location

type Location struct {
	AvailabilityZoneMappings *[]AvailabilityZoneMappings `json:"availabilityZoneMappings,omitempty"`
	DisplayName              *string                     `json:"displayName,omitempty"`
	Id                       *string                     `json:"id,omitempty"`
	Metadata                 *LocationMetadata           `json:"metadata,omitempty"`
	Name                     *string                     `json:"name,omitempty"`
	RegionalDisplayName      *string                     `json:"regionalDisplayName,omitempty"`
	SubscriptionId           *string                     `json:"subscriptionId,omitempty"`
	Type                     *LocationType               `json:"type,omitempty"`
}

type LocationListResult

type LocationListResult struct {
	Value *[]Location `json:"value,omitempty"`
}

type LocationMetadata

type LocationMetadata struct {
	Geography        *string         `json:"geography,omitempty"`
	GeographyGroup   *string         `json:"geographyGroup,omitempty"`
	HomeLocation     *string         `json:"homeLocation,omitempty"`
	Latitude         *string         `json:"latitude,omitempty"`
	Longitude        *string         `json:"longitude,omitempty"`
	PairedRegion     *[]PairedRegion `json:"pairedRegion,omitempty"`
	PhysicalLocation *string         `json:"physicalLocation,omitempty"`
	RegionCategory   *RegionCategory `json:"regionCategory,omitempty"`
	RegionType       *RegionType     `json:"regionType,omitempty"`
}

type LocationType

type LocationType string
const (
	LocationTypeEdgeZone LocationType = "EdgeZone"
	LocationTypeRegion   LocationType = "Region"
)

type ManagedByTenant

type ManagedByTenant struct {
	TenantId *string `json:"tenantId,omitempty"`
}

type PairedRegion

type PairedRegion struct {
	Id             *string `json:"id,omitempty"`
	Name           *string `json:"name,omitempty"`
	SubscriptionId *string `json:"subscriptionId,omitempty"`
}

type Peers

type Peers struct {
	AvailabilityZone *string `json:"availabilityZone,omitempty"`
	SubscriptionId   *string `json:"subscriptionId,omitempty"`
}

type RegionCategory

type RegionCategory string
const (
	RegionCategoryExtended    RegionCategory = "Extended"
	RegionCategoryOther       RegionCategory = "Other"
	RegionCategoryRecommended RegionCategory = "Recommended"
)

type RegionType

type RegionType string
const (
	RegionTypeLogical  RegionType = "Logical"
	RegionTypePhysical RegionType = "Physical"
)

type SpendingLimit

type SpendingLimit string
const (
	SpendingLimitCurrentPeriodOff SpendingLimit = "CurrentPeriodOff"
	SpendingLimitOff              SpendingLimit = "Off"
	SpendingLimitOn               SpendingLimit = "On"
)

type Subscription

type Subscription struct {
	AuthorizationSource  *string               `json:"authorizationSource,omitempty"`
	DisplayName          *string               `json:"displayName,omitempty"`
	Id                   *string               `json:"id,omitempty"`
	ManagedByTenants     *[]ManagedByTenant    `json:"managedByTenants,omitempty"`
	State                *SubscriptionState    `json:"state,omitempty"`
	SubscriptionId       *string               `json:"subscriptionId,omitempty"`
	SubscriptionPolicies *SubscriptionPolicies `json:"subscriptionPolicies,omitempty"`
	Tags                 *map[string]string    `json:"tags,omitempty"`
	TenantId             *string               `json:"tenantId,omitempty"`
}

type SubscriptionOperationPredicate

type SubscriptionOperationPredicate struct {
	AuthorizationSource *string
	DisplayName         *string
	Id                  *string
	SubscriptionId      *string
	TenantId            *string
}

func (SubscriptionOperationPredicate) Matches

type SubscriptionPolicies

type SubscriptionPolicies struct {
	LocationPlacementId *string        `json:"locationPlacementId,omitempty"`
	QuotaId             *string        `json:"quotaId,omitempty"`
	SpendingLimit       *SpendingLimit `json:"spendingLimit,omitempty"`
}

type SubscriptionState

type SubscriptionState string
const (
	SubscriptionStateDeleted  SubscriptionState = "Deleted"
	SubscriptionStateDisabled SubscriptionState = "Disabled"
	SubscriptionStateEnabled  SubscriptionState = "Enabled"
	SubscriptionStatePastDue  SubscriptionState = "PastDue"
	SubscriptionStateWarned   SubscriptionState = "Warned"
)

type SubscriptionsClient

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

func NewSubscriptionsClientWithBaseURI

func NewSubscriptionsClientWithBaseURI(endpoint string) SubscriptionsClient

func (SubscriptionsClient) CheckZonePeers

CheckZonePeers ...

func (SubscriptionsClient) Get

Get ...

func (SubscriptionsClient) List

List ...

func (SubscriptionsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (SubscriptionsClient) ListCompleteMatchingPredicate

func (c SubscriptionsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate SubscriptionOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (SubscriptionsClient) ListLocations

ListLocations ...

Jump to

Keyboard shortcuts

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