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 ¶
- func PossibleValuesForLocationType() []string
- func PossibleValuesForRegionCategory() []string
- func PossibleValuesForRegionType() []string
- func PossibleValuesForSpendingLimit() []string
- func PossibleValuesForSubscriptionState() []string
- type AvailabilityZoneMappings
- type AvailabilityZonePeers
- type CheckZonePeersOperationResponse
- type CheckZonePeersRequest
- type CheckZonePeersResult
- type GetOperationResponse
- type ListCompleteResult
- type ListLocationsOperationOptions
- type ListLocationsOperationResponse
- type ListOperationResponse
- type Location
- type LocationListResult
- type LocationMetadata
- type LocationType
- type ManagedByTenant
- type PairedRegion
- type Peers
- type RegionCategory
- type RegionType
- type SpendingLimit
- type Subscription
- type SubscriptionOperationPredicate
- type SubscriptionPolicies
- type SubscriptionState
- type SubscriptionsClient
- func (c SubscriptionsClient) CheckZonePeers(ctx context.Context, id commonids.SubscriptionId, input CheckZonePeersRequest) (result CheckZonePeersOperationResponse, err error)
- func (c SubscriptionsClient) Get(ctx context.Context, id commonids.SubscriptionId) (result GetOperationResponse, err error)
- func (c SubscriptionsClient) List(ctx context.Context) (resp ListOperationResponse, err error)
- func (c SubscriptionsClient) ListComplete(ctx context.Context) (ListCompleteResult, error)
- func (c SubscriptionsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate SubscriptionOperationPredicate) (resp ListCompleteResult, err error)
- func (c SubscriptionsClient) ListLocations(ctx context.Context, id commonids.SubscriptionId, ...) (result ListLocationsOperationResponse, err error)
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 AvailabilityZonePeers ¶
type CheckZonePeersOperationResponse ¶
type CheckZonePeersOperationResponse struct { HttpResponse *http.Response Model *CheckZonePeersResult }
type CheckZonePeersRequest ¶
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 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 ¶
func (p SubscriptionOperationPredicate) Matches(input Subscription) bool
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 ¶
func (c SubscriptionsClient) CheckZonePeers(ctx context.Context, id commonids.SubscriptionId, input CheckZonePeersRequest) (result CheckZonePeersOperationResponse, err error)
CheckZonePeers ...
func (SubscriptionsClient) Get ¶
func (c SubscriptionsClient) Get(ctx context.Context, id commonids.SubscriptionId) (result GetOperationResponse, err error)
Get ...
func (SubscriptionsClient) List ¶
func (c SubscriptionsClient) List(ctx context.Context) (resp ListOperationResponse, err error)
List ...
func (SubscriptionsClient) ListComplete ¶
func (c SubscriptionsClient) ListComplete(ctx context.Context) (ListCompleteResult, error)
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 ¶
func (c SubscriptionsClient) ListLocations(ctx context.Context, id commonids.SubscriptionId, options ListLocationsOperationOptions) (result ListLocationsOperationResponse, err error)
ListLocations ...
Source Files ¶
- client.go
- constants.go
- method_checkzonepeers_autorest.go
- method_get_autorest.go
- method_list_autorest.go
- method_listlocations_autorest.go
- model_availabilityzonemappings.go
- model_availabilityzonepeers.go
- model_checkzonepeersrequest.go
- model_checkzonepeersresult.go
- model_location.go
- model_locationlistresult.go
- model_locationmetadata.go
- model_managedbytenant.go
- model_pairedregion.go
- model_peers.go
- model_subscription.go
- model_subscriptionpolicies.go
- predicates.go
- version.go
Click to show internal directories.
Click to hide internal directories.