Documentation ¶
Index ¶
- type ARMErrorResponseBody
- type ArmErrorResponse
- type CPUThreshold
- type Category
- type ClientFactory
- func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewRecommendationMetadataClient() *RecommendationMetadataClient
- func (c *ClientFactory) NewRecommendationsClient() *RecommendationsClient
- func (c *ClientFactory) NewSuppressionsClient() *SuppressionsClient
- type ConfigData
- type ConfigDataProperties
- type ConfigurationListResult
- type ConfigurationName
- type ConfigurationsClient
- func (client *ConfigurationsClient) CreateInResourceGroup(ctx context.Context, configurationName ConfigurationName, resourceGroup string, ...) (ConfigurationsClientCreateInResourceGroupResponse, error)
- func (client *ConfigurationsClient) CreateInSubscription(ctx context.Context, configurationName ConfigurationName, ...) (ConfigurationsClientCreateInSubscriptionResponse, error)
- func (client *ConfigurationsClient) NewListByResourceGroupPager(resourceGroup string, options *ConfigurationsClientListByResourceGroupOptions) *runtime.Pager[ConfigurationsClientListByResourceGroupResponse]
- func (client *ConfigurationsClient) NewListBySubscriptionPager(options *ConfigurationsClientListBySubscriptionOptions) *runtime.Pager[ConfigurationsClientListBySubscriptionResponse]
- type ConfigurationsClientCreateInResourceGroupOptions
- type ConfigurationsClientCreateInResourceGroupResponse
- type ConfigurationsClientCreateInSubscriptionOptions
- type ConfigurationsClientCreateInSubscriptionResponse
- type ConfigurationsClientListByResourceGroupOptions
- type ConfigurationsClientListByResourceGroupResponse
- type ConfigurationsClientListBySubscriptionOptions
- type ConfigurationsClientListBySubscriptionResponse
- type DigestConfig
- type DigestConfigState
- type Impact
- type MetadataEntity
- type MetadataEntityListResult
- type MetadataEntityProperties
- type MetadataSupportedValueDetail
- type OperationDisplayInfo
- type OperationEntity
- type OperationEntityListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type RecommendationMetadataClient
- type RecommendationMetadataClientGetOptions
- type RecommendationMetadataClientGetResponse
- type RecommendationMetadataClientListOptions
- type RecommendationMetadataClientListResponse
- type RecommendationProperties
- type RecommendationsClient
- func (client *RecommendationsClient) Generate(ctx context.Context, options *RecommendationsClientGenerateOptions) (RecommendationsClientGenerateResponse, error)
- func (client *RecommendationsClient) Get(ctx context.Context, resourceURI string, recommendationID string, ...) (RecommendationsClientGetResponse, error)
- func (client *RecommendationsClient) GetGenerateStatus(ctx context.Context, operationID string, ...) (RecommendationsClientGetGenerateStatusResponse, error)
- func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse]
- type RecommendationsClientGenerateOptions
- type RecommendationsClientGenerateResponse
- type RecommendationsClientGetGenerateStatusOptions
- type RecommendationsClientGetGenerateStatusResponse
- type RecommendationsClientGetOptions
- type RecommendationsClientGetResponse
- type RecommendationsClientListOptions
- type RecommendationsClientListResponse
- type Resource
- type ResourceMetadata
- type ResourceRecommendationBase
- type ResourceRecommendationBaseListResult
- type Risk
- type Scenario
- type ShortDescription
- type SuppressionContract
- type SuppressionContractListResult
- type SuppressionProperties
- type SuppressionsClient
- func (client *SuppressionsClient) Create(ctx context.Context, resourceURI string, recommendationID string, name string, ...) (SuppressionsClientCreateResponse, error)
- func (client *SuppressionsClient) Delete(ctx context.Context, resourceURI string, recommendationID string, name string, ...) (SuppressionsClientDeleteResponse, error)
- func (client *SuppressionsClient) Get(ctx context.Context, resourceURI string, recommendationID string, name string, ...) (SuppressionsClientGetResponse, error)
- func (client *SuppressionsClient) NewListPager(options *SuppressionsClientListOptions) *runtime.Pager[SuppressionsClientListResponse]
- type SuppressionsClientCreateOptions
- type SuppressionsClientCreateResponse
- type SuppressionsClientDeleteOptions
- type SuppressionsClientDeleteResponse
- type SuppressionsClientGetOptions
- type SuppressionsClientGetResponse
- type SuppressionsClientListOptions
- type SuppressionsClientListResponse
Examples ¶
- ConfigurationsClient.CreateInSubscription
- ConfigurationsClient.NewListBySubscriptionPager
- RecommendationMetadataClient.Get
- RecommendationMetadataClient.NewListPager
- RecommendationsClient.Generate
- RecommendationsClient.Get
- RecommendationsClient.GetGenerateStatus
- RecommendationsClient.NewListPager
- SuppressionsClient.Create
- SuppressionsClient.Delete
- SuppressionsClient.Get
- SuppressionsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARMErrorResponseBody ¶
type ARMErrorResponseBody struct { // Gets or sets the string that can be used to programmatically identify the error. Code *string // Gets or sets the string that describes the error in detail and provides debugging information. Message *string }
ARMErrorResponseBody - ARM error response body.
func (ARMErrorResponseBody) MarshalJSON ¶
func (a ARMErrorResponseBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ARMErrorResponseBody.
func (*ARMErrorResponseBody) UnmarshalJSON ¶
func (a *ARMErrorResponseBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ARMErrorResponseBody.
type ArmErrorResponse ¶
type ArmErrorResponse struct { // ARM error response body. Error *ARMErrorResponseBody }
func (ArmErrorResponse) MarshalJSON ¶
func (a ArmErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArmErrorResponse.
func (*ArmErrorResponse) UnmarshalJSON ¶
func (a *ArmErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArmErrorResponse.
type CPUThreshold ¶
type CPUThreshold string
CPUThreshold - Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 (default), 10, 15 or 20.
const ( CPUThresholdFifteen CPUThreshold = "15" CPUThresholdFive CPUThreshold = "5" CPUThresholdTen CPUThreshold = "10" CPUThresholdTwenty CPUThreshold = "20" )
func PossibleCPUThresholdValues ¶
func PossibleCPUThresholdValues() []CPUThreshold
PossibleCPUThresholdValues returns the possible values for the CPUThreshold const type.
type Category ¶
type Category string
func PossibleCategoryValues ¶
func PossibleCategoryValues() []Category
PossibleCategoryValues returns the possible values for the Category const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The Azure subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewConfigurationsClient ¶
func (c *ClientFactory) NewConfigurationsClient() *ConfigurationsClient
NewConfigurationsClient creates a new instance of ConfigurationsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewRecommendationMetadataClient ¶
func (c *ClientFactory) NewRecommendationMetadataClient() *RecommendationMetadataClient
NewRecommendationMetadataClient creates a new instance of RecommendationMetadataClient.
func (*ClientFactory) NewRecommendationsClient ¶
func (c *ClientFactory) NewRecommendationsClient() *RecommendationsClient
NewRecommendationsClient creates a new instance of RecommendationsClient.
func (*ClientFactory) NewSuppressionsClient ¶
func (c *ClientFactory) NewSuppressionsClient() *SuppressionsClient
NewSuppressionsClient creates a new instance of SuppressionsClient.
type ConfigData ¶
type ConfigData struct { // The Advisor configuration data structure. Properties *ConfigDataProperties // READ-ONLY; The resource ID. ID *string // READ-ONLY; The name of the resource. Name *string // READ-ONLY; The type of the resource. Type *string }
ConfigData - The Advisor configuration data structure.
func (ConfigData) MarshalJSON ¶
func (c ConfigData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigData.
func (*ConfigData) UnmarshalJSON ¶
func (c *ConfigData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigData.
type ConfigDataProperties ¶
type ConfigDataProperties struct { // Advisor digest configuration. Valid only for subscriptions Digests []*DigestConfig // Exclude the resource from Advisor evaluations. Valid values: False (default) or True. Exclude *bool // Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values: 5 // (default), 10, 15 or 20. LowCPUThreshold *CPUThreshold }
ConfigDataProperties - Configuration data properties
func (ConfigDataProperties) MarshalJSON ¶
func (c ConfigDataProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigDataProperties.
func (*ConfigDataProperties) UnmarshalJSON ¶
func (c *ConfigDataProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigDataProperties.
type ConfigurationListResult ¶
type ConfigurationListResult struct { // The link used to get the next page of configurations. NextLink *string // The list of configurations. Value []*ConfigData }
ConfigurationListResult - The list of Advisor configurations.
func (ConfigurationListResult) MarshalJSON ¶
func (c ConfigurationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationListResult.
func (*ConfigurationListResult) UnmarshalJSON ¶
func (c *ConfigurationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationListResult.
type ConfigurationName ¶
type ConfigurationName string
const (
ConfigurationNameDefault ConfigurationName = "default"
)
func PossibleConfigurationNameValues ¶
func PossibleConfigurationNameValues() []ConfigurationName
PossibleConfigurationNameValues returns the possible values for the ConfigurationName const type.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
// contains filtered or unexported fields
}
ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)
NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values.
- subscriptionID - The Azure subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationsClient) CreateInResourceGroup ¶
func (client *ConfigurationsClient) CreateInResourceGroup(ctx context.Context, configurationName ConfigurationName, resourceGroup string, configContract ConfigData, options *ConfigurationsClientCreateInResourceGroupOptions) (ConfigurationsClientCreateInResourceGroupResponse, error)
CreateInResourceGroup - Create/Overwrite Azure Advisor configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- configurationName - Advisor configuration name. Value must be 'default'
- resourceGroup - The name of the Azure resource group.
- configContract - The Azure Advisor configuration data structure.
- options - ConfigurationsClientCreateInResourceGroupOptions contains the optional parameters for the ConfigurationsClient.CreateInResourceGroup method.
func (*ConfigurationsClient) CreateInSubscription ¶
func (client *ConfigurationsClient) CreateInSubscription(ctx context.Context, configurationName ConfigurationName, configContract ConfigData, options *ConfigurationsClientCreateInSubscriptionOptions) (ConfigurationsClientCreateInSubscriptionResponse, error)
CreateInSubscription - Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- configurationName - Advisor configuration name. Value must be 'default'
- configContract - The Azure Advisor configuration data structure.
- options - ConfigurationsClientCreateInSubscriptionOptions contains the optional parameters for the ConfigurationsClient.CreateInSubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewConfigurationsClient().CreateInSubscription(ctx, armadvisor.ConfigurationNameDefault, armadvisor.ConfigData{ Properties: &armadvisor.ConfigDataProperties{ Digests: []*armadvisor.DigestConfig{ { Name: to.Ptr("digestConfigName"), ActionGroupResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName"), Categories: []*armadvisor.Category{ to.Ptr(armadvisor.CategoryHighAvailability), to.Ptr(armadvisor.CategorySecurity), to.Ptr(armadvisor.CategoryPerformance), to.Ptr(armadvisor.CategoryCost), to.Ptr(armadvisor.CategoryOperationalExcellence)}, Frequency: to.Ptr[int32](30), State: to.Ptr(armadvisor.DigestConfigStateActive), Language: to.Ptr("en"), }}, Exclude: to.Ptr(true), LowCPUThreshold: to.Ptr(armadvisor.CPUThresholdFive), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ConfigData = armadvisor.ConfigData{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Advisor/configurations"), // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default"), // Properties: &armadvisor.ConfigDataProperties{ // Digests: []*armadvisor.DigestConfig{ // { // Name: to.Ptr("digestConfigName"), // ActionGroupResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName"), // Categories: []*armadvisor.Category{ // to.Ptr(armadvisor.CategoryHighAvailability), // to.Ptr(armadvisor.CategorySecurity), // to.Ptr(armadvisor.CategoryPerformance), // to.Ptr(armadvisor.CategoryCost), // to.Ptr(armadvisor.CategoryOperationalExcellence)}, // Frequency: to.Ptr[int32](30), // State: to.Ptr(armadvisor.DigestConfigStateActive), // Language: to.Ptr("en"), // }}, // Exclude: to.Ptr(true), // LowCPUThreshold: to.Ptr(armadvisor.CPUThresholdFive), // }, // } }
Output:
func (*ConfigurationsClient) NewListByResourceGroupPager ¶
func (client *ConfigurationsClient) NewListByResourceGroupPager(resourceGroup string, options *ConfigurationsClientListByResourceGroupOptions) *runtime.Pager[ConfigurationsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Retrieve Azure Advisor configurations.
Generated from API version 2020-01-01
- resourceGroup - The name of the Azure resource group.
- options - ConfigurationsClientListByResourceGroupOptions contains the optional parameters for the ConfigurationsClient.NewListByResourceGroupPager method.
func (*ConfigurationsClient) NewListBySubscriptionPager ¶
func (client *ConfigurationsClient) NewListBySubscriptionPager(options *ConfigurationsClientListBySubscriptionOptions) *runtime.Pager[ConfigurationsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
Generated from API version 2020-01-01
- options - ConfigurationsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewConfigurationsClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ConfigurationListResult = armadvisor.ConfigurationListResult{ // Value: []*armadvisor.ConfigData{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Advisor/configurations"), // ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default"), // Properties: &armadvisor.ConfigDataProperties{ // Digests: []*armadvisor.DigestConfig{ // { // Name: to.Ptr("digestConfigName"), // ActionGroupResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName"), // Categories: []*armadvisor.Category{ // to.Ptr(armadvisor.CategoryHighAvailability), // to.Ptr(armadvisor.CategorySecurity), // to.Ptr(armadvisor.CategoryPerformance), // to.Ptr(armadvisor.CategoryCost), // to.Ptr(armadvisor.CategoryOperationalExcellence)}, // Frequency: to.Ptr[int32](30), // State: to.Ptr(armadvisor.DigestConfigStateActive), // Language: to.Ptr("en"), // }}, // Exclude: to.Ptr(false), // LowCPUThreshold: to.Ptr(armadvisor.CPUThresholdFive), // }, // }}, // } } }
Output:
type ConfigurationsClientCreateInResourceGroupOptions ¶
type ConfigurationsClientCreateInResourceGroupOptions struct { }
ConfigurationsClientCreateInResourceGroupOptions contains the optional parameters for the ConfigurationsClient.CreateInResourceGroup method.
type ConfigurationsClientCreateInResourceGroupResponse ¶
type ConfigurationsClientCreateInResourceGroupResponse struct { // The Advisor configuration data structure. ConfigData }
ConfigurationsClientCreateInResourceGroupResponse contains the response from method ConfigurationsClient.CreateInResourceGroup.
type ConfigurationsClientCreateInSubscriptionOptions ¶
type ConfigurationsClientCreateInSubscriptionOptions struct { }
ConfigurationsClientCreateInSubscriptionOptions contains the optional parameters for the ConfigurationsClient.CreateInSubscription method.
type ConfigurationsClientCreateInSubscriptionResponse ¶
type ConfigurationsClientCreateInSubscriptionResponse struct { // The Advisor configuration data structure. ConfigData }
ConfigurationsClientCreateInSubscriptionResponse contains the response from method ConfigurationsClient.CreateInSubscription.
type ConfigurationsClientListByResourceGroupOptions ¶
type ConfigurationsClientListByResourceGroupOptions struct { }
ConfigurationsClientListByResourceGroupOptions contains the optional parameters for the ConfigurationsClient.NewListByResourceGroupPager method.
type ConfigurationsClientListByResourceGroupResponse ¶
type ConfigurationsClientListByResourceGroupResponse struct { // The list of Advisor configurations. ConfigurationListResult }
ConfigurationsClientListByResourceGroupResponse contains the response from method ConfigurationsClient.NewListByResourceGroupPager.
type ConfigurationsClientListBySubscriptionOptions ¶
type ConfigurationsClientListBySubscriptionOptions struct { }
ConfigurationsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationsClient.NewListBySubscriptionPager method.
type ConfigurationsClientListBySubscriptionResponse ¶
type ConfigurationsClientListBySubscriptionResponse struct { // The list of Advisor configurations. ConfigurationListResult }
ConfigurationsClientListBySubscriptionResponse contains the response from method ConfigurationsClient.NewListBySubscriptionPager.
type DigestConfig ¶
type DigestConfig struct { // Action group resource id used by digest. ActionGroupResourceID *string // Categories to send digest for. If categories are not provided, then digest will be sent for all categories. Categories []*Category // Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive. Frequency *int32 // Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, // it will be converted into one. Default value is English (en). Language *string // Name of digest configuration. Value is case-insensitive and must be unique within a subscription. Name *string // State of digest configuration. State *DigestConfigState }
DigestConfig - Advisor Digest configuration entity
func (DigestConfig) MarshalJSON ¶
func (d DigestConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DigestConfig.
func (*DigestConfig) UnmarshalJSON ¶
func (d *DigestConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DigestConfig.
type DigestConfigState ¶
type DigestConfigState string
DigestConfigState - State of digest configuration.
const ( DigestConfigStateActive DigestConfigState = "Active" DigestConfigStateDisabled DigestConfigState = "Disabled" )
func PossibleDigestConfigStateValues ¶
func PossibleDigestConfigStateValues() []DigestConfigState
PossibleDigestConfigStateValues returns the possible values for the DigestConfigState const type.
type Impact ¶
type Impact string
Impact - The business impact of the recommendation.
func PossibleImpactValues ¶
func PossibleImpactValues() []Impact
PossibleImpactValues returns the possible values for the Impact const type.
type MetadataEntity ¶
type MetadataEntity struct { // The resource Id of the metadata entity. ID *string // The name of the metadata entity. Name *string // The metadata entity properties. Properties *MetadataEntityProperties // The type of the metadata entity. Type *string }
MetadataEntity - The metadata entity contract.
func (MetadataEntity) MarshalJSON ¶
func (m MetadataEntity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetadataEntity.
func (*MetadataEntity) UnmarshalJSON ¶
func (m *MetadataEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetadataEntity.
type MetadataEntityListResult ¶
type MetadataEntityListResult struct { // The link used to get the next page of metadata. NextLink *string // The list of metadata entities. Value []*MetadataEntity }
MetadataEntityListResult - The list of metadata entities
func (MetadataEntityListResult) MarshalJSON ¶
func (m MetadataEntityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetadataEntityListResult.
func (*MetadataEntityListResult) UnmarshalJSON ¶
func (m *MetadataEntityListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetadataEntityListResult.
type MetadataEntityProperties ¶
type MetadataEntityProperties struct { // The list of scenarios applicable to this metadata entity. ApplicableScenarios []*Scenario // The list of keys on which this entity depends on. DependsOn []*string // The display name. DisplayName *string // The list of supported values. SupportedValues []*MetadataSupportedValueDetail }
MetadataEntityProperties - The metadata entity properties
func (MetadataEntityProperties) MarshalJSON ¶
func (m MetadataEntityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetadataEntityProperties.
func (*MetadataEntityProperties) UnmarshalJSON ¶
func (m *MetadataEntityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetadataEntityProperties.
type MetadataSupportedValueDetail ¶
type MetadataSupportedValueDetail struct { // The display name. DisplayName *string // The id. ID *string }
MetadataSupportedValueDetail - The metadata supported value detail.
func (MetadataSupportedValueDetail) MarshalJSON ¶
func (m MetadataSupportedValueDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetadataSupportedValueDetail.
func (*MetadataSupportedValueDetail) UnmarshalJSON ¶
func (m *MetadataSupportedValueDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetadataSupportedValueDetail.
type OperationDisplayInfo ¶
type OperationDisplayInfo struct { // The description of the operation. Description *string // The action that users can perform, based on their permission level. Operation *string // Service provider: Microsoft Advisor. Provider *string // Resource on which the operation is performed. Resource *string }
OperationDisplayInfo - The operation supported by Advisor.
func (OperationDisplayInfo) MarshalJSON ¶
func (o OperationDisplayInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplayInfo.
func (*OperationDisplayInfo) UnmarshalJSON ¶
func (o *OperationDisplayInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayInfo.
type OperationEntity ¶
type OperationEntity struct { // The operation supported by Advisor. Display *OperationDisplayInfo // Operation name: {provider}/{resource}/{operation}. Name *string }
OperationEntity - The operation supported by Advisor.
func (OperationEntity) MarshalJSON ¶
func (o OperationEntity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationEntity.
func (*OperationEntity) UnmarshalJSON ¶
func (o *OperationEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntity.
type OperationEntityListResult ¶
type OperationEntityListResult struct { // The link used to get the next page of operations. NextLink *string // The list of operations. Value []*OperationEntity }
OperationEntityListResult - The list of Advisor operations.
func (OperationEntityListResult) MarshalJSON ¶
func (o OperationEntityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationEntityListResult.
func (*OperationEntityListResult) UnmarshalJSON ¶
func (o *OperationEntityListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all the available Advisor REST API operations.
Generated from API version 2020-01-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // The list of Advisor operations. OperationEntityListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type RecommendationMetadataClient ¶
type RecommendationMetadataClient struct {
// contains filtered or unexported fields
}
RecommendationMetadataClient contains the methods for the RecommendationMetadata group. Don't use this type directly, use NewRecommendationMetadataClient() instead.
func NewRecommendationMetadataClient ¶
func NewRecommendationMetadataClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendationMetadataClient, error)
NewRecommendationMetadataClient creates a new instance of RecommendationMetadataClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RecommendationMetadataClient) Get ¶
func (client *RecommendationMetadataClient) Get(ctx context.Context, name string, options *RecommendationMetadataClientGetOptions) (RecommendationMetadataClientGetResponse, error)
Get - Gets the metadata entity. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- name - Name of metadata entity.
- options - RecommendationMetadataClientGetOptions contains the optional parameters for the RecommendationMetadataClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GetRecommendationMetadataEntity.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRecommendationMetadataClient().Get(ctx, "types", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MetadataEntity = armadvisor.MetadataEntity{ // Name: to.Ptr("recommendationType"), // Type: to.Ptr("Microsoft.Advisor/metadata"), // ID: to.Ptr("providers/Microsoft.Advisor/metadata/recommendationType"), // Properties: &armadvisor.MetadataEntityProperties{ // ApplicableScenarios: []*armadvisor.Scenario{ // to.Ptr(armadvisor.ScenarioAlerts)}, // DependsOn: []*string{ // to.Ptr("category"), // to.Ptr("impact")}, // DisplayName: to.Ptr("Recommendation Type"), // SupportedValues: []*armadvisor.MetadataSupportedValueDetail{ // { // DisplayName: to.Ptr("Upgrade your SKU or add more instances to ensure fault tolerance"), // ID: to.Ptr("6a2b1e70-bd4c-4163-86de-5243d7ac05ee"), // }, // { // DisplayName: to.Ptr("Delete ExpressRoute circuits in the provider status of Not Provisioned"), // ID: to.Ptr("da6630fb-4286-4996-92a3-a43f5f26dd34"), // }}, // }, // } }
Output:
func (*RecommendationMetadataClient) NewListPager ¶
func (client *RecommendationMetadataClient) NewListPager(options *RecommendationMetadataClientListOptions) *runtime.Pager[RecommendationMetadataClientListResponse]
NewListPager - Gets the list of metadata entities.
Generated from API version 2020-01-01
- options - RecommendationMetadataClientListOptions contains the optional parameters for the RecommendationMetadataClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListRecommendationMetadata.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRecommendationMetadataClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetadataEntityListResult = armadvisor.MetadataEntityListResult{ // Value: []*armadvisor.MetadataEntity{ // { // Name: to.Ptr("recommendationType"), // Type: to.Ptr("Microsoft.Advisor/metadata"), // ID: to.Ptr("providers/Microsoft.Advisor/metadata/recommendationType"), // Properties: &armadvisor.MetadataEntityProperties{ // ApplicableScenarios: []*armadvisor.Scenario{ // to.Ptr(armadvisor.ScenarioAlerts)}, // DependsOn: []*string{ // to.Ptr("category"), // to.Ptr("impact")}, // DisplayName: to.Ptr("Recommendation Type"), // SupportedValues: []*armadvisor.MetadataSupportedValueDetail{ // { // DisplayName: to.Ptr("Upgrade your SKU or add more instances to ensure fault tolerance"), // ID: to.Ptr("6a2b1e70-bd4c-4163-86de-5243d7ac05ee"), // }, // { // DisplayName: to.Ptr("Delete ExpressRoute circuits in the provider status of Not Provisioned"), // ID: to.Ptr("da6630fb-4286-4996-92a3-a43f5f26dd34"), // }}, // }, // }, // { // Name: to.Ptr("recommendationCategory"), // Type: to.Ptr("Microsoft.Advisor/metadata"), // ID: to.Ptr("providers/Microsoft.Advisor/metadata/recommendationCategory"), // Properties: &armadvisor.MetadataEntityProperties{ // ApplicableScenarios: []*armadvisor.Scenario{ // to.Ptr(armadvisor.ScenarioAlerts)}, // DisplayName: to.Ptr("Category"), // SupportedValues: []*armadvisor.MetadataSupportedValueDetail{ // { // DisplayName: to.Ptr("Cost"), // ID: to.Ptr("Cost"), // }, // { // DisplayName: to.Ptr("Performance"), // ID: to.Ptr("Performance"), // }}, // }, // }, // { // Name: to.Ptr("recommendationImpact"), // Type: to.Ptr("Microsoft.Advisor/metadata"), // ID: to.Ptr("providers/Microsoft.Advisor/metadata/recommendationImpact"), // Properties: &armadvisor.MetadataEntityProperties{ // DisplayName: to.Ptr("Impact"), // SupportedValues: []*armadvisor.MetadataSupportedValueDetail{ // { // DisplayName: to.Ptr("High"), // ID: to.Ptr("High"), // }, // { // DisplayName: to.Ptr("Medium"), // ID: to.Ptr("Medium"), // }, // { // DisplayName: to.Ptr("Low"), // ID: to.Ptr("Low"), // }}, // }, // }}, // } } }
Output:
type RecommendationMetadataClientGetOptions ¶
type RecommendationMetadataClientGetOptions struct { }
RecommendationMetadataClientGetOptions contains the optional parameters for the RecommendationMetadataClient.Get method.
type RecommendationMetadataClientGetResponse ¶
type RecommendationMetadataClientGetResponse struct { // The metadata entity contract. MetadataEntity }
RecommendationMetadataClientGetResponse contains the response from method RecommendationMetadataClient.Get.
type RecommendationMetadataClientListOptions ¶
type RecommendationMetadataClientListOptions struct { }
RecommendationMetadataClientListOptions contains the optional parameters for the RecommendationMetadataClient.NewListPager method.
type RecommendationMetadataClientListResponse ¶
type RecommendationMetadataClientListResponse struct { // The list of metadata entities MetadataEntityListResult }
RecommendationMetadataClientListResponse contains the response from method RecommendationMetadataClient.NewListPager.
type RecommendationProperties ¶
type RecommendationProperties struct { // The list of recommended actions to implement recommendation. Actions []map[string]any // The category of the recommendation. Category *Category // The detailed description of recommendation. Description *string // The recommendation metadata properties exposed to customer to provide additional information. ExposedMetadataProperties map[string]any // Extended properties ExtendedProperties map[string]*string // The business impact of the recommendation. Impact *Impact // The resource type identified by Advisor. ImpactedField *string // The resource identified by Advisor. ImpactedValue *string // The label of recommendation. Label *string // The most recent time that Advisor checked the validity of the recommendation. LastUpdated *time.Time // The link to learn more about recommendation and generation logic. LearnMoreLink *string // The recommendation metadata. Metadata map[string]any // The potential benefit of implementing recommendation. PotentialBenefits *string // The recommendation-type GUID. RecommendationTypeID *string // The automated way to apply recommendation. Remediation map[string]any // Metadata of resource that was assessed ResourceMetadata *ResourceMetadata // The potential risk of not implementing the recommendation. Risk *Risk // A summary of the recommendation. ShortDescription *ShortDescription // The list of snoozed and dismissed rules for the recommendation. SuppressionIDs []*string }
RecommendationProperties - The properties of the recommendation.
func (RecommendationProperties) MarshalJSON ¶
func (r RecommendationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendationProperties.
func (*RecommendationProperties) UnmarshalJSON ¶
func (r *RecommendationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationProperties.
type RecommendationsClient ¶
type RecommendationsClient struct {
// contains filtered or unexported fields
}
RecommendationsClient contains the methods for the Recommendations group. Don't use this type directly, use NewRecommendationsClient() instead.
func NewRecommendationsClient ¶
func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendationsClient, error)
NewRecommendationsClient creates a new instance of RecommendationsClient with the specified values.
- subscriptionID - The Azure subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RecommendationsClient) Generate ¶
func (client *RecommendationsClient) Generate(ctx context.Context, options *RecommendationsClientGenerateOptions) (RecommendationsClientGenerateResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- options - RecommendationsClientGenerateOptions contains the optional parameters for the RecommendationsClient.Generate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GenerateRecommendations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRecommendationsClient().Generate(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*RecommendationsClient) Get ¶
func (client *RecommendationsClient) Get(ctx context.Context, resourceURI string, recommendationID string, options *RecommendationsClientGetOptions) (RecommendationsClientGetResponse, error)
Get - Obtains details of a cached recommendation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- resourceURI - The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.
- recommendationID - The recommendation ID.
- options - RecommendationsClientGetOptions contains the optional parameters for the RecommendationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GetRecommendationDetail.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRecommendationsClient().Get(ctx, "resourceUri", "recommendationId", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ResourceRecommendationBase = armadvisor.ResourceRecommendationBase{ // Name: to.Ptr("recommendationId"), // Type: to.Ptr("Microsoft.Advisor/recommendations"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId"), // Properties: &armadvisor.RecommendationProperties{ // Description: to.Ptr("After enabling Soft Delete, deleted data transitions to a soft deleted state instead of being permanently deleted. When data is overwritten, a soft deleted snapshot is generated to save the state of the overwritten data. You can configure the amount of time soft deleted data is recoverable before it permanently expires."), // Actions: []map[string]any{ // map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link1", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId", // }, // }}, // Category: to.Ptr(armadvisor.CategorySecurity), // Impact: to.Ptr(armadvisor.ImpactMedium), // ImpactedField: to.Ptr("Microsoft.Compute/virtualMachines"), // ImpactedValue: to.Ptr("armavset"), // Label: to.Ptr("Enable Soft Delete"), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-24T22:24:43.321Z"); return t}()), // LearnMoreLink: to.Ptr("https://link2"), // PotentialBenefits: to.Ptr("Save and recover your data when blobs or blob snapshots are accidentally overwritten or deleted"), // Remediation: map[string]any{ // "httpMethod": "POST", // "uri": "uri", // "details": "link to document", // }, // ResourceMetadata: &armadvisor.ResourceMetadata{ // Action: map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link3", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz", // }, // }, // Plural: to.Ptr("Virtual machines"), // ResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz"), // Singular: to.Ptr("Virtual machine"), // Source: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Security/assessments/assessmentGuid"), // }, // Risk: to.Ptr(armadvisor.RiskWarning), // ShortDescription: &armadvisor.ShortDescription{ // Problem: to.Ptr("Monitoring agent is not installed on your machines"), // Solution: to.Ptr("Monitoring agent should be installed on your machines"), // }, // }, // } }
Output:
func (*RecommendationsClient) GetGenerateStatus ¶
func (client *RecommendationsClient) GetGenerateStatus(ctx context.Context, operationID string, options *RecommendationsClientGetGenerateStatusOptions) (RecommendationsClientGetGenerateStatusResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- operationID - The operation ID, which can be found from the Location field in the generate recommendation response header.
- options - RecommendationsClientGetGenerateStatusOptions contains the optional parameters for the RecommendationsClient.GetGenerateStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/EmptyResponse.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRecommendationsClient().GetGenerateStatus(ctx, "operationGUID", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*RecommendationsClient) NewListPager ¶
func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse]
NewListPager - Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
Generated from API version 2020-01-01
- options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListRecommendations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRecommendationsClient().NewListPager(&armadvisor.RecommendationsClientListOptions{Filter: nil, Top: to.Ptr[int32](10), SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourceRecommendationBaseListResult = armadvisor.ResourceRecommendationBaseListResult{ // Value: []*armadvisor.ResourceRecommendationBase{ // { // Name: to.Ptr("recGUID1"), // Type: to.Ptr("Microsoft.Advisor/recommendations"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recGUID1"), // Properties: &armadvisor.RecommendationProperties{ // Description: to.Ptr("After enabling Soft Delete, deleted data transitions to a soft deleted state instead of being permanently deleted. When data is overwritten, a soft deleted snapshot is generated to save the state of the overwritten data. You can configure the amount of time soft deleted data is recoverable before it permanently expires."), // Actions: []map[string]any{ // map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link1", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId", // }, // }}, // Category: to.Ptr(armadvisor.CategoryHighAvailability), // Impact: to.Ptr(armadvisor.ImpactMedium), // ImpactedField: to.Ptr("Microsoft.Compute/availabilitySets"), // ImpactedValue: to.Ptr("armavset"), // Label: to.Ptr("Enable Soft Delete"), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-24T22:24:43.321Z"); return t}()), // LearnMoreLink: to.Ptr("https://link2"), // PotentialBenefits: to.Ptr("Save and recover your data when blobs or blob snapshots are accidentally overwritten or deleted"), // Remediation: map[string]any{ // "httpMethod": "POST", // "uri": "uri", // "details": "link to document", // }, // ResourceMetadata: &armadvisor.ResourceMetadata{ // Action: map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link3", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId", // }, // }, // Plural: to.Ptr("Availability sets"), // ResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/availabilitysets/abc"), // Singular: to.Ptr("Availability set"), // }, // Risk: to.Ptr(armadvisor.RiskWarning), // ShortDescription: &armadvisor.ShortDescription{ // Problem: to.Ptr("This availability set is not configured for fault tolerance"), // Solution: to.Ptr("To ensure high availability add one or more virtual machines to this availability set"), // }, // }, // }, // { // Name: to.Ptr("recGUID2"), // Type: to.Ptr("Microsoft.Advisor/recommendations"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recGUID2"), // Properties: &armadvisor.RecommendationProperties{ // Description: to.Ptr("Monitoring agent should be installed on your machines."), // Actions: []map[string]any{ // map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link1", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId", // }, // }}, // Category: to.Ptr(armadvisor.CategorySecurity), // Impact: to.Ptr(armadvisor.ImpactMedium), // ImpactedField: to.Ptr("Microsoft.Compute/virtualMachines"), // ImpactedValue: to.Ptr("armavset"), // Label: to.Ptr("Enable monitoring agent"), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-24T22:24:43.321Z"); return t}()), // LearnMoreLink: to.Ptr("https://link2"), // PotentialBenefits: to.Ptr("Protect and monitor machine"), // ResourceMetadata: &armadvisor.ResourceMetadata{ // Action: map[string]any{ // "description": "Enable Soft Delete to protect blob data", // "actionType": "Document", // "caption": "Enable Soft Delete to protect blob data", // "link": "https://link3", // "metadata": map[string]any{ // "id": "/subscriptions/subscriptionId", // }, // }, // Plural: to.Ptr("Virtual machines"), // ResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz"), // Singular: to.Ptr("Virtual machine"), // Source: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Security/assessments/assessmentGuid"), // }, // Risk: to.Ptr(armadvisor.RiskWarning), // ShortDescription: &armadvisor.ShortDescription{ // Problem: to.Ptr("Monitoring agent is not installed on your machines"), // Solution: to.Ptr("Monitoring agent should be installed on your machines"), // }, // }, // }}, // } } }
Output:
type RecommendationsClientGenerateOptions ¶
type RecommendationsClientGenerateOptions struct { }
RecommendationsClientGenerateOptions contains the optional parameters for the RecommendationsClient.Generate method.
type RecommendationsClientGenerateResponse ¶
type RecommendationsClientGenerateResponse struct { // Location contains the information returned from the Location header response. Location *string // RetryAfter contains the information returned from the Retry-After header response. RetryAfter *string }
RecommendationsClientGenerateResponse contains the response from method RecommendationsClient.Generate.
type RecommendationsClientGetGenerateStatusOptions ¶
type RecommendationsClientGetGenerateStatusOptions struct { }
RecommendationsClientGetGenerateStatusOptions contains the optional parameters for the RecommendationsClient.GetGenerateStatus method.
type RecommendationsClientGetGenerateStatusResponse ¶
type RecommendationsClientGetGenerateStatusResponse struct { }
RecommendationsClientGetGenerateStatusResponse contains the response from method RecommendationsClient.GetGenerateStatus.
type RecommendationsClientGetOptions ¶
type RecommendationsClientGetOptions struct { }
RecommendationsClientGetOptions contains the optional parameters for the RecommendationsClient.Get method.
type RecommendationsClientGetResponse ¶
type RecommendationsClientGetResponse struct { // Advisor Recommendation. ResourceRecommendationBase }
RecommendationsClientGetResponse contains the response from method RecommendationsClient.Get.
type RecommendationsClientListOptions ¶
type RecommendationsClientListOptions struct { // The filter to apply to the recommendations. // Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', 'Category'] with operators // ['eq', 'and', 'or']. // Example: // - $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup' Filter *string // The page-continuation token to use with a paged version of this API. SkipToken *string // The number of recommendations per page if a paged version of this API is being used. Top *int32 }
RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager method.
type RecommendationsClientListResponse ¶
type RecommendationsClientListResponse struct { // The list of Advisor recommendations. ResourceRecommendationBaseListResult }
RecommendationsClientListResponse contains the response from method RecommendationsClient.NewListPager.
type Resource ¶
type Resource struct { // READ-ONLY; The resource ID. ID *string // READ-ONLY; The name of the resource. Name *string // READ-ONLY; The type of the resource. Type *string }
Resource - An Azure resource.
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceMetadata ¶
type ResourceMetadata struct { // The action to view resource. Action map[string]any // The plural user friendly name of resource type. eg: virtual machines Plural *string // Azure resource Id of the assessed resource ResourceID *string // The singular user friendly name of resource type. eg: virtual machine Singular *string // Source from which recommendation is generated Source *string }
ResourceMetadata - Recommendation resource metadata
func (ResourceMetadata) MarshalJSON ¶
func (r ResourceMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceMetadata.
func (*ResourceMetadata) UnmarshalJSON ¶
func (r *ResourceMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetadata.
type ResourceRecommendationBase ¶
type ResourceRecommendationBase struct { // The properties of the recommendation. Properties *RecommendationProperties // READ-ONLY; The resource ID. ID *string // READ-ONLY; The name of the resource. Name *string // READ-ONLY; The type of the resource. Type *string }
ResourceRecommendationBase - Advisor Recommendation.
func (ResourceRecommendationBase) MarshalJSON ¶
func (r ResourceRecommendationBase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceRecommendationBase.
func (*ResourceRecommendationBase) UnmarshalJSON ¶
func (r *ResourceRecommendationBase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRecommendationBase.
type ResourceRecommendationBaseListResult ¶
type ResourceRecommendationBaseListResult struct { // The link used to get the next page of recommendations. NextLink *string // The list of recommendations. Value []*ResourceRecommendationBase }
ResourceRecommendationBaseListResult - The list of Advisor recommendations.
func (ResourceRecommendationBaseListResult) MarshalJSON ¶
func (r ResourceRecommendationBaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceRecommendationBaseListResult.
func (*ResourceRecommendationBaseListResult) UnmarshalJSON ¶
func (r *ResourceRecommendationBaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRecommendationBaseListResult.
type Risk ¶
type Risk string
Risk - The potential risk of not implementing the recommendation.
func PossibleRiskValues ¶
func PossibleRiskValues() []Risk
PossibleRiskValues returns the possible values for the Risk const type.
type Scenario ¶
type Scenario string
const (
ScenarioAlerts Scenario = "Alerts"
)
func PossibleScenarioValues ¶
func PossibleScenarioValues() []Scenario
PossibleScenarioValues returns the possible values for the Scenario const type.
type ShortDescription ¶
type ShortDescription struct { // The issue or opportunity identified by the recommendation. Problem *string // The remediation action suggested by the recommendation. Solution *string }
ShortDescription - A summary of the recommendation.
func (ShortDescription) MarshalJSON ¶
func (s ShortDescription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ShortDescription.
func (*ShortDescription) UnmarshalJSON ¶
func (s *ShortDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ShortDescription.
type SuppressionContract ¶
type SuppressionContract struct { // The properties of the suppression. Properties *SuppressionProperties // READ-ONLY; The resource ID. ID *string // READ-ONLY; The name of the resource. Name *string // READ-ONLY; The type of the resource. Type *string }
SuppressionContract - The details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.
func (SuppressionContract) MarshalJSON ¶
func (s SuppressionContract) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SuppressionContract.
func (*SuppressionContract) UnmarshalJSON ¶
func (s *SuppressionContract) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SuppressionContract.
type SuppressionContractListResult ¶
type SuppressionContractListResult struct { // The link used to get the next page of suppressions. NextLink *string // The list of suppressions. Value []*SuppressionContract }
SuppressionContractListResult - The list of Advisor suppressions.
func (SuppressionContractListResult) MarshalJSON ¶
func (s SuppressionContractListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SuppressionContractListResult.
func (*SuppressionContractListResult) UnmarshalJSON ¶
func (s *SuppressionContractListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SuppressionContractListResult.
type SuppressionProperties ¶
type SuppressionProperties struct { // The GUID of the suppression. SuppressionID *string // The duration for which the suppression is valid. TTL *string // READ-ONLY; Gets or sets the expiration time stamp. ExpirationTimeStamp *time.Time }
SuppressionProperties - The properties of the suppression.
func (SuppressionProperties) MarshalJSON ¶
func (s SuppressionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SuppressionProperties.
func (*SuppressionProperties) UnmarshalJSON ¶
func (s *SuppressionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SuppressionProperties.
type SuppressionsClient ¶
type SuppressionsClient struct {
// contains filtered or unexported fields
}
SuppressionsClient contains the methods for the Suppressions group. Don't use this type directly, use NewSuppressionsClient() instead.
func NewSuppressionsClient ¶
func NewSuppressionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SuppressionsClient, error)
NewSuppressionsClient creates a new instance of SuppressionsClient with the specified values.
- subscriptionID - The Azure subscription ID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SuppressionsClient) Create ¶
func (client *SuppressionsClient) Create(ctx context.Context, resourceURI string, recommendationID string, name string, suppressionContract SuppressionContract, options *SuppressionsClientCreateOptions) (SuppressionsClientCreateResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- 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.
- options - SuppressionsClientCreateOptions contains the optional parameters for the SuppressionsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateSuppression.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSuppressionsClient().Create(ctx, "resourceUri", "recommendationId", "suppressionName1", armadvisor.SuppressionContract{ Properties: &armadvisor.SuppressionProperties{ TTL: to.Ptr("07:00:00:00"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SuppressionContract = armadvisor.SuppressionContract{ // Name: to.Ptr("suppressionName1"), // Type: to.Ptr("Microsoft.Advisor/suppressions"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1"), // Properties: &armadvisor.SuppressionProperties{ // SuppressionID: to.Ptr("suppressionId"), // TTL: to.Ptr("07:00:00:00"), // }, // } }
Output:
func (*SuppressionsClient) Delete ¶
func (client *SuppressionsClient) Delete(ctx context.Context, resourceURI string, recommendationID string, name string, options *SuppressionsClientDeleteOptions) (SuppressionsClientDeleteResponse, 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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- 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.
- options - SuppressionsClientDeleteOptions contains the optional parameters for the SuppressionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/DeleteSuppression.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSuppressionsClient().Delete(ctx, "resourceUri", "recommendationId", "suppressionName1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SuppressionsClient) Get ¶
func (client *SuppressionsClient) Get(ctx context.Context, resourceURI string, recommendationID string, name string, options *SuppressionsClientGetOptions) (SuppressionsClientGetResponse, error)
Get - Obtains the details of a suppression. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-01-01
- 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.
- options - SuppressionsClientGetOptions contains the optional parameters for the SuppressionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/GetSuppressionDetail.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSuppressionsClient().Get(ctx, "resourceUri", "recommendationId", "suppressionName1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SuppressionContract = armadvisor.SuppressionContract{ // Name: to.Ptr("suppressionName1"), // Type: to.Ptr("Microsoft.Advisor/suppressions"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1"), // Properties: &armadvisor.SuppressionProperties{ // ExpirationTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-25T22:24:43.321Z"); return t}()), // SuppressionID: to.Ptr("suppressionId1"), // TTL: to.Ptr("7.00:00:00"), // }, // } }
Output:
func (*SuppressionsClient) NewListPager ¶
func (client *SuppressionsClient) NewListPager(options *SuppressionsClientListOptions) *runtime.Pager[SuppressionsClientListResponse]
NewListPager - 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.
Generated from API version 2020-01-01
- options - SuppressionsClientListOptions contains the optional parameters for the SuppressionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListSuppressions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armadvisor.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSuppressionsClient().NewListPager(&armadvisor.SuppressionsClientListOptions{Top: nil, SkipToken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SuppressionContractListResult = armadvisor.SuppressionContractListResult{ // Value: []*armadvisor.SuppressionContract{ // { // Name: to.Ptr("suppressionName1"), // Type: to.Ptr("Microsoft.Advisor/suppressions"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName1"), // Properties: &armadvisor.SuppressionProperties{ // ExpirationTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-24T22:24:43.321Z"); return t}()), // SuppressionID: to.Ptr("suppressionId1"), // TTL: to.Ptr("7.00:00:00"), // }, // }, // { // Name: to.Ptr("suppressionName2"), // Type: to.Ptr("Microsoft.Advisor/suppressions"), // ID: to.Ptr("/resourceUri/providers/Microsoft.Advisor/recommendations/recommendationId/suppressions/suppressionName2"), // Properties: &armadvisor.SuppressionProperties{ // ExpirationTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-25T22:24:43.321Z"); return t}()), // SuppressionID: to.Ptr("suppressionId2"), // TTL: to.Ptr("7.00:00:00"), // }, // }}, // } } }
Output:
type SuppressionsClientCreateOptions ¶
type SuppressionsClientCreateOptions struct { }
SuppressionsClientCreateOptions contains the optional parameters for the SuppressionsClient.Create method.
type SuppressionsClientCreateResponse ¶
type SuppressionsClientCreateResponse struct { // The details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule. SuppressionContract }
SuppressionsClientCreateResponse contains the response from method SuppressionsClient.Create.
type SuppressionsClientDeleteOptions ¶
type SuppressionsClientDeleteOptions struct { }
SuppressionsClientDeleteOptions contains the optional parameters for the SuppressionsClient.Delete method.
type SuppressionsClientDeleteResponse ¶
type SuppressionsClientDeleteResponse struct { }
SuppressionsClientDeleteResponse contains the response from method SuppressionsClient.Delete.
type SuppressionsClientGetOptions ¶
type SuppressionsClientGetOptions struct { }
SuppressionsClientGetOptions contains the optional parameters for the SuppressionsClient.Get method.
type SuppressionsClientGetResponse ¶
type SuppressionsClientGetResponse struct { // The details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule. SuppressionContract }
SuppressionsClientGetResponse contains the response from method SuppressionsClient.Get.
type SuppressionsClientListOptions ¶
type SuppressionsClientListOptions struct { // The page-continuation token to use with a paged version of this API. SkipToken *string // The number of suppressions per page if a paged version of this API is being used. Top *int32 }
SuppressionsClientListOptions contains the optional parameters for the SuppressionsClient.NewListPager method.
type SuppressionsClientListResponse ¶
type SuppressionsClientListResponse struct { // The list of Advisor suppressions. SuppressionContractListResult }
SuppressionsClientListResponse contains the response from method SuppressionsClient.NewListPager.