Reference for configuration

This is the documentation for the pydantic models which are use for config validation.

pydantic model awspub.configmodels.ConfigModel

The base model for the whole configuration

Show JSON schema
{
   "title": "ConfigModel",
   "description": "The base model for the whole configuration",
   "type": "object",
   "properties": {
      "s3": {
         "$ref": "#/$defs/ConfigS3Model"
      },
      "source": {
         "$ref": "#/$defs/ConfigSourceModel"
      },
      "images": {
         "additionalProperties": {
            "$ref": "#/$defs/ConfigImageModel"
         },
         "title": "Images",
         "type": "object"
      },
      "tags": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": {},
         "description": "Optional Tags to apply to all resources",
         "title": "Tags"
      }
   },
   "$defs": {
      "ConfigImageMarketplaceModel": {
         "additionalProperties": false,
         "description": "Image/AMI Marketplace specific configuration to request new Marketplace versions\nSee https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html\nfor further information",
         "properties": {
            "entity_id": {
               "description": "The entity ID (product ID)",
               "title": "Entity Id",
               "type": "string"
            },
            "access_role_arn": {
               "description": "IAM role Amazon Resource Name (ARN) used by AWS Marketplace to access the provided AMI",
               "title": "Access Role Arn",
               "type": "string"
            },
            "version_title": {
               "description": "The version title. Must be unique across the product",
               "title": "Version Title",
               "type": "string"
            },
            "release_notes": {
               "description": "The release notes",
               "title": "Release Notes",
               "type": "string"
            },
            "user_name": {
               "description": "The login username to access the operating system",
               "title": "User Name",
               "type": "string"
            },
            "scanning_port": {
               "default": 22,
               "description": "Port to access the operating system (default: 22)",
               "title": "Scanning Port",
               "type": "integer"
            },
            "os_name": {
               "description": "Operating system name displayed to Marketplace buyers",
               "title": "Os Name",
               "type": "string"
            },
            "os_version": {
               "description": "Operating system version displayed to Marketplace buyers",
               "title": "Os Version",
               "type": "string"
            },
            "usage_instructions": {
               "description": " Instructions for using the AMI, or a link to more information about the AMI",
               "title": "Usage Instructions",
               "type": "string"
            },
            "recommended_instance_type": {
               "description": "The instance type that is recommended to run the service with the AMI and is the default for 1-click installs of your service",
               "title": "Recommended Instance Type",
               "type": "string"
            },
            "security_groups": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ConfigImageMarketplaceSecurityGroupModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Security Groups"
            }
         },
         "required": [
            "entity_id",
            "access_role_arn",
            "version_title",
            "release_notes",
            "user_name",
            "os_name",
            "os_version",
            "usage_instructions",
            "recommended_instance_type",
            "security_groups"
         ],
         "title": "ConfigImageMarketplaceModel",
         "type": "object"
      },
      "ConfigImageMarketplaceSecurityGroupModel": {
         "additionalProperties": false,
         "description": "Image/AMI Marketplace specific configuration for a security group",
         "properties": {
            "from_port": {
               "description": "The source port",
               "title": "From Port",
               "type": "integer"
            },
            "ip_protocol": {
               "description": "The IP protocol (either 'tcp' or 'udp')",
               "enum": [
                  "tcp",
                  "udp"
               ],
               "title": "Ip Protocol",
               "type": "string"
            },
            "ip_ranges": {
               "description": "IP ranges to allow, in CIDR format (eg. '192.0.2.0/24')",
               "items": {
                  "type": "string"
               },
               "title": "Ip Ranges",
               "type": "array"
            },
            "to_port": {
               "description": "The destination port",
               "title": "To Port",
               "type": "integer"
            }
         },
         "required": [
            "from_port",
            "ip_protocol",
            "ip_ranges",
            "to_port"
         ],
         "title": "ConfigImageMarketplaceSecurityGroupModel",
         "type": "object"
      },
      "ConfigImageModel": {
         "additionalProperties": false,
         "description": "Image/AMI configuration.",
         "properties": {
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional image description",
               "title": "Description"
            },
            "regions": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions for this image. If not given, all available regions willbe used from the currently used partition. If a region doesn't exist in the currently used partition, it will be ignored.",
               "title": "Regions"
            },
            "regions_denylist": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions to exclude from publication for this image. A region listed in both 'regions' and 'regions_denylist' will raise a validation error.",
               "title": "Regions Denylist"
            },
            "separate_snapshot": {
               "default": false,
               "description": "Use a separate snapshot for this image?",
               "title": "Separate Snapshot",
               "type": "boolean"
            },
            "billing_products": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of billing codes",
               "title": "Billing Products"
            },
            "boot_mode": {
               "description": "The boot mode. For arm64, this needs to be 'uefi'",
               "enum": [
                  "legacy-bios",
                  "uefi",
                  "uefi-preferred"
               ],
               "title": "Boot Mode",
               "type": "string"
            },
            "root_device_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "/dev/sda1",
               "description": "The root device name",
               "title": "Root Device Name"
            },
            "root_device_volume_type": {
               "anyOf": [
                  {
                     "enum": [
                        "gp2",
                        "gp3"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "gp3",
               "description": "The root device volume type",
               "title": "Root Device Volume Type"
            },
            "root_device_volume_size": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": 8,
               "description": "The root device volume size (in GB)",
               "title": "Root Device Volume Size"
            },
            "uefi_data": {
               "anyOf": [
                  {
                     "format": "path",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional path to a non-volatile UEFI variable store (must be already base64 encoded)",
               "title": "Uefi Data"
            },
            "tpm_support": {
               "anyOf": [
                  {
                     "const": "v2.0",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional TPM support. If this is set, 'boot_mode' must be 'uefi'",
               "title": "Tpm Support"
            },
            "imds_support": {
               "anyOf": [
                  {
                     "const": "v2.0",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional IMDS support",
               "title": "Imds Support"
            },
            "share": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of account IDs, organization ARN, OU ARN the image and snapshot will be shared with. The account ID can be prefixed with the partition and separated by ':'. Eg 'aws-cn:123456789123'",
               "title": "Share"
            },
            "temporary": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Optional boolean field indicates that a image is only temporary",
               "title": "Temporary"
            },
            "public": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Optional boolean field indicates if the image should be public",
               "title": "Public"
            },
            "marketplace": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ConfigImageMarketplaceModel"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional structure containing Marketplace related configuration for the commercial 'aws' partition"
            },
            "ssm_parameter": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ConfigImageSSMParameterModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of SSM parameter paths of type `aws:ec2:image` which will be pushed to the parameter store",
               "title": "Ssm Parameter"
            },
            "groups": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": [],
               "description": "Optional list of groups this image is part of",
               "title": "Groups"
            },
            "tags": {
               "anyOf": [
                  {
                     "additionalProperties": {
                        "type": "string"
                     },
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": {},
               "description": "Optional Tags to apply to this image only",
               "title": "Tags"
            },
            "sns": {
               "anyOf": [
                  {
                     "items": {
                        "additionalProperties": {
                           "$ref": "#/$defs/ConfigImageSNSNotificationModel"
                        },
                        "type": "object"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of SNS Notification related configuration",
               "title": "Sns"
            }
         },
         "required": [
            "boot_mode"
         ],
         "title": "ConfigImageModel",
         "type": "object"
      },
      "ConfigImageSNSNotificationModel": {
         "additionalProperties": false,
         "description": "Image/AMI SNS Notification specific configuration to notify subscribers about new images availability",
         "properties": {
            "subject": {
               "description": "The subject of SNS Notification",
               "maxLength": 99,
               "minLength": 1,
               "title": "Subject",
               "type": "string"
            },
            "message": {
               "additionalProperties": {
                  "type": "string"
               },
               "default": {
                  "default": ""
               },
               "description": "The body of the message to be sent to subscribers.",
               "propertyNames": {
                  "$ref": "#/$defs/SNSNotificationProtocol"
               },
               "title": "Message",
               "type": "object"
            },
            "regions": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions for sending notification. If not given, regions where the image registered will be used from the currently used parition. If a region doesn't exist in the currently used partition, it will be ignored.",
               "title": "Regions"
            },
            "regions_denylist": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions to exclude from sending notifications. A region listed in both 'regions' and 'regions_denylist' will raise a validation error.",
               "title": "Regions Denylist"
            }
         },
         "required": [
            "subject"
         ],
         "title": "ConfigImageSNSNotificationModel",
         "type": "object"
      },
      "ConfigImageSSMParameterModel": {
         "additionalProperties": false,
         "description": "Image/AMI SSM specific configuration to push parameters of type `aws:ec2:image` to the parameter store",
         "properties": {
            "name": {
               "description": "The fully qualified name of the parameter that you want to add to the system. A parameter name must be unique within an Amazon Web Services Region",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Information about the parameter that you want to add to the system",
               "title": "Description"
            },
            "allow_overwrite": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "allow to overwrite an existing parameter. Useful for keep a 'latest' parameter (default: false)",
               "title": "Allow Overwrite"
            }
         },
         "required": [
            "name"
         ],
         "title": "ConfigImageSSMParameterModel",
         "type": "object"
      },
      "ConfigS3Model": {
         "additionalProperties": false,
         "description": "S3 configuration.\nThis is required for uploading source files (usually .vmdk) to a bucket so\nsnapshots can be created out of the s3 file",
         "properties": {
            "bucket_name": {
               "description": "The S3 bucket name",
               "title": "Bucket Name",
               "type": "string"
            },
            "upload_multipart_concurrency": {
               "default": 1,
               "description": "The number of parts to upload concurrently during a multipart upload to S3 (1-32)",
               "maximum": 32,
               "minimum": 1,
               "title": "Upload Multipart Concurrency",
               "type": "integer"
            }
         },
         "required": [
            "bucket_name"
         ],
         "title": "ConfigS3Model",
         "type": "object"
      },
      "ConfigSourceModel": {
         "additionalProperties": false,
         "description": "Source configuration.\nThis defines the source (usually .vmdk) that is uploaded\nto S3 and then used to create EC2 snapshots in different regions.",
         "properties": {
            "path": {
               "description": "Path to a local .vmdk image",
               "format": "path",
               "title": "Path",
               "type": "string"
            },
            "architecture": {
               "description": "The architecture of the given .vmdk image",
               "enum": [
                  "x86_64",
                  "arm64"
               ],
               "title": "Architecture",
               "type": "string"
            }
         },
         "required": [
            "path",
            "architecture"
         ],
         "title": "ConfigSourceModel",
         "type": "object"
      },
      "SNSNotificationProtocol": {
         "enum": [
            "default",
            "email"
         ],
         "title": "SNSNotificationProtocol",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "s3",
      "source",
      "images"
   ]
}

Config:
  • extra: str = forbid

Fields:
field images: Dict[str, ConfigImageModel] [Required]
field s3: ConfigS3Model [Required]
field source: ConfigSourceModel [Required]
field tags: Dict[str, str] | None = {}

Optional Tags to apply to all resources

pydantic model awspub.configmodels.ConfigS3Model

S3 configuration. This is required for uploading source files (usually .vmdk) to a bucket so snapshots can be created out of the s3 file

Show JSON schema
{
   "title": "ConfigS3Model",
   "description": "S3 configuration.\nThis is required for uploading source files (usually .vmdk) to a bucket so\nsnapshots can be created out of the s3 file",
   "type": "object",
   "properties": {
      "bucket_name": {
         "description": "The S3 bucket name",
         "title": "Bucket Name",
         "type": "string"
      },
      "upload_multipart_concurrency": {
         "default": 1,
         "description": "The number of parts to upload concurrently during a multipart upload to S3 (1-32)",
         "maximum": 32,
         "minimum": 1,
         "title": "Upload Multipart Concurrency",
         "type": "integer"
      }
   },
   "additionalProperties": false,
   "required": [
      "bucket_name"
   ]
}

Config:
  • extra: str = forbid

Fields:
Validators:
field bucket_name: str [Required]

The S3 bucket name

field upload_multipart_concurrency: int = 1

The number of parts to upload concurrently during a multipart upload to S3 (1-32)

Constraints:
  • ge = 1

  • le = 32

Validated by:
  • _upload_multipart_concurrency_not_bool

pydantic model awspub.configmodels.ConfigSourceModel

Source configuration. This defines the source (usually .vmdk) that is uploaded to S3 and then used to create EC2 snapshots in different regions.

Show JSON schema
{
   "title": "ConfigSourceModel",
   "description": "Source configuration.\nThis defines the source (usually .vmdk) that is uploaded\nto S3 and then used to create EC2 snapshots in different regions.",
   "type": "object",
   "properties": {
      "path": {
         "description": "Path to a local .vmdk image",
         "format": "path",
         "title": "Path",
         "type": "string"
      },
      "architecture": {
         "description": "The architecture of the given .vmdk image",
         "enum": [
            "x86_64",
            "arm64"
         ],
         "title": "Architecture",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "path",
      "architecture"
   ]
}

Config:
  • extra: str = forbid

Fields:
field architecture: Literal['x86_64', 'arm64'] [Required]

The architecture of the given .vmdk image

field path: Path [Required]

Path to a local .vmdk image

pydantic model awspub.configmodels.ConfigImageModel

Image/AMI configuration.

Show JSON schema
{
   "title": "ConfigImageModel",
   "description": "Image/AMI configuration.",
   "type": "object",
   "properties": {
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional image description",
         "title": "Description"
      },
      "regions": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of regions for this image. If not given, all available regions willbe used from the currently used partition. If a region doesn't exist in the currently used partition, it will be ignored.",
         "title": "Regions"
      },
      "regions_denylist": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of regions to exclude from publication for this image. A region listed in both 'regions' and 'regions_denylist' will raise a validation error.",
         "title": "Regions Denylist"
      },
      "separate_snapshot": {
         "default": false,
         "description": "Use a separate snapshot for this image?",
         "title": "Separate Snapshot",
         "type": "boolean"
      },
      "billing_products": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of billing codes",
         "title": "Billing Products"
      },
      "boot_mode": {
         "description": "The boot mode. For arm64, this needs to be 'uefi'",
         "enum": [
            "legacy-bios",
            "uefi",
            "uefi-preferred"
         ],
         "title": "Boot Mode",
         "type": "string"
      },
      "root_device_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "/dev/sda1",
         "description": "The root device name",
         "title": "Root Device Name"
      },
      "root_device_volume_type": {
         "anyOf": [
            {
               "enum": [
                  "gp2",
                  "gp3"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "gp3",
         "description": "The root device volume type",
         "title": "Root Device Volume Type"
      },
      "root_device_volume_size": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": 8,
         "description": "The root device volume size (in GB)",
         "title": "Root Device Volume Size"
      },
      "uefi_data": {
         "anyOf": [
            {
               "format": "path",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional path to a non-volatile UEFI variable store (must be already base64 encoded)",
         "title": "Uefi Data"
      },
      "tpm_support": {
         "anyOf": [
            {
               "const": "v2.0",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional TPM support. If this is set, 'boot_mode' must be 'uefi'",
         "title": "Tpm Support"
      },
      "imds_support": {
         "anyOf": [
            {
               "const": "v2.0",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional IMDS support",
         "title": "Imds Support"
      },
      "share": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of account IDs, organization ARN, OU ARN the image and snapshot will be shared with. The account ID can be prefixed with the partition and separated by ':'. Eg 'aws-cn:123456789123'",
         "title": "Share"
      },
      "temporary": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Optional boolean field indicates that a image is only temporary",
         "title": "Temporary"
      },
      "public": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Optional boolean field indicates if the image should be public",
         "title": "Public"
      },
      "marketplace": {
         "anyOf": [
            {
               "$ref": "#/$defs/ConfigImageMarketplaceModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional structure containing Marketplace related configuration for the commercial 'aws' partition"
      },
      "ssm_parameter": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ConfigImageSSMParameterModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of SSM parameter paths of type `aws:ec2:image` which will be pushed to the parameter store",
         "title": "Ssm Parameter"
      },
      "groups": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [],
         "description": "Optional list of groups this image is part of",
         "title": "Groups"
      },
      "tags": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": {},
         "description": "Optional Tags to apply to this image only",
         "title": "Tags"
      },
      "sns": {
         "anyOf": [
            {
               "items": {
                  "additionalProperties": {
                     "$ref": "#/$defs/ConfigImageSNSNotificationModel"
                  },
                  "type": "object"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of SNS Notification related configuration",
         "title": "Sns"
      }
   },
   "$defs": {
      "ConfigImageMarketplaceModel": {
         "additionalProperties": false,
         "description": "Image/AMI Marketplace specific configuration to request new Marketplace versions\nSee https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html\nfor further information",
         "properties": {
            "entity_id": {
               "description": "The entity ID (product ID)",
               "title": "Entity Id",
               "type": "string"
            },
            "access_role_arn": {
               "description": "IAM role Amazon Resource Name (ARN) used by AWS Marketplace to access the provided AMI",
               "title": "Access Role Arn",
               "type": "string"
            },
            "version_title": {
               "description": "The version title. Must be unique across the product",
               "title": "Version Title",
               "type": "string"
            },
            "release_notes": {
               "description": "The release notes",
               "title": "Release Notes",
               "type": "string"
            },
            "user_name": {
               "description": "The login username to access the operating system",
               "title": "User Name",
               "type": "string"
            },
            "scanning_port": {
               "default": 22,
               "description": "Port to access the operating system (default: 22)",
               "title": "Scanning Port",
               "type": "integer"
            },
            "os_name": {
               "description": "Operating system name displayed to Marketplace buyers",
               "title": "Os Name",
               "type": "string"
            },
            "os_version": {
               "description": "Operating system version displayed to Marketplace buyers",
               "title": "Os Version",
               "type": "string"
            },
            "usage_instructions": {
               "description": " Instructions for using the AMI, or a link to more information about the AMI",
               "title": "Usage Instructions",
               "type": "string"
            },
            "recommended_instance_type": {
               "description": "The instance type that is recommended to run the service with the AMI and is the default for 1-click installs of your service",
               "title": "Recommended Instance Type",
               "type": "string"
            },
            "security_groups": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ConfigImageMarketplaceSecurityGroupModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Security Groups"
            }
         },
         "required": [
            "entity_id",
            "access_role_arn",
            "version_title",
            "release_notes",
            "user_name",
            "os_name",
            "os_version",
            "usage_instructions",
            "recommended_instance_type",
            "security_groups"
         ],
         "title": "ConfigImageMarketplaceModel",
         "type": "object"
      },
      "ConfigImageMarketplaceSecurityGroupModel": {
         "additionalProperties": false,
         "description": "Image/AMI Marketplace specific configuration for a security group",
         "properties": {
            "from_port": {
               "description": "The source port",
               "title": "From Port",
               "type": "integer"
            },
            "ip_protocol": {
               "description": "The IP protocol (either 'tcp' or 'udp')",
               "enum": [
                  "tcp",
                  "udp"
               ],
               "title": "Ip Protocol",
               "type": "string"
            },
            "ip_ranges": {
               "description": "IP ranges to allow, in CIDR format (eg. '192.0.2.0/24')",
               "items": {
                  "type": "string"
               },
               "title": "Ip Ranges",
               "type": "array"
            },
            "to_port": {
               "description": "The destination port",
               "title": "To Port",
               "type": "integer"
            }
         },
         "required": [
            "from_port",
            "ip_protocol",
            "ip_ranges",
            "to_port"
         ],
         "title": "ConfigImageMarketplaceSecurityGroupModel",
         "type": "object"
      },
      "ConfigImageSNSNotificationModel": {
         "additionalProperties": false,
         "description": "Image/AMI SNS Notification specific configuration to notify subscribers about new images availability",
         "properties": {
            "subject": {
               "description": "The subject of SNS Notification",
               "maxLength": 99,
               "minLength": 1,
               "title": "Subject",
               "type": "string"
            },
            "message": {
               "additionalProperties": {
                  "type": "string"
               },
               "default": {
                  "default": ""
               },
               "description": "The body of the message to be sent to subscribers.",
               "propertyNames": {
                  "$ref": "#/$defs/SNSNotificationProtocol"
               },
               "title": "Message",
               "type": "object"
            },
            "regions": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions for sending notification. If not given, regions where the image registered will be used from the currently used parition. If a region doesn't exist in the currently used partition, it will be ignored.",
               "title": "Regions"
            },
            "regions_denylist": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional list of regions to exclude from sending notifications. A region listed in both 'regions' and 'regions_denylist' will raise a validation error.",
               "title": "Regions Denylist"
            }
         },
         "required": [
            "subject"
         ],
         "title": "ConfigImageSNSNotificationModel",
         "type": "object"
      },
      "ConfigImageSSMParameterModel": {
         "additionalProperties": false,
         "description": "Image/AMI SSM specific configuration to push parameters of type `aws:ec2:image` to the parameter store",
         "properties": {
            "name": {
               "description": "The fully qualified name of the parameter that you want to add to the system. A parameter name must be unique within an Amazon Web Services Region",
               "title": "Name",
               "type": "string"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Information about the parameter that you want to add to the system",
               "title": "Description"
            },
            "allow_overwrite": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "allow to overwrite an existing parameter. Useful for keep a 'latest' parameter (default: false)",
               "title": "Allow Overwrite"
            }
         },
         "required": [
            "name"
         ],
         "title": "ConfigImageSSMParameterModel",
         "type": "object"
      },
      "SNSNotificationProtocol": {
         "enum": [
            "default",
            "email"
         ],
         "title": "SNSNotificationProtocol",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "boot_mode"
   ]
}

Config:
  • extra: str = forbid

Fields:
Validators:
field billing_products: List[str] | None = None

Optional list of billing codes

Validated by:
field boot_mode: Literal['legacy-bios', 'uefi', 'uefi-preferred'] [Required]

The boot mode. For arm64, this needs to be ‘uefi’

Validated by:
field description: str | None = None

Optional image description

Validated by:
field groups: List[str] | None = []

Optional list of groups this image is part of

Validated by:
field imds_support: Literal['v2.0'] | None = None

Optional IMDS support

Validated by:
field marketplace: ConfigImageMarketplaceModel | None = None

Optional structure containing Marketplace related configuration for the commercial ‘aws’ partition

Validated by:
field public: bool | None = False

Optional boolean field indicates if the image should be public

Validated by:
field regions: List[str] | None = None

Optional list of regions for this image. If not given, all available regions willbe used from the currently used partition. If a region doesn’t exist in the currently used partition, it will be ignored.

Validated by:
field regions_denylist: List[str] | None = None

Optional list of regions to exclude from publication for this image. A region listed in both ‘regions’ and ‘regions_denylist’ will raise a validation error.

Validated by:
field root_device_name: str | None = '/dev/sda1'

The root device name

Validated by:
field root_device_volume_size: int | None = 8

The root device volume size (in GB)

Validated by:
field root_device_volume_type: Literal['gp2', 'gp3'] | None = 'gp3'

The root device volume type

Validated by:
field separate_snapshot: bool = False

Use a separate snapshot for this image?

Validated by:
field share: List[str] | None = None

Optional list of account IDs, organization ARN, OU ARN the image and snapshot will be shared with. The account ID can be prefixed with the partition and separated by ‘:’. Eg ‘aws-cn:123456789123’

Validated by:
field sns: List[Dict[str, ConfigImageSNSNotificationModel]] | None = None

Optional list of SNS Notification related configuration

Validated by:
field ssm_parameter: List[ConfigImageSSMParameterModel] | None = None

Optional list of SSM parameter paths of type aws:ec2:image which will be pushed to the parameter store

Validated by:
field tags: Dict[str, str] | None = {}

Optional Tags to apply to this image only

Validated by:
field temporary: bool | None = False

Optional boolean field indicates that a image is only temporary

Validated by:
field tpm_support: Literal['v2.0'] | None = None

Optional TPM support. If this is set, ‘boot_mode’ must be ‘uefi’

Validated by:
field uefi_data: Path | None = None

Optional path to a non-volatile UEFI variable store (must be already base64 encoded)

Validated by:
validator check_regions_denylist  »  all fields
validator check_share  »  share

Make sure the account IDs are valid and if given the partition is correct

pydantic model awspub.configmodels.ConfigImageMarketplaceModel

Image/AMI Marketplace specific configuration to request new Marketplace versions See https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html for further information

Show JSON schema
{
   "title": "ConfigImageMarketplaceModel",
   "description": "Image/AMI Marketplace specific configuration to request new Marketplace versions\nSee https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html\nfor further information",
   "type": "object",
   "properties": {
      "entity_id": {
         "description": "The entity ID (product ID)",
         "title": "Entity Id",
         "type": "string"
      },
      "access_role_arn": {
         "description": "IAM role Amazon Resource Name (ARN) used by AWS Marketplace to access the provided AMI",
         "title": "Access Role Arn",
         "type": "string"
      },
      "version_title": {
         "description": "The version title. Must be unique across the product",
         "title": "Version Title",
         "type": "string"
      },
      "release_notes": {
         "description": "The release notes",
         "title": "Release Notes",
         "type": "string"
      },
      "user_name": {
         "description": "The login username to access the operating system",
         "title": "User Name",
         "type": "string"
      },
      "scanning_port": {
         "default": 22,
         "description": "Port to access the operating system (default: 22)",
         "title": "Scanning Port",
         "type": "integer"
      },
      "os_name": {
         "description": "Operating system name displayed to Marketplace buyers",
         "title": "Os Name",
         "type": "string"
      },
      "os_version": {
         "description": "Operating system version displayed to Marketplace buyers",
         "title": "Os Version",
         "type": "string"
      },
      "usage_instructions": {
         "description": " Instructions for using the AMI, or a link to more information about the AMI",
         "title": "Usage Instructions",
         "type": "string"
      },
      "recommended_instance_type": {
         "description": "The instance type that is recommended to run the service with the AMI and is the default for 1-click installs of your service",
         "title": "Recommended Instance Type",
         "type": "string"
      },
      "security_groups": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ConfigImageMarketplaceSecurityGroupModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Security Groups"
      }
   },
   "$defs": {
      "ConfigImageMarketplaceSecurityGroupModel": {
         "additionalProperties": false,
         "description": "Image/AMI Marketplace specific configuration for a security group",
         "properties": {
            "from_port": {
               "description": "The source port",
               "title": "From Port",
               "type": "integer"
            },
            "ip_protocol": {
               "description": "The IP protocol (either 'tcp' or 'udp')",
               "enum": [
                  "tcp",
                  "udp"
               ],
               "title": "Ip Protocol",
               "type": "string"
            },
            "ip_ranges": {
               "description": "IP ranges to allow, in CIDR format (eg. '192.0.2.0/24')",
               "items": {
                  "type": "string"
               },
               "title": "Ip Ranges",
               "type": "array"
            },
            "to_port": {
               "description": "The destination port",
               "title": "To Port",
               "type": "integer"
            }
         },
         "required": [
            "from_port",
            "ip_protocol",
            "ip_ranges",
            "to_port"
         ],
         "title": "ConfigImageMarketplaceSecurityGroupModel",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "entity_id",
      "access_role_arn",
      "version_title",
      "release_notes",
      "user_name",
      "os_name",
      "os_version",
      "usage_instructions",
      "recommended_instance_type",
      "security_groups"
   ]
}

Config:
  • extra: str = forbid

Fields:
field access_role_arn: str [Required]

IAM role Amazon Resource Name (ARN) used by AWS Marketplace to access the provided AMI

field entity_id: str [Required]

The entity ID (product ID)

field os_name: str [Required]

Operating system name displayed to Marketplace buyers

field os_version: str [Required]

Operating system version displayed to Marketplace buyers

field recommended_instance_type: str [Required]

The instance type that is recommended to run the service with the AMI and is the default for 1-click installs of your service

field release_notes: str [Required]

The release notes

field scanning_port: int = 22

Port to access the operating system (default: 22)

field security_groups: List[ConfigImageMarketplaceSecurityGroupModel] | None [Required]
field usage_instructions: str [Required]

Instructions for using the AMI, or a link to more information about the AMI

field user_name: str [Required]

The login username to access the operating system

field version_title: str [Required]

The version title. Must be unique across the product

pydantic model awspub.configmodels.ConfigImageMarketplaceSecurityGroupModel

Image/AMI Marketplace specific configuration for a security group

Show JSON schema
{
   "title": "ConfigImageMarketplaceSecurityGroupModel",
   "description": "Image/AMI Marketplace specific configuration for a security group",
   "type": "object",
   "properties": {
      "from_port": {
         "description": "The source port",
         "title": "From Port",
         "type": "integer"
      },
      "ip_protocol": {
         "description": "The IP protocol (either 'tcp' or 'udp')",
         "enum": [
            "tcp",
            "udp"
         ],
         "title": "Ip Protocol",
         "type": "string"
      },
      "ip_ranges": {
         "description": "IP ranges to allow, in CIDR format (eg. '192.0.2.0/24')",
         "items": {
            "type": "string"
         },
         "title": "Ip Ranges",
         "type": "array"
      },
      "to_port": {
         "description": "The destination port",
         "title": "To Port",
         "type": "integer"
      }
   },
   "additionalProperties": false,
   "required": [
      "from_port",
      "ip_protocol",
      "ip_ranges",
      "to_port"
   ]
}

Config:
  • extra: str = forbid

Fields:
field from_port: int [Required]

The source port

field ip_protocol: Literal['tcp', 'udp'] [Required]

The IP protocol (either ‘tcp’ or ‘udp’)

field ip_ranges: List[str] [Required]

IP ranges to allow, in CIDR format (eg. ‘192.0.2.0/24’)

field to_port: int [Required]

The destination port

pydantic model awspub.configmodels.ConfigImageSNSNotificationModel

Image/AMI SNS Notification specific configuration to notify subscribers about new images availability

Show JSON schema
{
   "title": "ConfigImageSNSNotificationModel",
   "description": "Image/AMI SNS Notification specific configuration to notify subscribers about new images availability",
   "type": "object",
   "properties": {
      "subject": {
         "description": "The subject of SNS Notification",
         "maxLength": 99,
         "minLength": 1,
         "title": "Subject",
         "type": "string"
      },
      "message": {
         "additionalProperties": {
            "type": "string"
         },
         "default": {
            "default": ""
         },
         "description": "The body of the message to be sent to subscribers.",
         "propertyNames": {
            "$ref": "#/$defs/SNSNotificationProtocol"
         },
         "title": "Message",
         "type": "object"
      },
      "regions": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of regions for sending notification. If not given, regions where the image registered will be used from the currently used parition. If a region doesn't exist in the currently used partition, it will be ignored.",
         "title": "Regions"
      },
      "regions_denylist": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional list of regions to exclude from sending notifications. A region listed in both 'regions' and 'regions_denylist' will raise a validation error.",
         "title": "Regions Denylist"
      }
   },
   "$defs": {
      "SNSNotificationProtocol": {
         "enum": [
            "default",
            "email"
         ],
         "title": "SNSNotificationProtocol",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "subject"
   ]
}

Config:
  • extra: str = forbid

Fields:
Validators:
field message: Dict[SNSNotificationProtocol, str] = {SNSNotificationProtocol.DEFAULT: ''}

The body of the message to be sent to subscribers.

Validated by:
field regions: List[str] | None = None

Optional list of regions for sending notification. If not given, regions where the image registered will be used from the currently used parition. If a region doesn’t exist in the currently used partition, it will be ignored.

Validated by:
field regions_denylist: List[str] | None = None

Optional list of regions to exclude from sending notifications. A region listed in both ‘regions’ and ‘regions_denylist’ will raise a validation error.

Validated by:
field subject: str [Required]

The subject of SNS Notification

Constraints:
  • min_length = 1

  • max_length = 99

Validated by:
validator check_message  »  message
validator check_regions_denylist  »  all fields