Documentation ¶
Overview ¶
Package reservations implements the Azure ARM Reservations service API version 2018-06-01.
This API describe Azure Reservation
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type AppliedReservationList
- type AppliedReservations
- type AppliedReservationsProperties
- type AppliedScopeType
- type BaseClient
- func (client BaseClient) GetAppliedReservationList(ctx context.Context, subscriptionID string) (result AppliedReservations, err error)
- func (client BaseClient) GetAppliedReservationListPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
- func (client BaseClient) GetAppliedReservationListResponder(resp *http.Response) (result AppliedReservations, err error)
- func (client BaseClient) GetAppliedReservationListSender(req *http.Request) (*http.Response, error)
- func (client BaseClient) GetCatalog(ctx context.Context, subscriptionID string, reservedResourceType string, ...) (result ListCatalog, err error)
- func (client BaseClient) GetCatalogPreparer(ctx context.Context, subscriptionID string, reservedResourceType string, ...) (*http.Request, error)
- func (client BaseClient) GetCatalogResponder(resp *http.Response) (result ListCatalog, err error)
- func (client BaseClient) GetCatalogSender(req *http.Request) (*http.Response, error)
- type Catalog
- type Client
- func (client Client) Get(ctx context.Context, reservationID string, reservationOrderID string) (result Response, err error)
- func (client Client) GetPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error)
- func (client Client) GetResponder(resp *http.Response) (result Response, err error)
- func (client Client) GetSender(req *http.Request) (*http.Response, error)
- func (client Client) List(ctx context.Context, reservationOrderID string) (result ListPage, err error)
- func (client Client) ListComplete(ctx context.Context, reservationOrderID string) (result ListIterator, err error)
- func (client Client) ListPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error)
- func (client Client) ListResponder(resp *http.Response) (result List, err error)
- func (client Client) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result ListPage, err error)
- func (client Client) ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result ListIterator, err error)
- func (client Client) ListRevisionsPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error)
- func (client Client) ListRevisionsResponder(resp *http.Response) (result List, err error)
- func (client Client) ListRevisionsSender(req *http.Request) (*http.Response, error)
- func (client Client) ListSender(req *http.Request) (*http.Response, error)
- func (client Client) Merge(ctx context.Context, reservationOrderID string, body MergeRequest) (result ReservationMergeFuture, err error)
- func (client Client) MergePreparer(ctx context.Context, reservationOrderID string, body MergeRequest) (*http.Request, error)
- func (client Client) MergeResponder(resp *http.Response) (result ListResponse, err error)
- func (client Client) MergeSender(req *http.Request) (future ReservationMergeFuture, err error)
- func (client Client) Split(ctx context.Context, reservationOrderID string, body SplitRequest) (result SplitFuture, err error)
- func (client Client) SplitPreparer(ctx context.Context, reservationOrderID string, body SplitRequest) (*http.Request, error)
- func (client Client) SplitResponder(resp *http.Response) (result ListResponse, err error)
- func (client Client) SplitSender(req *http.Request) (future SplitFuture, err error)
- func (client Client) Update(ctx context.Context, reservationOrderID string, reservationID string, ...) (result ReservationUpdateFuture, err error)
- func (client Client) UpdatePreparer(ctx context.Context, reservationOrderID string, reservationID string, ...) (*http.Request, error)
- func (client Client) UpdateResponder(resp *http.Response) (result Response, err error)
- func (client Client) UpdateSender(req *http.Request) (future ReservationUpdateFuture, err error)
- type Error
- type ErrorResponseCode
- type ExtendedErrorInfo
- type ExtendedStatusInfo
- type InstanceFlexibility
- type List
- type ListCatalog
- type ListIterator
- type ListPage
- type ListResponse
- type MergeProperties
- type MergePropertiesType
- type MergeRequest
- type OperationClient
- func (client OperationClient) List(ctx context.Context) (result OperationListPage, err error)
- func (client OperationClient) ListComplete(ctx context.Context) (result OperationListIterator, err error)
- func (client OperationClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client OperationClient) ListResponder(resp *http.Response) (result OperationList, err error)
- func (client OperationClient) ListSender(req *http.Request) (*http.Response, error)
- type OperationDisplay
- type OperationList
- type OperationListIterator
- type OperationListPage
- type OperationResponse
- type OrderClient
- func (client OrderClient) Get(ctx context.Context, reservationOrderID string) (result OrderResponse, err error)
- func (client OrderClient) GetPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error)
- func (client OrderClient) GetResponder(resp *http.Response) (result OrderResponse, err error)
- func (client OrderClient) GetSender(req *http.Request) (*http.Response, error)
- func (client OrderClient) List(ctx context.Context) (result OrderListPage, err error)
- func (client OrderClient) ListComplete(ctx context.Context) (result OrderListIterator, err error)
- func (client OrderClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client OrderClient) ListResponder(resp *http.Response) (result OrderList, err error)
- func (client OrderClient) ListSender(req *http.Request) (*http.Response, error)
- type OrderList
- type OrderListIterator
- type OrderListPage
- type OrderProperties
- type OrderResponse
- type Patch
- type PatchProperties
- type Properties
- type ReservationMergeFuture
- type ReservationTerm
- type ReservationUpdateFuture
- type ReservedResourceType
- type Response
- type SkuName
- type SkuProperty
- type SkuRestriction
- type SplitFuture
- type SplitProperties
- type SplitPropertiesType
- type SplitRequest
- type StatusCode
Constants ¶
const (
// DefaultBaseURI is the default URI used for the service Reservations
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 AppliedReservationList ¶
type AppliedReservationList struct { Value *[]string `json:"value,omitempty"` // NextLink - Url to get the next page of reservations NextLink *string `json:"nextLink,omitempty"` }
AppliedReservationList ...
type AppliedReservations ¶
type AppliedReservations struct { autorest.Response `json:"-"` // ID - READ-ONLY; Identifier of the applied reservations ID *string `json:"id,omitempty"` // Name - READ-ONLY; Name of resource Name *string `json:"name,omitempty"` // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/AppliedReservations" Type *string `json:"type,omitempty"` *AppliedReservationsProperties `json:"properties,omitempty"` }
AppliedReservations ...
func (AppliedReservations) MarshalJSON ¶
func (ar AppliedReservations) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AppliedReservations.
func (*AppliedReservations) UnmarshalJSON ¶
func (ar *AppliedReservations) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AppliedReservations struct.
type AppliedReservationsProperties ¶
type AppliedReservationsProperties struct {
ReservationOrderIds *AppliedReservationList `json:"reservationOrderIds,omitempty"`
}
AppliedReservationsProperties ...
type AppliedScopeType ¶
type AppliedScopeType string
AppliedScopeType enumerates the values for applied scope type.
const ( AppliedScopeType = "Shared" // Single ... Single AppliedScopeType = "Single" )Shared
func PossibleAppliedScopeTypeValues ¶
func PossibleAppliedScopeTypeValues() []AppliedScopeType
PossibleAppliedScopeTypeValues returns an array of possible values for the AppliedScopeType const type.
type BaseClient ¶
BaseClient is the base client for Reservations.
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) GetAppliedReservationList ¶
func (client BaseClient) GetAppliedReservationList(ctx context.Context, subscriptionID string) (result AppliedReservations, err error)
GetAppliedReservationList get applicable `Reservation`s that are applied to this subscription. Parameters: subscriptionID - id of the subscription
func (BaseClient) GetAppliedReservationListPreparer ¶
func (client BaseClient) GetAppliedReservationListPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
GetAppliedReservationListPreparer prepares the GetAppliedReservationList request.
func (BaseClient) GetAppliedReservationListResponder ¶
func (client BaseClient) GetAppliedReservationListResponder(resp *http.Response) (result AppliedReservations, err error)
GetAppliedReservationListResponder handles the response to the GetAppliedReservationList request. The method always closes the http.Response Body.
func (BaseClient) GetAppliedReservationListSender ¶
GetAppliedReservationListSender sends the GetAppliedReservationList request. The method will close the http.Response Body if it receives an error.
func (BaseClient) GetCatalog ¶
func (client BaseClient) GetCatalog(ctx context.Context, subscriptionID string, reservedResourceType string, location string) (result ListCatalog, err error)
GetCatalog sends the get catalog request. Parameters: subscriptionID - id of the subscription reservedResourceType - the type of the resource for which the skus should be provided. location - filters the skus based on the location specified in this parameter. This can be an azure region or global
func (BaseClient) GetCatalogPreparer ¶
func (client BaseClient) GetCatalogPreparer(ctx context.Context, subscriptionID string, reservedResourceType string, location string) (*http.Request, error)
GetCatalogPreparer prepares the GetCatalog request.
func (BaseClient) GetCatalogResponder ¶
func (client BaseClient) GetCatalogResponder(resp *http.Response) (result ListCatalog, err error)
GetCatalogResponder handles the response to the GetCatalog request. The method always closes the http.Response Body.
func (BaseClient) GetCatalogSender ¶
GetCatalogSender sends the GetCatalog request. The method will close the http.Response Body if it receives an error.
type Catalog ¶
type Catalog struct { // ResourceType - READ-ONLY; The type of resource the SKU applies to. ResourceType *string `json:"resourceType,omitempty"` // Name - READ-ONLY; The name of SKU Name *string `json:"name,omitempty"` // Terms - READ-ONLY; Available reservation terms for this resource Terms *[]ReservationTerm `json:"terms,omitempty"` // Locations - READ-ONLY Locations *[]string `json:"locations,omitempty"` // SkuProperties - READ-ONLY SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` // Restrictions - READ-ONLY Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` }
Catalog ...
type Client ¶
type Client struct {
BaseClient
}
Client is the this API describe Azure Reservation
func NewClientWithBaseURI ¶
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, reservationID string, reservationOrderID string) (result Response, err error)
Get get specific `Reservation` details. Parameters: reservationID - id of the Reservation Item reservationOrderID - order Id of the reservation
func (Client) GetPreparer ¶
func (client Client) GetPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (Client) GetResponder ¶
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (Client) GetSender ¶
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, reservationOrderID string) (result ListPage, err error)
List list `Reservation`s within a single `ReservationOrder`. Parameters: reservationOrderID - order Id of the reservation
func (Client) ListComplete ¶
func (client Client) ListComplete(ctx context.Context, reservationOrderID string) (result ListIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (Client) ListPreparer ¶
func (client Client) ListPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error)
ListPreparer prepares the List request.
func (Client) ListResponder ¶
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (Client) ListRevisions ¶
func (client Client) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result ListPage, err error)
ListRevisions list of all the revisions for the `Reservation`. Parameters: reservationID - id of the Reservation Item reservationOrderID - order Id of the reservation
func (Client) ListRevisionsComplete ¶
func (client Client) ListRevisionsComplete(ctx context.Context, reservationID string, reservationOrderID string) (result ListIterator, err error)
ListRevisionsComplete enumerates all values, automatically crossing page boundaries as required.
func (Client) ListRevisionsPreparer ¶
func (client Client) ListRevisionsPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error)
ListRevisionsPreparer prepares the ListRevisions request.
func (Client) ListRevisionsResponder ¶
ListRevisionsResponder handles the response to the ListRevisions request. The method always closes the http.Response Body.
func (Client) ListRevisionsSender ¶
ListRevisionsSender sends the ListRevisions request. The method will close the http.Response Body if it receives an error.
func (Client) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
func (Client) Merge ¶
func (client Client) Merge(ctx context.Context, reservationOrderID string, body MergeRequest) (result ReservationMergeFuture, err error)
Merge merge the specified `Reservation`s into a new `Reservation`. The two `Reservation`s being merged must have same properties. Parameters: reservationOrderID - order Id of the reservation body - information needed for commercial request for a reservation
func (Client) MergePreparer ¶
func (client Client) MergePreparer(ctx context.Context, reservationOrderID string, body MergeRequest) (*http.Request, error)
MergePreparer prepares the Merge request.
func (Client) MergeResponder ¶
func (client Client) MergeResponder(resp *http.Response) (result ListResponse, err error)
MergeResponder handles the response to the Merge request. The method always closes the http.Response Body.
func (Client) MergeSender ¶
func (client Client) MergeSender(req *http.Request) (future ReservationMergeFuture, err error)
MergeSender sends the Merge request. The method will close the http.Response Body if it receives an error.
func (Client) Split ¶
func (client Client) Split(ctx context.Context, reservationOrderID string, body SplitRequest) (result SplitFuture, err error)
Split split a `Reservation` into two `Reservation`s with specified quantity distribution. Parameters: reservationOrderID - order Id of the reservation body - information needed to Split a reservation item
func (Client) SplitPreparer ¶
func (client Client) SplitPreparer(ctx context.Context, reservationOrderID string, body SplitRequest) (*http.Request, error)
SplitPreparer prepares the Split request.
func (Client) SplitResponder ¶
func (client Client) SplitResponder(resp *http.Response) (result ListResponse, err error)
SplitResponder handles the response to the Split request. The method always closes the http.Response Body.
func (Client) SplitSender ¶
func (client Client) SplitSender(req *http.Request) (future SplitFuture, err error)
SplitSender sends the Split request. The method will close the http.Response Body if it receives an error.
func (Client) Update ¶
func (client Client) Update(ctx context.Context, reservationOrderID string, reservationID string, parameters Patch) (result ReservationUpdateFuture, err error)
Update updates the applied scopes of the `Reservation`. Parameters: reservationOrderID - order Id of the reservation reservationID - id of the Reservation Item parameters - information needed to patch a reservation item
func (Client) UpdatePreparer ¶
func (client Client) UpdatePreparer(ctx context.Context, reservationOrderID string, reservationID string, parameters Patch) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (Client) UpdateResponder ¶
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (Client) UpdateSender ¶
func (client Client) UpdateSender(req *http.Request) (future ReservationUpdateFuture, err error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
type ErrorResponseCode ¶
type ErrorResponseCode string
ErrorResponseCode enumerates the values for error response code.
const ( // ActivateQuoteFailed ... ActivateQuoteFailed ErrorResponseCode = "ActivateQuoteFailed" // AppliedScopesNotAssociatedWithCommerceAccount ... AppliedScopesNotAssociatedWithCommerceAccount ErrorResponseCode = "AppliedScopesNotAssociatedWithCommerceAccount" // AuthorizationFailed ... AuthorizationFailed ErrorResponseCode = "AuthorizationFailed" // BadRequest ... BadRequest ErrorResponseCode = "BadRequest" // BillingCustomerInputError ... BillingCustomerInputError ErrorResponseCode = "BillingCustomerInputError" // BillingError ... BillingError ErrorResponseCode = "BillingError" // BillingPaymentInstrumentHardError ... BillingPaymentInstrumentHardError ErrorResponseCode = "BillingPaymentInstrumentHardError" // BillingPaymentInstrumentSoftError ... BillingPaymentInstrumentSoftError ErrorResponseCode = "BillingPaymentInstrumentSoftError" // BillingScopeIDCannotBeChanged ... BillingScopeIDCannotBeChanged ErrorResponseCode = "BillingScopeIdCannotBeChanged" // BillingTransientError ... BillingTransientError ErrorResponseCode = "BillingTransientError" // CalculatePriceFailed ... CalculatePriceFailed ErrorResponseCode = "CalculatePriceFailed" // CapacityUpdateScopesFailed ... CapacityUpdateScopesFailed ErrorResponseCode = "CapacityUpdateScopesFailed" // ClientCertificateThumbprintNotSet ... ClientCertificateThumbprintNotSet ErrorResponseCode = "ClientCertificateThumbprintNotSet" // CreateQuoteFailed ... CreateQuoteFailed ErrorResponseCode = "CreateQuoteFailed" // Forbidden ... Forbidden ErrorResponseCode = "Forbidden" // FulfillmentConfigurationError ... FulfillmentConfigurationError ErrorResponseCode = "FulfillmentConfigurationError" // FulfillmentError ... FulfillmentError ErrorResponseCode = "FulfillmentError" // FulfillmentOutOfStockError ... FulfillmentOutOfStockError ErrorResponseCode = "FulfillmentOutOfStockError" // FulfillmentTransientError ... FulfillmentTransientError ErrorResponseCode = "FulfillmentTransientError" // HTTPMethodNotSupported ... HTTPMethodNotSupported ErrorResponseCode = "HttpMethodNotSupported" // InternalServerError ... InternalServerError ErrorResponseCode = "InternalServerError" // InvalidAccessToken ... InvalidAccessToken ErrorResponseCode = "InvalidAccessToken" // InvalidFulfillmentRequestParameters ... InvalidFulfillmentRequestParameters ErrorResponseCode = "InvalidFulfillmentRequestParameters" // InvalidHealthCheckType ... InvalidHealthCheckType ErrorResponseCode = "InvalidHealthCheckType" // InvalidLocationID ... InvalidLocationID ErrorResponseCode = "InvalidLocationId" // InvalidRefundQuantity ... InvalidRefundQuantity ErrorResponseCode = "InvalidRefundQuantity" // InvalidRequestContent ... InvalidRequestContent ErrorResponseCode = "InvalidRequestContent" // InvalidRequestURI ... InvalidRequestURI ErrorResponseCode = "InvalidRequestUri" // InvalidReservationID ... InvalidReservationID ErrorResponseCode = "InvalidReservationId" // InvalidReservationOrderID ... InvalidReservationOrderID ErrorResponseCode = "InvalidReservationOrderId" // InvalidSingleAppliedScopesCount ... InvalidSingleAppliedScopesCount ErrorResponseCode = "InvalidSingleAppliedScopesCount" // InvalidSubscriptionID ... InvalidSubscriptionID ErrorResponseCode = "InvalidSubscriptionId" // InvalidTenantID ... InvalidTenantID ErrorResponseCode = "InvalidTenantId" // MissingAppliedScopesForSingle ... MissingAppliedScopesForSingle ErrorResponseCode = "MissingAppliedScopesForSingle" // MissingTenantID ... MissingTenantID ErrorResponseCode = "MissingTenantId" // NonsupportedAccountID ... NonsupportedAccountID ErrorResponseCode = "NonsupportedAccountId" // NotSpecified ... NotSpecified ErrorResponseCode = "NotSpecified" // NotSupportedCountry ... NotSupportedCountry ErrorResponseCode = "NotSupportedCountry" // NoValidReservationsToReRate ... NoValidReservationsToReRate ErrorResponseCode = "NoValidReservationsToReRate" // OperationCannotBePerformedInCurrentState ... OperationCannotBePerformedInCurrentState ErrorResponseCode = "OperationCannotBePerformedInCurrentState" // OperationFailed ... OperationFailed ErrorResponseCode = "OperationFailed" // PatchValuesSameAsExisting ... PatchValuesSameAsExisting ErrorResponseCode = "PatchValuesSameAsExisting" // PaymentInstrumentNotFound ... PaymentInstrumentNotFound ErrorResponseCode = "PaymentInstrumentNotFound" // PurchaseError ... PurchaseError ErrorResponseCode = "PurchaseError" // ReRateOnlyAllowedForEA ... ReRateOnlyAllowedForEA ErrorResponseCode = "ReRateOnlyAllowedForEA" // ReservationIDNotInReservationOrder ... ReservationIDNotInReservationOrder ErrorResponseCode = "ReservationIdNotInReservationOrder" // ReservationOrderCreationFailed ... ReservationOrderCreationFailed ErrorResponseCode = "ReservationOrderCreationFailed" // ReservationOrderIDAlreadyExists ... ReservationOrderIDAlreadyExists ErrorResponseCode = "ReservationOrderIdAlreadyExists" // ReservationOrderNotEnabled ... ReservationOrderNotEnabled ErrorResponseCode = "ReservationOrderNotEnabled" // ReservationOrderNotFound ... ReservationOrderNotFound ErrorResponseCode = "ReservationOrderNotFound" // RiskCheckFailed ... RiskCheckFailed ErrorResponseCode = "RiskCheckFailed" // RoleAssignmentCreationFailed ... RoleAssignmentCreationFailed ErrorResponseCode = "RoleAssignmentCreationFailed" // ServerTimeout ... ServerTimeout ErrorResponseCode = "ServerTimeout" // UnauthenticatedRequestsThrottled ... UnauthenticatedRequestsThrottled ErrorResponseCode = "UnauthenticatedRequestsThrottled" // UnsupportedReservationTerm ... UnsupportedReservationTerm ErrorResponseCode = "UnsupportedReservationTerm" )
func PossibleErrorResponseCodeValues ¶
func PossibleErrorResponseCodeValues() []ErrorResponseCode
PossibleErrorResponseCodeValues returns an array of possible values for the ErrorResponseCode const type.
type ExtendedErrorInfo ¶
type ExtendedErrorInfo struct { // Code - Possible values include: 'NotSpecified', 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', 'BadRequest', 'ClientCertificateThumbprintNotSet', 'InvalidRequestContent', 'OperationFailed', 'HTTPMethodNotSupported', 'InvalidRequestURI', 'MissingTenantID', 'InvalidTenantID', 'InvalidReservationOrderID', 'InvalidReservationID', 'ReservationIDNotInReservationOrder', 'ReservationOrderNotFound', 'InvalidSubscriptionID', 'InvalidAccessToken', 'InvalidLocationID', 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIDCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIDAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', 'ActivateQuoteFailed', 'NonsupportedAccountID', 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', 'OperationCannotBePerformedInCurrentState', 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', 'BillingPaymentInstrumentHardError', 'BillingTransientError', 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed' Code ErrorResponseCode `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
ExtendedErrorInfo ...
type ExtendedStatusInfo ¶
type ExtendedStatusInfo struct { // StatusCode - Possible values include: 'StatusCodeNone', 'StatusCodePending', 'StatusCodeActive', 'StatusCodePurchaseError', 'StatusCodePaymentInstrumentError', 'StatusCodeSplit', 'StatusCodeMerged', 'StatusCodeExpired', 'StatusCodeSucceeded' StatusCode StatusCode `json:"statusCode,omitempty"` // Message - The message giving detailed information about the status code. Message *string `json:"message,omitempty"` }
ExtendedStatusInfo ...
type InstanceFlexibility ¶
type InstanceFlexibility string
InstanceFlexibility enumerates the values for instance flexibility.
const ( // NotSupported ... NotSupported InstanceFlexibility = "NotSupported" // Off ... Off InstanceFlexibility = "Off" // On ... On InstanceFlexibility = "On" )
func PossibleInstanceFlexibilityValues ¶
func PossibleInstanceFlexibilityValues() []InstanceFlexibility
PossibleInstanceFlexibilityValues returns an array of possible values for the InstanceFlexibility const type.
type List ¶
type List struct { autorest.Response `json:"-"` Value *[]Response `json:"value,omitempty"` // NextLink - Url to get the next page of reservations. NextLink *string `json:"nextLink,omitempty"` }
List ...
type ListCatalog ¶
ListCatalog ...
type ListIterator ¶
type ListIterator struct {
// contains filtered or unexported fields
}
ListIterator provides access to a complete listing of Response values.
func NewListIterator ¶
func NewListIterator(page ListPage) ListIterator
Creates a new instance of the ListIterator type.
func (*ListIterator) Next ¶
func (iter *ListIterator) 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 (*ListIterator) NextWithContext ¶
func (iter *ListIterator) 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 (ListIterator) NotDone ¶
func (iter ListIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (ListIterator) Response ¶
func (iter ListIterator) Response() List
Response returns the raw server response from the last page request.
func (ListIterator) Value ¶
func (iter ListIterator) Value() Response
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type ListPage ¶
type ListPage struct {
// contains filtered or unexported fields
}
ListPage contains a page of Response values.
func NewListPage ¶
Creates a new instance of the ListPage type.
func (*ListPage) Next ¶
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 (*ListPage) NextWithContext ¶
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 (ListPage) NotDone ¶
NotDone returns true if the page enumeration should be started or is not yet complete.
type ListResponse ¶
type ListResponse struct { autorest.Response `json:"-"` Value *[]Response `json:"value,omitempty"` }
ListResponse ...
type MergeProperties ¶
type MergeProperties struct { // Sources - Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} Sources *[]string `json:"sources,omitempty"` }
MergeProperties ...
type MergePropertiesType ¶
type MergePropertiesType struct { // MergeDestination - Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} MergeDestination *string `json:"mergeDestination,omitempty"` // MergeSources - Resource Ids of the Source Reservation's merged to form this Reservation. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} MergeSources *[]string `json:"mergeSources,omitempty"` }
MergePropertiesType ...
type MergeRequest ¶
type MergeRequest struct {
*MergeProperties `json:"properties,omitempty"`
}
MergeRequest ...
func (MergeRequest) MarshalJSON ¶
func (mr MergeRequest) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MergeRequest.
func (*MergeRequest) UnmarshalJSON ¶
func (mr *MergeRequest) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for MergeRequest struct.
type OperationClient ¶
type OperationClient struct {
BaseClient
}
OperationClient is the this API describe Azure Reservation
func NewOperationClient ¶
func NewOperationClient() OperationClient
NewOperationClient creates an instance of the OperationClient client.
func NewOperationClientWithBaseURI ¶
func NewOperationClientWithBaseURI(baseURI string) OperationClient
NewOperationClientWithBaseURI creates an instance of the OperationClient 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 (OperationClient) List ¶
func (client OperationClient) List(ctx context.Context) (result OperationListPage, err error)
List list all the operations.
func (OperationClient) ListComplete ¶
func (client OperationClient) ListComplete(ctx context.Context) (result OperationListIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (OperationClient) ListPreparer ¶
ListPreparer prepares the List request.
func (OperationClient) ListResponder ¶
func (client OperationClient) ListResponder(resp *http.Response) (result OperationList, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (OperationClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type OperationDisplay ¶
type OperationDisplay struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` Operation *string `json:"operation,omitempty"` Description *string `json:"description,omitempty"` }
OperationDisplay ...
type OperationList ¶
type OperationList struct { autorest.Response `json:"-"` Value *[]OperationResponse `json:"value,omitempty"` // NextLink - Url to get the next page of items. NextLink *string `json:"nextLink,omitempty"` }
OperationList ...
func (OperationList) IsEmpty ¶
func (ol OperationList) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type OperationListIterator ¶
type OperationListIterator struct {
// contains filtered or unexported fields
}
OperationListIterator provides access to a complete listing of OperationResponse values.
func NewOperationListIterator ¶
func NewOperationListIterator(page OperationListPage) OperationListIterator
Creates a new instance of the OperationListIterator type.
func (*OperationListIterator) Next ¶
func (iter *OperationListIterator) 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 (*OperationListIterator) NextWithContext ¶
func (iter *OperationListIterator) 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 (OperationListIterator) NotDone ¶
func (iter OperationListIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (OperationListIterator) Response ¶
func (iter OperationListIterator) Response() OperationList
Response returns the raw server response from the last page request.
func (OperationListIterator) Value ¶
func (iter OperationListIterator) Value() OperationResponse
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type OperationListPage ¶
type OperationListPage struct {
// contains filtered or unexported fields
}
OperationListPage contains a page of OperationResponse values.
func NewOperationListPage ¶
func NewOperationListPage(cur OperationList, getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage
Creates a new instance of the OperationListPage type.
func (*OperationListPage) Next ¶
func (page *OperationListPage) 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 (*OperationListPage) NextWithContext ¶
func (page *OperationListPage) 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 (OperationListPage) NotDone ¶
func (page OperationListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (OperationListPage) Response ¶
func (page OperationListPage) Response() OperationList
Response returns the raw server response from the last page request.
func (OperationListPage) Values ¶
func (page OperationListPage) Values() []OperationResponse
Values returns the slice of values for the current page or nil if there are no values.
type OperationResponse ¶
type OperationResponse struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` Origin *string `json:"origin,omitempty"` }
OperationResponse ...
type OrderClient ¶
type OrderClient struct {
BaseClient
}
OrderClient is the this API describe Azure Reservation
func NewOrderClient ¶
func NewOrderClient() OrderClient
NewOrderClient creates an instance of the OrderClient client.
func NewOrderClientWithBaseURI ¶
func NewOrderClientWithBaseURI(baseURI string) OrderClient
NewOrderClientWithBaseURI creates an instance of the OrderClient 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 (OrderClient) Get ¶
func (client OrderClient) Get(ctx context.Context, reservationOrderID string) (result OrderResponse, err error)
Get get the details of the `ReservationOrder`. Parameters: reservationOrderID - order Id of the reservation
func (OrderClient) GetPreparer ¶
func (client OrderClient) GetPreparer(ctx context.Context, reservationOrderID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (OrderClient) GetResponder ¶
func (client OrderClient) GetResponder(resp *http.Response) (result OrderResponse, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (OrderClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (OrderClient) List ¶
func (client OrderClient) List(ctx context.Context) (result OrderListPage, err error)
List list of all the `ReservationOrder`s that the user has access to in the current tenant.
func (OrderClient) ListComplete ¶
func (client OrderClient) ListComplete(ctx context.Context) (result OrderListIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (OrderClient) ListPreparer ¶
ListPreparer prepares the List request.
func (OrderClient) ListResponder ¶
func (client OrderClient) ListResponder(resp *http.Response) (result OrderList, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (OrderClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type OrderList ¶
type OrderList struct { autorest.Response `json:"-"` Value *[]OrderResponse `json:"value,omitempty"` // NextLink - Url to get the next page of reservationOrders. NextLink *string `json:"nextLink,omitempty"` }
OrderList ...
type OrderListIterator ¶
type OrderListIterator struct {
// contains filtered or unexported fields
}
OrderListIterator provides access to a complete listing of OrderResponse values.
func NewOrderListIterator ¶
func NewOrderListIterator(page OrderListPage) OrderListIterator
Creates a new instance of the OrderListIterator type.
func (*OrderListIterator) Next ¶
func (iter *OrderListIterator) 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 (*OrderListIterator) NextWithContext ¶
func (iter *OrderListIterator) 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 (OrderListIterator) NotDone ¶
func (iter OrderListIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (OrderListIterator) Response ¶
func (iter OrderListIterator) Response() OrderList
Response returns the raw server response from the last page request.
func (OrderListIterator) Value ¶
func (iter OrderListIterator) Value() OrderResponse
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type OrderListPage ¶
type OrderListPage struct {
// contains filtered or unexported fields
}
OrderListPage contains a page of OrderResponse values.
func NewOrderListPage ¶
func NewOrderListPage(cur OrderList, getNextPage func(context.Context, OrderList) (OrderList, error)) OrderListPage
Creates a new instance of the OrderListPage type.
func (*OrderListPage) Next ¶
func (page *OrderListPage) 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 (*OrderListPage) NextWithContext ¶
func (page *OrderListPage) 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 (OrderListPage) NotDone ¶
func (page OrderListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (OrderListPage) Response ¶
func (page OrderListPage) Response() OrderList
Response returns the raw server response from the last page request.
func (OrderListPage) Values ¶
func (page OrderListPage) Values() []OrderResponse
Values returns the slice of values for the current page or nil if there are no values.
type OrderProperties ¶
type OrderProperties struct { // DisplayName - Friendly name for user to easily identified the reservation. DisplayName *string `json:"displayName,omitempty"` // RequestDateTime - This is the DateTime when the reservation was initially requested for purchase. RequestDateTime *date.Time `json:"requestDateTime,omitempty"` // CreatedDateTime - This is the DateTime when the reservation was created. CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` // ExpiryDate - This is the date when the Reservation will expire. ExpiryDate *date.Date `json:"expiryDate,omitempty"` // OriginalQuantity - Total Quantity of the SKUs purchased in the Reservation. OriginalQuantity *int32 `json:"originalQuantity,omitempty"` // Term - Possible values include: 'P1Y', 'P3Y' Term ReservationTerm `json:"term,omitempty"` // ProvisioningState - Current state of the reservation. ProvisioningState *string `json:"provisioningState,omitempty"` ReservationsProperty *[]Response `json:"reservations,omitempty"` }
OrderProperties ...
type OrderResponse ¶
type OrderResponse struct { autorest.Response `json:"-"` Etag *int32 `json:"etag,omitempty"` // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` *OrderProperties `json:"properties,omitempty"` // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservations" Type *string `json:"type,omitempty"` }
OrderResponse ...
func (OrderResponse) MarshalJSON ¶
func (or OrderResponse) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OrderResponse.
func (*OrderResponse) UnmarshalJSON ¶
func (or *OrderResponse) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for OrderResponse struct.
type Patch ¶
type Patch struct {
*PatchProperties `json:"properties,omitempty"`
}
Patch ...
func (Patch) MarshalJSON ¶
MarshalJSON is the custom marshaler for Patch.
func (*Patch) UnmarshalJSON ¶
UnmarshalJSON is the custom unmarshaler for Patch struct.
type PatchProperties ¶
type PatchProperties struct { // AppliedScopeType - Possible values include: 'Single', 'Shared' AppliedScopeType AppliedScopeType `json:"appliedScopeType,omitempty"` AppliedScopes *[]string `json:"appliedScopes,omitempty"` // InstanceFlexibility - Possible values include: 'On', 'Off', 'NotSupported' InstanceFlexibility InstanceFlexibility `json:"instanceFlexibility,omitempty"` // Name - Name of the Reservation Name *string `json:"name,omitempty"` }
PatchProperties ...
type Properties ¶
type Properties struct { // ReservedResourceType - Possible values include: 'VirtualMachines', 'SQLDatabases', 'SuseLinux', 'CosmosDb', 'RedHat' ReservedResourceType ReservedResourceType `json:"reservedResourceType,omitempty"` // InstanceFlexibility - Possible values include: 'On', 'Off', 'NotSupported' InstanceFlexibility InstanceFlexibility `json:"instanceFlexibility,omitempty"` // DisplayName - Friendly name for user to easily identify the reservation DisplayName *string `json:"displayName,omitempty"` AppliedScopes *[]string `json:"appliedScopes,omitempty"` // AppliedScopeType - Possible values include: 'Single', 'Shared' AppliedScopeType AppliedScopeType `json:"appliedScopeType,omitempty"` // Quantity - Quantity of the SKUs that are part of the Reservation. Quantity *int32 `json:"quantity,omitempty"` // ProvisioningState - Current state of the reservation. ProvisioningState *string `json:"provisioningState,omitempty"` // EffectiveDateTime - DateTime of the Reservation starting when this version is effective from. EffectiveDateTime *date.Time `json:"effectiveDateTime,omitempty"` // LastUpdatedDateTime - READ-ONLY; DateTime of the last time the Reservation was updated. LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"` // ExpiryDate - This is the date when the Reservation will expire. ExpiryDate *date.Date `json:"expiryDate,omitempty"` // SkuDescription - Description of the SKU in english. SkuDescription *string `json:"skuDescription,omitempty"` ExtendedStatusInfo *ExtendedStatusInfo `json:"extendedStatusInfo,omitempty"` SplitProperties *SplitPropertiesType `json:"splitProperties,omitempty"` MergeProperties *MergePropertiesType `json:"mergeProperties,omitempty"` }
Properties ...
func (Properties) MarshalJSON ¶
func (p Properties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Properties.
type ReservationMergeFuture ¶
type ReservationMergeFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (ListResponse, error) }
ReservationMergeFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReservationTerm ¶
type ReservationTerm string
ReservationTerm enumerates the values for reservation term.
const ( // P1Y ... P1Y ReservationTerm = "P1Y" // P3Y ... P3Y ReservationTerm = "P3Y" )
func PossibleReservationTermValues ¶
func PossibleReservationTermValues() []ReservationTerm
PossibleReservationTermValues returns an array of possible values for the ReservationTerm const type.
type ReservationUpdateFuture ¶
type ReservationUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (Response, error) }
ReservationUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ReservedResourceType ¶
type ReservedResourceType string
ReservedResourceType enumerates the values for reserved resource type.
const ( // CosmosDb ... CosmosDb ReservedResourceType = "CosmosDb" // RedHat ... RedHat ReservedResourceType = "RedHat" // SQLDatabases ... SQLDatabases ReservedResourceType = "SqlDatabases" // SuseLinux ... SuseLinux ReservedResourceType = "SuseLinux" // VirtualMachines ... VirtualMachines ReservedResourceType = "VirtualMachines" )
func PossibleReservedResourceTypeValues ¶
func PossibleReservedResourceTypeValues() []ReservedResourceType
PossibleReservedResourceTypeValues returns an array of possible values for the ReservedResourceType const type.
type Response ¶
type Response struct { autorest.Response `json:"-"` // Location - READ-ONLY; The Azure Region where the reserved resource lives. Location *string `json:"location,omitempty"` Etag *int32 `json:"etag,omitempty"` // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` Sku *SkuName `json:"sku,omitempty"` Properties *Properties `json:"properties,omitempty"` // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservationOrders/reservations" Type *string `json:"type,omitempty"` }
Response ...
func (Response) MarshalJSON ¶
MarshalJSON is the custom marshaler for Response.
type SkuProperty ¶
type SkuProperty struct { // Name - An invariant to describe the feature. Name *string `json:"name,omitempty"` // Value - An invariant if the feature is measured by quantity. Value *string `json:"value,omitempty"` }
SkuProperty ...
type SkuRestriction ¶
type SkuRestriction struct { // Type - The type of restrictions. Type *string `json:"type,omitempty"` // Values - The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. Values *[]string `json:"values,omitempty"` // ReasonCode - The reason for restriction. ReasonCode *string `json:"reasonCode,omitempty"` }
SkuRestriction ...
type SplitFuture ¶
type SplitFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (ListResponse, error) }
SplitFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SplitProperties ¶
type SplitProperties struct { // Quantities - List of the quantities in the new reservations to create. Quantities *[]int32 `json:"quantities,omitempty"` // ReservationID - Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} ReservationID *string `json:"reservationId,omitempty"` }
SplitProperties ...
type SplitPropertiesType ¶
type SplitPropertiesType struct { // SplitDestinations - List of destination Resource Id that are created due to split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} SplitDestinations *[]string `json:"splitDestinations,omitempty"` // SplitSource - Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} SplitSource *string `json:"splitSource,omitempty"` }
SplitPropertiesType ...
type SplitRequest ¶
type SplitRequest struct {
*SplitProperties `json:"properties,omitempty"`
}
SplitRequest ...
func (SplitRequest) MarshalJSON ¶
func (sr SplitRequest) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SplitRequest.
func (*SplitRequest) UnmarshalJSON ¶
func (sr *SplitRequest) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for SplitRequest struct.
type StatusCode ¶
type StatusCode string
StatusCode enumerates the values for status code.
const ( // StatusCodeActive ... StatusCodeActive StatusCode = "Active" // StatusCodeExpired ... StatusCodeExpired StatusCode = "Expired" // StatusCodeMerged ... StatusCodeMerged StatusCode = "Merged" // StatusCodeNone ... StatusCodeNone StatusCode = "None" // StatusCodePaymentInstrumentError ... StatusCodePaymentInstrumentError StatusCode = "PaymentInstrumentError" // StatusCodePending ... StatusCodePending StatusCode = "Pending" // StatusCodePurchaseError ... StatusCodePurchaseError StatusCode = "PurchaseError" // StatusCodeSplit ... StatusCodeSplit StatusCode = "Split" // StatusCodeSucceeded ... StatusCodeSucceeded StatusCode = "Succeeded" )
func PossibleStatusCodeValues ¶
func PossibleStatusCodeValues() []StatusCode
PossibleStatusCodeValues returns an array of possible values for the StatusCode const type.