1. Packages
  2. AWS
  3. API Docs
  4. redshiftserverless
  5. UsageLimit
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.redshiftserverless.UsageLimit

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Creates a new Amazon Redshift Serverless Usage Limit.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshiftserverless.Workgroup("example", {
        namespaceName: exampleAwsRedshiftserverlessNamespace.namespaceName,
        workgroupName: "example",
    });
    const exampleUsageLimit = new aws.redshiftserverless.UsageLimit("example", {
        resourceArn: example.arn,
        usageType: "serverless-compute",
        amount: 60,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshiftserverless.Workgroup("example",
        namespace_name=example_aws_redshiftserverless_namespace["namespaceName"],
        workgroup_name="example")
    example_usage_limit = aws.redshiftserverless.UsageLimit("example",
        resource_arn=example.arn,
        usage_type="serverless-compute",
        amount=60)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := redshiftserverless.NewWorkgroup(ctx, "example", &redshiftserverless.WorkgroupArgs{
    			NamespaceName: pulumi.Any(exampleAwsRedshiftserverlessNamespace.NamespaceName),
    			WorkgroupName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = redshiftserverless.NewUsageLimit(ctx, "example", &redshiftserverless.UsageLimitArgs{
    			ResourceArn: example.Arn,
    			UsageType:   pulumi.String("serverless-compute"),
    			Amount:      pulumi.Int(60),
    		})
    		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.RedshiftServerless.Workgroup("example", new()
        {
            NamespaceName = exampleAwsRedshiftserverlessNamespace.NamespaceName,
            WorkgroupName = "example",
        });
    
        var exampleUsageLimit = new Aws.RedshiftServerless.UsageLimit("example", new()
        {
            ResourceArn = example.Arn,
            UsageType = "serverless-compute",
            Amount = 60,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshiftserverless.Workgroup;
    import com.pulumi.aws.redshiftserverless.WorkgroupArgs;
    import com.pulumi.aws.redshiftserverless.UsageLimit;
    import com.pulumi.aws.redshiftserverless.UsageLimitArgs;
    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 Workgroup("example", WorkgroupArgs.builder()
                .namespaceName(exampleAwsRedshiftserverlessNamespace.namespaceName())
                .workgroupName("example")
                .build());
    
            var exampleUsageLimit = new UsageLimit("exampleUsageLimit", UsageLimitArgs.builder()
                .resourceArn(example.arn())
                .usageType("serverless-compute")
                .amount(60)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshiftserverless:Workgroup
        properties:
          namespaceName: ${exampleAwsRedshiftserverlessNamespace.namespaceName}
          workgroupName: example
      exampleUsageLimit:
        type: aws:redshiftserverless:UsageLimit
        name: example
        properties:
          resourceArn: ${example.arn}
          usageType: serverless-compute
          amount: 60
    

    Create UsageLimit Resource

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

    Constructor syntax

    new UsageLimit(name: string, args: UsageLimitArgs, opts?: CustomResourceOptions);
    @overload
    def UsageLimit(resource_name: str,
                   args: UsageLimitArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def UsageLimit(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   amount: Optional[int] = None,
                   resource_arn: Optional[str] = None,
                   usage_type: Optional[str] = None,
                   breach_action: Optional[str] = None,
                   period: Optional[str] = None)
    func NewUsageLimit(ctx *Context, name string, args UsageLimitArgs, opts ...ResourceOption) (*UsageLimit, error)
    public UsageLimit(string name, UsageLimitArgs args, CustomResourceOptions? opts = null)
    public UsageLimit(String name, UsageLimitArgs args)
    public UsageLimit(String name, UsageLimitArgs args, CustomResourceOptions options)
    
    type: aws:redshiftserverless:UsageLimit
    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 UsageLimitArgs
    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 UsageLimitArgs
    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 UsageLimitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UsageLimitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UsageLimitArgs
    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 awsUsageLimitResource = new Aws.RedshiftServerless.UsageLimit("awsUsageLimitResource", new()
    {
        Amount = 0,
        ResourceArn = "string",
        UsageType = "string",
        BreachAction = "string",
        Period = "string",
    });
    
    example, err := redshiftserverless.NewUsageLimit(ctx, "awsUsageLimitResource", &redshiftserverless.UsageLimitArgs{
    	Amount:       pulumi.Int(0),
    	ResourceArn:  pulumi.String("string"),
    	UsageType:    pulumi.String("string"),
    	BreachAction: pulumi.String("string"),
    	Period:       pulumi.String("string"),
    })
    
    var awsUsageLimitResource = new UsageLimit("awsUsageLimitResource", UsageLimitArgs.builder()
        .amount(0)
        .resourceArn("string")
        .usageType("string")
        .breachAction("string")
        .period("string")
        .build());
    
    aws_usage_limit_resource = aws.redshiftserverless.UsageLimit("awsUsageLimitResource",
        amount=0,
        resource_arn="string",
        usage_type="string",
        breach_action="string",
        period="string")
    
    const awsUsageLimitResource = new aws.redshiftserverless.UsageLimit("awsUsageLimitResource", {
        amount: 0,
        resourceArn: "string",
        usageType: "string",
        breachAction: "string",
        period: "string",
    });
    
    type: aws:redshiftserverless:UsageLimit
    properties:
        amount: 0
        breachAction: string
        period: string
        resourceArn: string
        usageType: string
    

    UsageLimit Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The UsageLimit resource accepts the following input properties:

    Amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    ResourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    UsageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    BreachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    Period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    Amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    ResourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    UsageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    BreachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    Period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    amount Integer
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    resourceArn String
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType String
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    breachAction String
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period String
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    amount number
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    resourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    breachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    resource_arn str
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usage_type str
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    breach_action str
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period str
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    amount Number
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    resourceArn String
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType String
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    breachAction String
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period String
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.

    Outputs

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

    Arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UsageLimit Resource

    Get an existing UsageLimit 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?: UsageLimitState, opts?: CustomResourceOptions): UsageLimit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            amount: Optional[int] = None,
            arn: Optional[str] = None,
            breach_action: Optional[str] = None,
            period: Optional[str] = None,
            resource_arn: Optional[str] = None,
            usage_type: Optional[str] = None) -> UsageLimit
    func GetUsageLimit(ctx *Context, name string, id IDInput, state *UsageLimitState, opts ...ResourceOption) (*UsageLimit, error)
    public static UsageLimit Get(string name, Input<string> id, UsageLimitState? state, CustomResourceOptions? opts = null)
    public static UsageLimit get(String name, Output<String> id, UsageLimitState 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:
    Amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    Arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    BreachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    Period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    ResourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    UsageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    Amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    Arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    BreachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    Period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    ResourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    UsageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    amount Integer
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    arn String
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    breachAction String
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period String
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    resourceArn String
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType String
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    amount number
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    arn string
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    breachAction string
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period string
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    resourceArn string
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType string
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    amount int
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    arn str
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    breach_action str
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period str
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    resource_arn str
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usage_type str
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.
    amount Number
    The limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
    arn String
    Amazon Resource Name (ARN) of the Redshift Serverless Usage Limit.
    breachAction String
    The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are log, emit-metric, and deactivate. The default is log.
    period String
    The time period that the amount applies to. A weekly period begins on Sunday. Valid values are daily, weekly, and monthly. The default is monthly.
    resourceArn String
    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
    usageType String
    The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are serverless-compute or cross-region-datasharing.

    Import

    Using pulumi import, import Redshift Serverless Usage Limits using the id. For example:

    $ pulumi import aws:redshiftserverless/usageLimit:UsageLimit example example-id
    

    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.60.0 published on Tuesday, Nov 19, 2024 by Pulumi