pydantypes.cloud.aws¶
AWS cloud resource types.
Modules:
-
arn–AWS ARN types.
-
compute–AWS compute types.
-
containers–AWS container types.
-
database–AWS database types.
-
identity–AWS identity types.
-
messaging–AWS messaging types.
-
monitoring–AWS monitoring types.
-
network–AWS network types.
-
region–AWS region types.
-
security–AWS security types.
-
storage–AWS storage types.
Classes:
-
Arn–An AWS ARN with parsed components.
-
EcrRepositoryUri–An AWS ECR repository URI with parsed components.
-
IamRoleArn–An IAM Role ARN with parsed role name.
-
Region–AWS region identifiers.
-
S3Uri–An S3 URI like s3://bucket/key with parsed properties.
-
SnsTopicArn–An SNS Topic ARN with parsed topic name.
-
SqsQueueUrl–An SQS Queue URL with parsed components.
Attributes:
-
AccountId–A 12-digit AWS Account ID (e.g.
123456789012). -
AmiId–An AWS AMI ID (e.g.
ami-1234567890abcdef0). -
CloudFrontDistributionId–An AWS CloudFront Distribution ID (e.g.
E1A2B3C4D5E6F7). -
CloudWatchLogGroupName–An AWS CloudWatch Log Group name (e.g.
/my-app/production). -
CognitoUserPoolId–An AWS Cognito User Pool ID (e.g.
us-east-1_AbCdEfGhI). -
DynamoDbTableName–An AWS DynamoDB table name (e.g.
my-table). -
EbsSnapshotId–An AWS EBS Snapshot ID (e.g.
snap-1234567890abcdef0). -
EbsVolumeId–An AWS EBS Volume ID (e.g.
vol-1234567890abcdef0). -
Ec2InstanceId–An AWS EC2 instance ID (e.g.
i-1234567890abcdef0). -
EcsClusterName–An AWS ECS cluster name (e.g.
my-ecs-cluster). -
EksClusterName–An AWS EKS cluster name (e.g.
my-eks-cluster). -
ElasticIpAllocationId–An AWS Elastic IP Allocation ID (e.g.
eipalloc-1234567890abcdef0). -
EniId–An AWS ENI (Elastic Network Interface) ID (e.g.
eni-1234567890abcdef0). -
InternetGatewayId–An AWS Internet Gateway ID (e.g.
igw-1234567890abcdef0). -
KmsKeyId–An AWS KMS key ID (UUID or multi-region key ID) (e.g.
12345678-1234-1234-1234-123456789012). -
LambdaFunctionName–An AWS Lambda function name (e.g.
my-function). -
NatGatewayId–An AWS NAT Gateway ID (e.g.
nat-1234567890abcdef0). -
RdsInstanceId–An AWS RDS instance identifier (lowercase only) (e.g.
my-db-instance). -
Route53HostedZoneId–An AWS Route53 Hosted Zone ID (e.g.
Z1234567890ABC). -
S3BucketName–An AWS S3 bucket name (e.g.
my-bucket). -
SecretsManagerSecretName–An AWS Secrets Manager secret name (e.g.
prod/my-app/db-password). -
SecurityGroupId–An AWS Security Group ID (e.g.
sg-1234567890abcdef0). -
SsmParameterName–An AWS SSM Parameter Store parameter name (e.g.
/my-app/config/database-url). -
SubnetId–An AWS Subnet ID (e.g.
subnet-1234567890abcdef0). -
VpcId–An AWS VPC ID (e.g.
vpc-1234567890abcdef0).
AccountId
module-attribute
¶
AccountId = Annotated[str, AfterValidator(_validate_account_id), WithJsonSchema({'type': 'string', 'pattern': '^\\d{12}$', 'description': 'A 12-digit AWS Account ID', 'examples': ['123456789012'], 'title': 'AccountId', 'minLength': 12, 'maxLength': 12})]
A 12-digit AWS Account ID (e.g. 123456789012).
AmiId
module-attribute
¶
AmiId = Annotated[str, AfterValidator(_validate_ami_id), WithJsonSchema({'type': 'string', 'pattern': '^ami-[0-9a-f]{8,17}$', 'description': 'An AWS AMI ID', 'examples': ['ami-1234567890abcdef0'], 'title': 'AmiId'})]
An AWS AMI ID (e.g. ami-1234567890abcdef0).
CloudFrontDistributionId
module-attribute
¶
CloudFrontDistributionId = Annotated[str, AfterValidator(_validate_cloudfront_distribution_id), WithJsonSchema({'type': 'string', 'pattern': '^E[A-Z0-9]{10,16}$', 'description': 'An AWS CloudFront Distribution ID', 'examples': ['E1A2B3C4D5E6F7'], 'title': 'CloudFrontDistributionId'})]
An AWS CloudFront Distribution ID (e.g. E1A2B3C4D5E6F7).
CloudWatchLogGroupName
module-attribute
¶
CloudWatchLogGroupName = Annotated[str, AfterValidator(_validate_cloudwatch_log_group_name), WithJsonSchema({'type': 'string', 'pattern': '^[.\\-_/#A-Za-z0-9]{1,512}$', 'description': 'An AWS CloudWatch Log Group name', 'examples': ['/my-app/production'], 'title': 'CloudWatchLogGroupName', 'maxLength': 512})]
An AWS CloudWatch Log Group name (e.g. /my-app/production).
CognitoUserPoolId
module-attribute
¶
CognitoUserPoolId = Annotated[str, AfterValidator(_validate_cognito_user_pool_id), WithJsonSchema({'type': 'string', 'pattern': '^[\\w-]+_[0-9a-zA-Z]+$', 'description': 'An AWS Cognito User Pool ID', 'examples': ['us-east-1_AbCdEfGhI'], 'title': 'CognitoUserPoolId', 'maxLength': 55})]
An AWS Cognito User Pool ID (e.g. us-east-1_AbCdEfGhI).
DynamoDbTableName
module-attribute
¶
DynamoDbTableName = Annotated[str, AfterValidator(_validate_dynamodb_table_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9._-]{3,255}$', 'description': 'An AWS DynamoDB table name', 'examples': ['my-table'], 'title': 'DynamoDbTableName', 'minLength': 3, 'maxLength': 255})]
An AWS DynamoDB table name (e.g. my-table).
EbsSnapshotId
module-attribute
¶
EbsSnapshotId = Annotated[str, AfterValidator(_validate_ebs_snapshot_id), WithJsonSchema({'type': 'string', 'pattern': '^snap-[0-9a-f]{8,17}$', 'description': 'An AWS EBS Snapshot ID', 'examples': ['snap-1234567890abcdef0'], 'title': 'EbsSnapshotId'})]
An AWS EBS Snapshot ID (e.g. snap-1234567890abcdef0).
EbsVolumeId
module-attribute
¶
EbsVolumeId = Annotated[str, AfterValidator(_validate_ebs_volume_id), WithJsonSchema({'type': 'string', 'pattern': '^vol-[0-9a-f]{8,17}$', 'description': 'An AWS EBS Volume ID', 'examples': ['vol-1234567890abcdef0'], 'title': 'EbsVolumeId'})]
An AWS EBS Volume ID (e.g. vol-1234567890abcdef0).
Ec2InstanceId
module-attribute
¶
Ec2InstanceId = Annotated[str, AfterValidator(_validate_ec2_instance_id), WithJsonSchema({'type': 'string', 'pattern': '^i-[0-9a-f]{8,17}$', 'description': 'An AWS EC2 instance ID', 'examples': ['i-1234567890abcdef0'], 'title': 'Ec2InstanceId'})]
An AWS EC2 instance ID (e.g. i-1234567890abcdef0).
EcsClusterName
module-attribute
¶
EcsClusterName = Annotated[str, AfterValidator(_validate_ecs_cluster_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9_-]{1,255}$', 'description': 'An AWS ECS cluster name', 'examples': ['my-ecs-cluster'], 'title': 'EcsClusterName', 'maxLength': 255})]
An AWS ECS cluster name (e.g. my-ecs-cluster).
EksClusterName
module-attribute
¶
EksClusterName = Annotated[str, AfterValidator(_validate_eks_cluster_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9][a-zA-Z0-9_-]{0,99}$', 'description': 'An AWS EKS cluster name', 'examples': ['my-eks-cluster'], 'title': 'EksClusterName', 'maxLength': 100})]
An AWS EKS cluster name (e.g. my-eks-cluster).
ElasticIpAllocationId
module-attribute
¶
ElasticIpAllocationId = Annotated[str, AfterValidator(_validate_elastic_ip_allocation_id), WithJsonSchema({'type': 'string', 'pattern': '^eipalloc-[0-9a-f]{8,17}$', 'description': 'An AWS Elastic IP Allocation ID', 'examples': ['eipalloc-1234567890abcdef0'], 'title': 'ElasticIpAllocationId'})]
An AWS Elastic IP Allocation ID (e.g. eipalloc-1234567890abcdef0).
EniId
module-attribute
¶
EniId = Annotated[str, AfterValidator(_validate_eni_id), WithJsonSchema({'type': 'string', 'pattern': '^eni-[0-9a-f]{8,17}$', 'description': 'An AWS ENI (Elastic Network Interface) ID', 'examples': ['eni-1234567890abcdef0'], 'title': 'EniId'})]
An AWS ENI (Elastic Network Interface) ID (e.g. eni-1234567890abcdef0).
InternetGatewayId
module-attribute
¶
InternetGatewayId = Annotated[str, AfterValidator(_validate_internet_gateway_id), WithJsonSchema({'type': 'string', 'pattern': '^igw-[0-9a-f]{8,17}$', 'description': 'An AWS Internet Gateway ID', 'examples': ['igw-1234567890abcdef0'], 'title': 'InternetGatewayId'})]
An AWS Internet Gateway ID (e.g. igw-1234567890abcdef0).
KmsKeyId
module-attribute
¶
KmsKeyId = Annotated[str, AfterValidator(_validate_kms_key_id), WithJsonSchema({'type': 'string', 'pattern': '^(mrk-[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$', 'description': 'An AWS KMS key ID (UUID or multi-region key ID)', 'examples': ['12345678-1234-1234-1234-123456789012'], 'title': 'KmsKeyId'})]
An AWS KMS key ID (UUID or multi-region key ID) (e.g. 12345678-1234-1234-1234-123456789012).
LambdaFunctionName
module-attribute
¶
LambdaFunctionName = Annotated[str, AfterValidator(_validate_lambda_function_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9._-]{1,64}$', 'description': 'An AWS Lambda function name', 'examples': ['my-function'], 'title': 'LambdaFunctionName', 'maxLength': 64})]
An AWS Lambda function name (e.g. my-function).
NatGatewayId
module-attribute
¶
NatGatewayId = Annotated[str, AfterValidator(_validate_nat_gateway_id), WithJsonSchema({'type': 'string', 'pattern': '^nat-[0-9a-f]{8,17}$', 'description': 'An AWS NAT Gateway ID', 'examples': ['nat-1234567890abcdef0'], 'title': 'NatGatewayId'})]
An AWS NAT Gateway ID (e.g. nat-1234567890abcdef0).
RdsInstanceId
module-attribute
¶
RdsInstanceId = Annotated[str, AfterValidator(_validate_rds_instance_id), WithJsonSchema({'type': 'string', 'pattern': '^[a-z][a-z0-9-]{0,62}$', 'description': 'An AWS RDS instance identifier (lowercase only)', 'examples': ['my-db-instance'], 'title': 'RdsInstanceId', 'maxLength': 63})]
An AWS RDS instance identifier (lowercase only) (e.g. my-db-instance).
Route53HostedZoneId
module-attribute
¶
Route53HostedZoneId = Annotated[str, AfterValidator(_validate_route53_hosted_zone_id), WithJsonSchema({'type': 'string', 'pattern': '^Z[A-Z0-9]{1,31}$', 'description': 'An AWS Route53 Hosted Zone ID', 'examples': ['Z1234567890ABC'], 'title': 'Route53HostedZoneId'})]
An AWS Route53 Hosted Zone ID (e.g. Z1234567890ABC).
S3BucketName
module-attribute
¶
S3BucketName = Annotated[str, AfterValidator(_validate_s3_bucket_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$', 'description': 'An AWS S3 bucket name', 'examples': ['my-bucket'], 'title': 'S3BucketName', 'minLength': 3, 'maxLength': 63})]
An AWS S3 bucket name (e.g. my-bucket).
SecretsManagerSecretName
module-attribute
¶
SecretsManagerSecretName = Annotated[str, AfterValidator(_validate_secrets_manager_secret_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9/_+=.@-]{1,512}$', 'description': 'An AWS Secrets Manager secret name', 'examples': ['prod/my-app/db-password'], 'title': 'SecretsManagerSecretName', 'maxLength': 512})]
An AWS Secrets Manager secret name (e.g. prod/my-app/db-password).
SecurityGroupId
module-attribute
¶
SecurityGroupId = Annotated[str, AfterValidator(_validate_security_group_id), WithJsonSchema({'type': 'string', 'pattern': '^sg-[0-9a-f]{8,17}$', 'description': 'An AWS Security Group ID', 'examples': ['sg-1234567890abcdef0'], 'title': 'SecurityGroupId'})]
An AWS Security Group ID (e.g. sg-1234567890abcdef0).
SsmParameterName
module-attribute
¶
SsmParameterName = Annotated[str, AfterValidator(_validate_ssm_parameter_name), WithJsonSchema({'type': 'string', 'pattern': '^[a-zA-Z0-9_./-]+$', 'description': 'An AWS SSM Parameter Store parameter name', 'examples': ['/my-app/config/database-url'], 'title': 'SsmParameterName', 'maxLength': 1011})]
An AWS SSM Parameter Store parameter name (e.g. /my-app/config/database-url).
SubnetId
module-attribute
¶
SubnetId = Annotated[str, AfterValidator(_validate_subnet_id), WithJsonSchema({'type': 'string', 'pattern': '^subnet-[0-9a-f]{8,17}$', 'description': 'An AWS Subnet ID', 'examples': ['subnet-1234567890abcdef0'], 'title': 'SubnetId'})]
An AWS Subnet ID (e.g. subnet-1234567890abcdef0).
VpcId
module-attribute
¶
VpcId = Annotated[str, AfterValidator(_validate_vpc_id), WithJsonSchema({'type': 'string', 'pattern': '^vpc-[0-9a-f]{8,17}$', 'description': 'An AWS VPC ID', 'examples': ['vpc-1234567890abcdef0'], 'title': 'VpcId'})]
An AWS VPC ID (e.g. vpc-1234567890abcdef0).
Arn
¶
Bases: str
An AWS ARN with parsed components.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for Arn.
-
__get_pydantic_json_schema__–Return the JSON schema for Arn.
-
__new__–Create and validate a new Arn instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for Arn.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for Arn.
Source code in src/pydantypes/cloud/aws/arn.py
__new__
¶
__new__(value: str) -> Arn
Create and validate a new Arn instance.
Source code in src/pydantypes/cloud/aws/arn.py
EcrRepositoryUri
¶
Bases: str
An AWS ECR repository URI with parsed components.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for EcrRepositoryUri.
-
__get_pydantic_json_schema__–Return the JSON schema for EcrRepositoryUri.
-
__new__–Create and validate a new EcrRepositoryUri instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for EcrRepositoryUri.
Source code in src/pydantypes/cloud/aws/containers.py
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for EcrRepositoryUri.
Source code in src/pydantypes/cloud/aws/containers.py
__new__
¶
__new__(value: str) -> EcrRepositoryUri
Create and validate a new EcrRepositoryUri instance.
Source code in src/pydantypes/cloud/aws/containers.py
IamRoleArn
¶
Bases: Arn
An IAM Role ARN with parsed role name.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for IamRoleArn.
-
__get_pydantic_json_schema__–Return the JSON schema for IamRoleArn.
-
__new__–Create and validate a new IamRoleArn instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for IamRoleArn.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for IamRoleArn.
Source code in src/pydantypes/cloud/aws/arn.py
__new__
¶
__new__(value: str) -> IamRoleArn
Create and validate a new IamRoleArn instance.
Source code in src/pydantypes/cloud/aws/arn.py
Region
¶
Bases: StrEnum
AWS region identifiers.
S3Uri
¶
Bases: CloudStorageUri
An S3 URI like s3://bucket/key with parsed properties.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for S3Uri.
-
__get_pydantic_json_schema__–Return the JSON schema for S3Uri.
-
__new__–Create and validate a new S3Uri instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for S3Uri.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for S3Uri.
Source code in src/pydantypes/cloud/aws/storage.py
__new__
¶
__new__(value: str) -> S3Uri
Create and validate a new S3Uri instance.
Source code in src/pydantypes/cloud/aws/storage.py
SnsTopicArn
¶
Bases: Arn
An SNS Topic ARN with parsed topic name.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for SnsTopicArn.
-
__get_pydantic_json_schema__–Return the JSON schema for SnsTopicArn.
-
__new__–Create and validate a new SnsTopicArn instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for SnsTopicArn.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for SnsTopicArn.
Source code in src/pydantypes/cloud/aws/arn.py
__new__
¶
__new__(value: str) -> SnsTopicArn
Create and validate a new SnsTopicArn instance.
Source code in src/pydantypes/cloud/aws/arn.py
SqsQueueUrl
¶
Bases: str
An SQS Queue URL with parsed components.
Methods:
-
__get_pydantic_core_schema__–Return the Pydantic core schema for SqsQueueUrl.
-
__get_pydantic_json_schema__–Return the JSON schema for SqsQueueUrl.
-
__new__–Create and validate a new SqsQueueUrl instance.
__get_pydantic_core_schema__
classmethod
¶
Return the Pydantic core schema for SqsQueueUrl.
__get_pydantic_json_schema__
classmethod
¶
__get_pydantic_json_schema__(_core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue
Return the JSON schema for SqsQueueUrl.
Source code in src/pydantypes/cloud/aws/messaging.py
__new__
¶
__new__(value: str) -> SqsQueueUrl
Create and validate a new SqsQueueUrl instance.