aws.redshiftserverless.UsageLimit
Explore with Pulumi AI
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.
- 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
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.