-
Notifications
You must be signed in to change notification settings - Fork 9
/
kms_key.py
44 lines (33 loc) · 1.77 KB
/
kms_key.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from typing import ClassVar, Dict, List, Optional
from pycfmodel.model.base import CustomModel
from pycfmodel.model.resources.properties.policy_document import PolicyDocument
from pycfmodel.model.resources.resource import Resource
from pycfmodel.model.types import Resolvable, ResolvableBool, ResolvableInt, ResolvableStr
class KMSKeyProperties(CustomModel):
"""
Properties:
- Description: Description of the CMK.
- EnableKeyRotation: Enables automatic rotation of the key for the customer master key.
- Enabled: Specifies whether the customer master key (CMK) is enabled.
- KeyPolicy: A [policy document][pycfmodel.model.resources.properties.policy_document.PolicyDocument] object.
- KeyUsage: Determines the cryptographic operations.
- PendingWindowInDays: Number of days in the waiting period before AWS KMS deletes a CMK that has been removed from a CloudFormation stack.
- Tags: Array of key-value pairs.
More info at [AWS Docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html)
"""
Description: Optional[ResolvableStr] = None
EnableKeyRotation: Optional[ResolvableBool] = None
Enabled: Optional[ResolvableBool] = None
KeyPolicy: Resolvable[PolicyDocument]
KeyUsage: Optional[ResolvableStr] = None
PendingWindowInDays: Optional[ResolvableInt] = None
Tags: Optional[Resolvable[List[Dict]]] = None
class KMSKey(Resource):
"""
Properties:
- Properties: A [KMS Key properties][pycfmodel.model.resources.kms_key.KMSKeyProperties] object.
More info at [AWS Docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html)
"""
TYPE_VALUE: ClassVar = "AWS::KMS::Key"
Type: str = TYPE_VALUE
Properties: Resolvable[KMSKeyProperties]