create_usage_limit
async
¶
create_usage_limit(
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = 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/async_redshift.py
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 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 | |