subscriptions

package
v29.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package subscriptions implements the Azure ARM Subscriptions service API version 2016-06-01.

All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Subscriptions
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI string
}

BaseClient is the base client for Subscriptions.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type GroupClient

type GroupClient struct {
	BaseClient
}

GroupClient is the all resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

func NewGroupClient

func NewGroupClient() GroupClient

NewGroupClient creates an instance of the GroupClient client.

func NewGroupClientWithBaseURI

func NewGroupClientWithBaseURI(baseURI string) GroupClient

NewGroupClientWithBaseURI creates an instance of the GroupClient client.

func (GroupClient) Get

func (client GroupClient) Get(ctx context.Context, subscriptionID string) (result Subscription, err error)

Get gets details about a specified subscription. Parameters: subscriptionID - the ID of the target subscription.

func (GroupClient) GetPreparer

func (client GroupClient) GetPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (GroupClient) GetResponder

func (client GroupClient) GetResponder(resp *http.Response) (result Subscription, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (GroupClient) GetSender

func (client GroupClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (GroupClient) List

func (client GroupClient) List(ctx context.Context) (result ListResultPage, err error)

List gets all subscriptions for a tenant.

func (GroupClient) ListComplete

func (client GroupClient) ListComplete(ctx context.Context) (result ListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (GroupClient) ListLocations

func (client GroupClient) ListLocations(ctx context.Context, subscriptionID string) (result LocationListResult, err error)

ListLocations this operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list. Parameters: subscriptionID - the ID of the target subscription.

func (GroupClient) ListLocationsPreparer

func (client GroupClient) ListLocationsPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)

ListLocationsPreparer prepares the ListLocations request.

func (GroupClient) ListLocationsResponder

func (client GroupClient) ListLocationsResponder(resp *http.Response) (result LocationListResult, err error)

ListLocationsResponder handles the response to the ListLocations request. The method always closes the http.Response Body.

func (GroupClient) ListLocationsSender

func (client GroupClient) ListLocationsSender(req *http.Request) (*http.Response, error)

ListLocationsSender sends the ListLocations request. The method will close the http.Response Body if it receives an error.

func (GroupClient) ListPreparer

func (client GroupClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (GroupClient) ListResponder

func (client GroupClient) ListResponder(resp *http.Response) (result ListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (GroupClient) ListSender

func (client GroupClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ListResult

type ListResult struct {
	autorest.Response `json:"-"`
	// Value - An array of subscriptions.
	Value *[]Subscription `json:"value,omitempty"`
	// NextLink - The URL to get the next set of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ListResult subscription list operation response.

func (ListResult) IsEmpty

func (lr ListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type ListResultIterator

type ListResultIterator struct {
	// contains filtered or unexported fields
}

ListResultIterator provides access to a complete listing of Subscription values.

func NewListResultIterator

func NewListResultIterator(page ListResultPage) ListResultIterator

Creates a new instance of the ListResultIterator type.

func (*ListResultIterator) Next

func (iter *ListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ListResultIterator) NextWithContext

func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ListResultIterator) NotDone

func (iter ListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (ListResultIterator) Response

func (iter ListResultIterator) Response() ListResult

Response returns the raw server response from the last page request.

func (ListResultIterator) Value

func (iter ListResultIterator) Value() Subscription

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ListResultPage

type ListResultPage struct {
	// contains filtered or unexported fields
}

ListResultPage contains a page of Subscription values.

func NewListResultPage

func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage

Creates a new instance of the ListResultPage type.

func (*ListResultPage) Next

func (page *ListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ListResultPage) NextWithContext

func (page *ListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ListResultPage) NotDone

func (page ListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ListResultPage) Response

func (page ListResultPage) Response() ListResult

Response returns the raw server response from the last page request.

func (ListResultPage) Values

func (page ListResultPage) Values() []Subscription

Values returns the slice of values for the current page or nil if there are no values.

type Location

type Location struct {
	// ID - READ-ONLY; The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
	ID *string `json:"id,omitempty"`
	// SubscriptionID - READ-ONLY; The subscription ID.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// Name - READ-ONLY; The location name.
	Name *string `json:"name,omitempty"`
	// DisplayName - READ-ONLY; The display name of the location.
	DisplayName *string `json:"displayName,omitempty"`
	// Latitude - READ-ONLY; The latitude of the location.
	Latitude *string `json:"latitude,omitempty"`
	// Longitude - READ-ONLY; The longitude of the location.
	Longitude *string `json:"longitude,omitempty"`
}

Location location information.

type LocationListResult

type LocationListResult struct {
	autorest.Response `json:"-"`
	// Value - An array of locations.
	Value *[]Location `json:"value,omitempty"`
}

LocationListResult location list operation response.

type Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation microsoft.Resources operation

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.Resources
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
	// Description - Description of the operation.
	Description *string `json:"description,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of Microsoft.Resources operations.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsGroupClient

type OperationsGroupClient struct {
	BaseClient
}

OperationsGroupClient is the all resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

func NewOperationsGroupClient

func NewOperationsGroupClient() OperationsGroupClient

NewOperationsGroupClient creates an instance of the OperationsGroupClient client.

func NewOperationsGroupClientWithBaseURI

func NewOperationsGroupClientWithBaseURI(baseURI string) OperationsGroupClient

NewOperationsGroupClientWithBaseURI creates an instance of the OperationsGroupClient client.

func (OperationsGroupClient) List

func (client OperationsGroupClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available Microsoft.Resources REST API operations.

func (OperationsGroupClient) ListComplete

func (client OperationsGroupClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsGroupClient) ListPreparer

func (client OperationsGroupClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsGroupClient) ListResponder

func (client OperationsGroupClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsGroupClient) ListSender

func (client OperationsGroupClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Policies

type Policies struct {
	// LocationPlacementID - READ-ONLY; The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.
	LocationPlacementID *string `json:"locationPlacementId,omitempty"`
	// QuotaID - READ-ONLY; The subscription quota ID.
	QuotaID *string `json:"quotaId,omitempty"`
	// SpendingLimit - READ-ONLY; The subscription spending limit. Possible values include: 'On', 'Off', 'CurrentPeriodOff'
	SpendingLimit SpendingLimit `json:"spendingLimit,omitempty"`
}

Policies subscription policies.

type SpendingLimit

type SpendingLimit string

SpendingLimit enumerates the values for spending limit.

const (
	// CurrentPeriodOff ...
	CurrentPeriodOff SpendingLimit = "CurrentPeriodOff"
	// Off ...
	Off SpendingLimit = "Off"
	// On ...
	On SpendingLimit = "On"
)

func PossibleSpendingLimitValues

func PossibleSpendingLimitValues() []SpendingLimit

PossibleSpendingLimitValues returns an array of possible values for the SpendingLimit const type.

type State

type State string

State enumerates the values for state.

const (
	// Deleted ...
	Deleted State = "Deleted"
	// Disabled ...
	Disabled State = "Disabled"
	// Enabled ...
	Enabled State = "Enabled"
	// PastDue ...
	PastDue State = "PastDue"
	// Warned ...
	Warned State = "Warned"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns an array of possible values for the State const type.

type Subscription

type Subscription struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY; The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
	ID *string `json:"id,omitempty"`
	// SubscriptionID - READ-ONLY; The subscription ID.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// DisplayName - READ-ONLY; The subscription display name.
	DisplayName *string `json:"displayName,omitempty"`
	// State - READ-ONLY; The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted'
	State State `json:"state,omitempty"`
	// SubscriptionPolicies - The subscription policies.
	SubscriptionPolicies *Policies `json:"subscriptionPolicies,omitempty"`
	// AuthorizationSource - The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.
	AuthorizationSource *string `json:"authorizationSource,omitempty"`
}

Subscription subscription information.

type TenantIDDescription

type TenantIDDescription struct {
	// ID - READ-ONLY; The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.
	ID *string `json:"id,omitempty"`
	// TenantID - READ-ONLY; The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
	TenantID *string `json:"tenantId,omitempty"`
}

TenantIDDescription tenant Id information.

type TenantListResult

type TenantListResult struct {
	autorest.Response `json:"-"`
	// Value - An array of tenants.
	Value *[]TenantIDDescription `json:"value,omitempty"`
	// NextLink - The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`
}

TenantListResult tenant Ids information.

func (TenantListResult) IsEmpty

func (tlr TenantListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type TenantListResultIterator

type TenantListResultIterator struct {
	// contains filtered or unexported fields
}

TenantListResultIterator provides access to a complete listing of TenantIDDescription values.

func NewTenantListResultIterator

func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator

Creates a new instance of the TenantListResultIterator type.

func (*TenantListResultIterator) Next

func (iter *TenantListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*TenantListResultIterator) NextWithContext

func (iter *TenantListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (TenantListResultIterator) NotDone

func (iter TenantListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (TenantListResultIterator) Response

Response returns the raw server response from the last page request.

func (TenantListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type TenantListResultPage

type TenantListResultPage struct {
	// contains filtered or unexported fields
}

TenantListResultPage contains a page of TenantIDDescription values.

func NewTenantListResultPage

func NewTenantListResultPage(getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage

Creates a new instance of the TenantListResultPage type.

func (*TenantListResultPage) Next

func (page *TenantListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*TenantListResultPage) NextWithContext

func (page *TenantListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (TenantListResultPage) NotDone

func (page TenantListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (TenantListResultPage) Response

func (page TenantListResultPage) Response() TenantListResult

Response returns the raw server response from the last page request.

func (TenantListResultPage) Values

func (page TenantListResultPage) Values() []TenantIDDescription

Values returns the slice of values for the current page or nil if there are no values.

type TenantsGroupClient

type TenantsGroupClient struct {
	BaseClient
}

TenantsGroupClient is the all resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

func NewTenantsGroupClient

func NewTenantsGroupClient() TenantsGroupClient

NewTenantsGroupClient creates an instance of the TenantsGroupClient client.

func NewTenantsGroupClientWithBaseURI

func NewTenantsGroupClientWithBaseURI(baseURI string) TenantsGroupClient

NewTenantsGroupClientWithBaseURI creates an instance of the TenantsGroupClient client.

func (TenantsGroupClient) List

func (client TenantsGroupClient) List(ctx context.Context) (result TenantListResultPage, err error)

List gets the tenants for your account.

func (TenantsGroupClient) ListComplete

func (client TenantsGroupClient) ListComplete(ctx context.Context) (result TenantListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (TenantsGroupClient) ListPreparer

func (client TenantsGroupClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (TenantsGroupClient) ListResponder

func (client TenantsGroupClient) ListResponder(resp *http.Response) (result TenantListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (TenantsGroupClient) ListSender

func (client TenantsGroupClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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