...

Package subscriptions

import "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2015-11-01/subscriptions"
Overview
Index
Subdirectories

Overview ▾

Deprecated: Please note, this package has been deprecated. A replacement package is available github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions(https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.

Package subscriptions implements the Azure ARM Subscriptions service API version 2015-11-01.

Index ▾

Constants
func UserAgent() string
func Version() string
type BaseClient
    func New() BaseClient
    func NewWithBaseURI(baseURI string) BaseClient
    func (client BaseClient) CheckResourceName(ctx context.Context, resourceNameDefinition *ResourceName) (result CheckResourceNameResult, err error)
    func (client BaseClient) CheckResourceNamePreparer(ctx context.Context, resourceNameDefinition *ResourceName) (*http.Request, error)
    func (client BaseClient) CheckResourceNameResponder(resp *http.Response) (result CheckResourceNameResult, err error)
    func (client BaseClient) CheckResourceNameSender(req *http.Request) (*http.Response, error)
type CheckResourceNameResult
type Client
    func NewClient() Client
    func NewClientWithBaseURI(baseURI string) Client
    func (client Client) Get(ctx context.Context, subscriptionID string) (result Subscription, err error)
    func (client Client) GetPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
    func (client Client) GetResponder(resp *http.Response) (result Subscription, err error)
    func (client Client) GetSender(req *http.Request) (*http.Response, error)
    func (client Client) List(ctx context.Context) (result ListResultPage, err error)
    func (client Client) ListComplete(ctx context.Context) (result ListResultIterator, err error)
    func (client Client) ListLocations(ctx context.Context, subscriptionID string) (result LocationListResult, err error)
    func (client Client) ListLocationsPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
    func (client Client) ListLocationsResponder(resp *http.Response) (result LocationListResult, err error)
    func (client Client) ListLocationsSender(req *http.Request) (*http.Response, error)
    func (client Client) ListPreparer(ctx context.Context) (*http.Request, error)
    func (client Client) ListResponder(resp *http.Response) (result ListResult, err error)
    func (client Client) ListSender(req *http.Request) (*http.Response, error)
type ErrorDefinition
type ErrorResponse
type ListResult
    func (lr ListResult) IsEmpty() bool
type ListResultIterator
    func NewListResultIterator(page ListResultPage) ListResultIterator
    func (iter *ListResultIterator) Next() error
    func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error)
    func (iter ListResultIterator) NotDone() bool
    func (iter ListResultIterator) Response() ListResult
    func (iter ListResultIterator) Value() Subscription
type ListResultPage
    func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage
    func (page *ListResultPage) Next() error
    func (page *ListResultPage) NextWithContext(ctx context.Context) (err error)
    func (page ListResultPage) NotDone() bool
    func (page ListResultPage) Response() ListResult
    func (page ListResultPage) Values() []Subscription
type Location
type LocationListResult
type Policies
type ResourceName
type ResourceNameStatus
    func PossibleResourceNameStatusValues() []ResourceNameStatus
type Subscription
type TenantIDDescription
type TenantListResult
    func (tlr TenantListResult) IsEmpty() bool
type TenantListResultIterator
    func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator
    func (iter *TenantListResultIterator) Next() error
    func (iter *TenantListResultIterator) NextWithContext(ctx context.Context) (err error)
    func (iter TenantListResultIterator) NotDone() bool
    func (iter TenantListResultIterator) Response() TenantListResult
    func (iter TenantListResultIterator) Value() TenantIDDescription
