1. Packages
  2. AWS
  3. API Docs
  4. costoptimizationhub
  5. Preferences
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.costoptimizationhub.Preferences

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Resource for managing AWS Cost Optimization Hub Preferences.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.costoptimizationhub.Preferences("example", {});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.costoptimizationhub.Preferences("example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/costoptimizationhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := costoptimizationhub.NewPreferences(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.CostOptimizationHub.Preferences("example");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.costoptimizationhub.Preferences;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Preferences("example");
    
        }
    }
    
    resources:
      example:
        type: aws:costoptimizationhub:Preferences
    

    Usage with all the arguments

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.costoptimizationhub.Preferences("example", {
        memberAccountDiscountVisibility: "None",
        savingsEstimationMode: "AfterDiscounts",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.costoptimizationhub.Preferences("example",
        member_account_discount_visibility="None",
        savings_estimation_mode="AfterDiscounts")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/costoptimizationhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := costoptimizationhub.NewPreferences(ctx, "example", &costoptimizationhub.PreferencesArgs{
    			MemberAccountDiscountVisibility: pulumi.String("None"),
    			SavingsEstimationMode:           pulumi.String("AfterDiscounts"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.CostOptimizationHub.Preferences("example", new()
        {
            MemberAccountDiscountVisibility = "None",
            SavingsEstimationMode = "AfterDiscounts",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.costoptimizationhub.Preferences;
    import com.pulumi.aws.costoptimizationhub.PreferencesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Preferences("example", PreferencesArgs.builder()
                .memberAccountDiscountVisibility("None")
                .savingsEstimationMode("AfterDiscounts")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:costoptimizationhub:Preferences
        properties:
          memberAccountDiscountVisibility: None
          savingsEstimationMode: AfterDiscounts
    

    Create Preferences Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Preferences(name: string, args?: PreferencesArgs, opts?: CustomResourceOptions);
    @overload
    def Preferences(resource_name: str,
                    args: Optional[PreferencesArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Preferences(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    member_account_discount_visibility: Optional[str] = None,
                    savings_estimation_mode: Optional[str] = None)
    func NewPreferences(ctx *Context, name string, args *PreferencesArgs, opts ...ResourceOption) (*Preferences, error)
    public Preferences(string name, PreferencesArgs? args = null, CustomResourceOptions? opts = null)
    public Preferences(String name, PreferencesArgs args)
    public Preferences(String name, PreferencesArgs args, CustomResourceOptions options)
    
    type: aws:costoptimizationhub:Preferences
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PreferencesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PreferencesArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PreferencesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PreferencesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PreferencesArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var preferencesResource = new Aws.CostOptimizationHub.Preferences("preferencesResource", new()
    {
        MemberAccountDiscountVisibility = "string",
        SavingsEstimationMode = "string",
    });
    
    example, err := costoptimizationhub.NewPreferences(ctx, "preferencesResource", &costoptimizationhub.PreferencesArgs{
    	MemberAccountDiscountVisibility: pulumi.String("string"),
    	SavingsEstimationMode:           pulumi.String("string"),
    })
    
    var preferencesResource = new Preferences("preferencesResource", PreferencesArgs.builder()
        .memberAccountDiscountVisibility("string")
        .savingsEstimationMode("string")
        .build());
    
    preferences_resource = aws.costoptimizationhub.Preferences("preferencesResource",
        member_account_discount_visibility="string",
        savings_estimation_mode="string")
    
    const preferencesResource = new aws.costoptimizationhub.Preferences("preferencesResource", {
        memberAccountDiscountVisibility: "string",
        savingsEstimationMode: "string",
    });
    
    type: aws:costoptimizationhub:Preferences
    properties:
        memberAccountDiscountVisibility: string
        savingsEstimationMode: string
    

    Preferences Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Preferences resource accepts the following input properties:

    MemberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    SavingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    MemberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    SavingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility String
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode String
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    member_account_discount_visibility str
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savings_estimation_mode str
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility String
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode String
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Preferences resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Preferences Resource

    Get an existing Preferences resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PreferencesState, opts?: CustomResourceOptions): Preferences
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            member_account_discount_visibility: Optional[str] = None,
            savings_estimation_mode: Optional[str] = None) -> Preferences
    func GetPreferences(ctx *Context, name string, id IDInput, state *PreferencesState, opts ...ResourceOption) (*Preferences, error)
    public static Preferences Get(string name, Input<string> id, PreferencesState? state, CustomResourceOptions? opts = null)
    public static Preferences get(String name, Output<String> id, PreferencesState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    MemberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    SavingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    MemberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    SavingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility String
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode String
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility string
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode string
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    member_account_discount_visibility str
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savings_estimation_mode str
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.
    memberAccountDiscountVisibility String
    Customize whether the member accounts can see the "After Discounts" savings estimates. Valid values are All and None. Default value is All.
    savingsEstimationMode String
    Customize how estimated monthly savings are calculated. Valid values are BeforeDiscounts and AfterDiscounts. Default value is BeforeDiscounts.

    Import

    Using pulumi import, import Cost Optimization Hub Preferences using the id. For example:

    $ pulumi import aws:costoptimizationhub/preferences:Preferences example 111222333444
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi