README
¶
github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/subscriptions
Documentation
The subscriptions
SDK allows for interaction with Azure Resource Manager resources
(API Version 2015-11-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/subscriptions"
Client Initialization
client := subscriptions.NewSubscriptionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: SubscriptionsClient.CheckZonePeers
ctx := context.TODO()
id := commonids.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 := commonids.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 := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
read, err := client.ListLocations(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation
¶
Index ¶
- type AvailabilityZonePeers
- type CheckZonePeersOperationResponse
- type CheckZonePeersRequest
- type CheckZonePeersResult
- type GetOperationResponse
- type ListCompleteResult
- type ListCustomPager
- type ListLocationsOperationResponse
- type ListOperationResponse
- type Location
- type LocationListResult
- type Peers
- type Subscription
- type SubscriptionOperationPredicate
- type SubscriptionPolicies
- 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) (result ListOperationResponse, err error)
- func (c SubscriptionsClient) ListComplete(ctx context.Context) (ListCompleteResult, error)
- func (c SubscriptionsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate SubscriptionOperationPredicate) (result 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 ¶
This section is empty.
Types ¶
type AvailabilityZonePeers ¶
type CheckZonePeersOperationResponse ¶
type CheckZonePeersOperationResponse struct { HttpResponse *http.Response OData *odata.OData 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 OData *odata.OData Model *Subscription }
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []Subscription }
type ListCustomPager ¶ added in v0.20240628.1153531
func (*ListCustomPager) NextPageLink ¶ added in v0.20240628.1153531
func (p *ListCustomPager) NextPageLink() *odata.Link
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 LocationListResult ¶
type LocationListResult struct {
Value *[]Location `json:"value,omitempty"`
}
type Subscription ¶
type Subscription struct { DisplayName *string `json:"displayName,omitempty"` Id *string `json:"id,omitempty"` State *string `json:"state,omitempty"` SubscriptionId *string `json:"subscriptionId,omitempty"` SubscriptionPolicies *SubscriptionPolicies `json:"subscriptionPolicies,omitempty"` }
type SubscriptionOperationPredicate ¶
type SubscriptionOperationPredicate struct { DisplayName *string Id *string State *string SubscriptionId *string }
func (SubscriptionOperationPredicate) Matches ¶
func (p SubscriptionOperationPredicate) Matches(input Subscription) bool
type SubscriptionPolicies ¶
type SubscriptionsClient ¶
type SubscriptionsClient struct {
Client *resourcemanager.Client
}
func NewSubscriptionsClientWithBaseURI ¶
func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error)
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) (result ListOperationResponse, err error)
List ...
func (SubscriptionsClient) ListComplete ¶
func (c SubscriptionsClient) ListComplete(ctx context.Context) (ListCompleteResult, error)
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 ¶
func (c SubscriptionsClient) ListLocations(ctx context.Context, id commonids.SubscriptionId) (result ListLocationsOperationResponse, err error)
ListLocations ...
Source Files
¶
- client.go
- method_checkzonepeers.go
- method_get.go
- method_list.go
- method_listlocations.go
- model_availabilityzonepeers.go
- model_checkzonepeersrequest.go
- model_checkzonepeersresult.go
- model_location.go
- model_locationlistresult.go
- model_peers.go
- model_subscription.go
- model_subscriptionpolicies.go
- predicates.go
- version.go
Click to show internal directories.
Click to hide internal directories.