awslimitchecker.services.cloudfront module¶
-
class
awslimitchecker.services.cloudfront.
_CloudfrontService
(warning_threshold, critical_threshold, boto_connection_kwargs, quotas_client)[source]¶ Bases:
awslimitchecker.services.base._AwsService
Describes an AWS service and its limits, and provides methods to query current utilization.
Constructors of _AwsService subclasses must not make any external connections; these must be made lazily as needed in other methods. _AwsService subclasses should be usable without any external network connections.
Parameters: - warning_threshold (int) – the default warning threshold, as an integer percentage, for any limits without a specifically-set threshold.
- critical_threshold (int) – the default critical threshold, as an integer percentage, for any limits without a specifically-set threshold.
- boto_connection_kwargs (dict) – Dictionary of keyword arguments to pass to boto connection methods.
- quotas_client (
ServiceQuotasClient
orNone
) – Instance of ServiceQuotasClient
-
__module__
= 'awslimitchecker.services.cloudfront'¶
-
_find_usage_cache_policies
()[source]¶ List CloudFront cache policies from AWS, and update usage in self.limits for the following limits:
- Cache policies per AWS account
- Cookies per cache policy
- Headers per cache policy
- Query strings per cache policy
-
_find_usage_distributions
()[source]¶ List CloudFront distributions by calling AWS list_distributions, and update usage in self.limits for the following limits:
Per-distribution: - Alternate domain names (CNAMEs) per distribution - Cache behaviors per distribution - Origins per distribution - Origin groups per distribution - Key groups associated with a single distribution
Per cache behavior: - Key groups associated with a single cache behavior - Whitelisted cookies per cache behavior - Whitelisted headers per cache behavior - Whitelisted query strings per cache behavior
Global: - Distributions associated with a single key group - Distributions associated with a single cache policy - Distributions associated with a single origin request policy - Distributions per AWS account
-
_find_usage_keygroups
()[source]¶ List CloudFront key groups from AWS, and update usage in self.limits for the following limits: - Key groups per AWS account - Public keys in a single key group
-
_find_usage_origin_access_identities
()[source]¶ List CloudFront origin access identities from AWS, and update usage in self.limits for the limit “Origin access identities per account”.
-
_find_usage_origin_request_policies
()[source]¶ List CloudFront origin request policies from AWS, and update usage in self.limits for the following limits:
- Origin request policies per AWS account
- Cookies per origin request policy
- Headers per origin request policy
- Query strings per origin request policy
-
api_name
= 'cloudfront'¶
-
find_usage
()[source]¶ Determine the current usage for each limit of this service, and update corresponding Limit via
_add_current_usage()
.
-
get_limits
()[source]¶ Return all known limits for this service, as a dict of their names to
AwsLimit
objects.Returns: dict of limit names to AwsLimit
objectsReturn type: dict
-
quotas_service_code
= 'cloudfront'¶
-
required_iam_permissions
()[source]¶ Return a list of IAM Actions required for this Service to function properly. All Actions will be shown with an Effect of “Allow” and a Resource of “*”.
Returns: list of IAM Action strings Return type: list
-
service_name
= 'CloudFront'¶