subscriptions

package
v0.20240119.1124806 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 10 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
	OData        *odata.OData
	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
	OData        *odata.OData
	Model        *Subscription
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Subscription
}

type ListLocationsOperationOptions

type ListLocationsOperationOptions struct {
	IncludeExtendedLocations *bool
}

func DefaultListLocationsOperationOptions

func DefaultListLocationsOperationOptions() ListLocationsOperationOptions

func (ListLocationsOperationOptions) ToHeaders added in v0.20230509.1154719

func (ListLocationsOperationOptions) ToOData added in v0.20230509.1154719

func (ListLocationsOperationOptions) ToQuery added in v0.20230509.1154719

type ListLocationsOperationResponse

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

type ListOperationResponse

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

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

func (*LocationType) UnmarshalJSON added in v0.20230509.1154719

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

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

func (*RegionCategory) UnmarshalJSON added in v0.20230509.1154719

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

type RegionType

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

func (*RegionType) UnmarshalJSON added in v0.20230509.1154719

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

type SpendingLimit

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

func (*SpendingLimit) UnmarshalJSON added in v0.20230509.1154719

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

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

func (*SubscriptionState) UnmarshalJSON added in v0.20230509.1154719

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

type SubscriptionsClient

type SubscriptionsClient struct {
	Client *resourcemanager.Client
}

func NewSubscriptionsClientWithBaseURI

func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error)

func (SubscriptionsClient) CheckZonePeers

CheckZonePeers ...

func (SubscriptionsClient) Get

Get ...

func (SubscriptionsClient) List

List ...

func (SubscriptionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (SubscriptionsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SubscriptionsClient) ListLocations

ListLocations ...

Jump to

Keyboard shortcuts

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