create_usage_limit
¶
create_usage_limit(
*,
config_overrides: Optional[RedshiftClientConfig] = None,
cluster_identifier: Optional[String] = None,
feature_type: Optional[UsageLimitFeatureType] = None,
limit_type: Optional[UsageLimitLimitType] = None,
amount: Optional[Long] = None,
period: Optional[UsageLimitPeriod] = None,
breach_action: Optional[UsageLimitBreachAction] = None,
tags: Optional[TagList] = None,
) -> UsageLimit
Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the returned usage limit identifier.
Parameters:
-
cluster_identifier(Optional[String], default:None) –The identifier of the cluster that you want to limit usage.
-
feature_type(Optional[UsageLimitFeatureType], default:None) –The Amazon Redshift feature that you want to limit.
-
limit_type(Optional[UsageLimitLimitType], default:None) –The type of limit. Depending on the feature type, this can be based on a time duration or data size. If
FeatureTypeisspectrum, thenLimitTypemust bedata-scanned. IfFeatureTypeisconcurrency-scaling, thenLimitTypemust betime. IfFeatureTypeiscross-region-datasharing, thenLimitTypemust bedata-scanned. IfFeatureTypeisextra-compute-for-automatic-optimization, thenLimitTypemust betime. -
amount(Optional[Long], default:None) –The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number.
-
period(Optional[UsageLimitPeriod], default:None) –The time period that the amount applies to. A
weeklyperiod begins on Sunday. The default ismonthly. -
breach_action(Optional[UsageLimitBreachAction], default:None) –The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about this parameter, see UsageLimit.
-
tags(Optional[TagList], default:None) –A list of tag instances.
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
InvalidClusterStateFault–The specified cluster is not in the
availablestate. -
InvalidUsageLimitFault–The usage limit is not valid.
-
LimitExceededFault–The encryption key has exceeded its grant limit in Amazon Web Services KMS.
-
TagLimitExceededFault–You have exceeded the number of tags allowed.
-
UnsupportedOperationFault–The requested operation isn't supported.
-
UsageLimitAlreadyExistsFault–The usage limit already exists.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/redshift.py
2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 | |