1. Packages
  2. AWS Classic
  3. API Docs
  4. redshiftserverless
  5. UsageLimit

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.redshiftserverless.UsageLimit

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

    Creates a new Amazon Redshift Serverless Usage Limit.

    Example Usage

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

    Create UsageLimit Resource

    new UsageLimit(name: string, args: UsageLimitArgs, opts?: CustomResourceOptions);
    @overload
    def UsageLimit(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   amount: Optional[int] = None,
                   breach_action: Optional[str] = None,
                   period: Optional[str] = None,
                   resource_arn: Optional[str] = None,
                   usage_type: Optional[str] = None)
    @overload
    def UsageLimit(resource_name: str,
                   args: UsageLimitArgs,
                   opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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

    Redshift Serverless Usage Limits can be imported using the id, e.g.,

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

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi