pulumi-vault 7.6.0a1764657486__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_vault/__init__.py +1399 -0
- pulumi_vault/_inputs.py +2701 -0
- pulumi_vault/_utilities.py +331 -0
- pulumi_vault/ad/__init__.py +12 -0
- pulumi_vault/ad/get_access_credentials.py +177 -0
- pulumi_vault/ad/secret_backend.py +1916 -0
- pulumi_vault/ad/secret_library.py +546 -0
- pulumi_vault/ad/secret_role.py +499 -0
- pulumi_vault/alicloud/__init__.py +9 -0
- pulumi_vault/alicloud/auth_backend_role.py +866 -0
- pulumi_vault/approle/__init__.py +12 -0
- pulumi_vault/approle/auth_backend_login.py +571 -0
- pulumi_vault/approle/auth_backend_role.py +1082 -0
- pulumi_vault/approle/auth_backend_role_secret_id.py +796 -0
- pulumi_vault/approle/get_auth_backend_role_id.py +169 -0
- pulumi_vault/audit.py +499 -0
- pulumi_vault/audit_request_header.py +277 -0
- pulumi_vault/auth_backend.py +565 -0
- pulumi_vault/aws/__init__.py +22 -0
- pulumi_vault/aws/auth_backend_cert.py +420 -0
- pulumi_vault/aws/auth_backend_client.py +1259 -0
- pulumi_vault/aws/auth_backend_config_identity.py +494 -0
- pulumi_vault/aws/auth_backend_identity_whitelist.py +380 -0
- pulumi_vault/aws/auth_backend_login.py +1046 -0
- pulumi_vault/aws/auth_backend_role.py +1961 -0
- pulumi_vault/aws/auth_backend_role_tag.py +638 -0
- pulumi_vault/aws/auth_backend_roletag_blacklist.py +366 -0
- pulumi_vault/aws/auth_backend_sts_role.py +414 -0
- pulumi_vault/aws/get_access_credentials.py +369 -0
- pulumi_vault/aws/get_static_access_credentials.py +137 -0
- pulumi_vault/aws/secret_backend.py +2018 -0
- pulumi_vault/aws/secret_backend_role.py +1188 -0
- pulumi_vault/aws/secret_backend_static_role.py +639 -0
- pulumi_vault/azure/__init__.py +15 -0
- pulumi_vault/azure/_inputs.py +108 -0
- pulumi_vault/azure/auth_backend_config.py +1096 -0
- pulumi_vault/azure/auth_backend_role.py +1176 -0
- pulumi_vault/azure/backend.py +1793 -0
- pulumi_vault/azure/backend_role.py +883 -0
- pulumi_vault/azure/get_access_credentials.py +400 -0
- pulumi_vault/azure/outputs.py +107 -0
- pulumi_vault/cert_auth_backend_role.py +1539 -0
- pulumi_vault/config/__init__.py +9 -0
- pulumi_vault/config/__init__.pyi +164 -0
- pulumi_vault/config/_inputs.py +73 -0
- pulumi_vault/config/outputs.py +1225 -0
- pulumi_vault/config/ui_custom_message.py +530 -0
- pulumi_vault/config/vars.py +230 -0
- pulumi_vault/consul/__init__.py +10 -0
- pulumi_vault/consul/secret_backend.py +1517 -0
- pulumi_vault/consul/secret_backend_role.py +847 -0
- pulumi_vault/database/__init__.py +14 -0
- pulumi_vault/database/_inputs.py +11907 -0
- pulumi_vault/database/outputs.py +8496 -0
- pulumi_vault/database/secret_backend_connection.py +1676 -0
- pulumi_vault/database/secret_backend_role.py +840 -0
- pulumi_vault/database/secret_backend_static_role.py +881 -0
- pulumi_vault/database/secrets_mount.py +2160 -0
- pulumi_vault/egp_policy.py +399 -0
- pulumi_vault/gcp/__init__.py +17 -0
- pulumi_vault/gcp/_inputs.py +441 -0
- pulumi_vault/gcp/auth_backend.py +1486 -0
- pulumi_vault/gcp/auth_backend_role.py +1235 -0
- pulumi_vault/gcp/get_auth_backend_role.py +514 -0
- pulumi_vault/gcp/outputs.py +302 -0
- pulumi_vault/gcp/secret_backend.py +1807 -0
- pulumi_vault/gcp/secret_impersonated_account.py +484 -0
- pulumi_vault/gcp/secret_roleset.py +554 -0
- pulumi_vault/gcp/secret_static_account.py +557 -0
- pulumi_vault/generic/__init__.py +11 -0
- pulumi_vault/generic/endpoint.py +786 -0
- pulumi_vault/generic/get_secret.py +306 -0
- pulumi_vault/generic/secret.py +486 -0
- pulumi_vault/get_auth_backend.py +226 -0
- pulumi_vault/get_auth_backends.py +170 -0
- pulumi_vault/get_namespace.py +226 -0
- pulumi_vault/get_namespaces.py +202 -0
- pulumi_vault/get_nomad_access_token.py +210 -0
- pulumi_vault/get_policy_document.py +160 -0
- pulumi_vault/get_raft_autopilot_state.py +267 -0
- pulumi_vault/github/__init__.py +13 -0
- pulumi_vault/github/_inputs.py +225 -0
- pulumi_vault/github/auth_backend.py +1194 -0
- pulumi_vault/github/outputs.py +174 -0
- pulumi_vault/github/team.py +380 -0
- pulumi_vault/github/user.py +380 -0
- pulumi_vault/identity/__init__.py +35 -0
- pulumi_vault/identity/entity.py +447 -0
- pulumi_vault/identity/entity_alias.py +398 -0
- pulumi_vault/identity/entity_policies.py +455 -0
- pulumi_vault/identity/get_entity.py +384 -0
- pulumi_vault/identity/get_group.py +467 -0
- pulumi_vault/identity/get_oidc_client_creds.py +175 -0
- pulumi_vault/identity/get_oidc_openid_config.py +334 -0
- pulumi_vault/identity/get_oidc_public_keys.py +179 -0
- pulumi_vault/identity/group.py +805 -0
- pulumi_vault/identity/group_alias.py +386 -0
- pulumi_vault/identity/group_member_entity_ids.py +444 -0
- pulumi_vault/identity/group_member_group_ids.py +467 -0
- pulumi_vault/identity/group_policies.py +471 -0
- pulumi_vault/identity/mfa_duo.py +674 -0
- pulumi_vault/identity/mfa_login_enforcement.py +566 -0
- pulumi_vault/identity/mfa_okta.py +626 -0
- pulumi_vault/identity/mfa_pingid.py +616 -0
- pulumi_vault/identity/mfa_totp.py +758 -0
- pulumi_vault/identity/oidc.py +268 -0
- pulumi_vault/identity/oidc_assignment.py +375 -0
- pulumi_vault/identity/oidc_client.py +667 -0
- pulumi_vault/identity/oidc_key.py +474 -0
- pulumi_vault/identity/oidc_key_allowed_client_id.py +298 -0
- pulumi_vault/identity/oidc_provider.py +550 -0
- pulumi_vault/identity/oidc_role.py +543 -0
- pulumi_vault/identity/oidc_scope.py +355 -0
- pulumi_vault/identity/outputs.py +137 -0
- pulumi_vault/jwt/__init__.py +12 -0
- pulumi_vault/jwt/_inputs.py +225 -0
- pulumi_vault/jwt/auth_backend.py +1347 -0
- pulumi_vault/jwt/auth_backend_role.py +1847 -0
- pulumi_vault/jwt/outputs.py +174 -0
- pulumi_vault/kmip/__init__.py +11 -0
- pulumi_vault/kmip/secret_backend.py +1591 -0
- pulumi_vault/kmip/secret_role.py +1194 -0
- pulumi_vault/kmip/secret_scope.py +372 -0
- pulumi_vault/kubernetes/__init__.py +15 -0
- pulumi_vault/kubernetes/auth_backend_config.py +654 -0
- pulumi_vault/kubernetes/auth_backend_role.py +1031 -0
- pulumi_vault/kubernetes/get_auth_backend_config.py +280 -0
- pulumi_vault/kubernetes/get_auth_backend_role.py +470 -0
- pulumi_vault/kubernetes/get_service_account_token.py +344 -0
- pulumi_vault/kubernetes/secret_backend.py +1341 -0
- pulumi_vault/kubernetes/secret_backend_role.py +1140 -0
- pulumi_vault/kv/__init__.py +18 -0
- pulumi_vault/kv/_inputs.py +124 -0
- pulumi_vault/kv/get_secret.py +240 -0
- pulumi_vault/kv/get_secret_subkeys_v2.py +275 -0
- pulumi_vault/kv/get_secret_v2.py +315 -0
- pulumi_vault/kv/get_secrets_list.py +186 -0
- pulumi_vault/kv/get_secrets_list_v2.py +243 -0
- pulumi_vault/kv/outputs.py +102 -0
- pulumi_vault/kv/secret.py +397 -0
- pulumi_vault/kv/secret_backend_v2.py +455 -0
- pulumi_vault/kv/secret_v2.py +970 -0
- pulumi_vault/ldap/__init__.py +19 -0
- pulumi_vault/ldap/_inputs.py +225 -0
- pulumi_vault/ldap/auth_backend.py +2520 -0
- pulumi_vault/ldap/auth_backend_group.py +386 -0
- pulumi_vault/ldap/auth_backend_user.py +439 -0
- pulumi_vault/ldap/get_dynamic_credentials.py +181 -0
- pulumi_vault/ldap/get_static_credentials.py +192 -0
- pulumi_vault/ldap/outputs.py +174 -0
- pulumi_vault/ldap/secret_backend.py +2207 -0
- pulumi_vault/ldap/secret_backend_dynamic_role.py +767 -0
- pulumi_vault/ldap/secret_backend_library_set.py +552 -0
- pulumi_vault/ldap/secret_backend_static_role.py +541 -0
- pulumi_vault/managed/__init__.py +11 -0
- pulumi_vault/managed/_inputs.py +944 -0
- pulumi_vault/managed/keys.py +398 -0
- pulumi_vault/managed/outputs.py +667 -0
- pulumi_vault/mfa_duo.py +589 -0
- pulumi_vault/mfa_okta.py +623 -0
- pulumi_vault/mfa_pingid.py +670 -0
- pulumi_vault/mfa_totp.py +620 -0
- pulumi_vault/mongodbatlas/__init__.py +10 -0
- pulumi_vault/mongodbatlas/secret_backend.py +388 -0
- pulumi_vault/mongodbatlas/secret_role.py +726 -0
- pulumi_vault/mount.py +1262 -0
- pulumi_vault/namespace.py +452 -0
- pulumi_vault/nomad_secret_backend.py +1559 -0
- pulumi_vault/nomad_secret_role.py +489 -0
- pulumi_vault/oci_auth_backend.py +676 -0
- pulumi_vault/oci_auth_backend_role.py +852 -0
- pulumi_vault/okta/__init__.py +13 -0
- pulumi_vault/okta/_inputs.py +320 -0
- pulumi_vault/okta/auth_backend.py +1231 -0
- pulumi_vault/okta/auth_backend_group.py +369 -0
- pulumi_vault/okta/auth_backend_user.py +416 -0
- pulumi_vault/okta/outputs.py +244 -0
- pulumi_vault/outputs.py +502 -0
- pulumi_vault/pkisecret/__init__.py +38 -0
- pulumi_vault/pkisecret/_inputs.py +270 -0
- pulumi_vault/pkisecret/backend_acme_eab.py +550 -0
- pulumi_vault/pkisecret/backend_config_acme.py +690 -0
- pulumi_vault/pkisecret/backend_config_auto_tidy.py +1370 -0
- pulumi_vault/pkisecret/backend_config_cluster.py +370 -0
- pulumi_vault/pkisecret/backend_config_cmpv2.py +693 -0
- pulumi_vault/pkisecret/backend_config_est.py +756 -0
- pulumi_vault/pkisecret/backend_config_scep.py +738 -0
- pulumi_vault/pkisecret/get_backend_cert_metadata.py +277 -0
- pulumi_vault/pkisecret/get_backend_config_cmpv2.py +226 -0
- pulumi_vault/pkisecret/get_backend_config_est.py +251 -0
- pulumi_vault/pkisecret/get_backend_config_scep.py +271 -0
- pulumi_vault/pkisecret/get_backend_issuer.py +395 -0
- pulumi_vault/pkisecret/get_backend_issuers.py +192 -0
- pulumi_vault/pkisecret/get_backend_key.py +211 -0
- pulumi_vault/pkisecret/get_backend_keys.py +192 -0
- pulumi_vault/pkisecret/outputs.py +270 -0
- pulumi_vault/pkisecret/secret_backend_cert.py +1315 -0
- pulumi_vault/pkisecret/secret_backend_config_ca.py +386 -0
- pulumi_vault/pkisecret/secret_backend_config_issuers.py +392 -0
- pulumi_vault/pkisecret/secret_backend_config_urls.py +462 -0
- pulumi_vault/pkisecret/secret_backend_crl_config.py +846 -0
- pulumi_vault/pkisecret/secret_backend_intermediate_cert_request.py +1629 -0
- pulumi_vault/pkisecret/secret_backend_intermediate_set_signed.py +444 -0
- pulumi_vault/pkisecret/secret_backend_issuer.py +1089 -0
- pulumi_vault/pkisecret/secret_backend_key.py +613 -0
- pulumi_vault/pkisecret/secret_backend_role.py +2694 -0
- pulumi_vault/pkisecret/secret_backend_root_cert.py +2134 -0
- pulumi_vault/pkisecret/secret_backend_root_sign_intermediate.py +2031 -0
- pulumi_vault/pkisecret/secret_backend_sign.py +1194 -0
- pulumi_vault/plugin.py +596 -0
- pulumi_vault/plugin_pinned_version.py +299 -0
- pulumi_vault/policy.py +279 -0
- pulumi_vault/provider.py +781 -0
- pulumi_vault/pulumi-plugin.json +5 -0
- pulumi_vault/py.typed +0 -0
- pulumi_vault/quota_lease_count.py +504 -0
- pulumi_vault/quota_rate_limit.py +751 -0
- pulumi_vault/rabbitmq/__init__.py +12 -0
- pulumi_vault/rabbitmq/_inputs.py +235 -0
- pulumi_vault/rabbitmq/outputs.py +144 -0
- pulumi_vault/rabbitmq/secret_backend.py +1437 -0
- pulumi_vault/rabbitmq/secret_backend_role.py +496 -0
- pulumi_vault/raft_autopilot.py +609 -0
- pulumi_vault/raft_snapshot_agent_config.py +1591 -0
- pulumi_vault/rgp_policy.py +349 -0
- pulumi_vault/saml/__init__.py +12 -0
- pulumi_vault/saml/_inputs.py +225 -0
- pulumi_vault/saml/auth_backend.py +811 -0
- pulumi_vault/saml/auth_backend_role.py +1068 -0
- pulumi_vault/saml/outputs.py +174 -0
- pulumi_vault/scep_auth_backend_role.py +908 -0
- pulumi_vault/secrets/__init__.py +18 -0
- pulumi_vault/secrets/_inputs.py +110 -0
- pulumi_vault/secrets/outputs.py +94 -0
- pulumi_vault/secrets/sync_association.py +450 -0
- pulumi_vault/secrets/sync_aws_destination.py +780 -0
- pulumi_vault/secrets/sync_azure_destination.py +736 -0
- pulumi_vault/secrets/sync_config.py +303 -0
- pulumi_vault/secrets/sync_gcp_destination.py +572 -0
- pulumi_vault/secrets/sync_gh_destination.py +688 -0
- pulumi_vault/secrets/sync_github_apps.py +376 -0
- pulumi_vault/secrets/sync_vercel_destination.py +603 -0
- pulumi_vault/ssh/__init__.py +13 -0
- pulumi_vault/ssh/_inputs.py +76 -0
- pulumi_vault/ssh/get_secret_backend_sign.py +294 -0
- pulumi_vault/ssh/outputs.py +51 -0
- pulumi_vault/ssh/secret_backend_ca.py +588 -0
- pulumi_vault/ssh/secret_backend_role.py +1493 -0
- pulumi_vault/terraformcloud/__init__.py +11 -0
- pulumi_vault/terraformcloud/secret_backend.py +1321 -0
- pulumi_vault/terraformcloud/secret_creds.py +445 -0
- pulumi_vault/terraformcloud/secret_role.py +563 -0
- pulumi_vault/token.py +1026 -0
- pulumi_vault/tokenauth/__init__.py +9 -0
- pulumi_vault/tokenauth/auth_backend_role.py +1135 -0
- pulumi_vault/transform/__init__.py +14 -0
- pulumi_vault/transform/alphabet.py +348 -0
- pulumi_vault/transform/get_decode.py +287 -0
- pulumi_vault/transform/get_encode.py +291 -0
- pulumi_vault/transform/role.py +350 -0
- pulumi_vault/transform/template.py +592 -0
- pulumi_vault/transform/transformation.py +608 -0
- pulumi_vault/transit/__init__.py +15 -0
- pulumi_vault/transit/get_cmac.py +256 -0
- pulumi_vault/transit/get_decrypt.py +181 -0
- pulumi_vault/transit/get_encrypt.py +174 -0
- pulumi_vault/transit/get_sign.py +328 -0
- pulumi_vault/transit/get_verify.py +373 -0
- pulumi_vault/transit/secret_backend_key.py +1202 -0
- pulumi_vault/transit/secret_cache_config.py +302 -0
- pulumi_vault-7.6.0a1764657486.dist-info/METADATA +92 -0
- pulumi_vault-7.6.0a1764657486.dist-info/RECORD +274 -0
- pulumi_vault-7.6.0a1764657486.dist-info/WHEEL +5 -0
- pulumi_vault-7.6.0a1764657486.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['QuotaRateLimitArgs', 'QuotaRateLimit']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class QuotaRateLimitArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
rate: pulumi.Input[_builtins.float],
|
|
23
|
+
block_interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
24
|
+
group_by: Optional[pulumi.Input[_builtins.str]] = None,
|
|
25
|
+
inheritable: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
26
|
+
interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
27
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
28
|
+
namespace: Optional[pulumi.Input[_builtins.str]] = None,
|
|
29
|
+
path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
30
|
+
role: Optional[pulumi.Input[_builtins.str]] = None,
|
|
31
|
+
secondary_rate: Optional[pulumi.Input[_builtins.float]] = None):
|
|
32
|
+
"""
|
|
33
|
+
The set of arguments for constructing a QuotaRateLimit resource.
|
|
34
|
+
:param pulumi.Input[_builtins.float] rate: The maximum number of requests at any given second to be allowed by the quota
|
|
35
|
+
rule. The `rate` must be positive.
|
|
36
|
+
:param pulumi.Input[_builtins.int] block_interval: If set, when a client reaches a rate limit threshold, the client will
|
|
37
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
38
|
+
:param pulumi.Input[_builtins.str] group_by: Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
39
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
40
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
41
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
42
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
43
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
44
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
45
|
+
:param pulumi.Input[_builtins.bool] inheritable: If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
46
|
+
:param pulumi.Input[_builtins.int] interval: The duration in seconds to enforce rate limiting for.
|
|
47
|
+
:param pulumi.Input[_builtins.str] name: Name of the rate limit quota
|
|
48
|
+
:param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
|
|
49
|
+
The value should not contain leading or trailing forward slashes.
|
|
50
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
51
|
+
*Available only for Vault Enterprise*.
|
|
52
|
+
:param pulumi.Input[_builtins.str] path: Path of the mount or namespace to apply the quota. A blank path configures a
|
|
53
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
54
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
55
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
56
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
57
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
58
|
+
:param pulumi.Input[_builtins.str] role: If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
59
|
+
:param pulumi.Input[_builtins.float] secondary_rate: Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
60
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
61
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
62
|
+
"""
|
|
63
|
+
pulumi.set(__self__, "rate", rate)
|
|
64
|
+
if block_interval is not None:
|
|
65
|
+
pulumi.set(__self__, "block_interval", block_interval)
|
|
66
|
+
if group_by is not None:
|
|
67
|
+
pulumi.set(__self__, "group_by", group_by)
|
|
68
|
+
if inheritable is not None:
|
|
69
|
+
pulumi.set(__self__, "inheritable", inheritable)
|
|
70
|
+
if interval is not None:
|
|
71
|
+
pulumi.set(__self__, "interval", interval)
|
|
72
|
+
if name is not None:
|
|
73
|
+
pulumi.set(__self__, "name", name)
|
|
74
|
+
if namespace is not None:
|
|
75
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
76
|
+
if path is not None:
|
|
77
|
+
pulumi.set(__self__, "path", path)
|
|
78
|
+
if role is not None:
|
|
79
|
+
pulumi.set(__self__, "role", role)
|
|
80
|
+
if secondary_rate is not None:
|
|
81
|
+
pulumi.set(__self__, "secondary_rate", secondary_rate)
|
|
82
|
+
|
|
83
|
+
@_builtins.property
|
|
84
|
+
@pulumi.getter
|
|
85
|
+
def rate(self) -> pulumi.Input[_builtins.float]:
|
|
86
|
+
"""
|
|
87
|
+
The maximum number of requests at any given second to be allowed by the quota
|
|
88
|
+
rule. The `rate` must be positive.
|
|
89
|
+
"""
|
|
90
|
+
return pulumi.get(self, "rate")
|
|
91
|
+
|
|
92
|
+
@rate.setter
|
|
93
|
+
def rate(self, value: pulumi.Input[_builtins.float]):
|
|
94
|
+
pulumi.set(self, "rate", value)
|
|
95
|
+
|
|
96
|
+
@_builtins.property
|
|
97
|
+
@pulumi.getter(name="blockInterval")
|
|
98
|
+
def block_interval(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
99
|
+
"""
|
|
100
|
+
If set, when a client reaches a rate limit threshold, the client will
|
|
101
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
102
|
+
"""
|
|
103
|
+
return pulumi.get(self, "block_interval")
|
|
104
|
+
|
|
105
|
+
@block_interval.setter
|
|
106
|
+
def block_interval(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
107
|
+
pulumi.set(self, "block_interval", value)
|
|
108
|
+
|
|
109
|
+
@_builtins.property
|
|
110
|
+
@pulumi.getter(name="groupBy")
|
|
111
|
+
def group_by(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
112
|
+
"""
|
|
113
|
+
Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
114
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
115
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
116
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
117
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
118
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
119
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
120
|
+
"""
|
|
121
|
+
return pulumi.get(self, "group_by")
|
|
122
|
+
|
|
123
|
+
@group_by.setter
|
|
124
|
+
def group_by(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
125
|
+
pulumi.set(self, "group_by", value)
|
|
126
|
+
|
|
127
|
+
@_builtins.property
|
|
128
|
+
@pulumi.getter
|
|
129
|
+
def inheritable(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
130
|
+
"""
|
|
131
|
+
If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
132
|
+
"""
|
|
133
|
+
return pulumi.get(self, "inheritable")
|
|
134
|
+
|
|
135
|
+
@inheritable.setter
|
|
136
|
+
def inheritable(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
137
|
+
pulumi.set(self, "inheritable", value)
|
|
138
|
+
|
|
139
|
+
@_builtins.property
|
|
140
|
+
@pulumi.getter
|
|
141
|
+
def interval(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
142
|
+
"""
|
|
143
|
+
The duration in seconds to enforce rate limiting for.
|
|
144
|
+
"""
|
|
145
|
+
return pulumi.get(self, "interval")
|
|
146
|
+
|
|
147
|
+
@interval.setter
|
|
148
|
+
def interval(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
149
|
+
pulumi.set(self, "interval", value)
|
|
150
|
+
|
|
151
|
+
@_builtins.property
|
|
152
|
+
@pulumi.getter
|
|
153
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
154
|
+
"""
|
|
155
|
+
Name of the rate limit quota
|
|
156
|
+
"""
|
|
157
|
+
return pulumi.get(self, "name")
|
|
158
|
+
|
|
159
|
+
@name.setter
|
|
160
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
161
|
+
pulumi.set(self, "name", value)
|
|
162
|
+
|
|
163
|
+
@_builtins.property
|
|
164
|
+
@pulumi.getter
|
|
165
|
+
def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
166
|
+
"""
|
|
167
|
+
The namespace to provision the resource in.
|
|
168
|
+
The value should not contain leading or trailing forward slashes.
|
|
169
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
170
|
+
*Available only for Vault Enterprise*.
|
|
171
|
+
"""
|
|
172
|
+
return pulumi.get(self, "namespace")
|
|
173
|
+
|
|
174
|
+
@namespace.setter
|
|
175
|
+
def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
176
|
+
pulumi.set(self, "namespace", value)
|
|
177
|
+
|
|
178
|
+
@_builtins.property
|
|
179
|
+
@pulumi.getter
|
|
180
|
+
def path(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
181
|
+
"""
|
|
182
|
+
Path of the mount or namespace to apply the quota. A blank path configures a
|
|
183
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
184
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
185
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
186
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
187
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
188
|
+
"""
|
|
189
|
+
return pulumi.get(self, "path")
|
|
190
|
+
|
|
191
|
+
@path.setter
|
|
192
|
+
def path(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
193
|
+
pulumi.set(self, "path", value)
|
|
194
|
+
|
|
195
|
+
@_builtins.property
|
|
196
|
+
@pulumi.getter
|
|
197
|
+
def role(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
198
|
+
"""
|
|
199
|
+
If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
200
|
+
"""
|
|
201
|
+
return pulumi.get(self, "role")
|
|
202
|
+
|
|
203
|
+
@role.setter
|
|
204
|
+
def role(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
205
|
+
pulumi.set(self, "role", value)
|
|
206
|
+
|
|
207
|
+
@_builtins.property
|
|
208
|
+
@pulumi.getter(name="secondaryRate")
|
|
209
|
+
def secondary_rate(self) -> Optional[pulumi.Input[_builtins.float]]:
|
|
210
|
+
"""
|
|
211
|
+
Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
212
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
213
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
214
|
+
"""
|
|
215
|
+
return pulumi.get(self, "secondary_rate")
|
|
216
|
+
|
|
217
|
+
@secondary_rate.setter
|
|
218
|
+
def secondary_rate(self, value: Optional[pulumi.Input[_builtins.float]]):
|
|
219
|
+
pulumi.set(self, "secondary_rate", value)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@pulumi.input_type
|
|
223
|
+
class _QuotaRateLimitState:
|
|
224
|
+
def __init__(__self__, *,
|
|
225
|
+
block_interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
226
|
+
group_by: Optional[pulumi.Input[_builtins.str]] = None,
|
|
227
|
+
inheritable: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
228
|
+
interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
229
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
230
|
+
namespace: Optional[pulumi.Input[_builtins.str]] = None,
|
|
231
|
+
path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
232
|
+
rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
233
|
+
role: Optional[pulumi.Input[_builtins.str]] = None,
|
|
234
|
+
secondary_rate: Optional[pulumi.Input[_builtins.float]] = None):
|
|
235
|
+
"""
|
|
236
|
+
Input properties used for looking up and filtering QuotaRateLimit resources.
|
|
237
|
+
:param pulumi.Input[_builtins.int] block_interval: If set, when a client reaches a rate limit threshold, the client will
|
|
238
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
239
|
+
:param pulumi.Input[_builtins.str] group_by: Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
240
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
241
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
242
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
243
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
244
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
245
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
246
|
+
:param pulumi.Input[_builtins.bool] inheritable: If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
247
|
+
:param pulumi.Input[_builtins.int] interval: The duration in seconds to enforce rate limiting for.
|
|
248
|
+
:param pulumi.Input[_builtins.str] name: Name of the rate limit quota
|
|
249
|
+
:param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
|
|
250
|
+
The value should not contain leading or trailing forward slashes.
|
|
251
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
252
|
+
*Available only for Vault Enterprise*.
|
|
253
|
+
:param pulumi.Input[_builtins.str] path: Path of the mount or namespace to apply the quota. A blank path configures a
|
|
254
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
255
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
256
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
257
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
258
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
259
|
+
:param pulumi.Input[_builtins.float] rate: The maximum number of requests at any given second to be allowed by the quota
|
|
260
|
+
rule. The `rate` must be positive.
|
|
261
|
+
:param pulumi.Input[_builtins.str] role: If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
262
|
+
:param pulumi.Input[_builtins.float] secondary_rate: Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
263
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
264
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
265
|
+
"""
|
|
266
|
+
if block_interval is not None:
|
|
267
|
+
pulumi.set(__self__, "block_interval", block_interval)
|
|
268
|
+
if group_by is not None:
|
|
269
|
+
pulumi.set(__self__, "group_by", group_by)
|
|
270
|
+
if inheritable is not None:
|
|
271
|
+
pulumi.set(__self__, "inheritable", inheritable)
|
|
272
|
+
if interval is not None:
|
|
273
|
+
pulumi.set(__self__, "interval", interval)
|
|
274
|
+
if name is not None:
|
|
275
|
+
pulumi.set(__self__, "name", name)
|
|
276
|
+
if namespace is not None:
|
|
277
|
+
pulumi.set(__self__, "namespace", namespace)
|
|
278
|
+
if path is not None:
|
|
279
|
+
pulumi.set(__self__, "path", path)
|
|
280
|
+
if rate is not None:
|
|
281
|
+
pulumi.set(__self__, "rate", rate)
|
|
282
|
+
if role is not None:
|
|
283
|
+
pulumi.set(__self__, "role", role)
|
|
284
|
+
if secondary_rate is not None:
|
|
285
|
+
pulumi.set(__self__, "secondary_rate", secondary_rate)
|
|
286
|
+
|
|
287
|
+
@_builtins.property
|
|
288
|
+
@pulumi.getter(name="blockInterval")
|
|
289
|
+
def block_interval(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
290
|
+
"""
|
|
291
|
+
If set, when a client reaches a rate limit threshold, the client will
|
|
292
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
293
|
+
"""
|
|
294
|
+
return pulumi.get(self, "block_interval")
|
|
295
|
+
|
|
296
|
+
@block_interval.setter
|
|
297
|
+
def block_interval(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
298
|
+
pulumi.set(self, "block_interval", value)
|
|
299
|
+
|
|
300
|
+
@_builtins.property
|
|
301
|
+
@pulumi.getter(name="groupBy")
|
|
302
|
+
def group_by(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
303
|
+
"""
|
|
304
|
+
Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
305
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
306
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
307
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
308
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
309
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
310
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
311
|
+
"""
|
|
312
|
+
return pulumi.get(self, "group_by")
|
|
313
|
+
|
|
314
|
+
@group_by.setter
|
|
315
|
+
def group_by(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
316
|
+
pulumi.set(self, "group_by", value)
|
|
317
|
+
|
|
318
|
+
@_builtins.property
|
|
319
|
+
@pulumi.getter
|
|
320
|
+
def inheritable(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
321
|
+
"""
|
|
322
|
+
If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
323
|
+
"""
|
|
324
|
+
return pulumi.get(self, "inheritable")
|
|
325
|
+
|
|
326
|
+
@inheritable.setter
|
|
327
|
+
def inheritable(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
328
|
+
pulumi.set(self, "inheritable", value)
|
|
329
|
+
|
|
330
|
+
@_builtins.property
|
|
331
|
+
@pulumi.getter
|
|
332
|
+
def interval(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
333
|
+
"""
|
|
334
|
+
The duration in seconds to enforce rate limiting for.
|
|
335
|
+
"""
|
|
336
|
+
return pulumi.get(self, "interval")
|
|
337
|
+
|
|
338
|
+
@interval.setter
|
|
339
|
+
def interval(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
340
|
+
pulumi.set(self, "interval", value)
|
|
341
|
+
|
|
342
|
+
@_builtins.property
|
|
343
|
+
@pulumi.getter
|
|
344
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
345
|
+
"""
|
|
346
|
+
Name of the rate limit quota
|
|
347
|
+
"""
|
|
348
|
+
return pulumi.get(self, "name")
|
|
349
|
+
|
|
350
|
+
@name.setter
|
|
351
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
352
|
+
pulumi.set(self, "name", value)
|
|
353
|
+
|
|
354
|
+
@_builtins.property
|
|
355
|
+
@pulumi.getter
|
|
356
|
+
def namespace(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
357
|
+
"""
|
|
358
|
+
The namespace to provision the resource in.
|
|
359
|
+
The value should not contain leading or trailing forward slashes.
|
|
360
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
361
|
+
*Available only for Vault Enterprise*.
|
|
362
|
+
"""
|
|
363
|
+
return pulumi.get(self, "namespace")
|
|
364
|
+
|
|
365
|
+
@namespace.setter
|
|
366
|
+
def namespace(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
367
|
+
pulumi.set(self, "namespace", value)
|
|
368
|
+
|
|
369
|
+
@_builtins.property
|
|
370
|
+
@pulumi.getter
|
|
371
|
+
def path(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
372
|
+
"""
|
|
373
|
+
Path of the mount or namespace to apply the quota. A blank path configures a
|
|
374
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
375
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
376
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
377
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
378
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
379
|
+
"""
|
|
380
|
+
return pulumi.get(self, "path")
|
|
381
|
+
|
|
382
|
+
@path.setter
|
|
383
|
+
def path(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
384
|
+
pulumi.set(self, "path", value)
|
|
385
|
+
|
|
386
|
+
@_builtins.property
|
|
387
|
+
@pulumi.getter
|
|
388
|
+
def rate(self) -> Optional[pulumi.Input[_builtins.float]]:
|
|
389
|
+
"""
|
|
390
|
+
The maximum number of requests at any given second to be allowed by the quota
|
|
391
|
+
rule. The `rate` must be positive.
|
|
392
|
+
"""
|
|
393
|
+
return pulumi.get(self, "rate")
|
|
394
|
+
|
|
395
|
+
@rate.setter
|
|
396
|
+
def rate(self, value: Optional[pulumi.Input[_builtins.float]]):
|
|
397
|
+
pulumi.set(self, "rate", value)
|
|
398
|
+
|
|
399
|
+
@_builtins.property
|
|
400
|
+
@pulumi.getter
|
|
401
|
+
def role(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
402
|
+
"""
|
|
403
|
+
If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
404
|
+
"""
|
|
405
|
+
return pulumi.get(self, "role")
|
|
406
|
+
|
|
407
|
+
@role.setter
|
|
408
|
+
def role(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
409
|
+
pulumi.set(self, "role", value)
|
|
410
|
+
|
|
411
|
+
@_builtins.property
|
|
412
|
+
@pulumi.getter(name="secondaryRate")
|
|
413
|
+
def secondary_rate(self) -> Optional[pulumi.Input[_builtins.float]]:
|
|
414
|
+
"""
|
|
415
|
+
Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
416
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
417
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
418
|
+
"""
|
|
419
|
+
return pulumi.get(self, "secondary_rate")
|
|
420
|
+
|
|
421
|
+
@secondary_rate.setter
|
|
422
|
+
def secondary_rate(self, value: Optional[pulumi.Input[_builtins.float]]):
|
|
423
|
+
pulumi.set(self, "secondary_rate", value)
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
@pulumi.type_token("vault:index/quotaRateLimit:QuotaRateLimit")
|
|
427
|
+
class QuotaRateLimit(pulumi.CustomResource):
|
|
428
|
+
@overload
|
|
429
|
+
def __init__(__self__,
|
|
430
|
+
resource_name: str,
|
|
431
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
432
|
+
block_interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
433
|
+
group_by: Optional[pulumi.Input[_builtins.str]] = None,
|
|
434
|
+
inheritable: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
435
|
+
interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
436
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
437
|
+
namespace: Optional[pulumi.Input[_builtins.str]] = None,
|
|
438
|
+
path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
439
|
+
rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
440
|
+
role: Optional[pulumi.Input[_builtins.str]] = None,
|
|
441
|
+
secondary_rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
442
|
+
__props__=None):
|
|
443
|
+
"""
|
|
444
|
+
Manage rate limit quotas which enforce API rate limiting using a token bucket algorithm.
|
|
445
|
+
A rate limit quota can be created at the root level or defined on a namespace or mount by
|
|
446
|
+
specifying a path when creating the quota.
|
|
447
|
+
|
|
448
|
+
See [Vault's Documentation](https://www.vaultproject.io/docs/concepts/resource-quotas) for more
|
|
449
|
+
information.
|
|
450
|
+
|
|
451
|
+
## Example Usage
|
|
452
|
+
|
|
453
|
+
```python
|
|
454
|
+
import pulumi
|
|
455
|
+
import pulumi_vault as vault
|
|
456
|
+
|
|
457
|
+
global_ = vault.QuotaRateLimit("global",
|
|
458
|
+
name="global",
|
|
459
|
+
path="",
|
|
460
|
+
rate=100)
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
## Import
|
|
464
|
+
|
|
465
|
+
Rate limit quotas can be imported using their names
|
|
466
|
+
|
|
467
|
+
```sh
|
|
468
|
+
$ pulumi import vault:index/quotaRateLimit:QuotaRateLimit global global
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
:param str resource_name: The name of the resource.
|
|
472
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
473
|
+
:param pulumi.Input[_builtins.int] block_interval: If set, when a client reaches a rate limit threshold, the client will
|
|
474
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
475
|
+
:param pulumi.Input[_builtins.str] group_by: Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
476
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
477
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
478
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
479
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
480
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
481
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
482
|
+
:param pulumi.Input[_builtins.bool] inheritable: If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
483
|
+
:param pulumi.Input[_builtins.int] interval: The duration in seconds to enforce rate limiting for.
|
|
484
|
+
:param pulumi.Input[_builtins.str] name: Name of the rate limit quota
|
|
485
|
+
:param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
|
|
486
|
+
The value should not contain leading or trailing forward slashes.
|
|
487
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
488
|
+
*Available only for Vault Enterprise*.
|
|
489
|
+
:param pulumi.Input[_builtins.str] path: Path of the mount or namespace to apply the quota. A blank path configures a
|
|
490
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
491
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
492
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
493
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
494
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
495
|
+
:param pulumi.Input[_builtins.float] rate: The maximum number of requests at any given second to be allowed by the quota
|
|
496
|
+
rule. The `rate` must be positive.
|
|
497
|
+
:param pulumi.Input[_builtins.str] role: If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
498
|
+
:param pulumi.Input[_builtins.float] secondary_rate: Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
499
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
500
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
501
|
+
"""
|
|
502
|
+
...
|
|
503
|
+
@overload
|
|
504
|
+
def __init__(__self__,
|
|
505
|
+
resource_name: str,
|
|
506
|
+
args: QuotaRateLimitArgs,
|
|
507
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
508
|
+
"""
|
|
509
|
+
Manage rate limit quotas which enforce API rate limiting using a token bucket algorithm.
|
|
510
|
+
A rate limit quota can be created at the root level or defined on a namespace or mount by
|
|
511
|
+
specifying a path when creating the quota.
|
|
512
|
+
|
|
513
|
+
See [Vault's Documentation](https://www.vaultproject.io/docs/concepts/resource-quotas) for more
|
|
514
|
+
information.
|
|
515
|
+
|
|
516
|
+
## Example Usage
|
|
517
|
+
|
|
518
|
+
```python
|
|
519
|
+
import pulumi
|
|
520
|
+
import pulumi_vault as vault
|
|
521
|
+
|
|
522
|
+
global_ = vault.QuotaRateLimit("global",
|
|
523
|
+
name="global",
|
|
524
|
+
path="",
|
|
525
|
+
rate=100)
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
## Import
|
|
529
|
+
|
|
530
|
+
Rate limit quotas can be imported using their names
|
|
531
|
+
|
|
532
|
+
```sh
|
|
533
|
+
$ pulumi import vault:index/quotaRateLimit:QuotaRateLimit global global
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
:param str resource_name: The name of the resource.
|
|
537
|
+
:param QuotaRateLimitArgs args: The arguments to use to populate this resource's properties.
|
|
538
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
539
|
+
"""
|
|
540
|
+
...
|
|
541
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
542
|
+
resource_args, opts = _utilities.get_resource_args_opts(QuotaRateLimitArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
543
|
+
if resource_args is not None:
|
|
544
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
545
|
+
else:
|
|
546
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
547
|
+
|
|
548
|
+
def _internal_init(__self__,
|
|
549
|
+
resource_name: str,
|
|
550
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
551
|
+
block_interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
552
|
+
group_by: Optional[pulumi.Input[_builtins.str]] = None,
|
|
553
|
+
inheritable: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
554
|
+
interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
555
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
556
|
+
namespace: Optional[pulumi.Input[_builtins.str]] = None,
|
|
557
|
+
path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
558
|
+
rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
559
|
+
role: Optional[pulumi.Input[_builtins.str]] = None,
|
|
560
|
+
secondary_rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
561
|
+
__props__=None):
|
|
562
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
563
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
564
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
565
|
+
if opts.id is None:
|
|
566
|
+
if __props__ is not None:
|
|
567
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
568
|
+
__props__ = QuotaRateLimitArgs.__new__(QuotaRateLimitArgs)
|
|
569
|
+
|
|
570
|
+
__props__.__dict__["block_interval"] = block_interval
|
|
571
|
+
__props__.__dict__["group_by"] = group_by
|
|
572
|
+
__props__.__dict__["inheritable"] = inheritable
|
|
573
|
+
__props__.__dict__["interval"] = interval
|
|
574
|
+
__props__.__dict__["name"] = name
|
|
575
|
+
__props__.__dict__["namespace"] = namespace
|
|
576
|
+
__props__.__dict__["path"] = path
|
|
577
|
+
if rate is None and not opts.urn:
|
|
578
|
+
raise TypeError("Missing required property 'rate'")
|
|
579
|
+
__props__.__dict__["rate"] = rate
|
|
580
|
+
__props__.__dict__["role"] = role
|
|
581
|
+
__props__.__dict__["secondary_rate"] = secondary_rate
|
|
582
|
+
super(QuotaRateLimit, __self__).__init__(
|
|
583
|
+
'vault:index/quotaRateLimit:QuotaRateLimit',
|
|
584
|
+
resource_name,
|
|
585
|
+
__props__,
|
|
586
|
+
opts)
|
|
587
|
+
|
|
588
|
+
@staticmethod
|
|
589
|
+
def get(resource_name: str,
|
|
590
|
+
id: pulumi.Input[str],
|
|
591
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
592
|
+
block_interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
593
|
+
group_by: Optional[pulumi.Input[_builtins.str]] = None,
|
|
594
|
+
inheritable: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
595
|
+
interval: Optional[pulumi.Input[_builtins.int]] = None,
|
|
596
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
597
|
+
namespace: Optional[pulumi.Input[_builtins.str]] = None,
|
|
598
|
+
path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
599
|
+
rate: Optional[pulumi.Input[_builtins.float]] = None,
|
|
600
|
+
role: Optional[pulumi.Input[_builtins.str]] = None,
|
|
601
|
+
secondary_rate: Optional[pulumi.Input[_builtins.float]] = None) -> 'QuotaRateLimit':
|
|
602
|
+
"""
|
|
603
|
+
Get an existing QuotaRateLimit resource's state with the given name, id, and optional extra
|
|
604
|
+
properties used to qualify the lookup.
|
|
605
|
+
|
|
606
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
607
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
608
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
609
|
+
:param pulumi.Input[_builtins.int] block_interval: If set, when a client reaches a rate limit threshold, the client will
|
|
610
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
611
|
+
:param pulumi.Input[_builtins.str] group_by: Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
612
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
613
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
614
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
615
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
616
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
617
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
618
|
+
:param pulumi.Input[_builtins.bool] inheritable: If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
619
|
+
:param pulumi.Input[_builtins.int] interval: The duration in seconds to enforce rate limiting for.
|
|
620
|
+
:param pulumi.Input[_builtins.str] name: Name of the rate limit quota
|
|
621
|
+
:param pulumi.Input[_builtins.str] namespace: The namespace to provision the resource in.
|
|
622
|
+
The value should not contain leading or trailing forward slashes.
|
|
623
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
624
|
+
*Available only for Vault Enterprise*.
|
|
625
|
+
:param pulumi.Input[_builtins.str] path: Path of the mount or namespace to apply the quota. A blank path configures a
|
|
626
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
627
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
628
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
629
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
630
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
631
|
+
:param pulumi.Input[_builtins.float] rate: The maximum number of requests at any given second to be allowed by the quota
|
|
632
|
+
rule. The `rate` must be positive.
|
|
633
|
+
:param pulumi.Input[_builtins.str] role: If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
634
|
+
:param pulumi.Input[_builtins.float] secondary_rate: Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
635
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
636
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
637
|
+
"""
|
|
638
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
639
|
+
|
|
640
|
+
__props__ = _QuotaRateLimitState.__new__(_QuotaRateLimitState)
|
|
641
|
+
|
|
642
|
+
__props__.__dict__["block_interval"] = block_interval
|
|
643
|
+
__props__.__dict__["group_by"] = group_by
|
|
644
|
+
__props__.__dict__["inheritable"] = inheritable
|
|
645
|
+
__props__.__dict__["interval"] = interval
|
|
646
|
+
__props__.__dict__["name"] = name
|
|
647
|
+
__props__.__dict__["namespace"] = namespace
|
|
648
|
+
__props__.__dict__["path"] = path
|
|
649
|
+
__props__.__dict__["rate"] = rate
|
|
650
|
+
__props__.__dict__["role"] = role
|
|
651
|
+
__props__.__dict__["secondary_rate"] = secondary_rate
|
|
652
|
+
return QuotaRateLimit(resource_name, opts=opts, __props__=__props__)
|
|
653
|
+
|
|
654
|
+
@_builtins.property
|
|
655
|
+
@pulumi.getter(name="blockInterval")
|
|
656
|
+
def block_interval(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
657
|
+
"""
|
|
658
|
+
If set, when a client reaches a rate limit threshold, the client will
|
|
659
|
+
be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
|
|
660
|
+
"""
|
|
661
|
+
return pulumi.get(self, "block_interval")
|
|
662
|
+
|
|
663
|
+
@_builtins.property
|
|
664
|
+
@pulumi.getter(name="groupBy")
|
|
665
|
+
def group_by(self) -> pulumi.Output[_builtins.str]:
|
|
666
|
+
"""
|
|
667
|
+
Attribute used to group requests for rate limiting. Limits are enforced independently for each
|
|
668
|
+
group. Valid `group_by` modes are: 1) `ip` that groups requests by their source IP address (**`group_by` defaults to
|
|
669
|
+
`ip` if unset, which is the only supported mode in community edition**); 2) `none` that groups together all requests
|
|
670
|
+
that match the rate limit quota rule; 3) `entity_then_ip` that groups requests by their entity ID for authenticated
|
|
671
|
+
requests that carry one, or by their IP for unauthenticated requests (or requests whose authentication is not
|
|
672
|
+
connected to an entity); and 4) `entity_then_none` which also groups requests by their entity ID when available, but
|
|
673
|
+
the rest is all grouped together (i.e. unauthenticated or with authentication not connected to an entity).
|
|
674
|
+
"""
|
|
675
|
+
return pulumi.get(self, "group_by")
|
|
676
|
+
|
|
677
|
+
@_builtins.property
|
|
678
|
+
@pulumi.getter
|
|
679
|
+
def inheritable(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
680
|
+
"""
|
|
681
|
+
If set to `true` on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set to `true` if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+.
|
|
682
|
+
"""
|
|
683
|
+
return pulumi.get(self, "inheritable")
|
|
684
|
+
|
|
685
|
+
@_builtins.property
|
|
686
|
+
@pulumi.getter
|
|
687
|
+
def interval(self) -> pulumi.Output[_builtins.int]:
|
|
688
|
+
"""
|
|
689
|
+
The duration in seconds to enforce rate limiting for.
|
|
690
|
+
"""
|
|
691
|
+
return pulumi.get(self, "interval")
|
|
692
|
+
|
|
693
|
+
@_builtins.property
|
|
694
|
+
@pulumi.getter
|
|
695
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
696
|
+
"""
|
|
697
|
+
Name of the rate limit quota
|
|
698
|
+
"""
|
|
699
|
+
return pulumi.get(self, "name")
|
|
700
|
+
|
|
701
|
+
@_builtins.property
|
|
702
|
+
@pulumi.getter
|
|
703
|
+
def namespace(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
704
|
+
"""
|
|
705
|
+
The namespace to provision the resource in.
|
|
706
|
+
The value should not contain leading or trailing forward slashes.
|
|
707
|
+
The `namespace` is always relative to the provider's configured namespace.
|
|
708
|
+
*Available only for Vault Enterprise*.
|
|
709
|
+
"""
|
|
710
|
+
return pulumi.get(self, "namespace")
|
|
711
|
+
|
|
712
|
+
@_builtins.property
|
|
713
|
+
@pulumi.getter
|
|
714
|
+
def path(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
715
|
+
"""
|
|
716
|
+
Path of the mount or namespace to apply the quota. A blank path configures a
|
|
717
|
+
global rate limit quota. For example `namespace1/` adds a quota to a full namespace,
|
|
718
|
+
`namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`.
|
|
719
|
+
Updating this field on an existing quota can have "moving" effects. For example, updating
|
|
720
|
+
`auth/userpass` to `namespace1/auth/userpass` moves this quota from being a global mount quota to
|
|
721
|
+
a namespace specific mount quota. **Note, namespaces are supported in Enterprise only.**
|
|
722
|
+
"""
|
|
723
|
+
return pulumi.get(self, "path")
|
|
724
|
+
|
|
725
|
+
@_builtins.property
|
|
726
|
+
@pulumi.getter
|
|
727
|
+
def rate(self) -> pulumi.Output[_builtins.float]:
|
|
728
|
+
"""
|
|
729
|
+
The maximum number of requests at any given second to be allowed by the quota
|
|
730
|
+
rule. The `rate` must be positive.
|
|
731
|
+
"""
|
|
732
|
+
return pulumi.get(self, "rate")
|
|
733
|
+
|
|
734
|
+
@_builtins.property
|
|
735
|
+
@pulumi.getter
|
|
736
|
+
def role(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
737
|
+
"""
|
|
738
|
+
If set on a quota where `path` is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
|
|
739
|
+
"""
|
|
740
|
+
return pulumi.get(self, "role")
|
|
741
|
+
|
|
742
|
+
@_builtins.property
|
|
743
|
+
@pulumi.getter(name="secondaryRate")
|
|
744
|
+
def secondary_rate(self) -> pulumi.Output[_builtins.float]:
|
|
745
|
+
"""
|
|
746
|
+
Can only be set for the `group_by` modes `entity_then_ip` or `entity_then_none`. This is
|
|
747
|
+
the rate limit applied to the requests that fall under the "ip" or "none" groupings, while the authenticated requests
|
|
748
|
+
that contain an entity ID are subject to the `rate` field instead. Defaults to the same value as `rate`.
|
|
749
|
+
"""
|
|
750
|
+
return pulumi.get(self, "secondary_rate")
|
|
751
|
+
|