Documentation ¶
Overview ¶
Package advisor implements the Azure ARM Advisor service API version 2017-04-19.
REST APIs for Azure Advisor
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type ARMErrorResponseBody
- type BaseClient
- type Category
- type ConfigData
- type ConfigDataProperties
- type ConfigurationListResult
- type ConfigurationListResultIterator
- func (iter *ConfigurationListResultIterator) Next() error
- func (iter *ConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter ConfigurationListResultIterator) NotDone() bool
- func (iter ConfigurationListResultIterator) Response() ConfigurationListResult
- func (iter ConfigurationListResultIterator) Value() ConfigData
- type ConfigurationListResultPage
- func (page *ConfigurationListResultPage) Next() error
- func (page *ConfigurationListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page ConfigurationListResultPage) NotDone() bool
- func (page ConfigurationListResultPage) Response() ConfigurationListResult
- func (page ConfigurationListResultPage) Values() []ConfigData
- type ConfigurationsClient
- func (client ConfigurationsClient) CreateInResourceGroup(ctx context.Context, configContract ConfigData, resourceGroup string) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInResourceGroupPreparer(ctx context.Context, configContract ConfigData, resourceGroup string) (*http.Request, error)
- func (client ConfigurationsClient) CreateInResourceGroupResponder(resp *http.Response) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInResourceGroupSender(req *http.Request) (*http.Response, error)
- func (client ConfigurationsClient) CreateInSubscription(ctx context.Context, configContract ConfigData) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInSubscriptionPreparer(ctx context.Context, configContract ConfigData) (*http.Request, error)
- func (client ConfigurationsClient) CreateInSubscriptionResponder(resp *http.Response) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInSubscriptionSender(req *http.Request) (*http.Response, error)
- func (client ConfigurationsClient) ListByResourceGroup(ctx context.Context, resourceGroup string) (result ConfigurationListResult, err error)
- func (client ConfigurationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroup string) (*http.Request, error)
- func (client ConfigurationsClient) ListByResourceGroupResponder(resp *http.Response) (result ConfigurationListResult, err error)
- func (client ConfigurationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)
- func (client ConfigurationsClient) ListBySubscription(ctx context.Context) (result ConfigurationListResultPage, err error)
- func (client ConfigurationsClient) ListBySubscriptionComplete(ctx context.Context) (result ConfigurationListResultIterator, err error)
- func (client ConfigurationsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error)
- func (client ConfigurationsClient) ListBySubscriptionResponder(resp *http.Response) (result ConfigurationListResult, err error)
- func (client ConfigurationsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error)
- type Impact
- type MetadataEntity
- type MetadataEntityListResult
- type MetadataEntityListResultIterator
- func (iter *MetadataEntityListResultIterator) Next() error
- func (iter *MetadataEntityListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter MetadataEntityListResultIterator) NotDone() bool
- func (iter MetadataEntityListResultIterator) Response() MetadataEntityListResult
- func (iter MetadataEntityListResultIterator) Value() MetadataEntity
- type MetadataEntityListResultPage
- func (page *MetadataEntityListResultPage) Next() error
- func (page *MetadataEntityListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page MetadataEntityListResultPage) NotDone() bool
- func (page MetadataEntityListResultPage) Response() MetadataEntityListResult
- func (page MetadataEntityListResultPage) Values() []MetadataEntity
- type MetadataEntityProperties
- type MetadataSupportedValueDetail
- type OperationDisplayInfo
- type OperationEntity
- type OperationEntityListResult
- type OperationEntityListResultIterator
- func (iter *OperationEntityListResultIterator) Next() error
- func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter OperationEntityListResultIterator) NotDone() bool
- func (iter OperationEntityListResultIterator) Response() OperationEntityListResult
- func (iter OperationEntityListResultIterator) Value() OperationEntity
- type OperationEntityListResultPage
- func (page *OperationEntityListResultPage) Next() error
- func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page OperationEntityListResultPage) NotDone() bool
- func (page OperationEntityListResultPage) Response() OperationEntityListResult
- func (page OperationEntityListResultPage) Values() []OperationEntity
- type OperationsClient
- func (client OperationsClient) List(ctx context.Context) (result OperationEntityListResultPage, err error)
- func (client OperationsClient) ListComplete(ctx context.Context) (result OperationEntityListResultIterator, err error)
- func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client OperationsClient) ListResponder(resp *http.Response) (result OperationEntityListResult, err error)
- func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)
- type RecommendationMetadataClient
- func (client RecommendationMetadataClient) Get(ctx context.Context, name string) (result SetObject, err error)
- func (client RecommendationMetadataClient) GetPreparer(ctx context.Context, name string) (*http.Request, error)
- func (client RecommendationMetadataClient) GetResponder(resp *http.Response) (result SetObject, err error)
- func (client RecommendationMetadataClient) GetSender(req *http.Request) (*http.Response, error)
- func (client RecommendationMetadataClient) List(ctx context.Context) (result MetadataEntityListResultPage, err error)
- func (client RecommendationMetadataClient) ListComplete(ctx context.Context) (result MetadataEntityListResultIterator, err error)
- func (client RecommendationMetadataClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client RecommendationMetadataClient) ListResponder(resp *http.Response) (result MetadataEntityListResult, err error)
- func (client RecommendationMetadataClient) ListSender(req *http.Request) (*http.Response, error)
- type RecommendationProperties
- type RecommendationsClient
- func (client RecommendationsClient) Generate(ctx context.Context) (result autorest.Response, err error)
- func (client RecommendationsClient) GeneratePreparer(ctx context.Context) (*http.Request, error)
- func (client RecommendationsClient) GenerateResponder(resp *http.Response) (result autorest.Response, err error)
- func (client RecommendationsClient) GenerateSender(req *http.Request) (*http.Response, error)
- func (client RecommendationsClient) Get(ctx context.Context, resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error)
- func (client RecommendationsClient) GetGenerateStatus(ctx context.Context, operationID uuid.UUID) (result autorest.Response, err error)
- func (client RecommendationsClient) GetGenerateStatusPreparer(ctx context.Context, operationID uuid.UUID) (*http.Request, error)
- func (client RecommendationsClient) GetGenerateStatusResponder(resp *http.Response) (result autorest.Response, err error)
- func (client RecommendationsClient) GetGenerateStatusSender(req *http.Request) (*http.Response, error)
- func (client RecommendationsClient) GetPreparer(ctx context.Context, resourceURI string, recommendationID string) (*http.Request, error)
- func (client RecommendationsClient) GetResponder(resp *http.Response) (result ResourceRecommendationBase, err error)
- func (client RecommendationsClient) GetSender(req *http.Request) (*http.Response, error)
- func (client RecommendationsClient) List(ctx context.Context, filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResultPage, err error)
- func (client RecommendationsClient) ListComplete(ctx context.Context, filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResultIterator, err error)
- func (client RecommendationsClient) ListPreparer(ctx context.Context, filter string, top *int32, skipToken string) (*http.Request, error)
- func (client RecommendationsClient) ListResponder(resp *http.Response) (result ResourceRecommendationBaseListResult, err error)
- func (client RecommendationsClient) ListSender(req *http.Request) (*http.Response, error)
- type Resource
- type ResourceRecommendationBase
- type ResourceRecommendationBaseListResult
- type ResourceRecommendationBaseListResultIterator
- func (iter *ResourceRecommendationBaseListResultIterator) Next() error
- func (iter *ResourceRecommendationBaseListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter ResourceRecommendationBaseListResultIterator) NotDone() bool
- func (iter ResourceRecommendationBaseListResultIterator) Response() ResourceRecommendationBaseListResult
- func (iter ResourceRecommendationBaseListResultIterator) Value() ResourceRecommendationBase
- type ResourceRecommendationBaseListResultPage
- func (page *ResourceRecommendationBaseListResultPage) Next() error
- func (page *ResourceRecommendationBaseListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page ResourceRecommendationBaseListResultPage) NotDone() bool
- func (page ResourceRecommendationBaseListResultPage) Response() ResourceRecommendationBaseListResult
- func (page ResourceRecommendationBaseListResultPage) Values() []ResourceRecommendationBase
- type Risk
- type Scenario
- type SetObject
- type ShortDescription
- type SuppressionContract
- type SuppressionContractListResult
- type SuppressionContractListResultIterator
- func (iter *SuppressionContractListResultIterator) Next() error
- func (iter *SuppressionContractListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter SuppressionContractListResultIterator) NotDone() bool
- func (iter SuppressionContractListResultIterator) Response() SuppressionContractListResult
- func (iter SuppressionContractListResultIterator) Value() SuppressionContract
- type SuppressionContractListResultPage
- func (page *SuppressionContractListResultPage) Next() error
- func (page *SuppressionContractListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page SuppressionContractListResultPage) NotDone() bool
- func (page SuppressionContractListResultPage) Response() SuppressionContractListResult
- func (page SuppressionContractListResultPage) Values() []SuppressionContract
- type SuppressionProperties
- type SuppressionsClient
- func (client SuppressionsClient) Create(ctx context.Context, resourceURI string, recommendationID string, name string, ...) (result SuppressionContract, err error)
- func (client SuppressionsClient) CreatePreparer(ctx context.Context, resourceURI string, recommendationID string, name string, ...) (*http.Request, error)
- func (client SuppressionsClient) CreateResponder(resp *http.Response) (result SuppressionContract, err error)
- func (client SuppressionsClient) CreateSender(req *http.Request) (*http.Response, error)
- func (client SuppressionsClient) Delete(ctx context.Context, resourceURI string, recommendationID string, name string) (result autorest.Response, err error)
- func (client SuppressionsClient) DeletePreparer(ctx context.Context, resourceURI string, recommendationID string, name string) (*http.Request, error)
- func (client SuppressionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client SuppressionsClient) DeleteSender(req *http.Request) (*http.Response, error)
- func (client SuppressionsClient) Get(ctx context.Context, resourceURI string, recommendationID string, name string) (result SuppressionContract, err error)
- func (client SuppressionsClient) GetPreparer(ctx context.Context, resourceURI string, recommendationID string, name string) (*http.Request, error)
- func (client SuppressionsClient) GetResponder(resp *http.Response) (result SuppressionContract, err error)
- func (client SuppressionsClient) GetSender(req *http.Request) (*http.Response, error)
- func (client SuppressionsClient) List(ctx context.Context, top *int32, skipToken string) (result SuppressionContractListResultPage, err error)
- func (client SuppressionsClient) ListComplete(ctx context.Context, top *int32, skipToken string) (result SuppressionContractListResultIterator, err error)
- func (client SuppressionsClient) ListPreparer(ctx context.Context, top *int32, skipToken string) (*http.Request, error)
- func (client SuppressionsClient) ListResponder(resp *http.Response) (result SuppressionContractListResult, err error)
- func (client SuppressionsClient) ListSender(req *http.Request) (*http.Response, error)
Constants ¶
const (
// DefaultBaseURI is the default URI used for the service Advisor
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 ARMErrorResponseBody ¶
type ARMErrorResponseBody struct { autorest.Response `json:"-"` // Message - Gets or sets the string that describes the error in detail and provides debugging information. Message *string `json:"message,omitempty"` // Code - Gets or sets the string that can be used to programmatically identify the error. Code *string `json:"code,omitempty"` }
ARMErrorResponseBody ARM error response body.
type BaseClient ¶
BaseClient is the base client for Advisor.
func New ¶
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID 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).
type Category ¶
type Category string
Category enumerates the values for category.
const ( // Cost ... Cost Category = "Cost" // HighAvailability ... HighAvailability Category = "HighAvailability" // OperationalExcellence ... OperationalExcellence Category = "OperationalExcellence" // Performance ... Performance Category = "Performance" // Security ... Security Category = "Security" )
func PossibleCategoryValues ¶
func PossibleCategoryValues() []Category
PossibleCategoryValues returns an array of possible values for the Category const type.
type ConfigData ¶
type ConfigData struct { // ID - The resource Id of the configuration resource. ID *string `json:"id,omitempty"` // Type - The type of the configuration resource. Type *string `json:"type,omitempty"` // Name - The name of the configuration resource. Name *string `json:"name,omitempty"` // Properties - The list of property name/value pairs. Properties *ConfigDataProperties `json:"properties,omitempty"` }
ConfigData the Advisor configuration data structure.
type ConfigDataProperties ¶
type ConfigDataProperties struct { // AdditionalProperties - Unmatched properties from the message are deserialized this collection AdditionalProperties map[string]interface{} `json:""` // Exclude - Exclude the resource from Advisor evaluations. Valid values: False (default) or True. Exclude *bool `json:"exclude,omitempty"` // LowCPUThreshold - Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20. LowCPUThreshold *string `json:"low_cpu_threshold,omitempty"` }
ConfigDataProperties the list of property name/value pairs.
func (ConfigDataProperties) MarshalJSON ¶
func (cd ConfigDataProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ConfigDataProperties.
func (*ConfigDataProperties) UnmarshalJSON ¶
func (cd *ConfigDataProperties) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ConfigDataProperties struct.
type ConfigurationListResult ¶
type ConfigurationListResult struct { autorest.Response `json:"-"` // Value - The list of configurations. Value *[]ConfigData `json:"value,omitempty"` // NextLink - The link used to get the next page of configurations. NextLink *string `json:"nextLink,omitempty"` }
ConfigurationListResult the list of Advisor configurations.
func (ConfigurationListResult) IsEmpty ¶
func (clr ConfigurationListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type ConfigurationListResultIterator ¶
type ConfigurationListResultIterator struct {
// contains filtered or unexported fields
}
ConfigurationListResultIterator provides access to a complete listing of ConfigData values.
func NewConfigurationListResultIterator ¶
func NewConfigurationListResultIterator(page ConfigurationListResultPage) ConfigurationListResultIterator
Creates a new instance of the ConfigurationListResultIterator type.
func (*ConfigurationListResultIterator) Next ¶
func (iter *ConfigurationListResultIterator) 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 (*ConfigurationListResultIterator) NextWithContext ¶
func (iter *ConfigurationListResultIterator) 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 (ConfigurationListResultIterator) NotDone ¶
func (iter ConfigurationListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (ConfigurationListResultIterator) Response ¶
func (iter ConfigurationListResultIterator) Response() ConfigurationListResult
Response returns the raw server response from the last page request.
func (ConfigurationListResultIterator) Value ¶
func (iter ConfigurationListResultIterator) Value() ConfigData
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type ConfigurationListResultPage ¶
type ConfigurationListResultPage struct {
// contains filtered or unexported fields
}
ConfigurationListResultPage contains a page of ConfigData values.
func NewConfigurationListResultPage ¶
func NewConfigurationListResultPage(getNextPage func(context.Context, ConfigurationListResult) (ConfigurationListResult, error)) ConfigurationListResultPage
Creates a new instance of the ConfigurationListResultPage type.
func (*ConfigurationListResultPage) Next ¶
func (page *ConfigurationListResultPage) 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 (*ConfigurationListResultPage) NextWithContext ¶
func (page *ConfigurationListResultPage) 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 (ConfigurationListResultPage) NotDone ¶
func (page ConfigurationListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (ConfigurationListResultPage) Response ¶
func (page ConfigurationListResultPage) Response() ConfigurationListResult
Response returns the raw server response from the last page request.
func (ConfigurationListResultPage) Values ¶
func (page ConfigurationListResultPage) Values() []ConfigData
Values returns the slice of values for the current page or nil if there are no values.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
BaseClient
}
ConfigurationsClient is the REST APIs for Azure Advisor
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string) ConfigurationsClient
NewConfigurationsClient creates an instance of the ConfigurationsClient client.
func NewConfigurationsClientWithBaseURI ¶
func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient
NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient 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 (ConfigurationsClient) CreateInResourceGroup ¶
func (client ConfigurationsClient) CreateInResourceGroup(ctx context.Context, configContract ConfigData, resourceGroup string) (result ARMErrorResponseBody, err error)
CreateInResourceGroup sends the create in resource group request. Parameters: configContract - the Azure Advisor configuration data structure. resourceGroup - the name of the Azure resource group.
func (ConfigurationsClient) CreateInResourceGroupPreparer ¶
func (client ConfigurationsClient) CreateInResourceGroupPreparer(ctx context.Context, configContract ConfigData, resourceGroup string) (*http.Request, error)
CreateInResourceGroupPreparer prepares the CreateInResourceGroup request.
func (ConfigurationsClient) CreateInResourceGroupResponder ¶
func (client ConfigurationsClient) CreateInResourceGroupResponder(resp *http.Response) (result ARMErrorResponseBody, err error)
CreateInResourceGroupResponder handles the response to the CreateInResourceGroup request. The method always closes the http.Response Body.
func (ConfigurationsClient) CreateInResourceGroupSender ¶
func (client ConfigurationsClient) CreateInResourceGroupSender(req *http.Request) (*http.Response, error)
CreateInResourceGroupSender sends the CreateInResourceGroup request. The method will close the http.Response Body if it receives an error.
func (ConfigurationsClient) CreateInSubscription ¶
func (client ConfigurationsClient) CreateInSubscription(ctx context.Context, configContract ConfigData) (result ARMErrorResponseBody, err error)
CreateInSubscription create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups. Parameters: configContract - the Azure Advisor configuration data structure.
func (ConfigurationsClient) CreateInSubscriptionPreparer ¶
func (client ConfigurationsClient) CreateInSubscriptionPreparer(ctx context.Context, configContract ConfigData) (*http.Request, error)
CreateInSubscriptionPreparer prepares the CreateInSubscription request.
func (ConfigurationsClient) CreateInSubscriptionResponder ¶
func (client ConfigurationsClient) CreateInSubscriptionResponder(resp *http.Response) (result ARMErrorResponseBody, err error)
CreateInSubscriptionResponder handles the response to the CreateInSubscription request. The method always closes the http.Response Body.
func (ConfigurationsClient) CreateInSubscriptionSender ¶
func (client ConfigurationsClient) CreateInSubscriptionSender(req *http.Request) (*http.Response, error)
CreateInSubscriptionSender sends the CreateInSubscription request. The method will close the http.Response Body if it receives an error.
func (ConfigurationsClient) ListByResourceGroup ¶
func (client ConfigurationsClient) ListByResourceGroup(ctx context.Context, resourceGroup string) (result ConfigurationListResult, err error)
ListByResourceGroup sends the list by resource group request. Parameters: resourceGroup - the name of the Azure resource group.
func (ConfigurationsClient) ListByResourceGroupPreparer ¶
func (client ConfigurationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroup string) (*http.Request, error)
ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (ConfigurationsClient) ListByResourceGroupResponder ¶
func (client ConfigurationsClient) ListByResourceGroupResponder(resp *http.Response) (result ConfigurationListResult, err error)
ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.
func (ConfigurationsClient) ListByResourceGroupSender ¶
func (client ConfigurationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)
ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.
func (ConfigurationsClient) ListBySubscription ¶
func (client ConfigurationsClient) ListBySubscription(ctx context.Context) (result ConfigurationListResultPage, err error)
ListBySubscription retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
func (ConfigurationsClient) ListBySubscriptionComplete ¶
func (client ConfigurationsClient) ListBySubscriptionComplete(ctx context.Context) (result ConfigurationListResultIterator, err error)
ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (ConfigurationsClient) ListBySubscriptionPreparer ¶
func (client ConfigurationsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error)
ListBySubscriptionPreparer prepares the ListBySubscription request.
func (ConfigurationsClient) ListBySubscriptionResponder ¶
func (client ConfigurationsClient) ListBySubscriptionResponder(resp *http.Response) (result ConfigurationListResult, err error)
ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always closes the http.Response Body.
func (ConfigurationsClient) ListBySubscriptionSender ¶
func (client ConfigurationsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error)
ListBySubscriptionSender sends the ListBySubscription request. The method will close the http.Response Body if it receives an error.
type Impact ¶
type Impact string
Impact enumerates the values for impact.
func PossibleImpactValues ¶
func PossibleImpactValues() []Impact
PossibleImpactValues returns an array of possible values for the Impact const type.
type MetadataEntity ¶
type MetadataEntity struct { // ID - The resource Id of the metadata entity. ID *string `json:"id,omitempty"` // Type - The type of the metadata entity. Type *string `json:"type,omitempty"` // Name - The name of the metadata entity. Name *string `json:"name,omitempty"` // MetadataEntityProperties - The metadata entity properties. *MetadataEntityProperties `json:"properties,omitempty"` }
MetadataEntity the metadata entity contract.
func (MetadataEntity) MarshalJSON ¶
func (me MetadataEntity) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MetadataEntity.
func (*MetadataEntity) UnmarshalJSON ¶
func (me *MetadataEntity) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for MetadataEntity struct.
type MetadataEntityListResult ¶
type MetadataEntityListResult struct { autorest.Response `json:"-"` // Value - The list of metadata entities. Value *[]MetadataEntity `json:"value,omitempty"` // NextLink - The link used to get the next page of metadata. NextLink *string `json:"nextLink,omitempty"` }
MetadataEntityListResult the list of metadata entities
func (MetadataEntityListResult) IsEmpty ¶
func (melr MetadataEntityListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type MetadataEntityListResultIterator ¶
type MetadataEntityListResultIterator struct {
// contains filtered or unexported fields
}
MetadataEntityListResultIterator provides access to a complete listing of MetadataEntity values.
func NewMetadataEntityListResultIterator ¶
func NewMetadataEntityListResultIterator(page MetadataEntityListResultPage) MetadataEntityListResultIterator
Creates a new instance of the MetadataEntityListResultIterator type.
func (*MetadataEntityListResultIterator) Next ¶
func (iter *MetadataEntityListResultIterator) 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 (*MetadataEntityListResultIterator) NextWithContext ¶
func (iter *MetadataEntityListResultIterator) 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 (MetadataEntityListResultIterator) NotDone ¶
func (iter MetadataEntityListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (MetadataEntityListResultIterator) Response ¶
func (iter MetadataEntityListResultIterator) Response() MetadataEntityListResult
Response returns the raw server response from the last page request.
func (MetadataEntityListResultIterator) Value ¶
func (iter MetadataEntityListResultIterator) Value() MetadataEntity
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type MetadataEntityListResultPage ¶
type MetadataEntityListResultPage struct {
// contains filtered or unexported fields
}
MetadataEntityListResultPage contains a page of MetadataEntity values.
func NewMetadataEntityListResultPage ¶
func NewMetadataEntityListResultPage(getNextPage func(context.Context, MetadataEntityListResult) (MetadataEntityListResult, error)) MetadataEntityListResultPage
Creates a new instance of the MetadataEntityListResultPage type.
func (*MetadataEntityListResultPage) Next ¶
func (page *MetadataEntityListResultPage) 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 (*MetadataEntityListResultPage) NextWithContext ¶
func (page *MetadataEntityListResultPage) 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 (MetadataEntityListResultPage) NotDone ¶
func (page MetadataEntityListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (MetadataEntityListResultPage) Response ¶
func (page MetadataEntityListResultPage) Response() MetadataEntityListResult
Response returns the raw server response from the last page request.
func (MetadataEntityListResultPage) Values ¶
func (page MetadataEntityListResultPage) Values() []MetadataEntity
Values returns the slice of values for the current page or nil if there are no values.
type MetadataEntityProperties ¶
type MetadataEntityProperties struct { // DisplayName - The display name. DisplayName *string `json:"displayName,omitempty"` // DependsOn - The list of keys on which this entity depends on. DependsOn *[]string `json:"dependsOn,omitempty"` // ApplicableScenarios - The list of scenarios applicable to this metadata entity. ApplicableScenarios *[]Scenario `json:"applicableScenarios,omitempty"` // SupportedValues - The list of supported values. SupportedValues *[]MetadataSupportedValueDetail `json:"supportedValues,omitempty"` }
MetadataEntityProperties the metadata entity properties
type MetadataSupportedValueDetail ¶
type MetadataSupportedValueDetail struct { // ID - The id. ID *string `json:"id,omitempty"` // DisplayName - The display name. DisplayName *string `json:"displayName,omitempty"` }
MetadataSupportedValueDetail the metadata supported value detail.
type OperationDisplayInfo ¶
type OperationDisplayInfo struct { // Description - The description of the operation. Description *string `json:"description,omitempty"` // Operation - The action that users can perform, based on their permission level. Operation *string `json:"operation,omitempty"` // Provider - Service provider: Microsoft Advisor. Provider *string `json:"provider,omitempty"` // Resource - Resource on which the operation is performed. Resource *string `json:"resource,omitempty"` }
OperationDisplayInfo the operation supported by Advisor.
type OperationEntity ¶
type OperationEntity struct { // Name - Operation name: {provider}/{resource}/{operation}. Name *string `json:"name,omitempty"` // Display - The operation supported by Advisor. Display *OperationDisplayInfo `json:"display,omitempty"` }
OperationEntity the operation supported by Advisor.
type OperationEntityListResult ¶
type OperationEntityListResult struct { autorest.Response `json:"-"` // NextLink - The link used to get the next page of operations. NextLink *string `json:"nextLink,omitempty"` // Value - The list of operations. Value *[]OperationEntity `json:"value,omitempty"` }
OperationEntityListResult the list of Advisor operations.
func (OperationEntityListResult) IsEmpty ¶
func (oelr OperationEntityListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type OperationEntityListResultIterator ¶
type OperationEntityListResultIterator struct {
// contains filtered or unexported fields
}
OperationEntityListResultIterator provides access to a complete listing of OperationEntity values.
func NewOperationEntityListResultIterator ¶
func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator
Creates a new instance of the OperationEntityListResultIterator type.
func (*OperationEntityListResultIterator) Next ¶
func (iter *OperationEntityListResultIterator) 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 (*OperationEntityListResultIterator) NextWithContext ¶
func (iter *OperationEntityListResultIterator) 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 (OperationEntityListResultIterator) NotDone ¶
func (iter OperationEntityListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (OperationEntityListResultIterator) Response ¶
func (iter OperationEntityListResultIterator) Response() OperationEntityListResult
Response returns the raw server response from the last page request.
func (OperationEntityListResultIterator) Value ¶
func (iter OperationEntityListResultIterator) Value() OperationEntity
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type OperationEntityListResultPage ¶
type OperationEntityListResultPage struct {
// contains filtered or unexported fields
}
OperationEntityListResultPage contains a page of OperationEntity values.
func NewOperationEntityListResultPage ¶
func NewOperationEntityListResultPage(getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage
Creates a new instance of the OperationEntityListResultPage type.
func (*OperationEntityListResultPage) Next ¶
func (page *OperationEntityListResultPage) 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 (*OperationEntityListResultPage) NextWithContext ¶
func (page *OperationEntityListResultPage) 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 (OperationEntityListResultPage) NotDone ¶
func (page OperationEntityListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (OperationEntityListResultPage) Response ¶
func (page OperationEntityListResultPage) Response() OperationEntityListResult
Response returns the raw server response from the last page request.
func (OperationEntityListResultPage) Values ¶
func (page OperationEntityListResultPage) Values() []OperationEntity
Values returns the slice of values for the current page or nil if there are no values.
type OperationsClient ¶
type OperationsClient struct {
BaseClient
}
OperationsClient is the REST APIs for Azure Advisor
func NewOperationsClient ¶
func NewOperationsClient(subscriptionID string) OperationsClient
NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClientWithBaseURI ¶
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient
NewOperationsClientWithBaseURI creates an instance of the OperationsClient 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 (OperationsClient) List ¶
func (client OperationsClient) List(ctx context.Context) (result OperationEntityListResultPage, err error)
List lists all the available Advisor REST API operations.
func (OperationsClient) ListComplete ¶
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationEntityListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (OperationsClient) ListPreparer ¶
ListPreparer prepares the List request.
func (OperationsClient) ListResponder ¶
func (client OperationsClient) ListResponder(resp *http.Response) (result OperationEntityListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (OperationsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type RecommendationMetadataClient ¶
type RecommendationMetadataClient struct {
BaseClient
}
RecommendationMetadataClient is the REST APIs for Azure Advisor
func NewRecommendationMetadataClient ¶
func NewRecommendationMetadataClient(subscriptionID string) RecommendationMetadataClient
NewRecommendationMetadataClient creates an instance of the RecommendationMetadataClient client.
func NewRecommendationMetadataClientWithBaseURI ¶
func NewRecommendationMetadataClientWithBaseURI(baseURI string, subscriptionID string) RecommendationMetadataClient
NewRecommendationMetadataClientWithBaseURI creates an instance of the RecommendationMetadataClient 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 (RecommendationMetadataClient) Get ¶
func (client RecommendationMetadataClient) Get(ctx context.Context, name string) (result SetObject, err error)
Get sends the get request. Parameters: name - name of metadata entity.
func (RecommendationMetadataClient) GetPreparer ¶
func (client RecommendationMetadataClient) GetPreparer(ctx context.Context, name string) (*http.Request, error)
GetPreparer prepares the Get request.
func (RecommendationMetadataClient) GetResponder ¶
func (client RecommendationMetadataClient) GetResponder(resp *http.Response) (result SetObject, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (RecommendationMetadataClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (RecommendationMetadataClient) List ¶
func (client RecommendationMetadataClient) List(ctx context.Context) (result MetadataEntityListResultPage, err error)
List sends the list request.
func (RecommendationMetadataClient) ListComplete ¶
func (client RecommendationMetadataClient) ListComplete(ctx context.Context) (result MetadataEntityListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (RecommendationMetadataClient) ListPreparer ¶
ListPreparer prepares the List request.
func (RecommendationMetadataClient) ListResponder ¶
func (client RecommendationMetadataClient) ListResponder(resp *http.Response) (result MetadataEntityListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (RecommendationMetadataClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type RecommendationProperties ¶
type RecommendationProperties struct { // Category - The category of the recommendation. Possible values include: 'HighAvailability', 'Security', 'Performance', 'Cost', 'OperationalExcellence' Category Category `json:"category,omitempty"` // Impact - The business impact of the recommendation. Possible values include: 'High', 'Medium', 'Low' Impact Impact `json:"impact,omitempty"` // ImpactedField - The resource type identified by Advisor. ImpactedField *string `json:"impactedField,omitempty"` // ImpactedValue - The resource identified by Advisor. ImpactedValue *string `json:"impactedValue,omitempty"` // LastUpdated - The most recent time that Advisor checked the validity of the recommendation. LastUpdated *date.Time `json:"lastUpdated,omitempty"` // Metadata - The recommendation metadata. Metadata map[string]interface{} `json:"metadata"` // RecommendationTypeID - The recommendation-type GUID. RecommendationTypeID *string `json:"recommendationTypeId,omitempty"` // Risk - The potential risk of not implementing the recommendation. Possible values include: 'Error', 'Warning', 'None' Risk Risk `json:"risk,omitempty"` // ShortDescription - A summary of the recommendation. ShortDescription *ShortDescription `json:"shortDescription,omitempty"` // SuppressionIds - The list of snoozed and dismissed rules for the recommendation. SuppressionIds *[]uuid.UUID `json:"suppressionIds,omitempty"` // ExtendedProperties - Extended properties ExtendedProperties map[string]*string `json:"extendedProperties"` }
RecommendationProperties the properties of the recommendation.
func (RecommendationProperties) MarshalJSON ¶
func (rp RecommendationProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RecommendationProperties.
type RecommendationsClient ¶
type RecommendationsClient struct {
BaseClient
}
RecommendationsClient is the REST APIs for Azure Advisor
func NewRecommendationsClient ¶
func NewRecommendationsClient(subscriptionID string) RecommendationsClient
NewRecommendationsClient creates an instance of the RecommendationsClient client.
func NewRecommendationsClientWithBaseURI ¶
func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient
NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient 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 (RecommendationsClient) Generate ¶
func (client RecommendationsClient) Generate(ctx context.Context) (result autorest.Response, err error)
Generate initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
func (RecommendationsClient) GeneratePreparer ¶
GeneratePreparer prepares the Generate request.
func (RecommendationsClient) GenerateResponder ¶
func (client RecommendationsClient) GenerateResponder(resp *http.Response) (result autorest.Response, err error)
GenerateResponder handles the response to the Generate request. The method always closes the http.Response Body.
func (RecommendationsClient) GenerateSender ¶
GenerateSender sends the Generate request. The method will close the http.Response Body if it receives an error.
func (RecommendationsClient) Get ¶
func (client RecommendationsClient) Get(ctx context.Context, resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error)
Get obtains details of a cached recommendation. Parameters: resourceURI - the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID - the recommendation ID.
func (RecommendationsClient) GetGenerateStatus ¶
func (client RecommendationsClient) GetGenerateStatus(ctx context.Context, operationID uuid.UUID) (result autorest.Response, err error)
GetGenerateStatus retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header. Parameters: operationID - the operation ID, which can be found from the Location field in the generate recommendation response header.
func (RecommendationsClient) GetGenerateStatusPreparer ¶
func (client RecommendationsClient) GetGenerateStatusPreparer(ctx context.Context, operationID uuid.UUID) (*http.Request, error)
GetGenerateStatusPreparer prepares the GetGenerateStatus request.
func (RecommendationsClient) GetGenerateStatusResponder ¶
func (client RecommendationsClient) GetGenerateStatusResponder(resp *http.Response) (result autorest.Response, err error)
GetGenerateStatusResponder handles the response to the GetGenerateStatus request. The method always closes the http.Response Body.
func (RecommendationsClient) GetGenerateStatusSender ¶
func (client RecommendationsClient) GetGenerateStatusSender(req *http.Request) (*http.Response, error)
GetGenerateStatusSender sends the GetGenerateStatus request. The method will close the http.Response Body if it receives an error.
func (RecommendationsClient) GetPreparer ¶
func (client RecommendationsClient) GetPreparer(ctx context.Context, resourceURI string, recommendationID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (RecommendationsClient) GetResponder ¶
func (client RecommendationsClient) GetResponder(resp *http.Response) (result ResourceRecommendationBase, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (RecommendationsClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (RecommendationsClient) List ¶
func (client RecommendationsClient) List(ctx context.Context, filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResultPage, err error)
List obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations. Parameters: filter - the filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', 'Category(#category)'] with operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' top - the number of recommendations per page if a paged version of this API is being used. skipToken - the page-continuation token to use with a paged version of this API.
func (RecommendationsClient) ListComplete ¶
func (client RecommendationsClient) ListComplete(ctx context.Context, filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (RecommendationsClient) ListPreparer ¶
func (client RecommendationsClient) ListPreparer(ctx context.Context, filter string, top *int32, skipToken string) (*http.Request, error)
ListPreparer prepares the List request.
func (RecommendationsClient) ListResponder ¶
func (client RecommendationsClient) ListResponder(resp *http.Response) (result ResourceRecommendationBaseListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (RecommendationsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type Resource ¶
type Resource struct { // ID - READ-ONLY; The resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource. Name *string `json:"name,omitempty"` // Type - READ-ONLY; The type of the resource. Type *string `json:"type,omitempty"` }
Resource an Azure resource.
type ResourceRecommendationBase ¶
type ResourceRecommendationBase struct { autorest.Response `json:"-"` // RecommendationProperties - The properties of the recommendation. *RecommendationProperties `json:"properties,omitempty"` // ID - READ-ONLY; The resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource. Name *string `json:"name,omitempty"` // Type - READ-ONLY; The type of the resource. Type *string `json:"type,omitempty"` }
ResourceRecommendationBase advisor Recommendation.
func (ResourceRecommendationBase) MarshalJSON ¶
func (rrb ResourceRecommendationBase) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ResourceRecommendationBase.
func (*ResourceRecommendationBase) UnmarshalJSON ¶
func (rrb *ResourceRecommendationBase) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ResourceRecommendationBase struct.
type ResourceRecommendationBaseListResult ¶
type ResourceRecommendationBaseListResult struct { autorest.Response `json:"-"` // NextLink - The link used to get the next page of recommendations. NextLink *string `json:"nextLink,omitempty"` // Value - The list of recommendations. Value *[]ResourceRecommendationBase `json:"value,omitempty"` }
ResourceRecommendationBaseListResult the list of Advisor recommendations.
func (ResourceRecommendationBaseListResult) IsEmpty ¶
func (rrblr ResourceRecommendationBaseListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type ResourceRecommendationBaseListResultIterator ¶
type ResourceRecommendationBaseListResultIterator struct {
// contains filtered or unexported fields
}
ResourceRecommendationBaseListResultIterator provides access to a complete listing of ResourceRecommendationBase values.
func NewResourceRecommendationBaseListResultIterator ¶
func NewResourceRecommendationBaseListResultIterator(page ResourceRecommendationBaseListResultPage) ResourceRecommendationBaseListResultIterator
Creates a new instance of the ResourceRecommendationBaseListResultIterator type.
func (*ResourceRecommendationBaseListResultIterator) Next ¶
func (iter *ResourceRecommendationBaseListResultIterator) 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 (*ResourceRecommendationBaseListResultIterator) NextWithContext ¶
func (iter *ResourceRecommendationBaseListResultIterator) 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 (ResourceRecommendationBaseListResultIterator) NotDone ¶
func (iter ResourceRecommendationBaseListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (ResourceRecommendationBaseListResultIterator) Response ¶
func (iter ResourceRecommendationBaseListResultIterator) Response() ResourceRecommendationBaseListResult
Response returns the raw server response from the last page request.
func (ResourceRecommendationBaseListResultIterator) Value ¶
func (iter ResourceRecommendationBaseListResultIterator) Value() ResourceRecommendationBase
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type ResourceRecommendationBaseListResultPage ¶
type ResourceRecommendationBaseListResultPage struct {
// contains filtered or unexported fields
}
ResourceRecommendationBaseListResultPage contains a page of ResourceRecommendationBase values.
func NewResourceRecommendationBaseListResultPage ¶
func NewResourceRecommendationBaseListResultPage(getNextPage func(context.Context, ResourceRecommendationBaseListResult) (ResourceRecommendationBaseListResult, error)) ResourceRecommendationBaseListResultPage
Creates a new instance of the ResourceRecommendationBaseListResultPage type.
func (*ResourceRecommendationBaseListResultPage) Next ¶
func (page *ResourceRecommendationBaseListResultPage) 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 (*ResourceRecommendationBaseListResultPage) NextWithContext ¶
func (page *ResourceRecommendationBaseListResultPage) 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 (ResourceRecommendationBaseListResultPage) NotDone ¶
func (page ResourceRecommendationBaseListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (ResourceRecommendationBaseListResultPage) Response ¶
func (page ResourceRecommendationBaseListResultPage) Response() ResourceRecommendationBaseListResult
Response returns the raw server response from the last page request.
func (ResourceRecommendationBaseListResultPage) Values ¶
func (page ResourceRecommendationBaseListResultPage) Values() []ResourceRecommendationBase
Values returns the slice of values for the current page or nil if there are no values.
type Risk ¶
type Risk string
Risk enumerates the values for risk.
func PossibleRiskValues ¶
func PossibleRiskValues() []Risk
PossibleRiskValues returns an array of possible values for the Risk const type.
type Scenario ¶
type Scenario string
Scenario enumerates the values for scenario.
const ( // Alerts ... Alerts Scenario = "Alerts" )
func PossibleScenarioValues ¶
func PossibleScenarioValues() []Scenario
PossibleScenarioValues returns an array of possible values for the Scenario const type.
type ShortDescription ¶
type ShortDescription struct { // Problem - The issue or opportunity identified by the recommendation. Problem *string `json:"problem,omitempty"` // Solution - The remediation action suggested by the recommendation. Solution *string `json:"solution,omitempty"` }
ShortDescription a summary of the recommendation.
type SuppressionContract ¶
type SuppressionContract struct { autorest.Response `json:"-"` // SuppressionProperties - The properties of the suppression. *SuppressionProperties `json:"properties,omitempty"` // ID - READ-ONLY; The resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource. Name *string `json:"name,omitempty"` // Type - READ-ONLY; The type of the resource. Type *string `json:"type,omitempty"` }
SuppressionContract the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.
func (SuppressionContract) MarshalJSON ¶
func (sc SuppressionContract) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SuppressionContract.
func (*SuppressionContract) UnmarshalJSON ¶
func (sc *SuppressionContract) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for SuppressionContract struct.
type SuppressionContractListResult ¶
type SuppressionContractListResult struct { autorest.Response `json:"-"` // NextLink - The link used to get the next page of suppressions. NextLink *string `json:"nextLink,omitempty"` // Value - The list of suppressions. Value *[]SuppressionContract `json:"value,omitempty"` }
SuppressionContractListResult the list of Advisor suppressions.
func (SuppressionContractListResult) IsEmpty ¶
func (sclr SuppressionContractListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type SuppressionContractListResultIterator ¶
type SuppressionContractListResultIterator struct {
// contains filtered or unexported fields
}
SuppressionContractListResultIterator provides access to a complete listing of SuppressionContract values.
func NewSuppressionContractListResultIterator ¶
func NewSuppressionContractListResultIterator(page SuppressionContractListResultPage) SuppressionContractListResultIterator
Creates a new instance of the SuppressionContractListResultIterator type.
func (*SuppressionContractListResultIterator) Next ¶
func (iter *SuppressionContractListResultIterator) 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 (*SuppressionContractListResultIterator) NextWithContext ¶
func (iter *SuppressionContractListResultIterator) 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 (SuppressionContractListResultIterator) NotDone ¶
func (iter SuppressionContractListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (SuppressionContractListResultIterator) Response ¶
func (iter SuppressionContractListResultIterator) Response() SuppressionContractListResult
Response returns the raw server response from the last page request.
func (SuppressionContractListResultIterator) Value ¶
func (iter SuppressionContractListResultIterator) Value() SuppressionContract
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type SuppressionContractListResultPage ¶
type SuppressionContractListResultPage struct {
// contains filtered or unexported fields
}
SuppressionContractListResultPage contains a page of SuppressionContract values.
func NewSuppressionContractListResultPage ¶
func NewSuppressionContractListResultPage(getNextPage func(context.Context, SuppressionContractListResult) (SuppressionContractListResult, error)) SuppressionContractListResultPage
Creates a new instance of the SuppressionContractListResultPage type.
func (*SuppressionContractListResultPage) Next ¶
func (page *SuppressionContractListResultPage) 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 (*SuppressionContractListResultPage) NextWithContext ¶
func (page *SuppressionContractListResultPage) 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 (SuppressionContractListResultPage) NotDone ¶
func (page SuppressionContractListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (SuppressionContractListResultPage) Response ¶
func (page SuppressionContractListResultPage) Response() SuppressionContractListResult
Response returns the raw server response from the last page request.
func (SuppressionContractListResultPage) Values ¶
func (page SuppressionContractListResultPage) Values() []SuppressionContract
Values returns the slice of values for the current page or nil if there are no values.
type SuppressionProperties ¶
type SuppressionProperties struct { // SuppressionID - The GUID of the suppression. SuppressionID *string `json:"suppressionId,omitempty"` // TTL - The duration for which the suppression is valid. TTL *string `json:"ttl,omitempty"` }
SuppressionProperties the properties of the suppression.
type SuppressionsClient ¶
type SuppressionsClient struct {
BaseClient
}
SuppressionsClient is the REST APIs for Azure Advisor
func NewSuppressionsClient ¶
func NewSuppressionsClient(subscriptionID string) SuppressionsClient
NewSuppressionsClient creates an instance of the SuppressionsClient client.
func NewSuppressionsClientWithBaseURI ¶
func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient
NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient 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 (SuppressionsClient) Create ¶
func (client SuppressionsClient) Create(ctx context.Context, resourceURI string, recommendationID string, name string, suppressionContract SuppressionContract) (result SuppressionContract, err error)
Create enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation. Parameters: resourceURI - the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID - the recommendation ID. name - the name of the suppression. suppressionContract - the snoozed or dismissed attribute; for example, the snooze duration.
func (SuppressionsClient) CreatePreparer ¶
func (client SuppressionsClient) CreatePreparer(ctx context.Context, resourceURI string, recommendationID string, name string, suppressionContract SuppressionContract) (*http.Request, error)
CreatePreparer prepares the Create request.
func (SuppressionsClient) CreateResponder ¶
func (client SuppressionsClient) CreateResponder(resp *http.Response) (result SuppressionContract, err error)
CreateResponder handles the response to the Create request. The method always closes the http.Response Body.
func (SuppressionsClient) CreateSender ¶
CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.
func (SuppressionsClient) Delete ¶
func (client SuppressionsClient) Delete(ctx context.Context, resourceURI string, recommendationID string, name string) (result autorest.Response, err error)
Delete enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. Parameters: resourceURI - the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID - the recommendation ID. name - the name of the suppression.
func (SuppressionsClient) DeletePreparer ¶
func (client SuppressionsClient) DeletePreparer(ctx context.Context, resourceURI string, recommendationID string, name string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (SuppressionsClient) DeleteResponder ¶
func (client SuppressionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (SuppressionsClient) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (SuppressionsClient) Get ¶
func (client SuppressionsClient) Get(ctx context.Context, resourceURI string, recommendationID string, name string) (result SuppressionContract, err error)
Get obtains the details of a suppression. Parameters: resourceURI - the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID - the recommendation ID. name - the name of the suppression.
func (SuppressionsClient) GetPreparer ¶
func (client SuppressionsClient) GetPreparer(ctx context.Context, resourceURI string, recommendationID string, name string) (*http.Request, error)
GetPreparer prepares the Get request.
func (SuppressionsClient) GetResponder ¶
func (client SuppressionsClient) GetResponder(resp *http.Response) (result SuppressionContract, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (SuppressionsClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (SuppressionsClient) List ¶
func (client SuppressionsClient) List(ctx context.Context, top *int32, skipToken string) (result SuppressionContractListResultPage, err error)
List retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression. Parameters: top - the number of suppressions per page if a paged version of this API is being used. skipToken - the page-continuation token to use with a paged version of this API.
func (SuppressionsClient) ListComplete ¶
func (client SuppressionsClient) ListComplete(ctx context.Context, top *int32, skipToken string) (result SuppressionContractListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (SuppressionsClient) ListPreparer ¶
func (client SuppressionsClient) ListPreparer(ctx context.Context, top *int32, skipToken string) (*http.Request, error)
ListPreparer prepares the List request.
func (SuppressionsClient) ListResponder ¶
func (client SuppressionsClient) ListResponder(resp *http.Response) (result SuppressionContractListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (SuppressionsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.