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 Category
- type ConfigData
- type ConfigDataProperties
- type ConfigurationListResult
- type ConfigurationsClient
- func (client ConfigurationsClient) CreateInResourceGroup(configContract ConfigData, resourceGroup string) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInResourceGroupPreparer(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(configContract ConfigData) (result ARMErrorResponseBody, err error)
- func (client ConfigurationsClient) CreateInSubscriptionPreparer(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(resourceGroup string) (result ConfigurationListResult, err error)
- func (client ConfigurationsClient) ListByResourceGroupPreparer(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() (result ConfigurationListResult, err error)
- func (client ConfigurationsClient) ListBySubscriptionPreparer() (*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 ManagementClient
- type OperationDisplayInfo
- type OperationEntity
- type OperationEntityListResult
- type OperationsClient
- func (client OperationsClient) List() (result OperationEntityListResult, err error)
- func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error)
- func (client OperationsClient) ListNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error)
- func (client OperationsClient) ListPreparer() (*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 RecommendationProperties
- type RecommendationsClient
- func (client RecommendationsClient) Generate() (result autorest.Response, err error)
- func (client RecommendationsClient) GeneratePreparer() (*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(resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error)
- func (client RecommendationsClient) GetGenerateStatus(operationID uuid.UUID, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error)
- func (client RecommendationsClient) GetGenerateStatusPreparer(operationID uuid.UUID, cancel <-chan struct{}) (*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(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(filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResult, err error)
- func (client RecommendationsClient) ListComplete(filter string, top *int32, skipToken string, cancel <-chan struct{}) (<-chan ResourceRecommendationBase, <-chan error)
- func (client RecommendationsClient) ListNextResults(lastResults ResourceRecommendationBaseListResult) (result ResourceRecommendationBaseListResult, err error)
- func (client RecommendationsClient) ListPreparer(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 Risk
- type ShortDescription
- type SuppressionContract
- type SuppressionContractListResult
- type SuppressionProperties
- type SuppressionsClient
- func (client SuppressionsClient) Create(resourceURI string, recommendationID string, name string, ...) (result SuppressionContract, err error)
- func (client SuppressionsClient) CreatePreparer(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(resourceURI string, recommendationID string, name string) (result autorest.Response, err error)
- func (client SuppressionsClient) DeletePreparer(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(resourceURI string, recommendationID string, name string) (result SuppressionContract, err error)
- func (client SuppressionsClient) GetPreparer(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(top *int32, skipToken string) (result SuppressionContractListResult, err error)
- func (client SuppressionsClient) ListComplete(top *int32, skipToken string, cancel <-chan struct{}) (<-chan SuppressionContract, <-chan error)
- func (client SuppressionsClient) ListNextResults(lastResults SuppressionContractListResult) (result SuppressionContractListResult, err error)
- func (client SuppressionsClient) ListPreparer(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 *string `json:"message,omitempty"` Code *string `json:"code,omitempty"` }
ARMErrorResponseBody is ARM error response body.
type Category ¶
type Category string
Category enumerates the values for category.
const ( // Cost specifies the cost state for category. Cost Category = "Cost" // HighAvailability specifies the high availability state for category. HighAvailability Category = "HighAvailability" // Performance specifies the performance state for category. Performance Category = "Performance" // Security specifies the security state for category. Security Category = "Security" )
type ConfigData ¶
type ConfigData struct { ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` Properties *ConfigDataProperties `json:"properties,omitempty"` }
ConfigData is the Advisor configuration data structure.
type ConfigDataProperties ¶
type ConfigDataProperties struct { AdditionalProperties *map[string]*map[string]interface{} `json:",omitempty"` Exclude *bool `json:"exclude,omitempty"` LowCPUThreshold *string `json:"low_cpu_threshold,omitempty"` }
ConfigDataProperties is the list of property name/value pairs.
type ConfigurationListResult ¶
type ConfigurationListResult struct { autorest.Response `json:"-"` Value *[]ConfigData `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` }
ConfigurationListResult is the list of Advisor configurations.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
ManagementClient
}
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.
func (ConfigurationsClient) CreateInResourceGroup ¶
func (client ConfigurationsClient) CreateInResourceGroup(configContract ConfigData, resourceGroup string) (result ARMErrorResponseBody, err error)
CreateInResourceGroup sends the create in resource group request.
configContract is the Azure Advisor configuration data structure. resourceGroup is the name of the Azure resource group.
func (ConfigurationsClient) CreateInResourceGroupPreparer ¶
func (client ConfigurationsClient) CreateInResourceGroupPreparer(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(configContract ConfigData) (result ARMErrorResponseBody, err error)
CreateInSubscription create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups.
configContract is the Azure Advisor configuration data structure.
func (ConfigurationsClient) CreateInSubscriptionPreparer ¶
func (client ConfigurationsClient) CreateInSubscriptionPreparer(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(resourceGroup string) (result ConfigurationListResult, err error)
ListByResourceGroup sends the list by resource group request.
resourceGroup is the name of the Azure resource group.
func (ConfigurationsClient) ListByResourceGroupPreparer ¶
func (client ConfigurationsClient) ListByResourceGroupPreparer(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() (result ConfigurationListResult, err error)
ListBySubscription retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
func (ConfigurationsClient) ListBySubscriptionPreparer ¶
func (client ConfigurationsClient) ListBySubscriptionPreparer() (*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 ManagementClient ¶
ManagementClient is the base client for Advisor.
func New ¶
func New(subscriptionID string) ManagementClient
New creates an instance of the ManagementClient client.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient
NewWithBaseURI creates an instance of the ManagementClient client.
type OperationDisplayInfo ¶
type OperationDisplayInfo struct { Description *string `json:"description,omitempty"` Operation *string `json:"operation,omitempty"` Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` }
OperationDisplayInfo is the operation supported by Advisor.
type OperationEntity ¶
type OperationEntity struct { Name *string `json:"name,omitempty"` Display *OperationDisplayInfo `json:"display,omitempty"` }
OperationEntity is the operation supported by Advisor.
type OperationEntityListResult ¶
type OperationEntityListResult struct { autorest.Response `json:"-"` NextLink *string `json:"nextLink,omitempty"` Value *[]OperationEntity `json:"value,omitempty"` }
OperationEntityListResult is the list of Advisor operations.
func (OperationEntityListResult) OperationEntityListResultPreparer ¶
func (client OperationEntityListResult) OperationEntityListResultPreparer() (*http.Request, error)
OperationEntityListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type OperationsClient ¶
type OperationsClient struct {
ManagementClient
}
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.
func (OperationsClient) List ¶
func (client OperationsClient) List() (result OperationEntityListResult, err error)
List lists all the available Advisor REST API operations.
func (OperationsClient) ListComplete ¶
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error)
ListComplete gets all elements from the list without paging.
func (OperationsClient) ListNextResults ¶
func (client OperationsClient) ListNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (OperationsClient) ListPreparer ¶
func (client OperationsClient) ListPreparer() (*http.Request, error)
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 RecommendationProperties ¶
type RecommendationProperties struct { Category Category `json:"category,omitempty"` Impact Impact `json:"impact,omitempty"` ImpactedField *string `json:"impactedField,omitempty"` ImpactedValue *string `json:"impactedValue,omitempty"` LastUpdated *date.Time `json:"lastUpdated,omitempty"` Metadata *map[string]*map[string]interface{} `json:"metadata,omitempty"` RecommendationTypeID *string `json:"recommendationTypeId,omitempty"` Risk Risk `json:"risk,omitempty"` ShortDescription *ShortDescription `json:"shortDescription,omitempty"` SuppressionIds *[]uuid.UUID `json:"suppressionIds,omitempty"` }
RecommendationProperties is the properties of the recommendation.
type RecommendationsClient ¶
type RecommendationsClient struct {
ManagementClient
}
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.
func (RecommendationsClient) Generate ¶
func (client RecommendationsClient) Generate() (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 ¶
func (client RecommendationsClient) GeneratePreparer() (*http.Request, error)
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(resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error)
Get obtains details of a cached recommendation.
resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID is the recommendation ID.
func (RecommendationsClient) GetGenerateStatus ¶
func (client RecommendationsClient) GetGenerateStatus(operationID uuid.UUID, cancel <-chan struct{}) (<-chan autorest.Response, <-chan 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. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
operationID is the operation ID, which can be found from the Location field in the generate recommendation response header.
func (RecommendationsClient) GetGenerateStatusPreparer ¶
func (client RecommendationsClient) GetGenerateStatusPreparer(operationID uuid.UUID, cancel <-chan struct{}) (*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(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(filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResult, err error)
List obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
filter is the filter to apply to the recommendations. top is the number of recommendations per page if a paged version of this API is being used. skipToken is the page-continuation token to use with a paged version of this API.
func (RecommendationsClient) ListComplete ¶
func (client RecommendationsClient) ListComplete(filter string, top *int32, skipToken string, cancel <-chan struct{}) (<-chan ResourceRecommendationBase, <-chan error)
ListComplete gets all elements from the list without paging.
func (RecommendationsClient) ListNextResults ¶
func (client RecommendationsClient) ListNextResults(lastResults ResourceRecommendationBaseListResult) (result ResourceRecommendationBaseListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (RecommendationsClient) ListPreparer ¶
func (client RecommendationsClient) ListPreparer(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 *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` }
Resource is an Azure resource.
type ResourceRecommendationBase ¶
type ResourceRecommendationBase struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` *RecommendationProperties `json:"properties,omitempty"` }
ResourceRecommendationBase is advisor Recommendation.
type ResourceRecommendationBaseListResult ¶
type ResourceRecommendationBaseListResult struct { autorest.Response `json:"-"` NextLink *string `json:"nextLink,omitempty"` Value *[]ResourceRecommendationBase `json:"value,omitempty"` }
ResourceRecommendationBaseListResult is the list of Advisor recommendations.
func (ResourceRecommendationBaseListResult) ResourceRecommendationBaseListResultPreparer ¶
func (client ResourceRecommendationBaseListResult) ResourceRecommendationBaseListResultPreparer() (*http.Request, error)
ResourceRecommendationBaseListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type ShortDescription ¶
type ShortDescription struct { Problem *string `json:"problem,omitempty"` Solution *string `json:"solution,omitempty"` }
ShortDescription is a summary of the recommendation.
type SuppressionContract ¶
type SuppressionContract struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` *SuppressionProperties `json:"properties,omitempty"` }
SuppressionContract is the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.
type SuppressionContractListResult ¶
type SuppressionContractListResult struct { autorest.Response `json:"-"` NextLink *string `json:"nextLink,omitempty"` Value *[]SuppressionContract `json:"value,omitempty"` }
SuppressionContractListResult is the list of Advisor suppressions.
func (SuppressionContractListResult) SuppressionContractListResultPreparer ¶
func (client SuppressionContractListResult) SuppressionContractListResultPreparer() (*http.Request, error)
SuppressionContractListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type SuppressionProperties ¶
type SuppressionProperties struct { SuppressionID *string `json:"suppressionId,omitempty"` TTL *string `json:"ttl,omitempty"` }
SuppressionProperties is the properties of the suppression.
type SuppressionsClient ¶
type SuppressionsClient struct {
ManagementClient
}
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.
func (SuppressionsClient) Create ¶
func (client SuppressionsClient) Create(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.
resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID is the recommendation ID. name is the name of the suppression. suppressionContract is the snoozed or dismissed attribute; for example, the snooze duration.
func (SuppressionsClient) CreatePreparer ¶
func (client SuppressionsClient) CreatePreparer(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(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.
resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID is the recommendation ID. name is the name of the suppression.
func (SuppressionsClient) DeletePreparer ¶
func (client SuppressionsClient) DeletePreparer(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(resourceURI string, recommendationID string, name string) (result SuppressionContract, err error)
Get obtains the details of a suppression.
resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. recommendationID is the recommendation ID. name is the name of the suppression.
func (SuppressionsClient) GetPreparer ¶
func (client SuppressionsClient) GetPreparer(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(top *int32, skipToken string) (result SuppressionContractListResult, 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.
top is the number of suppressions per page if a paged version of this API is being used. skipToken is the page-continuation token to use with a paged version of this API.
func (SuppressionsClient) ListComplete ¶
func (client SuppressionsClient) ListComplete(top *int32, skipToken string, cancel <-chan struct{}) (<-chan SuppressionContract, <-chan error)
ListComplete gets all elements from the list without paging.
func (SuppressionsClient) ListNextResults ¶
func (client SuppressionsClient) ListNextResults(lastResults SuppressionContractListResult) (result SuppressionContractListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (SuppressionsClient) ListPreparer ¶
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.