subscriptions

package
v0.20240521.1173452 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/subscriptions Documentation

The subscriptions SDK allows for interaction with the Azure Resource Manager Service 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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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 {
	DisplayName    *string `json:"displayName,omitempty"`
	Id             *string `json:"id,omitempty"`
	Latitude       *string `json:"latitude,omitempty"`
	Longitude      *string `json:"longitude,omitempty"`
	Name           *string `json:"name,omitempty"`
	SubscriptionId *string `json:"subscriptionId,omitempty"`
}

type LocationListResult

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

type Peers

type Peers struct {
	AvailabilityZone *string `json:"availabilityZone,omitempty"`
	SubscriptionId   *string `json:"subscriptionId,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

type SubscriptionPolicies

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

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