create_usage_limit

create_usage_limit(**kwargs)

Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the returned usage limit identifier.

See also: AWS API Documentation

Request Syntax

response = client.create_usage_limit(
    amount=123,
    breachAction='log'|'emit-metric'|'deactivate',
    period='daily'|'weekly'|'monthly',
    resourceArn='string',
    usageType='serverless-compute'|'cross-region-datasharing'
)
Parameters
  • amount (integer) --

    [REQUIRED]

    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.

  • breachAction (string) -- The action that Amazon Redshift Serverless takes when the limit is reached. The default is log.
  • period (string) -- The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.
  • resourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.

  • usageType (string) --

    [REQUIRED]

    The type of Amazon Redshift Serverless usage to create a usage limit for.

Return type

dict

Returns

Response Syntax

{
    'usageLimit': {
        'amount': 123,
        'breachAction': 'log'|'emit-metric'|'deactivate',
        'period': 'daily'|'weekly'|'monthly',
        'resourceArn': 'string',
        'usageLimitArn': 'string',
        'usageLimitId': 'string',
        'usageType': 'serverless-compute'|'cross-region-datasharing'
    }
}

Response Structure

  • (dict) --

    • usageLimit (dict) --

      The returned usage limit object.

      • amount (integer) --

        The limit amount. If time-based, this amount is in RPUs consumed per hour. If data-based, this amount is in terabytes (TB). The value must be a positive number.

      • breachAction (string) --

        The action that Amazon Redshift Serverless takes when the limit is reached.

      • period (string) --

        The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.

      • resourceArn (string) --

        The Amazon Resource Name (ARN) that identifies the Amazon Redshift Serverless resource.

      • usageLimitArn (string) --

        The Amazon Resource Name (ARN) of the resource associated with the usage limit.

      • usageLimitId (string) --

        The identifier of the usage limit.

      • usageType (string) --

        The Amazon Redshift Serverless feature to limit.

Exceptions

  • RedshiftServerless.Client.exceptions.InternalServerException
  • RedshiftServerless.Client.exceptions.ResourceNotFoundException
  • RedshiftServerless.Client.exceptions.ConflictException
  • RedshiftServerless.Client.exceptions.ValidationException
  • RedshiftServerless.Client.exceptions.ServiceQuotaExceededException