Documentation ¶
Index ¶
- Constants
- func Bool(input bool) *bool
- func Int32(input int32) *int32
- func Int64(input int64) *int64
- func String(input string) *string
- type APICall
- type APIInfo
- type AzureResourceManagerCredentials
- type Client
- type CreateResourceGroup
- type CreateResourceGroupResponse
- type DeleteResourceGroup
- type Error
- type GetResourceGroup
- type GetResourceGroupResponse
- type GetResourceProvider
- type GetResourceProviderResponse
- type RegisterResourceProvider
- type RegisterResourceProviderResponse
- type Request
- type Response
- type UpdateResourceGroup
- type UpdateResourceGroupResponse
Constants ¶
const ( Global = "global" CentralUS = "centralus" EastUS = "eastus" EastUS2 = "eastus2" USGovIowa = "usgoviowa" USGovVirginia = "usgovvirginia" NorthCentralUS = "northcentralus" SouthCentralUS = "southcentralus" WestUS = "westus" NorthEurope = "northeurope" WestEurope = "westeurope" EastAsia = "eastasia" SoutheastAsia = "southeastasia" JapanEast = "japaneast" JapanWest = "japanwest" BrazilSouth = "brazilsouth" AustraliaEast = "australiaeast" AustraliaSouthEast = "australiasoutheast" CentralIndia = "centralindia" SouthIndia = "southindia" WestIndia = "westindia" ChinaEast = "chinaeast" ChinaNorth = "chinanorth" UKSouth = "uksouth" UKWest = "ukwest" CanadaCentral = "canadacentral" CanadaEast = "canadaeast" GermanyCentral = "germanycentral" GermanyEast = "germanyeast" )
Variables ¶
This section is empty.
Functions ¶
func Int32 ¶
Int32 returns a pointer to the input int32. This is useful when initializing structures.
Types ¶
type APICall ¶
type APICall interface {
APIInfo() APIInfo
}
APICall must be implemented by structures which represent requests to the ARM API in order that the generic request handling layer has sufficient information to execute requests.
type APIInfo ¶
type APIInfo struct { APIVersion string Method string URLPathFunc func() string ResponseTypeFunc func() interface{} RequestPropertiesFunc func() interface{} HasBodyOverride bool }
APIInfo contains information about a request to the ARM API - which API version is required, the HTTP method to use, and a factory function for responses.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(creds *AzureResourceManagerCredentials) (*Client, error)
func (*Client) NewRequest ¶
func (*Client) NewRequestForURI ¶
type CreateResourceGroup ¶
type CreateResourceGroup struct { Name string `json:"-"` Location string `json:"-" riviera:"location"` Tags map[string]*string `json:"-" riviera:"tags"` }
func (CreateResourceGroup) APIInfo ¶
func (command CreateResourceGroup) APIInfo() APIInfo
type DeleteResourceGroup ¶
type DeleteResourceGroup struct {
Name string `json:"-"`
}
func (DeleteResourceGroup) APIInfo ¶
func (s DeleteResourceGroup) APIInfo() APIInfo
type Error ¶
type Error struct { StatusCode int ErrorCode string `mapstructure:"code"` Message string `mapstructure:"message"` }
Error represents the body of an error response which is often returned by the Azure ARM API.
type GetResourceGroup ¶
type GetResourceGroup struct {
Name string `json:"-"`
}
func (GetResourceGroup) APIInfo ¶
func (command GetResourceGroup) APIInfo() APIInfo
type GetResourceProvider ¶
type GetResourceProvider struct {
Namespace string `json:"-"`
}
func (GetResourceProvider) APIInfo ¶
func (command GetResourceProvider) APIInfo() APIInfo
type RegisterResourceProvider ¶
type RegisterResourceProvider struct {
Namespace string `json:"-"`
}
func (RegisterResourceProvider) APIInfo ¶
func (command RegisterResourceProvider) APIInfo() APIInfo
type Response ¶
type Response struct { // HTTP provides direct access to the http.Response, though use should // not be necessary as a matter of course HTTP *http.Response // Parsed provides access the response structure of the command Parsed interface{} // Error provides access to the error body if the command was unsuccessful Error *Error }
Response is the type returned by API operations. It provides low level access to the HTTP request from the operation if that is required, and a parsed version of the response as an interface{} which can be type asserted to the correct response type for the request.
func (*Response) IsSuccessful ¶
IsSuccessful returns true if the status code for the underlying HTTP request was a "successful" status code.
type UpdateResourceGroup ¶
type UpdateResourceGroup struct { Name string `json:"-"` Tags map[string]*string `json:"-" riviera:"tags"` }
func (UpdateResourceGroup) APIInfo ¶
func (command UpdateResourceGroup) APIInfo() APIInfo