GetRecommendations

Use this data source to access information about an existing Advisor Recommendations.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Advisor.GetRecommendations.InvokeAsync(new Azure.Advisor.GetRecommendationsArgs
        {
            FilterByCategories = 
            {
                "security",
                "cost",
            },
            FilterByResourceGroups = 
            {
                "example-resgroups",
            },
        }));
        this.Recommendations = example.Apply(example => example.Recommendations);
    }

    [Output("recommendations")]
    public Output<string> Recommendations { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/advisor"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := advisor.GetRecommendations(ctx, &advisor.GetRecommendationsArgs{
            FilterByCategories: []string{
                "security",
                "cost",
            },
            FilterByResourceGroups: []string{
                "example-resgroups",
            },
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("recommendations", example.Recommendations)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.advisor.get_recommendations(filter_by_categories=[
        "security",
        "cost",
    ],
    filter_by_resource_groups=["example-resgroups"])
pulumi.export("recommendations", example.recommendations)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.advisor.getRecommendations({
    filterByCategories: [
        "security",
        "cost",
    ],
    filterByResourceGroups: ["example-resgroups"],
});
export const recommendations = example.then(example => example.recommendations);

Using GetRecommendations

function getRecommendations(args: GetRecommendationsArgs, opts?: InvokeOptions): Promise<GetRecommendationsResult>
function  get_recommendations(filter_by_categories=None, filter_by_resource_groups=None, opts=None)
func GetRecommendations(ctx *Context, args *GetRecommendationsArgs, opts ...InvokeOption) (*GetRecommendationsResult, error)
public static class GetRecommendations {
    public static Task<GetRecommendationsResult> InvokeAsync(GetRecommendationsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

FilterByCategories List<string>

Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are HighAvailability, Security, Performance, Cost and OperationalExcellence.

FilterByResourceGroups List<string>

Specifies a list of resource groups about which the Advisor Recommendations will be listed.

FilterByCategories []string

Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are HighAvailability, Security, Performance, Cost and OperationalExcellence.

FilterByResourceGroups []string

Specifies a list of resource groups about which the Advisor Recommendations will be listed.

filterByCategories string[]

Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are HighAvailability, Security, Performance, Cost and OperationalExcellence.

filterByResourceGroups string[]

Specifies a list of resource groups about which the Advisor Recommendations will be listed.

filter_by_categories List[str]

Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are HighAvailability, Security, Performance, Cost and OperationalExcellence.

filter_by_resource_groups List[str]

Specifies a list of resource groups about which the Advisor Recommendations will be listed.

GetRecommendations Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Recommendations List<GetRecommendationsRecommendation>

One or more recommendations blocks as defined below.

FilterByCategories List<string>
FilterByResourceGroups List<string>
Id string

The provider-assigned unique ID for this managed resource.

Recommendations []GetRecommendationsRecommendation

One or more recommendations blocks as defined below.

FilterByCategories []string
FilterByResourceGroups []string
id string

The provider-assigned unique ID for this managed resource.

recommendations GetRecommendationsRecommendation[]

One or more recommendations blocks as defined below.

filterByCategories string[]
filterByResourceGroups string[]
id str

The provider-assigned unique ID for this managed resource.

recommendations List[GetRecommendationsRecommendation]

One or more recommendations blocks as defined below.

filter_by_categories List[str]
filter_by_resource_groups List[str]

Supporting Types

GetRecommendationsRecommendation

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Category string

The category of the recommendation.

Description string

The description of the issue or the opportunity identified by the recommendation.

Impact string

The business impact of the recommendation.

RecommendationName string

The name of the Advisor Recommendation.

RecommendationTypeId string

The recommendation type id of the Advisor Recommendation.

ResourceName string

The name of the identified resource of the Advisor Recommendation.

ResourceType string

The type of the identified resource of the Advisor Recommendation.

SuppressionNames List<string>

A list of Advisor Suppression names of the Advisor Recommendation.

UpdatedTime string

The most recent time that Advisor checked the validity of the recommendation..

Category string

The category of the recommendation.

Description string

The description of the issue or the opportunity identified by the recommendation.

Impact string

The business impact of the recommendation.

RecommendationName string

The name of the Advisor Recommendation.

RecommendationTypeId string

The recommendation type id of the Advisor Recommendation.

ResourceName string

The name of the identified resource of the Advisor Recommendation.

ResourceType string

The type of the identified resource of the Advisor Recommendation.

SuppressionNames []string

A list of Advisor Suppression names of the Advisor Recommendation.

UpdatedTime string

The most recent time that Advisor checked the validity of the recommendation..

category string

The category of the recommendation.

description string

The description of the issue or the opportunity identified by the recommendation.

impact string

The business impact of the recommendation.

recommendationName string

The name of the Advisor Recommendation.

recommendationTypeId string

The recommendation type id of the Advisor Recommendation.

resourceName string

The name of the identified resource of the Advisor Recommendation.

resourceType string

The type of the identified resource of the Advisor Recommendation.

suppressionNames string[]

A list of Advisor Suppression names of the Advisor Recommendation.

updatedTime string

The most recent time that Advisor checked the validity of the recommendation..

category str

The category of the recommendation.

description str

The description of the issue or the opportunity identified by the recommendation.

impact str

The business impact of the recommendation.

recommendationName str

The name of the Advisor Recommendation.

recommendationTypeId str

The recommendation type id of the Advisor Recommendation.

resourceName str

The name of the identified resource of the Advisor Recommendation.

resourceType str

The type of the identified resource of the Advisor Recommendation.

suppressionNames List[str]

A list of Advisor Suppression names of the Advisor Recommendation.

updatedTime str

The most recent time that Advisor checked the validity of the recommendation..

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.