Try AWS Native preview for resources not in the classic version.
aws.redshiftserverless.UsageLimit
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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.
- Resource
Arn string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- Usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-region-datasharing
.- Breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- Period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
- 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 string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- Usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-region-datasharing
.- Breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- Period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
- 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.
- resource
Arn String The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type String The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-region-datasharing
.- breach
Action String The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period String
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
- 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.
- resource
Arn string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-region-datasharing
.- breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
- 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
orcross-region-datasharing
.- breach_
action str The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period str
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
- 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.
- resource
Arn String The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type String The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-region-datasharing
.- breach
Action String The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period String
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.
Outputs
All input properties are implicitly available as output properties. Additionally, the UsageLimit resource produces the following output properties:
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.
- 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.
- Breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- Period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- Resource
Arn string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- Usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-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.
- Breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- Period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- Resource
Arn string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- Usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-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.
- breach
Action String The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period String
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- resource
Arn String The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type String The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-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.
- breach
Action string The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period string
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- resource
Arn string The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type string The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-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
, anddeactivate
. The default islog
.- period str
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- 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
orcross-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.
- breach
Action String The action that Amazon Redshift Serverless takes when the limit is reached. Valid values are
log
,emit-metric
, anddeactivate
. The default islog
.- period String
The time period that the amount applies to. A weekly period begins on Sunday. Valid values are
daily
,weekly
, andmonthly
. The default ismonthly
.- resource
Arn String The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
- usage
Type String The type of Amazon Redshift Serverless usage to create a usage limit for. Valid values are
serverless-compute
orcross-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.
Try AWS Native preview for resources not in the classic version.