type TenantListResultPage
    func NewTenantListResultPage(cur TenantListResult, getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage
    func (page *TenantListResultPage) Next() error
    func (page *TenantListResultPage) NextWithContext(ctx context.Context) (err error)
    func (page TenantListResultPage) NotDone() bool
    func (page TenantListResultPage) Response() TenantListResult
    func (page TenantListResultPage) Values() []TenantIDDescription
type TenantsClient
    func NewTenantsClient() TenantsClient
    func NewTenantsClientWithBaseURI(baseURI string) TenantsClient
    func (client TenantsClient) List(ctx context.Context) (result TenantListResultPage, err error)
    func (client TenantsClient) ListComplete(ctx context.Context) (result TenantListResultIterator, err error)
    func (client TenantsClient) ListPreparer(ctx context.Context) (*http.Request, error)
    func (client TenantsClient) ListResponder(resp *http.Response) (result TenantListResult, err error)
    func (client TenantsClient) ListSender(req *http.Request) (*http.Response, error)

Package files

client.go enums.go models.go subscriptions.go tenants.go version.go

Constants

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

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.

type BaseClient

BaseClient is the base client for Subscriptions.

type BaseClient struct {
    autorest.Client
    BaseURI string
}

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 using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (BaseClient) CheckResourceName

func (client BaseClient) CheckResourceName(ctx context.Context, resourceNameDefinition *ResourceName) (result CheckResourceNameResult, err error)

CheckResourceName a resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word Parameters: resourceNameDefinition - resource object with values for resource name and resource type

func (BaseClient) CheckResourceNamePreparer

func (client BaseClient) CheckResourceNamePreparer(ctx context.Context, resourceNameDefinition *ResourceName) (*http.Request, error)

CheckResourceNamePreparer prepares the CheckResourceName request.

func (BaseClient) CheckResourceNameResponder

func (client BaseClient) CheckResourceNameResponder(resp *http.Response) (result CheckResourceNameResult, err error)

CheckResourceNameResponder handles the response to the CheckResourceName request. The method always closes the http.Response Body.

func (BaseClient) CheckResourceNameSender

func (client BaseClient) CheckResourceNameSender(req *http.Request) (*http.Response, error)

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

type CheckResourceNameResult

CheckResourceNameResult resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word

type CheckResourceNameResult struct {
    autorest.Response `json:"-"`
    // Name - Name of Resource
    Name *string `json:"name,omitempty"`
    // Type - Type of Resource
    Type *string `json:"type,omitempty"`
    // Status - Is the resource name Allowed or Reserved. Possible values include: 'Allowed', 'Reserved'
    Status ResourceNameStatus `json:"status,omitempty"`
}

type Client

Client is the client for the Subscriptions methods of the Subscriptions service.

type Client struct {
    BaseClient
}

func NewClient

func NewClient() Client

NewClient creates an instance of the Client client.

func NewClientWithBaseURI

func NewClientWithBaseURI(baseURI string) Client

NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (Client) Get

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

Get gets details about particular subscription. Parameters: subscriptionID - id of the subscription.

func (Client) GetPreparer

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

GetPreparer prepares the Get request.

func (Client) GetResponder

func (client Client) 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 (Client) GetSender

func (client Client) 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 (Client) List

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

List gets a list of the subscriptionIds.

func (Client) ListComplete

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

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

func (Client) ListLocations

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

ListLocations gets a list of the subscription locations. Parameters: subscriptionID - id of the subscription

func (Client) ListLocationsPreparer

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

ListLocationsPreparer prepares the ListLocations request.

func (Client) ListLocationsResponder

func (client Client) 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 (Client) ListLocationsSender

func (client Client) 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 (Client) ListPreparer

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

ListPreparer prepares the List request.

func (Client) ListResponder

func (client Client) 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 (Client) ListSender

func (client Client) 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 ErrorDefinition

ErrorDefinition error description and code explaining why resource name is invalid.

type ErrorDefinition struct {
    // Message - Description of the error.
    Message *string `json:"message,omitempty"`
    // Code - Code of the error.
    Code *string `json:"code,omitempty"`
}

type ErrorResponse

ErrorResponse error response.

type ErrorResponse struct {
    // Error - The error details.
    Error *ErrorDefinition `json:"error,omitempty"`
}

type ListResult

ListResult subscription list operation response.

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

func (ListResult) IsEmpty

func (lr ListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type ListResultIterator

ListResultIterator provides access to a complete listing of Subscription values.

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

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

ListResultPage contains a page of Subscription values.

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

func NewListResultPage

func NewListResultPage(cur ListResult, 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

Location location information.

type Location struct {
    // ID - Gets or sets the ID of the resource (/subscriptions/SubscriptionId).
    ID *string `json:"id,omitempty"`
    // SubscriptionID - Gets or sets the subscription Id.
    SubscriptionID *string `json:"subscriptionId,omitempty"`
    // Name - Gets or sets the location name
    Name *string `json:"name,omitempty"`
    // DisplayName - Gets or sets the display name of the location
    DisplayName *string `json:"displayName,omitempty"`
    // Latitude - Gets or sets the latitude of the location
    Latitude *string `json:"latitude,omitempty"`
    // Longitude - Gets or sets the longitude of the location
    Longitude *string `json:"longitude,omitempty"`
}

type LocationListResult

LocationListResult location list operation response.

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

type Policies

Policies subscription policies.

type Policies struct {
    // LocationPlacementID - Gets or sets the subscription location placement Id.
    LocationPlacementID *string `json:"locationPlacementId,omitempty"`
    // QuotaID - Gets or sets the subscription quota Id.
    QuotaID *string `json:"quotaId,omitempty"`
}

type ResourceName

ResourceName name and Type of the Resource

type ResourceName struct {
    // Name - Name of the resource
    Name *string `json:"name,omitempty"`
    // Type - The type of the resource
    Type *string `json:"type,omitempty"`
}

type ResourceNameStatus

ResourceNameStatus enumerates the values for resource name status.

type ResourceNameStatus string
const (
    // Allowed ...
    Allowed ResourceNameStatus = "Allowed"
    // Reserved ...
    Reserved ResourceNameStatus = "Reserved"
)

func PossibleResourceNameStatusValues

func PossibleResourceNameStatusValues() []ResourceNameStatus

PossibleResourceNameStatusValues returns an array of possible values for the ResourceNameStatus const type.

type Subscription

Subscription subscription information.

type Subscription struct {
    autorest.Response `json:"-"`
    // ID - Gets or sets the ID of the resource (/subscriptions/SubscriptionId).
    ID *string `json:"id,omitempty"`
    // SubscriptionID - Gets or sets the subscription Id.
    SubscriptionID *string `json:"subscriptionId,omitempty"`
    // DisplayName - Gets or sets the subscription display name
    DisplayName *string `json:"displayName,omitempty"`
    // State - Gets or sets the subscription state
    State *string `json:"state,omitempty"`
    // SubscriptionPolicies - Gets or sets the subscription policies.
    SubscriptionPolicies *Policies `json:"subscriptionPolicies,omitempty"`
}

type TenantIDDescription

TenantIDDescription tenant Id information

type TenantIDDescription struct {
    // ID - Gets or sets Id
    ID *string `json:"id,omitempty"`
    // TenantID - Gets or sets tenantId
    TenantID *string `json:"tenantId,omitempty"`
}

type TenantListResult

TenantListResult tenant Ids information.

type TenantListResult struct {
    autorest.Response `json:"-"`
    // Value - Gets or sets tenant Ids.
    Value *[]TenantIDDescription `json:"value,omitempty"`
    // NextLink - Gets or sets the URL to get the next set of results.
    NextLink *string `json:"nextLink,omitempty"`
}

func (TenantListResult) IsEmpty

func (tlr TenantListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type TenantListResultIterator

TenantListResultIterator provides access to a complete listing of TenantIDDescription values.

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

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

func (iter TenantListResultIterator) Response() TenantListResult

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

func (TenantListResultIterator) Value

func (iter TenantListResultIterator) Value() TenantIDDescription

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

type TenantListResultPage

TenantListResultPage contains a page of TenantIDDescription values.

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

func NewTenantListResultPage

func NewTenantListResultPage(cur TenantListResult, 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 TenantsClient

TenantsClient is the client for the Tenants methods of the Subscriptions service.

type TenantsClient struct {
    BaseClient
}

func NewTenantsClient

func NewTenantsClient() TenantsClient

NewTenantsClient creates an instance of the TenantsClient client.

func NewTenantsClientWithBaseURI

func NewTenantsClientWithBaseURI(baseURI string) TenantsClient

NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (TenantsClient) List

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

List gets a list of the tenantIds.

func (TenantsClient) ListComplete

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

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

func (TenantsClient) ListPreparer

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

ListPreparer prepares the List request.

func (TenantsClient) ListResponder

func (client TenantsClient) 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 (TenantsClient) ListSender

func (client TenantsClient) 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.

Subdirectories

Name Synopsis
..
subscriptionsapi Deprecated: Please note, this package has been deprecated.