Auto Scaling (autoscaling)

Primary Models

Primary models are models that you can act on directly. They are the models that represent resources in the AWS service, and are acted on by the managers.

pydantic model botocraft.services.autoscaling.AutoScalingGroup[source]

Bases: TagsDictMixin, AutoScalingGroupModelMixin, PrimaryBoto3Model

Describes an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingGroup",
   "description": "Describes an Auto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "AutoScalingGroupName": {
         "title": "Autoscalinggroupname",
         "type": "string"
      },
      "MinSize": {
         "title": "Minsize",
         "type": "integer"
      },
      "MaxSize": {
         "title": "Maxsize",
         "type": "integer"
      },
      "DefaultCooldown": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": 300,
         "title": "Defaultcooldown"
      },
      "AutoScalingGroupARN": {
         "default": null,
         "title": "Autoscalinggrouparn",
         "type": "string"
      },
      "LaunchConfigurationName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchconfigurationname"
      },
      "LaunchTemplate": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "MixedInstancesPolicy": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingMixedInstancesPolicy"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "DesiredCapacity": {
         "title": "Desiredcapacity",
         "type": "integer"
      },
      "PredictedCapacity": {
         "default": null,
         "title": "Predictedcapacity",
         "type": "integer"
      },
      "AvailabilityZones": {
         "items": {
            "type": "string"
         },
         "title": "Availabilityzones",
         "type": "array"
      },
      "AvailabilityZoneIds": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Availabilityzoneids"
      },
      "LoadBalancerNames": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Loadbalancernames"
      },
      "TargetGroupARNs": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Targetgrouparns"
      },
      "HealthCheckType": {
         "title": "Healthchecktype",
         "type": "string"
      },
      "HealthCheckGracePeriod": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Healthcheckgraceperiod"
      },
      "Instances": {
         "items": {
            "$ref": "#/$defs/AutoScalingInstanceReference"
         },
         "title": "Instances",
         "type": "array"
      },
      "CreatedTime": {
         "format": "date-time",
         "title": "Createdtime",
         "type": "string"
      },
      "SuspendedProcesses": {
         "items": {
            "$ref": "#/$defs/SuspendedProcess"
         },
         "title": "Suspendedprocesses",
         "type": "array"
      },
      "PlacementGroup": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Placementgroup"
      },
      "VPCZoneIdentifier": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Vpczoneidentifier"
      },
      "EnabledMetrics": {
         "items": {
            "$ref": "#/$defs/EnabledMetric"
         },
         "title": "Enabledmetrics",
         "type": "array"
      },
      "Status": {
         "default": null,
         "title": "Status",
         "type": "string"
      },
      "Tags": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/AutoScalingTagDescription"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Tags"
      },
      "TerminationPolicies": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Terminationpolicies"
      },
      "NewInstancesProtectedFromScaleIn": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Newinstancesprotectedfromscalein"
      },
      "ServiceLinkedRoleARN": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Servicelinkedrolearn"
      },
      "MaxInstanceLifetime": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maxinstancelifetime"
      },
      "CapacityRebalance": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Capacityrebalance"
      },
      "WarmPoolConfiguration": {
         "$ref": "#/$defs/AutoScalingWarmPoolConfiguration",
         "default": null
      },
      "WarmPoolSize": {
         "default": null,
         "title": "Warmpoolsize",
         "type": "integer"
      },
      "Context": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Context"
      },
      "DesiredCapacityType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Desiredcapacitytype"
      },
      "DefaultInstanceWarmup": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Defaultinstancewarmup"
      },
      "TrafficSources": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TrafficSourceIdentifier"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Trafficsources"
      },
      "InstanceMaintenancePolicy": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstanceMaintenancePolicy"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "DeletionProtection": {
         "anyOf": [
            {
               "enum": [
                  "none",
                  "prevent-force-deletion",
                  "prevent-all-deletion"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Deletionprotection"
      },
      "AvailabilityZoneDistribution": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingAvailabilityZoneDistribution"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "AvailabilityZoneImpairmentPolicy": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingAvailabilityZoneImpairmentPolicy"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "CapacityReservationSpecification": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingCapacityReservationSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "InstanceLifecyclePolicy": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstanceLifecyclePolicy"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingAvailabilityZoneDistribution": {
         "description": "Describes an Availability Zone distribution.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityDistributionStrategy": {
               "anyOf": [
                  {
                     "enum": [
                        "balanced-only",
                        "balanced-best-effort"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Capacitydistributionstrategy"
            }
         },
         "title": "AutoScalingAvailabilityZoneDistribution",
         "type": "object"
      },
      "AutoScalingAvailabilityZoneImpairmentPolicy": {
         "description": "Describes an Availability Zone impairment policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ZonalShiftEnabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Zonalshiftenabled"
            },
            "ImpairedZoneHealthCheckBehavior": {
               "anyOf": [
                  {
                     "enum": [
                        "ReplaceUnhealthy",
                        "IgnoreUnhealthy"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Impairedzonehealthcheckbehavior"
            }
         },
         "title": "AutoScalingAvailabilityZoneImpairmentPolicy",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCapacityReservationSpecification": {
         "description": "Describes the Capacity Reservation preference and targeting options.\n\nIf you specify ``open`` or ``none`` for\n``CapacityReservationPreference``, do not specify a ``CapacityReservationTarget``.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityReservationPreference": {
               "anyOf": [
                  {
                     "enum": [
                        "capacity-reservations-only",
                        "capacity-reservations-first",
                        "none",
                        "default"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Capacityreservationpreference"
            },
            "CapacityReservationTarget": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCapacityReservationTarget"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingCapacityReservationSpecification",
         "type": "object"
      },
      "AutoScalingCapacityReservationTarget": {
         "description": "The target for the Capacity Reservation.\n\nSpecify Capacity Reservations IDs or Capacity Reservation resource group ARNs.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityReservationIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationids"
            },
            "CapacityReservationResourceGroupArns": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationresourcegrouparns"
            }
         },
         "title": "AutoScalingCapacityReservationTarget",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingInstanceLifecyclePolicy": {
         "description": "The instance lifecycle policy for the Auto Scaling group. This policy controls\ninstance behavior when an instance transitions through its lifecycle states.\nConfigure retention triggers to specify when instances should move to a ``Retained``\nstate instead of automatic termination.\n\nFor more information, see\n`Control instance retention with instance lifecycle policies <https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-lifecycle-policy.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "RetentionTriggers": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingRetentionTriggers"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingInstanceLifecyclePolicy",
         "type": "object"
      },
      "AutoScalingInstanceMaintenancePolicy": {
         "description": "Describes an instance maintenance policy.\n\nFor more information, see\n`Set instance maintenance policy <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "MinHealthyPercentage": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minhealthypercentage"
            },
            "MaxHealthyPercentage": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxhealthypercentage"
            }
         },
         "title": "AutoScalingInstanceMaintenancePolicy",
         "type": "object"
      },
      "AutoScalingInstanceReference": {
         "description": "Describes an EC2 instance.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceId": {
               "title": "Instanceid",
               "type": "string"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "AvailabilityZone": {
               "title": "Availabilityzone",
               "type": "string"
            },
            "AvailabilityZoneId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Availabilityzoneid"
            },
            "LifecycleState": {
               "enum": [
                  "Pending",
                  "Pending:Wait",
                  "Pending:Proceed",
                  "Quarantined",
                  "InService",
                  "Terminating",
                  "Terminating:Wait",
                  "Terminating:Proceed",
                  "Terminating:Retained",
                  "Terminated",
                  "Detaching",
                  "Detached",
                  "EnteringStandby",
                  "Standby",
                  "ReplacingRootVolume",
                  "ReplacingRootVolume:Wait",
                  "ReplacingRootVolume:Proceed",
                  "RootVolumeReplaced",
                  "Warmed:Pending",
                  "Warmed:Pending:Wait",
                  "Warmed:Pending:Proceed",
                  "Warmed:Pending:Retained",
                  "Warmed:Terminating",
                  "Warmed:Terminating:Wait",
                  "Warmed:Terminating:Proceed",
                  "Warmed:Terminating:Retained",
                  "Warmed:Terminated",
                  "Warmed:Stopped",
                  "Warmed:Running",
                  "Warmed:Hibernated"
               ],
               "title": "Lifecyclestate",
               "type": "string"
            },
            "HealthStatus": {
               "title": "Healthstatus",
               "type": "string"
            },
            "LaunchConfigurationName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchconfigurationname"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            },
            "ProtectedFromScaleIn": {
               "title": "Protectedfromscalein",
               "type": "boolean"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            }
         },
         "required": [
            "InstanceId",
            "AvailabilityZone",
            "LifecycleState",
            "HealthStatus",
            "ProtectedFromScaleIn"
         ],
         "title": "AutoScalingInstanceReference",
         "type": "object"
      },
      "AutoScalingInstanceRequirements": {
         "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VCpuCount": {
               "$ref": "#/$defs/VCpuCountRequest"
            },
            "MemoryMiB": {
               "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
            },
            "CpuManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "intel",
                           "amd",
                           "amazon-web-services",
                           "apple"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Cpumanufacturers"
            },
            "MemoryGiBPerVCpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ExcludedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Excludedinstancetypes"
            },
            "InstanceGenerations": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "current",
                           "previous"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Instancegenerations"
            },
            "SpotMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxpricepercentageoverlowestprice"
            },
            "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxspotpriceaspercentageofoptimalondemandprice"
            },
            "OnDemandMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandmaxpricepercentageoverlowestprice"
            },
            "BareMetal": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Baremetal"
            },
            "BurstablePerformance": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Burstableperformance"
            },
            "RequireHibernateSupport": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Requirehibernatesupport"
            },
            "NetworkInterfaceCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "LocalStorage": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Localstorage"
            },
            "LocalStorageTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "hdd",
                           "ssd"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Localstoragetypes"
            },
            "TotalLocalStorageGB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "BaselineEbsBandwidthMbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "gpu",
                           "fpga",
                           "inference"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratortypes"
            },
            "AcceleratorCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "nvidia",
                           "amd",
                           "amazon-web-services",
                           "xilinx"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratormanufacturers"
            },
            "AcceleratorNames": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "a100",
                           "v100",
                           "k80",
                           "t4",
                           "m60",
                           "radeon-pro-v520",
                           "vu9p"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratornames"
            },
            "AcceleratorTotalMemoryMiB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NetworkBandwidthGbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AllowedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Allowedinstancetypes"
            },
            "BaselinePerformanceFactors": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "VCpuCount",
            "MemoryMiB"
         ],
         "title": "AutoScalingInstanceRequirements",
         "type": "object"
      },
      "AutoScalingInstanceReusePolicy": {
         "description": "Describes an instance reuse policy for a warm pool.\n\nFor more information, see\n`Warm pools for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ReuseOnScaleIn": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reuseonscalein"
            }
         },
         "title": "AutoScalingInstanceReusePolicy",
         "type": "object"
      },
      "AutoScalingInstancesDistribution": {
         "description": "Use this structure to specify the distribution of On-Demand Instances and Spot\nInstances and the allocation strategies used to fulfill On-Demand and Spot\ncapacities for a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "OnDemandAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandallocationstrategy"
            },
            "OnDemandBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandbasecapacity"
            },
            "OnDemandPercentageAboveBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandpercentageabovebasecapacity"
            },
            "SpotAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotallocationstrategy"
            },
            "SpotInstancePools": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotinstancepools"
            },
            "SpotMaxPrice": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxprice"
            }
         },
         "title": "AutoScalingInstancesDistribution",
         "type": "object"
      },
      "AutoScalingLaunchTemplate": {
         "description": "Use this structure to specify the launch templates and instance types (overrides)\nfor a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "Overrides": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/LaunchTemplateOverrides"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Overrides"
            }
         },
         "title": "AutoScalingLaunchTemplate",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingMixedInstancesPolicy": {
         "description": "Use this structure to launch multiple instance types and On-Demand Instances and\nSpot Instances within a single Auto Scaling group.\n\nA mixed instances policy contains information that Amazon EC2 Auto Scaling can use\nto launch instances and help optimize your costs. For more information, see\n`Auto Scaling groups with multiple instance types and purchase options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplate"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstancesDistribution": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstancesDistribution"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingMixedInstancesPolicy",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingRetentionTriggers": {
         "description": "Defines the specific triggers that cause instances to be retained in a Retained\nstate rather than terminated.\n\nEach trigger corresponds to a different failure scenario during the instance\nlifecycle. This allows fine-grained control over when to preserve instances for\nmanual intervention.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "TerminateHookAbandon": {
               "anyOf": [
                  {
                     "enum": [
                        "retain",
                        "terminate"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Terminatehookabandon"
            }
         },
         "title": "AutoScalingRetentionTriggers",
         "type": "object"
      },
      "AutoScalingTagDescription": {
         "description": "Describes a tag for an Auto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ResourceId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Resourceid"
            },
            "ResourceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Resourcetype"
            },
            "Key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "Value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            },
            "PropagateAtLaunch": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Propagateatlaunch"
            }
         },
         "title": "AutoScalingTagDescription",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "AutoScalingWarmPoolConfiguration": {
         "description": "Describes a warm pool configuration.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "MaxGroupPreparedCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxgrouppreparedcapacity"
            },
            "MinSize": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minsize"
            },
            "PoolState": {
               "anyOf": [
                  {
                     "enum": [
                        "Stopped",
                        "Running",
                        "Hibernated"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Poolstate"
            },
            "Status": {
               "anyOf": [
                  {
                     "const": "PendingDelete",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Status"
            },
            "InstanceReusePolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceReusePolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingWarmPoolConfiguration",
         "type": "object"
      },
      "EnabledMetric": {
         "description": "Describes an enabled Auto Scaling group metric.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Metric": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Metric"
            },
            "Granularity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Granularity"
            }
         },
         "title": "EnabledMetric",
         "type": "object"
      },
      "LaunchTemplateOverrides": {
         "description": "Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances\npolicy:\n\n* Override the instance type that is specified in the launch template.\n* Use multiple instance types.\n\nSpecify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling\nprovision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a\nlarger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which\ninstance types are matched before you apply the instance requirements to your Auto Scaling group.\n\nAfter you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance\ntypes automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine\nwhether a new EC2 instance type can be used.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstanceRequirements": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceRequirements"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            }
         },
         "title": "LaunchTemplateOverrides",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "SuspendedProcess": {
         "description": "Describes an auto scaling process that has been suspended.\n\nFor more information, see\n`Types of processes <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-\nprocesses.html#process-types>`_ in the *Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ProcessName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Processname"
            },
            "SuspensionReason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Suspensionreason"
            }
         },
         "title": "SuspendedProcess",
         "type": "object"
      },
      "TrafficSourceIdentifier": {
         "description": "Identifying information for a traffic source.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Identifier": {
               "title": "Identifier",
               "type": "string"
            },
            "Type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            }
         },
         "required": [
            "Identifier"
         ],
         "title": "TrafficSourceIdentifier",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   },
   "required": [
      "AutoScalingGroupName",
      "MinSize",
      "MaxSize",
      "DesiredCapacity",
      "AvailabilityZones",
      "HealthCheckType",
      "CreatedTime"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AutoScalingGroupARN: str = None

The Amazon Resource Name (ARN) of the Auto Scaling group.

field AutoScalingGroupName: str [Required]

The name of the Auto Scaling group.

field AvailabilityZoneDistribution: AutoScalingAvailabilityZoneDistribution | None = None

The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.

field AvailabilityZoneIds: builtins.list[str] | None [Optional]

The Availability Zone IDs where the Auto Scaling group can launch instances.

field AvailabilityZoneImpairmentPolicy: AutoScalingAvailabilityZoneImpairmentPolicy | None = None

The Availability Zone impairment policy for the Auto Scaling group.

field AvailabilityZones: builtins.list[str] [Required]

One or more Availability Zones for the Auto Scaling group.

field CapacityRebalance: bool | None = None

Indicates whether Capacity Rebalancing is enabled.

field CapacityReservationSpecification: AutoScalingCapacityReservationSpecification | None = None

The capacity reservation specification for the Auto Scaling group.

field Context: str | None = None

Reserved.

field CreatedTime: datetime [Required]

The date and time the Auto Scaling group was created.

field DefaultCooldown: int | None = 300

The duration of the default cooldown period, in seconds, for the Auto Scaling group.

field DefaultInstanceWarmup: int | None = None

The duration of the default EC2 instance warmup time, in seconds, for the Auto Scaling group.

field DeletionProtection: Literal['none', 'prevent-force-deletion', 'prevent-all-deletion'] | None = None

The deletion protection setting for the Auto Scaling group.

field DesiredCapacity: int [Required]

The desired size of the Auto Scaling group.

field DesiredCapacityType: str | None = None

The unit of measurement for the value specified for desired capacity.

Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based instance type selection only.

field EnabledMetrics: builtins.list[EnabledMetric] [Optional]

The metrics enabled for the Auto Scaling group.

field HealthCheckGracePeriod: int | None = None

The duration of the health check grace period, in seconds, for the Auto Scaling group.

field HealthCheckType: str [Required]

One or more comma-separated health check types for the Auto Scaling group.

field InstanceLifecyclePolicy: AutoScalingInstanceLifecyclePolicy | None = None

The instance lifecycle policy for the Auto Scaling group.

field InstanceMaintenancePolicy: AutoScalingInstanceMaintenancePolicy | None = None

An instance maintenance policy.

field Instances: builtins.list[AutoScalingInstanceReference] [Optional]

The EC2 instances associated with the Auto Scaling group.

field LaunchConfigurationName: str | None = None

The name of the associated launch configuration for the Auto Scaling group.

field LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None

The launch template for the Auto Scaling group.

field LoadBalancerNames: builtins.list[str] | None [Optional]

One or more load balancers associated with the group.

field MaxInstanceLifetime: int | None = None

The maximum amount of time, in seconds, that an EC2 instance can be in service for the Auto Scaling group.

field MaxSize: int [Required]

The maximum size of the Auto Scaling group.

field MinSize: int [Required]

The minimum size of the Auto Scaling group.

field MixedInstancesPolicy: AutoScalingMixedInstancesPolicy | None = None

The mixed instances policy for the group.

field NewInstancesProtectedFromScaleIn: bool | None = None

Indicates whether newly launched EC2 instances are protected from termination when scaling in for the Auto Scaling group.

field PlacementGroup: str | None = None

The name of the placement group into which to launch EC2 instances for the Auto Scaling group.

field PredictedCapacity: int = None

The predicted capacity of the group when it has a predictive scaling policy.

field ServiceLinkedRoleARN: str | None = None

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services on your behalf.

field Status: str = None

The current state of the Auto Scaling group when the DeleteAutoScalingGroup operation is in progress.

field SuspendedProcesses: builtins.list[SuspendedProcess] [Optional]

The suspended processes associated with the Auto Scaling group.

field Tags: builtins.list[AutoScalingTagDescription] | None [Optional]

The tags for the Auto Scaling group.

field TargetGroupARNs: builtins.list[str] | None [Optional]

The Amazon Resource Names (ARN) of the target groups for your load balancer.

field TerminationPolicies: builtins.list[str] | None [Optional]

The termination policies for the Auto Scaling group.

field TrafficSources: builtins.list[TrafficSourceIdentifier] | None [Optional]

The traffic sources associated with this Auto Scaling group.

field VPCZoneIdentifier: str | None = None

One or more comma-separated subnet IDs for the Auto Scaling group.

field WarmPoolConfiguration: AutoScalingWarmPoolConfiguration = None

The warm pool for the group.

field WarmPoolSize: int = None

The current size of the warm pool.

field session: boto3.session.Session = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

manager_class

alias of AutoScalingGroupManager

tag_class

alias of AutoScalingTagDescription

delete()

Delete the model.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

save(**kwargs)

Save the model.

scale(desired_count: int, wait: bool = False, max_attempts: int = 40) None

Scale the autoscaling group to the desired count.

Parameters:

desired_count – The number of tasks to run.

Keyword Arguments:
  • wait – If True, wait for the service to reach the desired count.

  • max_attempts – The maximum number of attempts to make before giving up

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

wait_until_stable(max_attempts: int = 40, delay: int = 15) None

Since there is no waiter for this, we’ll use this method to wait until the autoscaling group is stable.

Raises:

botocore.exceptions.WaiterError – If the autoscaling group is not stable after max_attempts.

Keyword Arguments:
  • max_attempts – The maximum number of attempts to make before giving up.

  • delay – The number of seconds to wait between attempts.

property arn: str | None

Return the ARN of the model. This is the value of the AutoScalingGroupARN attribute.

Returns:

The ARN of the model instance.

property ec2_instances: PrimaryBoto3ModelQuerySet

Return the running Instance objects that belong to this group, if any.

property is_stable: bool

Return True if the autoscaling group is stable, False otherwise.

An autoscaling group is considered stable if all instances are running and healthy and the DesiredCapacity is equal to the number of instances.

property launch_configuration: LaunchConfiguration | None

Return the LaunchConfiguration object that this group uses, if any.

Note

The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.

property launch_template: LaunchTemplateVersion | None

Return the LaunchTemplate object that this group uses, if any.

Note

The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.

property name: str | None

Return the name of the model. This is the value of the AutoScalingGroupName attribute.

Returns:

The name of the model instance.

objects: ClassVar['AutoScalingGroupManager']

Get the manager for this model, and set it as a class property

property pk: str | None

Return the primary key of the model. This is the value of the AutoScalingGroupName attribute.

Returns:

The primary key of the model instance.

property tags: TagsDict

Get the tags for the model instance.

Returns:

The tags for the model instance.

pydantic model botocraft.services.autoscaling.LaunchConfiguration[source]

Bases: PrimaryBoto3Model

Describes a launch configuration.

Show JSON schema
{
   "title": "LaunchConfiguration",
   "description": "Describes a launch configuration.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LaunchConfigurationName": {
         "title": "Launchconfigurationname",
         "type": "string"
      },
      "LaunchConfigurationARN": {
         "default": null,
         "title": "Launchconfigurationarn",
         "type": "string"
      },
      "ImageId": {
         "title": "Imageid",
         "type": "string"
      },
      "KeyName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Keyname"
      },
      "SecurityGroups": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Securitygroups"
      },
      "ClassicLinkVPCId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Classiclinkvpcid"
      },
      "ClassicLinkVPCSecurityGroups": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Classiclinkvpcsecuritygroups"
      },
      "UserData": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Userdata"
      },
      "InstanceType": {
         "title": "Instancetype",
         "type": "string"
      },
      "KernelId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Kernelid"
      },
      "RamdiskId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ramdiskid"
      },
      "BlockDeviceMappings": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/AutoScalingBlockDeviceMapping"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Blockdevicemappings"
      },
      "InstanceMonitoring": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstanceMonitoring"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "SpotPrice": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spotprice"
      },
      "IamInstanceProfile": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Iaminstanceprofile"
      },
      "CreatedTime": {
         "format": "date-time",
         "title": "Createdtime",
         "type": "string"
      },
      "EbsOptimized": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ebsoptimized"
      },
      "AssociatePublicIpAddress": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Associatepublicipaddress"
      },
      "PlacementTenancy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Placementtenancy"
      },
      "MetadataOptions": {
         "anyOf": [
            {
               "$ref": "#/$defs/InstanceMetadataOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingBlockDeviceMapping": {
         "description": "Describes a block device mapping.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VirtualName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Virtualname"
            },
            "DeviceName": {
               "title": "Devicename",
               "type": "string"
            },
            "Ebs": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/EbsMapping"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NoDevice": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Nodevice"
            }
         },
         "required": [
            "DeviceName"
         ],
         "title": "AutoScalingBlockDeviceMapping",
         "type": "object"
      },
      "AutoScalingInstanceMonitoring": {
         "description": "Describes whether detailed monitoring is enabled for the Auto Scaling instances.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Enabled"
            }
         },
         "title": "AutoScalingInstanceMonitoring",
         "type": "object"
      },
      "EbsMapping": {
         "description": "Describes information used to set up an Amazon EBS volume specified in a block\ndevice mapping.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "SnapshotId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Snapshotid"
            },
            "VolumeSize": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumesize"
            },
            "VolumeType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumetype"
            },
            "DeleteOnTermination": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Deleteontermination"
            },
            "Iops": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Iops"
            },
            "Encrypted": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Encrypted"
            },
            "Throughput": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Throughput"
            }
         },
         "title": "EbsMapping",
         "type": "object"
      },
      "InstanceMetadataOptions": {
         "description": "The metadata options for the instances.\n\nFor more information, see\n`Configure the instance metadata options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds>`_\nin\nthe *Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "HttpTokens": {
               "anyOf": [
                  {
                     "enum": [
                        "optional",
                        "required"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httptokens"
            },
            "HttpPutResponseHopLimit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httpputresponsehoplimit"
            },
            "HttpEndpoint": {
               "anyOf": [
                  {
                     "enum": [
                        "enabled",
                        "disabled"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httpendpoint"
            }
         },
         "title": "InstanceMetadataOptions",
         "type": "object"
      }
   },
   "required": [
      "LaunchConfigurationName",
      "ImageId",
      "InstanceType",
      "CreatedTime"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AssociatePublicIpAddress: bool | None = None

Specifies whether to assign a public IPv4 address to the group’s instances.

If the instance is launched into a default subnet, the default is to assign a public IPv4 address, unless you disabled the option to assign a public IPv4 address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IPv4 address, unless you enabled the option to assign a public IPv4 address on the subnet. For more information, see Provide network connectivity for your Auto Scaling instances using Amazon VPC in the Amazon EC2 Auto Scaling User Guide.

field BlockDeviceMappings: builtins.list[AutoScalingBlockDeviceMapping] | None [Optional]

The block device mapping entries that define the block devices to attach to the instances at launch.

By default, the block devices specified in the block device mapping for the AMI are used. For more information, see Block device mappings in the Amazon EC2 User Guide.

field ClassicLinkVPCId: str | None = None

Available for backward compatibility.

field ClassicLinkVPCSecurityGroups: builtins.list[str] | None [Optional]

Available for backward compatibility.

field CreatedTime: datetime [Required]

The creation date and time for the launch configuration.

field EbsOptimized: bool | None = None

Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).

For more information, see Amazon EBS-optimized instances in the Amazon EC2 User Guide.

field IamInstanceProfile: str | None = None

The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

The instance profile contains the IAM role. For more information, see IAM role for applications that run on Amazon EC2 instances in the Amazon EC2 Auto Scaling User Guide.

field ImageId: str [Required]

The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

For more information, see Find a Linux AMI in the Amazon EC2 User Guide.

field InstanceMonitoring: AutoScalingInstanceMonitoring | None = None

Controls whether instances in this group are launched with detailed (true) or basic (false) monitoring.

field InstanceType: str [Required]

The instance type for the instances.

For information about available instance types, see Available instance types in the Amazon EC2 User Guide.

field KernelId: str | None = None

The ID of the kernel associated with the AMI.

field KeyName: str | None = None

The name of the key pair.

field LaunchConfigurationARN: str = None

The Amazon Resource Name (ARN) of the launch configuration.

field LaunchConfigurationName: str [Required]

The name of the launch configuration.

field MetadataOptions: InstanceMetadataOptions | None = None

The metadata options for the instances.

For more information, see Configure the instance metadata options in the Amazon EC2 Auto Scaling User Guide.

field PlacementTenancy: str | None = None

The tenancy of the instance, either default or dedicated.

An instance with dedicated tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC.

field RamdiskId: str | None = None

The ID of the RAM disk associated with the AMI.

field SecurityGroups: builtins.list[str] | None [Optional]

A list that contains the security groups to assign to the instances in the Auto Scaling group.

For more information, see Control traffic to your Amazon Web Services resources using security groups in the Amazon Virtual Private Cloud User Guide.

field SpotPrice: str | None = None

The maximum hourly price to be paid for any Spot Instance launched to fulfill the request.

Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see Requesting Spot Instances for fault-tolerant and flexible applications in the Amazon EC2 Auto Scaling User Guide.

field UserData: str | None = None

The user data to make available to the launched EC2 instances.

For more information, see Instance metadata and user data in the Amazon EC2 User Guide. If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

manager_class

alias of LaunchConfigurationManager

delete()

Delete the model.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

save(**kwargs)

Save the model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

property ami: AMI | None

Return the AMI object that this launch configuration uses.

Note

The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.

property arn: str | None

Return the ARN of the model. This is the value of the LaunchConfigurationARN attribute.

Returns:

The ARN of the model instance.

property instance_type: EC2InstanceType | None

Return the EC2InstanceType object that this launch configuration uses.

Note

The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.

property name: str | None

Return the name of the model. This is the value of the LaunchConfigurationName attribute.

Returns:

The name of the model instance.

objects: ClassVar[classproperty]

Get the manager for this model, and set it as a class property

property pk: str | None

Return the primary key of the model. This is the value of the LaunchConfigurationName attribute.

Returns:

The primary key of the model instance.

property security_groups: list[botocraft.services.ec2.SecurityGroup] | None

Return the security groups that this launch configuration uses.

Note

The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.

Managers

Managers work with the primary models to provide a high-level interface to the AWS service. They are responsible for creating, updating, and deleting the resources in the service, as well as any additional operations that are available for those models.

class botocraft.services.autoscaling.AutoScalingGroupManager[source]

Bases: Boto3ModelManager

create(model: AutoScalingGroup, InstanceId: str | None = None, LifecycleHookSpecificationList: list[botocraft.services.autoscaling.LifecycleHookSpecification] | None = None, SkipZonalShiftValidation: bool | None = None) None[source]

We strongly recommend using a launch template when calling this operation to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.

Parameters:

model – The AutoScalingGroup to create.

Keyword Arguments:
  • InstanceId – The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 DescribeInstances API operation. For more information, see Create an Auto Scaling group using parameters from an existing instance in the Amazon EC2 Auto Scaling User Guide.

  • LifecycleHookSpecificationList – One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.

  • SkipZonalShiftValidation – If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify true. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.

delete(AutoScalingGroupName: str, *, ForceDelete: bool | None = None) None[source]

Deletes the specified Auto Scaling group.

Parameters:

AutoScalingGroupName – The name of the Auto Scaling group.

Keyword Arguments:

ForceDelete – Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated with the group.

get(AutoScalingGroupName: str, *, IncludeInstances: bool | None = None) AutoScalingGroup | None[source]

Gets information about the Auto Scaling groups in the account and Region.

Parameters:

AutoScalingGroupName – The name of the Auto Scaling group. The name can be a maximum of 1600 characters.

Keyword Arguments:

IncludeInstances – Specifies whether to include information about Amazon EC2 instances in the response. When set to true (default), the response includes instance details.

instance_status(*, InstanceIds: list[str] | None = None) list[botocraft.services.autoscaling.AutoScalingInstanceDetails][source]

Gets information about the Auto Scaling instances in the account and Region.

Keyword Arguments:

InstanceIds – The IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error.

list(*, AutoScalingGroupNames: list[str] | None = None, IncludeInstances: bool | None = None, Filters: list[botocraft.services.common.Filter] | None = None) PrimaryBoto3ModelQuerySet[source]

Gets information about the Auto Scaling groups in the account and Region.

Keyword Arguments:
  • AutoScalingGroupNames – The names of the Auto Scaling groups. By default, you can only specify up to 50 names. You can optionally increase this limit using the MaxRecords property.

  • IncludeInstances – Specifies whether to include information about Amazon EC2 instances in the response. When set to true (default), the response includes instance details.

  • Filters – One or more filters to limit the results based on specific tags.

scale(AutoScalingGroupName: str, DesiredCapacity: int) None[source]

Sets the size of the specified Auto Scaling group.

Parameters:
  • AutoScalingGroupName – The name of the Auto Scaling group.

  • DesiredCapacity – The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain.

terminate_instance(InstanceId: str, ShouldDecrementDesiredCapacity: bool) ActivityType[source]

Terminates the specified instance and optionally adjusts the desired group size. This operation cannot be called on instances in a warm pool.

Parameters:
  • InstanceId – The ID of the instance.

  • ShouldDecrementDesiredCapacity – Indicates whether terminating the instance also decrements the size of the Auto Scaling group.

update(model: AutoScalingGroup, SkipZonalShiftValidation: bool | None = None) None[source]

We strongly recommend that all Auto Scaling groups use launch templates to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.

Parameters:

model – The AutoScalingGroup to update.

Keyword Arguments:

SkipZonalShiftValidation

If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify true. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.

service_name: str = 'autoscaling'

ec2, s3, etc.

Type:

The name of the boto3 service. Example

class botocraft.services.autoscaling.LaunchConfigurationManager[source]

Bases: Boto3ModelManager

create(model: LaunchConfiguration, InstanceId: str | None = None) None[source]

Creates a launch configuration.

Parameters:

model – The LaunchConfiguration to create.

Keyword Arguments:

InstanceId – The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.

delete(LaunchConfigurationName: str) None[source]

Deletes the specified launch configuration.

Parameters:

LaunchConfigurationName – The name of the launch configuration.

get(LaunchConfigurationName: str) LaunchConfiguration | None[source]

Gets information about the launch configurations in the account and Region.

Parameters:

LaunchConfigurationName – The name of the launch configuration. This name must be unique per Region per account.

list(*, LaunchConfigurationNames: list[str] | None = None) PrimaryBoto3ModelQuerySet[source]

Gets information about the launch configurations in the account and Region.

Keyword Arguments:

LaunchConfigurationNames – The launch configuration names. If you omit this property, all launch configurations are described.

service_name: str = 'autoscaling'

ec2, s3, etc.

Type:

The name of the boto3 service. Example

Secondary Models

Secondary models are models that are used by the primary models to organize their data. They are not acted on directly, but are used to describe the structure of the fields in the primary models or other secondary models.

pydantic model botocraft.services.autoscaling.AutoScalingAcceleratorCountRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the AcceleratorCount object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingAcceleratorCountRequest",
   "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The maximum value.

field Min: int | None = None

The minimum value.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingAcceleratorTotalMemoryMiBRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the AcceleratorTotalMemoryMiB object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
   "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The memory maximum in MiB.

field Min: int | None = None

The memory minimum in MiB.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingAvailabilityZoneDistribution[source]

Bases: Boto3Model

Describes an Availability Zone distribution.

Show JSON schema
{
   "title": "AutoScalingAvailabilityZoneDistribution",
   "description": "Describes an Availability Zone distribution.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "CapacityDistributionStrategy": {
         "anyOf": [
            {
               "enum": [
                  "balanced-only",
                  "balanced-best-effort"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Capacitydistributionstrategy"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field CapacityDistributionStrategy: Literal['balanced-only', 'balanced-best-effort'] | None = None

If launches fail in an Availability Zone, the following strategies are available.

The default is balanced-best- effort.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingAvailabilityZoneImpairmentPolicy[source]

Bases: Boto3Model

Describes an Availability Zone impairment policy.

Show JSON schema
{
   "title": "AutoScalingAvailabilityZoneImpairmentPolicy",
   "description": "Describes an Availability Zone impairment policy.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "ZonalShiftEnabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Zonalshiftenabled"
      },
      "ImpairedZoneHealthCheckBehavior": {
         "anyOf": [
            {
               "enum": [
                  "ReplaceUnhealthy",
                  "IgnoreUnhealthy"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Impairedzonehealthcheckbehavior"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ImpairedZoneHealthCheckBehavior: Literal['ReplaceUnhealthy', 'IgnoreUnhealthy'] | None = None

Specifies the health check behavior for the impaired Availability Zone in an active zonal shift.

If you select Replace unhealthy, instances that appear unhealthy will be replaced in all Availability Zones. If you select Ignore unhealthy, instances will not be replaced in the Availability Zone with the active zonal shift. For more information, see Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.

field ZonalShiftEnabled: bool | None = None

If true, enable zonal shift for your Auto Scaling group.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingBaselineEbsBandwidthMbsRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the BaselineEbsBandwidthMbps object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
   "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The maximum value in Mbps.

field Min: int | None = None

The minimum value in Mbps.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingBaselinePerformanceFactorsRequest[source]

Bases: Boto3Model

The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Auto Scaling uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application.

Currently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying c6i uses the CPU performance of the c6i family as the baseline reference.

Show JSON schema
{
   "title": "AutoScalingBaselinePerformanceFactorsRequest",
   "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Cpu": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Cpu: AutoScalingCpuPerformanceFactorRequest | None = None

The CPU performance to consider, using an instance family as the baseline reference.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingBlockDeviceMapping[source]

Bases: Boto3Model

Describes a block device mapping.

Show JSON schema
{
   "title": "AutoScalingBlockDeviceMapping",
   "description": "Describes a block device mapping.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "VirtualName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Virtualname"
      },
      "DeviceName": {
         "title": "Devicename",
         "type": "string"
      },
      "Ebs": {
         "anyOf": [
            {
               "$ref": "#/$defs/EbsMapping"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "NoDevice": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nodevice"
      }
   },
   "$defs": {
      "EbsMapping": {
         "description": "Describes information used to set up an Amazon EBS volume specified in a block\ndevice mapping.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "SnapshotId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Snapshotid"
            },
            "VolumeSize": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumesize"
            },
            "VolumeType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumetype"
            },
            "DeleteOnTermination": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Deleteontermination"
            },
            "Iops": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Iops"
            },
            "Encrypted": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Encrypted"
            },
            "Throughput": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Throughput"
            }
         },
         "title": "EbsMapping",
         "type": "object"
      }
   },
   "required": [
      "DeviceName"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field DeviceName: str [Required]

The device name assigned to the volume (for example, /dev/sdh or xvdh).

For more information, see Device naming on Linux instances in the Amazon EC2 User Guide.

field Ebs: EbsMapping | None = None

Information to attach an EBS volume to an instance at launch.

field NoDevice: bool | None = None

Setting this value to true prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch.

field VirtualName: str | None = None

The name of the instance store volume (virtual device) to attach to an instance at launch.

The name must be in the form ephemeral*X* where X is a number starting from zero (0), for example, ephemeral0.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingCapacityReservationSpecification[source]

Bases: Boto3Model

Describes the Capacity Reservation preference and targeting options.

If you specify open or none for CapacityReservationPreference, do not specify a CapacityReservationTarget.

Show JSON schema
{
   "title": "AutoScalingCapacityReservationSpecification",
   "description": "Describes the Capacity Reservation preference and targeting options.\n\nIf you specify ``open`` or ``none`` for\n``CapacityReservationPreference``, do not specify a ``CapacityReservationTarget``.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "CapacityReservationPreference": {
         "anyOf": [
            {
               "enum": [
                  "capacity-reservations-only",
                  "capacity-reservations-first",
                  "none",
                  "default"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Capacityreservationpreference"
      },
      "CapacityReservationTarget": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingCapacityReservationTarget"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingCapacityReservationTarget": {
         "description": "The target for the Capacity Reservation.\n\nSpecify Capacity Reservations IDs or Capacity Reservation resource group ARNs.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityReservationIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationids"
            },
            "CapacityReservationResourceGroupArns": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationresourcegrouparns"
            }
         },
         "title": "AutoScalingCapacityReservationTarget",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field CapacityReservationPreference: Literal['capacity-reservations-only', 'capacity-reservations-first', 'none', 'default'] | None = None

The capacity reservation preference.

The following options are available:

field CapacityReservationTarget: AutoScalingCapacityReservationTarget | None = None

Describes a target Capacity Reservation or Capacity Reservation resource group.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingCapacityReservationTarget[source]

Bases: Boto3Model

The target for the Capacity Reservation.

Specify Capacity Reservations IDs or Capacity Reservation resource group ARNs.

Show JSON schema
{
   "title": "AutoScalingCapacityReservationTarget",
   "description": "The target for the Capacity Reservation.\n\nSpecify Capacity Reservations IDs or Capacity Reservation resource group ARNs.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "CapacityReservationIds": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Capacityreservationids"
      },
      "CapacityReservationResourceGroupArns": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Capacityreservationresourcegrouparns"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field CapacityReservationIds: builtins.list[str] | None [Optional]

The Capacity Reservation IDs to launch instances into.

field CapacityReservationResourceGroupArns: builtins.list[str] | None [Optional]

The resource group ARNs of the Capacity Reservation to launch instances into.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingCpuPerformanceFactorRequest[source]

Bases: Boto3Model

The CPU performance to consider, using an instance family as the baseline reference.

Show JSON schema
{
   "title": "AutoScalingCpuPerformanceFactorRequest",
   "description": "The CPU performance to consider, using an instance family as the baseline reference.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "References": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "References"
      }
   },
   "$defs": {
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field References: builtins.list[AutoScalingPerformanceFactorReferenceRequest] | None [Optional]

Specify an instance family to use as the baseline reference for CPU performance.

All instance types that match your specified attributes will be compared against the CPU performance of the referenced instance family, regardless of CPU manufacturer or architecture differences.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceLifecyclePolicy[source]

Bases: Boto3Model

The instance lifecycle policy for the Auto Scaling group. This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a Retained state instead of automatic termination.

For more information, see Control instance retention with instance lifecycle policies in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "AutoScalingInstanceLifecyclePolicy",
   "description": "The instance lifecycle policy for the Auto Scaling group. This policy controls\ninstance behavior when an instance transitions through its lifecycle states.\nConfigure retention triggers to specify when instances should move to a ``Retained``\nstate instead of automatic termination.\n\nFor more information, see\n`Control instance retention with instance lifecycle policies <https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-lifecycle-policy.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "RetentionTriggers": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingRetentionTriggers"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingRetentionTriggers": {
         "description": "Defines the specific triggers that cause instances to be retained in a Retained\nstate rather than terminated.\n\nEach trigger corresponds to a different failure scenario during the instance\nlifecycle. This allows fine-grained control over when to preserve instances for\nmanual intervention.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "TerminateHookAbandon": {
               "anyOf": [
                  {
                     "enum": [
                        "retain",
                        "terminate"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Terminatehookabandon"
            }
         },
         "title": "AutoScalingRetentionTriggers",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field RetentionTriggers: AutoScalingRetentionTriggers | None = None

Specifies the conditions that trigger instance retention behavior.

These triggers determine when instances should move to a Retained state instead of automatic termination. This allows you to maintain control over instance management when lifecycles transition and operations fail.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceMaintenancePolicy[source]

Bases: Boto3Model

Describes an instance maintenance policy.

For more information, see Set instance maintenance policy in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "AutoScalingInstanceMaintenancePolicy",
   "description": "Describes an instance maintenance policy.\n\nFor more information, see\n`Set instance maintenance policy <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "MinHealthyPercentage": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Minhealthypercentage"
      },
      "MaxHealthyPercentage": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maxhealthypercentage"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field MaxHealthyPercentage: int | None = None

Specifies the upper threshold as a percentage of the desired capacity of the Auto Scaling group.

It represents the maximum percentage of the group that can be in service and healthy, or pending, to support your workload when replacing instances. Value range is 100 to 200. To clear a previously set value, specify a value of -1.

field MinHealthyPercentage: int | None = None

Specifies the lower threshold as a percentage of the desired capacity of the Auto Scaling group.

It represents the minimum percentage of the group to keep in service, healthy, and ready to use to support your workload when replacing instances. Value range is 0 to 100. To clear a previously set value, specify a value of -1.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceMonitoring[source]

Bases: Boto3Model

Describes whether detailed monitoring is enabled for the Auto Scaling instances.

Show JSON schema
{
   "title": "AutoScalingInstanceMonitoring",
   "description": "Describes whether detailed monitoring is enabled for the Auto Scaling instances.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Enabled": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Enabled"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Enabled: bool | None = None

If true, detailed monitoring is enabled.

Otherwise, basic monitoring is enabled.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceReference[source]

Bases: Boto3Model

Describes an EC2 instance.

Show JSON schema
{
   "title": "AutoScalingInstanceReference",
   "description": "Describes an EC2 instance.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "InstanceId": {
         "title": "Instanceid",
         "type": "string"
      },
      "InstanceType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Instancetype"
      },
      "AvailabilityZone": {
         "title": "Availabilityzone",
         "type": "string"
      },
      "AvailabilityZoneId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Availabilityzoneid"
      },
      "LifecycleState": {
         "enum": [
            "Pending",
            "Pending:Wait",
            "Pending:Proceed",
            "Quarantined",
            "InService",
            "Terminating",
            "Terminating:Wait",
            "Terminating:Proceed",
            "Terminating:Retained",
            "Terminated",
            "Detaching",
            "Detached",
            "EnteringStandby",
            "Standby",
            "ReplacingRootVolume",
            "ReplacingRootVolume:Wait",
            "ReplacingRootVolume:Proceed",
            "RootVolumeReplaced",
            "Warmed:Pending",
            "Warmed:Pending:Wait",
            "Warmed:Pending:Proceed",
            "Warmed:Pending:Retained",
            "Warmed:Terminating",
            "Warmed:Terminating:Wait",
            "Warmed:Terminating:Proceed",
            "Warmed:Terminating:Retained",
            "Warmed:Terminated",
            "Warmed:Stopped",
            "Warmed:Running",
            "Warmed:Hibernated"
         ],
         "title": "Lifecyclestate",
         "type": "string"
      },
      "HealthStatus": {
         "title": "Healthstatus",
         "type": "string"
      },
      "LaunchConfigurationName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchconfigurationname"
      },
      "LaunchTemplate": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "ImageId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Imageid"
      },
      "ProtectedFromScaleIn": {
         "title": "Protectedfromscalein",
         "type": "boolean"
      },
      "WeightedCapacity": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Weightedcapacity"
      }
   },
   "$defs": {
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      }
   },
   "required": [
      "InstanceId",
      "AvailabilityZone",
      "LifecycleState",
      "HealthStatus",
      "ProtectedFromScaleIn"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AvailabilityZone: str [Required]

The Availability Zone in which the instance is running.

field AvailabilityZoneId: str | None = None

The Availability Zone ID where the instance was launched.

field HealthStatus: str [Required]

The last reported health status of the instance.

Healthy means that the instance is healthy and should remain in service. Unhealthy means that the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and replace it.

field ImageId: str | None = None

The ID of the Amazon Machine Image (AMI) used for the instance’s current root volume.

This value reflects the most recent AMI applied to the instance, including updates made through root volume replacement operations.

field InstanceId: str [Required]

The ID of the instance.

field InstanceType: str | None = None

The instance type of the EC2 instance.

field LaunchConfigurationName: str | None = None

The launch configuration associated with the instance.

field LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None

The launch template for the instance.

field LifecycleState: Literal['Pending', 'Pending:Wait', 'Pending:Proceed', 'Quarantined', 'InService', 'Terminating', 'Terminating:Wait', 'Terminating:Proceed', 'Terminating:Retained', 'Terminated', 'Detaching', 'Detached', 'EnteringStandby', 'Standby', 'ReplacingRootVolume', 'ReplacingRootVolume:Wait', 'ReplacingRootVolume:Proceed', 'RootVolumeReplaced', 'Warmed:Pending', 'Warmed:Pending:Wait', 'Warmed:Pending:Proceed', 'Warmed:Pending:Retained', 'Warmed:Terminating', 'Warmed:Terminating:Wait', 'Warmed:Terminating:Proceed', 'Warmed:Terminating:Retained', 'Warmed:Terminated', 'Warmed:Stopped', 'Warmed:Running', 'Warmed:Hibernated'] [Required]

A description of the current lifecycle state.

The Quarantined state is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.

field ProtectedFromScaleIn: bool [Required]

Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.

field WeightedCapacity: str | None = None

The number of capacity units contributed by the instance based on its instance type.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceRequirements[source]

Bases: Boto3Model

The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto Scaling uses your specified requirements to identify instance types. Then, it uses your On-Demand and Spot allocation strategies to launch instances from these instance types.

When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.

To limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use one of the following parameters, but not both in the same request:

  • AllowedInstanceTypes - The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.

  • ExcludedInstanceTypes - The instance types to exclude from the list, even if they match your specified attributes.

You must specify VCpuCount and MemoryMiB. All other attributes are optional. Any unspecified optional attribute is set to its default.

For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide. For help determining which instance types match your attributes before you apply them to your Auto Scaling group, see Preview instance types with specified attributes in the Amazon EC2 User Guide.

Show JSON schema
{
   "title": "AutoScalingInstanceRequirements",
   "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "VCpuCount": {
         "$ref": "#/$defs/VCpuCountRequest"
      },
      "MemoryMiB": {
         "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
      },
      "CpuManufacturers": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "intel",
                     "amd",
                     "amazon-web-services",
                     "apple"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Cpumanufacturers"
      },
      "MemoryGiBPerVCpu": {
         "anyOf": [
            {
               "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "ExcludedInstanceTypes": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Excludedinstancetypes"
      },
      "InstanceGenerations": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "current",
                     "previous"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Instancegenerations"
      },
      "SpotMaxPricePercentageOverLowestPrice": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spotmaxpricepercentageoverlowestprice"
      },
      "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maxspotpriceaspercentageofoptimalondemandprice"
      },
      "OnDemandMaxPricePercentageOverLowestPrice": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ondemandmaxpricepercentageoverlowestprice"
      },
      "BareMetal": {
         "anyOf": [
            {
               "enum": [
                  "included",
                  "required",
                  "excluded"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Baremetal"
      },
      "BurstablePerformance": {
         "anyOf": [
            {
               "enum": [
                  "included",
                  "required",
                  "excluded"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Burstableperformance"
      },
      "RequireHibernateSupport": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Requirehibernatesupport"
      },
      "NetworkInterfaceCount": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "LocalStorage": {
         "anyOf": [
            {
               "enum": [
                  "included",
                  "required",
                  "excluded"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Localstorage"
      },
      "LocalStorageTypes": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "hdd",
                     "ssd"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Localstoragetypes"
      },
      "TotalLocalStorageGB": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "BaselineEbsBandwidthMbps": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "AcceleratorTypes": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "gpu",
                     "fpga",
                     "inference"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Acceleratortypes"
      },
      "AcceleratorCount": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "AcceleratorManufacturers": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "nvidia",
                     "amd",
                     "amazon-web-services",
                     "xilinx"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Acceleratormanufacturers"
      },
      "AcceleratorNames": {
         "anyOf": [
            {
               "items": {
                  "enum": [
                     "a100",
                     "v100",
                     "k80",
                     "t4",
                     "m60",
                     "radeon-pro-v520",
                     "vu9p"
                  ],
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Acceleratornames"
      },
      "AcceleratorTotalMemoryMiB": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "NetworkBandwidthGbps": {
         "anyOf": [
            {
               "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "AllowedInstanceTypes": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Allowedinstancetypes"
      },
      "BaselinePerformanceFactors": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   },
   "required": [
      "VCpuCount",
      "MemoryMiB"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AcceleratorCount: AutoScalingAcceleratorCountRequest | None = None

The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) for an instance type.

field AcceleratorManufacturers: builtins.list[Literal['nvidia', 'amd', 'amazon-web-services', 'xilinx']] | None [Optional]

Indicates whether instance types must have accelerators by specific manufacturers.

field AcceleratorNames: builtins.list[Literal['a100', 'v100', 'k80', 't4', 'm60', 'radeon-pro-v520', 'vu9p']] | None [Optional]

Lists the accelerators that must be on an instance type.

field AcceleratorTotalMemoryMiB: AutoScalingAcceleratorTotalMemoryMiBRequest | None = None

The minimum and maximum total memory size for the accelerators on an instance type, in MiB.

field AcceleratorTypes: builtins.list[Literal['gpu', 'fpga', 'inference']] | None [Optional]

Lists the accelerator types that must be on an instance type.

field AllowedInstanceTypes: builtins.list[str] | None [Optional]

The instance types to apply your specified attributes against.

All other instance types are ignored, even if they match your specified attributes.

field BareMetal: Literal['included', 'excluded', 'required'] | None = None

Indicates whether bare metal instance types are included, excluded, or required.

field BaselineEbsBandwidthMbps: AutoScalingBaselineEbsBandwidthMbsRequest | None = None

The minimum and maximum baseline bandwidth performance for an instance type, in Mbps.

For more information, see Amazon EBS-optimized instances in the Amazon EC2 User Guide.

field BaselinePerformanceFactors: AutoScalingBaselinePerformanceFactorsRequest | None = None

The baseline performance factors for the instance requirements.

field BurstablePerformance: Literal['included', 'excluded', 'required'] | None = None

Indicates whether burstable performance instance types are included, excluded, or required.

For more information, see Burstable performance instances in the Amazon EC2 User Guide.

field CpuManufacturers: builtins.list[Literal['intel', 'amd', 'amazon-web-services', 'apple']] | None [Optional]

Lists which specific CPU manufacturers to include.

field ExcludedInstanceTypes: builtins.list[str] | None [Optional]

The instance types to exclude.

You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*.

field InstanceGenerations: builtins.list[Literal['current', 'previous']] | None [Optional]

Indicates whether current or previous generation instance types are included.

field LocalStorage: Literal['included', 'excluded', 'required'] | None = None

Indicates whether instance types with instance store volumes are included, excluded, or required.

For more information, see Amazon EC2 instance store in the Amazon EC2 User Guide.

field LocalStorageTypes: builtins.list[Literal['hdd', 'ssd']] | None [Optional]

Indicates the type of local storage that is required.

field MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: int | None = None

[Price protection] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price.

The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

field MemoryGiBPerVCpu: MemoryGiBPerVCpuRequest | None = None

The minimum and maximum amount of memory per vCPU for an instance type, in GiB.

field MemoryMiB: AutoScalingMemoryMiBRequest [Required]

The minimum and maximum instance memory size for an instance type, in MiB.

field NetworkBandwidthGbps: NetworkBandwidthGbpsRequest | None = None

The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).

field NetworkInterfaceCount: AutoScalingNetworkInterfaceCountRequest | None = None

The minimum and maximum number of network interfaces for an instance type.

field OnDemandMaxPricePercentageOverLowestPrice: int | None = None

[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On- Demand price.

The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

field RequireHibernateSupport: bool | None = None

Indicates whether instance types must provide On-Demand Instance hibernation support.

field SpotMaxPricePercentageOverLowestPrice: int | None = None

[Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price.

The identified Spot price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

field TotalLocalStorageGB: AutoScalingTotalLocalStorageGBRequest | None = None

The minimum and maximum total local storage size for an instance type, in GB.

field VCpuCount: VCpuCountRequest [Required]

The minimum and maximum number of vCPUs for an instance type.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceReusePolicy[source]

Bases: Boto3Model

Describes an instance reuse policy for a warm pool.

For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "AutoScalingInstanceReusePolicy",
   "description": "Describes an instance reuse policy for a warm pool.\n\nFor more information, see\n`Warm pools for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "ReuseOnScaleIn": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reuseonscalein"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ReuseOnScaleIn: bool | None = None

Specifies whether instances in the Auto Scaling group can be returned to the warm pool on scale in.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstancesDistribution[source]

Bases: Boto3Model

Use this structure to specify the distribution of On-Demand Instances and Spot Instances and the allocation strategies used to fulfill On-Demand and Spot capacities for a mixed instances policy.

Show JSON schema
{
   "title": "AutoScalingInstancesDistribution",
   "description": "Use this structure to specify the distribution of On-Demand Instances and Spot\nInstances and the allocation strategies used to fulfill On-Demand and Spot\ncapacities for a mixed instances policy.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "OnDemandAllocationStrategy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ondemandallocationstrategy"
      },
      "OnDemandBaseCapacity": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ondemandbasecapacity"
      },
      "OnDemandPercentageAboveBaseCapacity": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Ondemandpercentageabovebasecapacity"
      },
      "SpotAllocationStrategy": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spotallocationstrategy"
      },
      "SpotInstancePools": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spotinstancepools"
      },
      "SpotMaxPrice": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spotmaxprice"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field OnDemandAllocationStrategy: str | None = None

The allocation strategy to apply to your On-Demand Instances when they are launched.

Possible instance types are determined by the launch template overrides that you specify.

field OnDemandBaseCapacity: int | None = None

The minimum amount of the Auto Scaling group’s capacity that must be fulfilled by On-Demand Instances.

This base portion is launched first as your group scales.

field OnDemandPercentageAboveBaseCapacity: int | None = None

Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.

Expressed as a number (for example, 20 specifies 20% On-Demand Instances, 80% Spot Instances). If set to 100, only On-Demand Instances are used.

field SpotAllocationStrategy: str | None = None

The allocation strategy to apply to your Spot Instances when they are launched.

Possible instance types are determined by the launch template overrides that you specify.

field SpotInstancePools: int | None = None

The number of Spot Instance pools across which to allocate your Spot Instances.

The Spot pools are determined from the different instance types in the overrides. Valid only when the SpotAllocationStrategy is lowest-price. Value must be in the range of 1-20.

field SpotMaxPrice: str | None = None

The maximum price per unit hour that you are willing to pay for a Spot Instance.

If your maximum price is lower than the Spot price for the instance types that you selected, your Spot Instances are not launched. We do not recommend specifying a maximum price because it can lead to increased interruptions. When Spot Instances launch, you pay the current Spot price. To remove a maximum price that you previously set, include the property but specify an empty string (“”) for the value.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingLaunchTemplate[source]

Bases: Boto3Model

Use this structure to specify the launch templates and instance types (overrides) for a mixed instances policy.

Show JSON schema
{
   "title": "AutoScalingLaunchTemplate",
   "description": "Use this structure to specify the launch templates and instance types (overrides)\nfor a mixed instances policy.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LaunchTemplateSpecification": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "Overrides": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/LaunchTemplateOverrides"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Overrides"
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingInstanceRequirements": {
         "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VCpuCount": {
               "$ref": "#/$defs/VCpuCountRequest"
            },
            "MemoryMiB": {
               "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
            },
            "CpuManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "intel",
                           "amd",
                           "amazon-web-services",
                           "apple"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Cpumanufacturers"
            },
            "MemoryGiBPerVCpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ExcludedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Excludedinstancetypes"
            },
            "InstanceGenerations": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "current",
                           "previous"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Instancegenerations"
            },
            "SpotMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxpricepercentageoverlowestprice"
            },
            "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxspotpriceaspercentageofoptimalondemandprice"
            },
            "OnDemandMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandmaxpricepercentageoverlowestprice"
            },
            "BareMetal": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Baremetal"
            },
            "BurstablePerformance": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Burstableperformance"
            },
            "RequireHibernateSupport": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Requirehibernatesupport"
            },
            "NetworkInterfaceCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "LocalStorage": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Localstorage"
            },
            "LocalStorageTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "hdd",
                           "ssd"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Localstoragetypes"
            },
            "TotalLocalStorageGB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "BaselineEbsBandwidthMbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "gpu",
                           "fpga",
                           "inference"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratortypes"
            },
            "AcceleratorCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "nvidia",
                           "amd",
                           "amazon-web-services",
                           "xilinx"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratormanufacturers"
            },
            "AcceleratorNames": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "a100",
                           "v100",
                           "k80",
                           "t4",
                           "m60",
                           "radeon-pro-v520",
                           "vu9p"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratornames"
            },
            "AcceleratorTotalMemoryMiB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NetworkBandwidthGbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AllowedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Allowedinstancetypes"
            },
            "BaselinePerformanceFactors": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "VCpuCount",
            "MemoryMiB"
         ],
         "title": "AutoScalingInstanceRequirements",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "LaunchTemplateOverrides": {
         "description": "Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances\npolicy:\n\n* Override the instance type that is specified in the launch template.\n* Use multiple instance types.\n\nSpecify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling\nprovision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a\nlarger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which\ninstance types are matched before you apply the instance requirements to your Auto Scaling group.\n\nAfter you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance\ntypes automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine\nwhether a new EC2 instance type can be used.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstanceRequirements": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceRequirements"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            }
         },
         "title": "LaunchTemplateOverrides",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field LaunchTemplateSpecification: AutoScalingLaunchTemplateSpecification | None = None

The launch template.

field Overrides: builtins.list[LaunchTemplateOverrides] | None [Optional]

Any properties that you specify override the same properties in the launch template.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingLaunchTemplateSpecification[source]

Bases: Boto3Model

Describes the launch template and the version of the launch template that Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances.

For more information about launch templates, see Launch templates in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "AutoScalingLaunchTemplateSpecification",
   "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LaunchTemplateId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchtemplateid"
      },
      "LaunchTemplateName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchtemplatename"
      },
      "Version": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Version"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field LaunchTemplateId: str | None = None

The ID of the launch template.

To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.

field LaunchTemplateName: str | None = None

The name of the launch template.

To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.

field Version: str | None = None

The version number, $Latest, or $Default.

To get the version number, use the Amazon EC2 DescribeLaunchTemplateV ersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingMemoryMiBRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the MemoryMiB object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingMemoryMiBRequest",
   "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "title": "Min",
         "type": "integer"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   },
   "required": [
      "Min"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The memory maximum in MiB.

field Min: int [Required]

The memory minimum in MiB.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingMixedInstancesPolicy[source]

Bases: Boto3Model

Use this structure to launch multiple instance types and On-Demand Instances and Spot Instances within a single Auto Scaling group.

A mixed instances policy contains information that Amazon EC2 Auto Scaling can use to launch instances and help optimize your costs. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "AutoScalingMixedInstancesPolicy",
   "description": "Use this structure to launch multiple instance types and On-Demand Instances and\nSpot Instances within a single Auto Scaling group.\n\nA mixed instances policy contains information that Amazon EC2 Auto Scaling can use\nto launch instances and help optimize your costs. For more information, see\n`Auto Scaling groups with multiple instance types and purchase options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LaunchTemplate": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplate"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "InstancesDistribution": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstancesDistribution"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingInstanceRequirements": {
         "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VCpuCount": {
               "$ref": "#/$defs/VCpuCountRequest"
            },
            "MemoryMiB": {
               "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
            },
            "CpuManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "intel",
                           "amd",
                           "amazon-web-services",
                           "apple"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Cpumanufacturers"
            },
            "MemoryGiBPerVCpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ExcludedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Excludedinstancetypes"
            },
            "InstanceGenerations": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "current",
                           "previous"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Instancegenerations"
            },
            "SpotMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxpricepercentageoverlowestprice"
            },
            "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxspotpriceaspercentageofoptimalondemandprice"
            },
            "OnDemandMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandmaxpricepercentageoverlowestprice"
            },
            "BareMetal": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Baremetal"
            },
            "BurstablePerformance": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Burstableperformance"
            },
            "RequireHibernateSupport": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Requirehibernatesupport"
            },
            "NetworkInterfaceCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "LocalStorage": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Localstorage"
            },
            "LocalStorageTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "hdd",
                           "ssd"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Localstoragetypes"
            },
            "TotalLocalStorageGB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "BaselineEbsBandwidthMbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "gpu",
                           "fpga",
                           "inference"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratortypes"
            },
            "AcceleratorCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "nvidia",
                           "amd",
                           "amazon-web-services",
                           "xilinx"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratormanufacturers"
            },
            "AcceleratorNames": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "a100",
                           "v100",
                           "k80",
                           "t4",
                           "m60",
                           "radeon-pro-v520",
                           "vu9p"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratornames"
            },
            "AcceleratorTotalMemoryMiB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NetworkBandwidthGbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AllowedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Allowedinstancetypes"
            },
            "BaselinePerformanceFactors": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "VCpuCount",
            "MemoryMiB"
         ],
         "title": "AutoScalingInstanceRequirements",
         "type": "object"
      },
      "AutoScalingInstancesDistribution": {
         "description": "Use this structure to specify the distribution of On-Demand Instances and Spot\nInstances and the allocation strategies used to fulfill On-Demand and Spot\ncapacities for a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "OnDemandAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandallocationstrategy"
            },
            "OnDemandBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandbasecapacity"
            },
            "OnDemandPercentageAboveBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandpercentageabovebasecapacity"
            },
            "SpotAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotallocationstrategy"
            },
            "SpotInstancePools": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotinstancepools"
            },
            "SpotMaxPrice": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxprice"
            }
         },
         "title": "AutoScalingInstancesDistribution",
         "type": "object"
      },
      "AutoScalingLaunchTemplate": {
         "description": "Use this structure to specify the launch templates and instance types (overrides)\nfor a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "Overrides": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/LaunchTemplateOverrides"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Overrides"
            }
         },
         "title": "AutoScalingLaunchTemplate",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "LaunchTemplateOverrides": {
         "description": "Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances\npolicy:\n\n* Override the instance type that is specified in the launch template.\n* Use multiple instance types.\n\nSpecify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling\nprovision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a\nlarger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which\ninstance types are matched before you apply the instance requirements to your Auto Scaling group.\n\nAfter you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance\ntypes automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine\nwhether a new EC2 instance type can be used.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstanceRequirements": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceRequirements"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            }
         },
         "title": "LaunchTemplateOverrides",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field InstancesDistribution: AutoScalingInstancesDistribution | None = None

The instances distribution.

field LaunchTemplate: AutoScalingLaunchTemplate | None = None

One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On- Demand and Spot capacities.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingNetworkInterfaceCountRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the NetworkInterfaceCount object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingNetworkInterfaceCountRequest",
   "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The maximum number of network interfaces.

field Min: int | None = None

The minimum number of network interfaces.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingPerformanceFactorReferenceRequest[source]

Bases: Boto3Model

Specify an instance family to use as the baseline reference for CPU performance. All instance types that All instance types that match your specified attributes will be compared against the CPU performance of the referenced instance family, regardless of CPU manufacturer or architecture differences.

Currently only one instance family can be specified in the list.

Show JSON schema
{
   "title": "AutoScalingPerformanceFactorReferenceRequest",
   "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "InstanceFamily": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Instancefamily"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field InstanceFamily: str | None = None

The instance family to use as a baseline reference.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingRetentionTriggers[source]

Bases: Boto3Model

Defines the specific triggers that cause instances to be retained in a Retained state rather than terminated.

Each trigger corresponds to a different failure scenario during the instance lifecycle. This allows fine-grained control over when to preserve instances for manual intervention.

Show JSON schema
{
   "title": "AutoScalingRetentionTriggers",
   "description": "Defines the specific triggers that cause instances to be retained in a Retained\nstate rather than terminated.\n\nEach trigger corresponds to a different failure scenario during the instance\nlifecycle. This allows fine-grained control over when to preserve instances for\nmanual intervention.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "TerminateHookAbandon": {
         "anyOf": [
            {
               "enum": [
                  "retain",
                  "terminate"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Terminatehookabandon"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field TerminateHookAbandon: Literal['retain', 'terminate'] | None = None

Specifies the action when a termination lifecycle hook is abandoned due to failure, timeout, or explicit abandonment (calling CompleteLifecycleAction).

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingTagDescription[source]

Bases: Boto3Model

Describes a tag for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingTagDescription",
   "description": "Describes a tag for an Auto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "ResourceId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Resourceid"
      },
      "ResourceType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Resourcetype"
      },
      "Key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "Value": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Value"
      },
      "PropagateAtLaunch": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Propagateatlaunch"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Key: str | None = None

The tag key.

field PropagateAtLaunch: bool | None = None

Determines whether the tag is added to new instances as they are launched in the group.

field ResourceId: str | None = None

The name of the group.

field ResourceType: str | None = None

The type of resource.

The only supported value is auto-scaling-group.

field Value: str | None = None

The tag value.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingTotalLocalStorageGBRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the TotalLocalStorageGB object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingTotalLocalStorageGBRequest",
   "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: float | None = None

The storage maximum in GB.

field Min: float | None = None

The storage minimum in GB.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingWarmPoolConfiguration[source]

Bases: Boto3Model

Describes a warm pool configuration.

Show JSON schema
{
   "title": "AutoScalingWarmPoolConfiguration",
   "description": "Describes a warm pool configuration.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "MaxGroupPreparedCapacity": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maxgrouppreparedcapacity"
      },
      "MinSize": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Minsize"
      },
      "PoolState": {
         "anyOf": [
            {
               "enum": [
                  "Stopped",
                  "Running",
                  "Hibernated"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Poolstate"
      },
      "Status": {
         "anyOf": [
            {
               "const": "PendingDelete",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Status"
      },
      "InstanceReusePolicy": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstanceReusePolicy"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingInstanceReusePolicy": {
         "description": "Describes an instance reuse policy for a warm pool.\n\nFor more information, see\n`Warm pools for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ReuseOnScaleIn": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reuseonscalein"
            }
         },
         "title": "AutoScalingInstanceReusePolicy",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field InstanceReusePolicy: AutoScalingInstanceReusePolicy | None = None

The instance reuse policy.

field MaxGroupPreparedCapacity: int | None = None

The maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.

field MinSize: int | None = None

The minimum number of instances to maintain in the warm pool.

field PoolState: Literal['Stopped', 'Running', 'Hibernated'] | None = None

The instance state to transition to after the lifecycle actions are complete.

field Status: Literal['PendingDelete'] | None = None

The status of a warm pool that is marked for deletion.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.EbsMapping[source]

Bases: Boto3Model

Describes information used to set up an Amazon EBS volume specified in a block device mapping.

Show JSON schema
{
   "title": "EbsMapping",
   "description": "Describes information used to set up an Amazon EBS volume specified in a block\ndevice mapping.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "SnapshotId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Snapshotid"
      },
      "VolumeSize": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Volumesize"
      },
      "VolumeType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Volumetype"
      },
      "DeleteOnTermination": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Deleteontermination"
      },
      "Iops": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Iops"
      },
      "Encrypted": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Encrypted"
      },
      "Throughput": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Throughput"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field DeleteOnTermination: bool | None = None

Indicates whether the volume is deleted on instance termination.

For Amazon EC2 Auto Scaling, the default value is true.

field Encrypted: bool | None = None

Specifies whether the volume should be encrypted.

Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Requirements for Amazon EBS encryption in the Amazon EBS User Guide. If your AMI uses encrypted volumes, you can also only launch it on supported instance types.

field Iops: int | None = None

The number of input/output (I/O) operations per second (IOPS) to provision for the volume.

For gp3 and io1 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

field SnapshotId: str | None = None

The snapshot ID of the volume to use.

field Throughput: int | None = None

The throughput (MiBps) to provision for a gp3 volume.

field VolumeSize: int | None = None

The volume size, in GiBs.

The following are the supported volumes sizes for each volume type:

field VolumeType: str | None = None

The volume type.

For more information, see Amazon EBS volume types in the Amazon EBS User Guide.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.EnabledMetric[source]

Bases: Boto3Model

Describes an enabled Auto Scaling group metric.

Show JSON schema
{
   "title": "EnabledMetric",
   "description": "Describes an enabled Auto Scaling group metric.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Metric": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Metric"
      },
      "Granularity": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Granularity"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Granularity: str | None = None

The granularity of the metric.

The only valid value is 1Minute.

field Metric: str | None = None

One of the following metrics:

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.InstanceMetadataOptions[source]

Bases: Boto3Model

The metadata options for the instances.

For more information, see Configure the instance metadata options in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "InstanceMetadataOptions",
   "description": "The metadata options for the instances.\n\nFor more information, see\n`Configure the instance metadata options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds>`_\nin\nthe *Amazon EC2 Auto Scaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "HttpTokens": {
         "anyOf": [
            {
               "enum": [
                  "optional",
                  "required"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Httptokens"
      },
      "HttpPutResponseHopLimit": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Httpputresponsehoplimit"
      },
      "HttpEndpoint": {
         "anyOf": [
            {
               "enum": [
                  "enabled",
                  "disabled"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Httpendpoint"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field HttpEndpoint: Literal['disabled', 'enabled'] | None = None

This parameter enables or disables the HTTP metadata endpoint on your instances.

If the parameter is not specified, the default state is enabled.

field HttpPutResponseHopLimit: int | None = None

The desired HTTP PUT response hop limit for instance metadata requests.

The larger the number, the further instance metadata requests can travel.

field HttpTokens: Literal['optional', 'required'] | None = None

The state of token usage for your instance metadata requests.

If the parameter is not specified in the request, the default state is optional.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.LaunchTemplateOverrides[source]

Bases: Boto3Model

Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances policy:

  • Override the instance type that is specified in the launch template.

  • Use multiple instance types.

Specify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling provision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a larger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which instance types are matched before you apply the instance requirements to your Auto Scaling group.

After you define your instance requirements, you don’t have to keep updating these settings to get new EC2 instance types automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine whether a new EC2 instance type can be used.

Show JSON schema
{
   "title": "LaunchTemplateOverrides",
   "description": "Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances\npolicy:\n\n* Override the instance type that is specified in the launch template.\n* Use multiple instance types.\n\nSpecify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling\nprovision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a\nlarger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which\ninstance types are matched before you apply the instance requirements to your Auto Scaling group.\n\nAfter you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance\ntypes automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine\nwhether a new EC2 instance type can be used.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "InstanceType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Instancetype"
      },
      "WeightedCapacity": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Weightedcapacity"
      },
      "LaunchTemplateSpecification": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "InstanceRequirements": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingInstanceRequirements"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "ImageId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Imageid"
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingInstanceRequirements": {
         "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VCpuCount": {
               "$ref": "#/$defs/VCpuCountRequest"
            },
            "MemoryMiB": {
               "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
            },
            "CpuManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "intel",
                           "amd",
                           "amazon-web-services",
                           "apple"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Cpumanufacturers"
            },
            "MemoryGiBPerVCpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ExcludedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Excludedinstancetypes"
            },
            "InstanceGenerations": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "current",
                           "previous"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Instancegenerations"
            },
            "SpotMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxpricepercentageoverlowestprice"
            },
            "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxspotpriceaspercentageofoptimalondemandprice"
            },
            "OnDemandMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandmaxpricepercentageoverlowestprice"
            },
            "BareMetal": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Baremetal"
            },
            "BurstablePerformance": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Burstableperformance"
            },
            "RequireHibernateSupport": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Requirehibernatesupport"
            },
            "NetworkInterfaceCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "LocalStorage": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Localstorage"
            },
            "LocalStorageTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "hdd",
                           "ssd"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Localstoragetypes"
            },
            "TotalLocalStorageGB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "BaselineEbsBandwidthMbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "gpu",
                           "fpga",
                           "inference"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratortypes"
            },
            "AcceleratorCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "nvidia",
                           "amd",
                           "amazon-web-services",
                           "xilinx"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratormanufacturers"
            },
            "AcceleratorNames": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "a100",
                           "v100",
                           "k80",
                           "t4",
                           "m60",
                           "radeon-pro-v520",
                           "vu9p"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratornames"
            },
            "AcceleratorTotalMemoryMiB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NetworkBandwidthGbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AllowedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Allowedinstancetypes"
            },
            "BaselinePerformanceFactors": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "VCpuCount",
            "MemoryMiB"
         ],
         "title": "AutoScalingInstanceRequirements",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ImageId: str | None = None

The ID of the Amazon Machine Image (AMI) to use for instances launched with this override.

When using Instance Refresh with ReplaceRootVolume strategy, this specifies the AMI for root volume replacement operations.

field InstanceRequirements: AutoScalingInstanceRequirements | None = None

The instance requirements.

Amazon EC2 Auto Scaling uses your specified requirements to identify instance types. Then, it uses your On-Demand and Spot allocation strategies to launch instances from these instance types.

field InstanceType: str | None = None

The instance type, such as m3.xlarge.

You must specify an instance type that is supported in your requested Region and Availability Zones. For more information, see Instance types in the Amazon EC2 User Guide.

field LaunchTemplateSpecification: AutoScalingLaunchTemplateSpecification | None = None

Provides a launch template for the specified instance type or set of instance requirements.

For example, some instance types might require a launch template with a different AMI. If not provided, Amazon EC2 Auto Scaling uses the launch template that’s specified in the LaunchTemplate definition. For more information, see Specifying a different launch template for an instance type in the Amazon EC2 Auto Scaling User Guide.

field WeightedCapacity: str | None = None

If you provide a list of instance types to use, you can specify the number of capacity units provided by each instance type in terms of virtual CPUs, memory, storage, throughput, or other relative performance characteristic.

When a Spot or On-Demand Instance is launched, the capacity units count toward the desired capacity. Amazon EC2 Auto Scaling launches instances until the desired capacity is totally fulfilled, even if this results in an overage. For example, if there are two units remaining to fulfill capacity, and Amazon EC2 Auto Scaling can only launch an instance with a WeightedCapacity of five units, the instance is launched, and the desired capacity is exceeded by three units. For more information, see Configure an Auto Scaling group to use instance weights in the Amazon EC2 Auto Scaling User Guide. Value must be in the range of 1-999.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.MemoryGiBPerVCpuRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the MemoryGiBPerVCpu object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "MemoryGiBPerVCpuRequest",
   "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: float | None = None

The memory maximum in GiB.

field Min: float | None = None

The memory minimum in GiB.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.NetworkBandwidthGbpsRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the NetworkBandwidthGbps object when you specify InstanceRequirements for an Auto Scaling group.

Setting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will identify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go below the specified minimum at times. For more information, see Available instance bandwidth in the Amazon EC2 User Guide.

Show JSON schema
{
   "title": "NetworkBandwidthGbpsRequest",
   "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Min"
      },
      "Max": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: float | None = None

The maximum amount of network bandwidth, in gigabits per second (Gbps).

field Min: float | None = None

The minimum amount of network bandwidth, in gigabits per second (Gbps).

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.SuspendedProcess[source]

Bases: Boto3Model

Describes an auto scaling process that has been suspended.

For more information, see Types of processes in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "SuspendedProcess",
   "description": "Describes an auto scaling process that has been suspended.\n\nFor more information, see\n`Types of processes <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-\nprocesses.html#process-types>`_ in the *Amazon EC2 Auto Scaling User Guide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "ProcessName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Processname"
      },
      "SuspensionReason": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Suspensionreason"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ProcessName: str | None = None

The name of the suspended process.

field SuspensionReason: str | None = None

The reason that the process was suspended.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.TrafficSourceIdentifier[source]

Bases: Boto3Model

Identifying information for a traffic source.

Show JSON schema
{
   "title": "TrafficSourceIdentifier",
   "description": "Identifying information for a traffic source.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Identifier": {
         "title": "Identifier",
         "type": "string"
      },
      "Type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Type"
      }
   },
   "required": [
      "Identifier"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Identifier: str [Required]

Identifies the traffic source.

field Type: str | None = None

Provides additional context for the value of Identifier.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.VCpuCountRequest[source]

Bases: Boto3Model

Specifies the minimum and maximum for the VCpuCount object when you specify InstanceRequirements for an Auto Scaling group.

Show JSON schema
{
   "title": "VCpuCountRequest",
   "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Min": {
         "title": "Min",
         "type": "integer"
      },
      "Max": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max"
      }
   },
   "required": [
      "Min"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Max: int | None = None

The maximum number of vCPUs.

field Min: int [Required]

The minimum number of vCPUs.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

Request/Response Models

Request/response models are models that are used to describe the structure of the data that is sent to and received from the AWS service. They are used by the managers to send requests to the service and to parse the responses that are received.

You will not often use them directly – typically they are used by the managers internally to send requests and parse responses – but they are included here for completeness, and because occasionally we return them directly to you because they have some useful additional information.

pydantic model botocraft.services.autoscaling.ActivityType[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "ActivityType",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Activity": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingActivity"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AutoScalingActivity": {
         "description": "Describes scaling activity, which is a long-running process that represents a change\nto your Auto Scaling group, such as changing its size or replacing an instance.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ActivityId": {
               "title": "Activityid",
               "type": "string"
            },
            "AutoScalingGroupName": {
               "title": "Autoscalinggroupname",
               "type": "string"
            },
            "Description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "Cause": {
               "title": "Cause",
               "type": "string"
            },
            "StartTime": {
               "format": "date-time",
               "title": "Starttime",
               "type": "string"
            },
            "EndTime": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Endtime"
            },
            "StatusCode": {
               "enum": [
                  "PendingSpotBidPlacement",
                  "WaitingForSpotInstanceRequestId",
                  "WaitingForSpotInstanceId",
                  "WaitingForInstanceId",
                  "PreInService",
                  "InProgress",
                  "WaitingForELBConnectionDraining",
                  "MidLifecycleAction",
                  "WaitingForInstanceWarmup",
                  "Successful",
                  "Failed",
                  "Cancelled",
                  "WaitingForConnectionDraining",
                  "WaitingForInPlaceUpdateToStart",
                  "WaitingForInPlaceUpdateToFinalize",
                  "InPlaceUpdateInProgress"
               ],
               "title": "Statuscode",
               "type": "string"
            },
            "StatusMessage": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Statusmessage"
            },
            "Progress": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Progress"
            },
            "Details": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Details"
            },
            "AutoScalingGroupState": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Autoscalinggroupstate"
            },
            "AutoScalingGroupARN": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Autoscalinggrouparn"
            }
         },
         "required": [
            "ActivityId",
            "AutoScalingGroupName",
            "Cause",
            "StartTime",
            "StatusCode"
         ],
         "title": "AutoScalingActivity",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Activity: AutoScalingActivity | None = None

A scaling activity.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingActivity[source]

Bases: Boto3Model

Describes scaling activity, which is a long-running process that represents a change to your Auto Scaling group, such as changing its size or replacing an instance.

Show JSON schema
{
   "title": "AutoScalingActivity",
   "description": "Describes scaling activity, which is a long-running process that represents a change\nto your Auto Scaling group, such as changing its size or replacing an instance.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "ActivityId": {
         "title": "Activityid",
         "type": "string"
      },
      "AutoScalingGroupName": {
         "title": "Autoscalinggroupname",
         "type": "string"
      },
      "Description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Description"
      },
      "Cause": {
         "title": "Cause",
         "type": "string"
      },
      "StartTime": {
         "format": "date-time",
         "title": "Starttime",
         "type": "string"
      },
      "EndTime": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Endtime"
      },
      "StatusCode": {
         "enum": [
            "PendingSpotBidPlacement",
            "WaitingForSpotInstanceRequestId",
            "WaitingForSpotInstanceId",
            "WaitingForInstanceId",
            "PreInService",
            "InProgress",
            "WaitingForELBConnectionDraining",
            "MidLifecycleAction",
            "WaitingForInstanceWarmup",
            "Successful",
            "Failed",
            "Cancelled",
            "WaitingForConnectionDraining",
            "WaitingForInPlaceUpdateToStart",
            "WaitingForInPlaceUpdateToFinalize",
            "InPlaceUpdateInProgress"
         ],
         "title": "Statuscode",
         "type": "string"
      },
      "StatusMessage": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Statusmessage"
      },
      "Progress": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Progress"
      },
      "Details": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Details"
      },
      "AutoScalingGroupState": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Autoscalinggroupstate"
      },
      "AutoScalingGroupARN": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Autoscalinggrouparn"
      }
   },
   "required": [
      "ActivityId",
      "AutoScalingGroupName",
      "Cause",
      "StartTime",
      "StatusCode"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ActivityId: str [Required]

The ID of the activity.

field AutoScalingGroupARN: str | None = None

The Amazon Resource Name (ARN) of the Auto Scaling group.

field AutoScalingGroupName: str [Required]

The name of the Auto Scaling group.

field AutoScalingGroupState: str | None = None

The state of the Auto Scaling group, which is either InService or Deleted.

field Cause: str [Required]

The reason the activity began.

field Description: str | None = None

A friendly, more verbose description of the activity.

field Details: str | None = None

The details about the activity.

field EndTime: datetime | None = None

The end time of the activity.

field Progress: int | None = None

A value between 0 and 100 that indicates the progress of the activity.

field StartTime: datetime [Required]

The start time of the activity.

field StatusCode: Literal['PendingSpotBidPlacement', 'WaitingForSpotInstanceRequestId', 'WaitingForSpotInstanceId', 'WaitingForInstanceId', 'PreInService', 'InProgress', 'WaitingForELBConnectionDraining', 'MidLifecycleAction', 'WaitingForInstanceWarmup', 'Successful', 'Failed', 'Cancelled', 'WaitingForConnectionDraining', 'WaitingForInPlaceUpdateToStart', 'WaitingForInPlaceUpdateToFinalize', 'InPlaceUpdateInProgress'] [Required]

The current status of the activity.

field StatusMessage: str | None = None

A friendly, more verbose description of the activity status.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingGroupsType[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "AutoScalingGroupsType",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "AutoScalingGroups": {
         "items": {
            "$ref": "#/$defs/AutoScalingGroup"
         },
         "title": "Autoscalinggroups",
         "type": "array"
      },
      "NextToken": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nexttoken"
      }
   },
   "$defs": {
      "AutoScalingAcceleratorCountRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorCountRequest",
         "type": "object"
      },
      "AutoScalingAcceleratorTotalMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingAcceleratorTotalMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingAvailabilityZoneDistribution": {
         "description": "Describes an Availability Zone distribution.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityDistributionStrategy": {
               "anyOf": [
                  {
                     "enum": [
                        "balanced-only",
                        "balanced-best-effort"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Capacitydistributionstrategy"
            }
         },
         "title": "AutoScalingAvailabilityZoneDistribution",
         "type": "object"
      },
      "AutoScalingAvailabilityZoneImpairmentPolicy": {
         "description": "Describes an Availability Zone impairment policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ZonalShiftEnabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Zonalshiftenabled"
            },
            "ImpairedZoneHealthCheckBehavior": {
               "anyOf": [
                  {
                     "enum": [
                        "ReplaceUnhealthy",
                        "IgnoreUnhealthy"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Impairedzonehealthcheckbehavior"
            }
         },
         "title": "AutoScalingAvailabilityZoneImpairmentPolicy",
         "type": "object"
      },
      "AutoScalingBaselineEbsBandwidthMbsRequest": {
         "description": "Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingBaselineEbsBandwidthMbsRequest",
         "type": "object"
      },
      "AutoScalingBaselinePerformanceFactorsRequest": {
         "description": "The baseline performance to consider, using an instance family as a baseline\nreference. The instance family establishes the lowest acceptable level of\nperformance. Auto Scaling uses this baseline to guide instance type selection, but\nthere is no guarantee that the selected instance types will always exceed the\nbaseline for every application.\n\nCurrently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying\n``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Cpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCpuPerformanceFactorRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingBaselinePerformanceFactorsRequest",
         "type": "object"
      },
      "AutoScalingCapacityReservationSpecification": {
         "description": "Describes the Capacity Reservation preference and targeting options.\n\nIf you specify ``open`` or ``none`` for\n``CapacityReservationPreference``, do not specify a ``CapacityReservationTarget``.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityReservationPreference": {
               "anyOf": [
                  {
                     "enum": [
                        "capacity-reservations-only",
                        "capacity-reservations-first",
                        "none",
                        "default"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Capacityreservationpreference"
            },
            "CapacityReservationTarget": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCapacityReservationTarget"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingCapacityReservationSpecification",
         "type": "object"
      },
      "AutoScalingCapacityReservationTarget": {
         "description": "The target for the Capacity Reservation.\n\nSpecify Capacity Reservations IDs or Capacity Reservation resource group ARNs.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "CapacityReservationIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationids"
            },
            "CapacityReservationResourceGroupArns": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Capacityreservationresourcegrouparns"
            }
         },
         "title": "AutoScalingCapacityReservationTarget",
         "type": "object"
      },
      "AutoScalingCpuPerformanceFactorRequest": {
         "description": "The CPU performance to consider, using an instance family as the baseline reference.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "References": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingPerformanceFactorReferenceRequest"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "References"
            }
         },
         "title": "AutoScalingCpuPerformanceFactorRequest",
         "type": "object"
      },
      "AutoScalingGroup": {
         "description": "Describes an Auto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "AutoScalingGroupName": {
               "title": "Autoscalinggroupname",
               "type": "string"
            },
            "MinSize": {
               "title": "Minsize",
               "type": "integer"
            },
            "MaxSize": {
               "title": "Maxsize",
               "type": "integer"
            },
            "DefaultCooldown": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": 300,
               "title": "Defaultcooldown"
            },
            "AutoScalingGroupARN": {
               "default": null,
               "title": "Autoscalinggrouparn",
               "type": "string"
            },
            "LaunchConfigurationName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchconfigurationname"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "MixedInstancesPolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingMixedInstancesPolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "DesiredCapacity": {
               "title": "Desiredcapacity",
               "type": "integer"
            },
            "PredictedCapacity": {
               "default": null,
               "title": "Predictedcapacity",
               "type": "integer"
            },
            "AvailabilityZones": {
               "items": {
                  "type": "string"
               },
               "title": "Availabilityzones",
               "type": "array"
            },
            "AvailabilityZoneIds": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Availabilityzoneids"
            },
            "LoadBalancerNames": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Loadbalancernames"
            },
            "TargetGroupARNs": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Targetgrouparns"
            },
            "HealthCheckType": {
               "title": "Healthchecktype",
               "type": "string"
            },
            "HealthCheckGracePeriod": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Healthcheckgraceperiod"
            },
            "Instances": {
               "items": {
                  "$ref": "#/$defs/AutoScalingInstanceReference"
               },
               "title": "Instances",
               "type": "array"
            },
            "CreatedTime": {
               "format": "date-time",
               "title": "Createdtime",
               "type": "string"
            },
            "SuspendedProcesses": {
               "items": {
                  "$ref": "#/$defs/SuspendedProcess"
               },
               "title": "Suspendedprocesses",
               "type": "array"
            },
            "PlacementGroup": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Placementgroup"
            },
            "VPCZoneIdentifier": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Vpczoneidentifier"
            },
            "EnabledMetrics": {
               "items": {
                  "$ref": "#/$defs/EnabledMetric"
               },
               "title": "Enabledmetrics",
               "type": "array"
            },
            "Status": {
               "default": null,
               "title": "Status",
               "type": "string"
            },
            "Tags": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingTagDescription"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Tags"
            },
            "TerminationPolicies": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Terminationpolicies"
            },
            "NewInstancesProtectedFromScaleIn": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Newinstancesprotectedfromscalein"
            },
            "ServiceLinkedRoleARN": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Servicelinkedrolearn"
            },
            "MaxInstanceLifetime": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxinstancelifetime"
            },
            "CapacityRebalance": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Capacityrebalance"
            },
            "WarmPoolConfiguration": {
               "$ref": "#/$defs/AutoScalingWarmPoolConfiguration",
               "default": null
            },
            "WarmPoolSize": {
               "default": null,
               "title": "Warmpoolsize",
               "type": "integer"
            },
            "Context": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Context"
            },
            "DesiredCapacityType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Desiredcapacitytype"
            },
            "DefaultInstanceWarmup": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Defaultinstancewarmup"
            },
            "TrafficSources": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/TrafficSourceIdentifier"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Trafficsources"
            },
            "InstanceMaintenancePolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceMaintenancePolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "DeletionProtection": {
               "anyOf": [
                  {
                     "enum": [
                        "none",
                        "prevent-force-deletion",
                        "prevent-all-deletion"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Deletionprotection"
            },
            "AvailabilityZoneDistribution": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAvailabilityZoneDistribution"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AvailabilityZoneImpairmentPolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAvailabilityZoneImpairmentPolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "CapacityReservationSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingCapacityReservationSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstanceLifecyclePolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceLifecyclePolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "AutoScalingGroupName",
            "MinSize",
            "MaxSize",
            "DesiredCapacity",
            "AvailabilityZones",
            "HealthCheckType",
            "CreatedTime"
         ],
         "title": "AutoScalingGroup",
         "type": "object"
      },
      "AutoScalingInstanceLifecyclePolicy": {
         "description": "The instance lifecycle policy for the Auto Scaling group. This policy controls\ninstance behavior when an instance transitions through its lifecycle states.\nConfigure retention triggers to specify when instances should move to a ``Retained``\nstate instead of automatic termination.\n\nFor more information, see\n`Control instance retention with instance lifecycle policies <https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-lifecycle-policy.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "RetentionTriggers": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingRetentionTriggers"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingInstanceLifecyclePolicy",
         "type": "object"
      },
      "AutoScalingInstanceMaintenancePolicy": {
         "description": "Describes an instance maintenance policy.\n\nFor more information, see\n`Set instance maintenance policy <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "MinHealthyPercentage": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minhealthypercentage"
            },
            "MaxHealthyPercentage": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxhealthypercentage"
            }
         },
         "title": "AutoScalingInstanceMaintenancePolicy",
         "type": "object"
      },
      "AutoScalingInstanceReference": {
         "description": "Describes an EC2 instance.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceId": {
               "title": "Instanceid",
               "type": "string"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "AvailabilityZone": {
               "title": "Availabilityzone",
               "type": "string"
            },
            "AvailabilityZoneId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Availabilityzoneid"
            },
            "LifecycleState": {
               "enum": [
                  "Pending",
                  "Pending:Wait",
                  "Pending:Proceed",
                  "Quarantined",
                  "InService",
                  "Terminating",
                  "Terminating:Wait",
                  "Terminating:Proceed",
                  "Terminating:Retained",
                  "Terminated",
                  "Detaching",
                  "Detached",
                  "EnteringStandby",
                  "Standby",
                  "ReplacingRootVolume",
                  "ReplacingRootVolume:Wait",
                  "ReplacingRootVolume:Proceed",
                  "RootVolumeReplaced",
                  "Warmed:Pending",
                  "Warmed:Pending:Wait",
                  "Warmed:Pending:Proceed",
                  "Warmed:Pending:Retained",
                  "Warmed:Terminating",
                  "Warmed:Terminating:Wait",
                  "Warmed:Terminating:Proceed",
                  "Warmed:Terminating:Retained",
                  "Warmed:Terminated",
                  "Warmed:Stopped",
                  "Warmed:Running",
                  "Warmed:Hibernated"
               ],
               "title": "Lifecyclestate",
               "type": "string"
            },
            "HealthStatus": {
               "title": "Healthstatus",
               "type": "string"
            },
            "LaunchConfigurationName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchconfigurationname"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            },
            "ProtectedFromScaleIn": {
               "title": "Protectedfromscalein",
               "type": "boolean"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            }
         },
         "required": [
            "InstanceId",
            "AvailabilityZone",
            "LifecycleState",
            "HealthStatus",
            "ProtectedFromScaleIn"
         ],
         "title": "AutoScalingInstanceReference",
         "type": "object"
      },
      "AutoScalingInstanceRequirements": {
         "description": "The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto\nScaling uses your specified requirements to identify instance types. Then, it uses\nyour On-Demand and Spot allocation strategies to launch instances from these\ninstance types.\n\nWhen you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you\nspecify multiple values for an attribute, you get instance types that satisfy any of the specified values.\n\nTo limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use\none of the following parameters, but not both in the same request:\n\n* ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if\n  they match your specified attributes.\n* ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.\n\nYou must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute\nis set to its default.\n\nFor more information, see `Create a mixed instances group using attribute-based instance type\nselection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-\ntype-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your\nattributes before you apply them to your Auto Scaling group, see `Preview instance types with specified\nattributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-\nselection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VCpuCount": {
               "$ref": "#/$defs/VCpuCountRequest"
            },
            "MemoryMiB": {
               "$ref": "#/$defs/AutoScalingMemoryMiBRequest"
            },
            "CpuManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "intel",
                           "amd",
                           "amazon-web-services",
                           "apple"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Cpumanufacturers"
            },
            "MemoryGiBPerVCpu": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/MemoryGiBPerVCpuRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ExcludedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Excludedinstancetypes"
            },
            "InstanceGenerations": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "current",
                           "previous"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Instancegenerations"
            },
            "SpotMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxpricepercentageoverlowestprice"
            },
            "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxspotpriceaspercentageofoptimalondemandprice"
            },
            "OnDemandMaxPricePercentageOverLowestPrice": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandmaxpricepercentageoverlowestprice"
            },
            "BareMetal": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Baremetal"
            },
            "BurstablePerformance": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Burstableperformance"
            },
            "RequireHibernateSupport": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Requirehibernatesupport"
            },
            "NetworkInterfaceCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingNetworkInterfaceCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "LocalStorage": {
               "anyOf": [
                  {
                     "enum": [
                        "included",
                        "required",
                        "excluded"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Localstorage"
            },
            "LocalStorageTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "hdd",
                           "ssd"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Localstoragetypes"
            },
            "TotalLocalStorageGB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingTotalLocalStorageGBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "BaselineEbsBandwidthMbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselineEbsBandwidthMbsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorTypes": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "gpu",
                           "fpga",
                           "inference"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratortypes"
            },
            "AcceleratorCount": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorCountRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AcceleratorManufacturers": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "nvidia",
                           "amd",
                           "amazon-web-services",
                           "xilinx"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratormanufacturers"
            },
            "AcceleratorNames": {
               "anyOf": [
                  {
                     "items": {
                        "enum": [
                           "a100",
                           "v100",
                           "k80",
                           "t4",
                           "m60",
                           "radeon-pro-v520",
                           "vu9p"
                        ],
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Acceleratornames"
            },
            "AcceleratorTotalMemoryMiB": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingAcceleratorTotalMemoryMiBRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NetworkBandwidthGbps": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NetworkBandwidthGbpsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "AllowedInstanceTypes": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Allowedinstancetypes"
            },
            "BaselinePerformanceFactors": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingBaselinePerformanceFactorsRequest"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "VCpuCount",
            "MemoryMiB"
         ],
         "title": "AutoScalingInstanceRequirements",
         "type": "object"
      },
      "AutoScalingInstanceReusePolicy": {
         "description": "Describes an instance reuse policy for a warm pool.\n\nFor more information, see\n`Warm pools for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html>`_\nin the *Amazon EC2 Auto\nScaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ReuseOnScaleIn": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Reuseonscalein"
            }
         },
         "title": "AutoScalingInstanceReusePolicy",
         "type": "object"
      },
      "AutoScalingInstancesDistribution": {
         "description": "Use this structure to specify the distribution of On-Demand Instances and Spot\nInstances and the allocation strategies used to fulfill On-Demand and Spot\ncapacities for a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "OnDemandAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandallocationstrategy"
            },
            "OnDemandBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandbasecapacity"
            },
            "OnDemandPercentageAboveBaseCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ondemandpercentageabovebasecapacity"
            },
            "SpotAllocationStrategy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotallocationstrategy"
            },
            "SpotInstancePools": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotinstancepools"
            },
            "SpotMaxPrice": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotmaxprice"
            }
         },
         "title": "AutoScalingInstancesDistribution",
         "type": "object"
      },
      "AutoScalingLaunchTemplate": {
         "description": "Use this structure to specify the launch templates and instance types (overrides)\nfor a mixed instances policy.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "Overrides": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/LaunchTemplateOverrides"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Overrides"
            }
         },
         "title": "AutoScalingLaunchTemplate",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      },
      "AutoScalingMemoryMiBRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "AutoScalingMemoryMiBRequest",
         "type": "object"
      },
      "AutoScalingMixedInstancesPolicy": {
         "description": "Use this structure to launch multiple instance types and On-Demand Instances and\nSpot Instances within a single Auto Scaling group.\n\nA mixed instances policy contains information that Amazon EC2 Auto Scaling can use\nto launch instances and help optimize your costs. For more information, see\n`Auto Scaling groups with multiple instance types and purchase options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html>`_\nin the\n*Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplate"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstancesDistribution": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstancesDistribution"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingMixedInstancesPolicy",
         "type": "object"
      },
      "AutoScalingNetworkInterfaceCountRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingNetworkInterfaceCountRequest",
         "type": "object"
      },
      "AutoScalingPerformanceFactorReferenceRequest": {
         "description": "Specify an instance family to use as the baseline reference for CPU performance. All\ninstance types that All instance types that match your specified attributes will be\ncompared against the CPU performance of the referenced instance family, regardless\nof CPU manufacturer or architecture differences.\n\nCurrently only one instance family can be specified in the list.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceFamily": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancefamily"
            }
         },
         "title": "AutoScalingPerformanceFactorReferenceRequest",
         "type": "object"
      },
      "AutoScalingRetentionTriggers": {
         "description": "Defines the specific triggers that cause instances to be retained in a Retained\nstate rather than terminated.\n\nEach trigger corresponds to a different failure scenario during the instance\nlifecycle. This allows fine-grained control over when to preserve instances for\nmanual intervention.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "TerminateHookAbandon": {
               "anyOf": [
                  {
                     "enum": [
                        "retain",
                        "terminate"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Terminatehookabandon"
            }
         },
         "title": "AutoScalingRetentionTriggers",
         "type": "object"
      },
      "AutoScalingTagDescription": {
         "description": "Describes a tag for an Auto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ResourceId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Resourceid"
            },
            "ResourceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Resourcetype"
            },
            "Key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "Value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            },
            "PropagateAtLaunch": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Propagateatlaunch"
            }
         },
         "title": "AutoScalingTagDescription",
         "type": "object"
      },
      "AutoScalingTotalLocalStorageGBRequest": {
         "description": "Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "AutoScalingTotalLocalStorageGBRequest",
         "type": "object"
      },
      "AutoScalingWarmPoolConfiguration": {
         "description": "Describes a warm pool configuration.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "MaxGroupPreparedCapacity": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maxgrouppreparedcapacity"
            },
            "MinSize": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Minsize"
            },
            "PoolState": {
               "anyOf": [
                  {
                     "enum": [
                        "Stopped",
                        "Running",
                        "Hibernated"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Poolstate"
            },
            "Status": {
               "anyOf": [
                  {
                     "const": "PendingDelete",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Status"
            },
            "InstanceReusePolicy": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceReusePolicy"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "AutoScalingWarmPoolConfiguration",
         "type": "object"
      },
      "EnabledMetric": {
         "description": "Describes an enabled Auto Scaling group metric.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Metric": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Metric"
            },
            "Granularity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Granularity"
            }
         },
         "title": "EnabledMetric",
         "type": "object"
      },
      "LaunchTemplateOverrides": {
         "description": "Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances\npolicy:\n\n* Override the instance type that is specified in the launch template.\n* Use multiple instance types.\n\nSpecify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling\nprovision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a\nlarger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which\ninstance types are matched before you apply the instance requirements to your Auto Scaling group.\n\nAfter you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance\ntypes automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine\nwhether a new EC2 instance type can be used.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            },
            "LaunchTemplateSpecification": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "InstanceRequirements": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceRequirements"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            }
         },
         "title": "LaunchTemplateOverrides",
         "type": "object"
      },
      "MemoryGiBPerVCpuRequest": {
         "description": "Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "MemoryGiBPerVCpuRequest",
         "type": "object"
      },
      "NetworkBandwidthGbpsRequest": {
         "description": "Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.\n\nSetting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will\nidentify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go\nbelow the specified minimum at times. For more information, see `Available instance\nbandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-\nbandwidth>`_ in the *Amazon EC2 User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Min"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "title": "NetworkBandwidthGbpsRequest",
         "type": "object"
      },
      "SuspendedProcess": {
         "description": "Describes an auto scaling process that has been suspended.\n\nFor more information, see\n`Types of processes <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-\nprocesses.html#process-types>`_ in the *Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "ProcessName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Processname"
            },
            "SuspensionReason": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Suspensionreason"
            }
         },
         "title": "SuspendedProcess",
         "type": "object"
      },
      "TrafficSourceIdentifier": {
         "description": "Identifying information for a traffic source.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Identifier": {
               "title": "Identifier",
               "type": "string"
            },
            "Type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            }
         },
         "required": [
            "Identifier"
         ],
         "title": "TrafficSourceIdentifier",
         "type": "object"
      },
      "VCpuCountRequest": {
         "description": "Specifies the minimum and maximum for the ``VCpuCount`` object when you specify\n`InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an\nAuto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Min": {
               "title": "Min",
               "type": "integer"
            },
            "Max": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max"
            }
         },
         "required": [
            "Min"
         ],
         "title": "VCpuCountRequest",
         "type": "object"
      }
   },
   "required": [
      "AutoScalingGroups"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AutoScalingGroups: builtins.list[AutoScalingGroup] [Required]

The groups.

field NextToken: str | None = None

A string that indicates that the response contains more items than can be returned in a single response.

To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstanceDetails[source]

Bases: Boto3Model

Describes an EC2 instance associated with an Auto Scaling group.

Show JSON schema
{
   "title": "AutoScalingInstanceDetails",
   "description": "Describes an EC2 instance associated with an Auto Scaling group.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "InstanceId": {
         "title": "Instanceid",
         "type": "string"
      },
      "InstanceType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Instancetype"
      },
      "AutoScalingGroupName": {
         "title": "Autoscalinggroupname",
         "type": "string"
      },
      "AvailabilityZone": {
         "title": "Availabilityzone",
         "type": "string"
      },
      "AvailabilityZoneId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Availabilityzoneid"
      },
      "LifecycleState": {
         "title": "Lifecyclestate",
         "type": "string"
      },
      "HealthStatus": {
         "title": "Healthstatus",
         "type": "string"
      },
      "LaunchConfigurationName": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Launchconfigurationname"
      },
      "LaunchTemplate": {
         "anyOf": [
            {
               "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "ImageId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Imageid"
      },
      "ProtectedFromScaleIn": {
         "title": "Protectedfromscalein",
         "type": "boolean"
      },
      "WeightedCapacity": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Weightedcapacity"
      }
   },
   "$defs": {
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      }
   },
   "required": [
      "InstanceId",
      "AutoScalingGroupName",
      "AvailabilityZone",
      "LifecycleState",
      "HealthStatus",
      "ProtectedFromScaleIn"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AutoScalingGroupName: str [Required]

The name of the Auto Scaling group for the instance.

field AvailabilityZone: str [Required]

The Availability Zone for the instance.

field AvailabilityZoneId: str | None = None

The Availability Zone ID where the instance is located.

field HealthStatus: str [Required]

The last reported health status of this instance.

Healthy means that the instance is healthy and should remain in service. Unhealthy means that the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace it.

field ImageId: str | None = None

The ID of the Amazon Machine Image (AMI) associated with the instance.

This field shows the current AMI ID of the instance’s root volume. It may differ from the original AMI used when the instance was first launched.

field InstanceId: str [Required]

The ID of the instance.

field InstanceType: str | None = None

The instance type of the EC2 instance.

field LaunchConfigurationName: str | None = None

The launch configuration used to launch the instance.

This value is not available if you attached the instance to the Auto Scaling group.

field LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None

The launch template for the instance.

field LifecycleState: str [Required]

The lifecycle state for the instance.

The Quarantined state is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.

field ProtectedFromScaleIn: bool [Required]

Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.

field WeightedCapacity: str | None = None

The number of capacity units contributed by the instance based on its instance type.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.AutoScalingInstancesType[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "AutoScalingInstancesType",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "AutoScalingInstances": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/AutoScalingInstanceDetails"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Autoscalinginstances"
      },
      "NextToken": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nexttoken"
      }
   },
   "$defs": {
      "AutoScalingInstanceDetails": {
         "description": "Describes an EC2 instance associated with an Auto Scaling group.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "InstanceId": {
               "title": "Instanceid",
               "type": "string"
            },
            "InstanceType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Instancetype"
            },
            "AutoScalingGroupName": {
               "title": "Autoscalinggroupname",
               "type": "string"
            },
            "AvailabilityZone": {
               "title": "Availabilityzone",
               "type": "string"
            },
            "AvailabilityZoneId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Availabilityzoneid"
            },
            "LifecycleState": {
               "title": "Lifecyclestate",
               "type": "string"
            },
            "HealthStatus": {
               "title": "Healthstatus",
               "type": "string"
            },
            "LaunchConfigurationName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchconfigurationname"
            },
            "LaunchTemplate": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingLaunchTemplateSpecification"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "ImageId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Imageid"
            },
            "ProtectedFromScaleIn": {
               "title": "Protectedfromscalein",
               "type": "boolean"
            },
            "WeightedCapacity": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Weightedcapacity"
            }
         },
         "required": [
            "InstanceId",
            "AutoScalingGroupName",
            "AvailabilityZone",
            "LifecycleState",
            "HealthStatus",
            "ProtectedFromScaleIn"
         ],
         "title": "AutoScalingInstanceDetails",
         "type": "object"
      },
      "AutoScalingLaunchTemplateSpecification": {
         "description": "Describes the launch template and the version of the launch template that Amazon EC2\nAuto Scaling uses to launch Amazon EC2 instances.\n\nFor more information about launch templates, see\n`Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_\nin the *Amazon EC2 Auto Scaling\nUser Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchTemplateId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplateid"
            },
            "LaunchTemplateName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Launchtemplatename"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            }
         },
         "title": "AutoScalingLaunchTemplateSpecification",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field AutoScalingInstances: builtins.list[AutoScalingInstanceDetails] | None [Optional]

The instances.

field NextToken: str | None = None

A string that indicates that the response contains more items than can be returned in a single response.

To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.LaunchConfigurationsType[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "LaunchConfigurationsType",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LaunchConfigurations": {
         "items": {
            "$ref": "#/$defs/LaunchConfiguration"
         },
         "title": "Launchconfigurations",
         "type": "array"
      },
      "NextToken": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nexttoken"
      }
   },
   "$defs": {
      "AutoScalingBlockDeviceMapping": {
         "description": "Describes a block device mapping.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "VirtualName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Virtualname"
            },
            "DeviceName": {
               "title": "Devicename",
               "type": "string"
            },
            "Ebs": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/EbsMapping"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "NoDevice": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Nodevice"
            }
         },
         "required": [
            "DeviceName"
         ],
         "title": "AutoScalingBlockDeviceMapping",
         "type": "object"
      },
      "AutoScalingInstanceMonitoring": {
         "description": "Describes whether detailed monitoring is enabled for the Auto Scaling instances.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Enabled": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Enabled"
            }
         },
         "title": "AutoScalingInstanceMonitoring",
         "type": "object"
      },
      "EbsMapping": {
         "description": "Describes information used to set up an Amazon EBS volume specified in a block\ndevice mapping.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "SnapshotId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Snapshotid"
            },
            "VolumeSize": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumesize"
            },
            "VolumeType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Volumetype"
            },
            "DeleteOnTermination": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Deleteontermination"
            },
            "Iops": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Iops"
            },
            "Encrypted": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Encrypted"
            },
            "Throughput": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Throughput"
            }
         },
         "title": "EbsMapping",
         "type": "object"
      },
      "InstanceMetadataOptions": {
         "description": "The metadata options for the instances.\n\nFor more information, see\n`Configure the instance metadata options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds>`_\nin\nthe *Amazon EC2 Auto Scaling User Guide*.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "HttpTokens": {
               "anyOf": [
                  {
                     "enum": [
                        "optional",
                        "required"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httptokens"
            },
            "HttpPutResponseHopLimit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httpputresponsehoplimit"
            },
            "HttpEndpoint": {
               "anyOf": [
                  {
                     "enum": [
                        "enabled",
                        "disabled"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Httpendpoint"
            }
         },
         "title": "InstanceMetadataOptions",
         "type": "object"
      },
      "LaunchConfiguration": {
         "description": "Describes a launch configuration.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "LaunchConfigurationName": {
               "title": "Launchconfigurationname",
               "type": "string"
            },
            "LaunchConfigurationARN": {
               "default": null,
               "title": "Launchconfigurationarn",
               "type": "string"
            },
            "ImageId": {
               "title": "Imageid",
               "type": "string"
            },
            "KeyName": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Keyname"
            },
            "SecurityGroups": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Securitygroups"
            },
            "ClassicLinkVPCId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Classiclinkvpcid"
            },
            "ClassicLinkVPCSecurityGroups": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Classiclinkvpcsecuritygroups"
            },
            "UserData": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Userdata"
            },
            "InstanceType": {
               "title": "Instancetype",
               "type": "string"
            },
            "KernelId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Kernelid"
            },
            "RamdiskId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ramdiskid"
            },
            "BlockDeviceMappings": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AutoScalingBlockDeviceMapping"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Blockdevicemappings"
            },
            "InstanceMonitoring": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/AutoScalingInstanceMonitoring"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "SpotPrice": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Spotprice"
            },
            "IamInstanceProfile": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Iaminstanceprofile"
            },
            "CreatedTime": {
               "format": "date-time",
               "title": "Createdtime",
               "type": "string"
            },
            "EbsOptimized": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Ebsoptimized"
            },
            "AssociatePublicIpAddress": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Associatepublicipaddress"
            },
            "PlacementTenancy": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Placementtenancy"
            },
            "MetadataOptions": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/InstanceMetadataOptions"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "LaunchConfigurationName",
            "ImageId",
            "InstanceType",
            "CreatedTime"
         ],
         "title": "LaunchConfiguration",
         "type": "object"
      }
   },
   "required": [
      "LaunchConfigurations"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field LaunchConfigurations: builtins.list[LaunchConfiguration] [Required]

The launch configurations.

field NextToken: str | None = None

A string that indicates that the response contains more items than can be returned in a single response.

To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.

pydantic model botocraft.services.autoscaling.LifecycleHookSpecification[source]

Bases: Boto3Model

Describes information used to specify a lifecycle hook for an Auto Scaling group.

For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide.

Show JSON schema
{
   "title": "LifecycleHookSpecification",
   "description": "Describes information used to specify a lifecycle hook for an Auto Scaling group.\n\nFor more information, see\n`Amazon EC2 Auto Scaling lifecycle hooks <https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html>`_\nin the *Amazon EC2 Auto Scaling User\nGuide*.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "LifecycleHookName": {
         "title": "Lifecyclehookname",
         "type": "string"
      },
      "LifecycleTransition": {
         "title": "Lifecycletransition",
         "type": "string"
      },
      "NotificationMetadata": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Notificationmetadata"
      },
      "HeartbeatTimeout": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Heartbeattimeout"
      },
      "DefaultResult": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Defaultresult"
      },
      "NotificationTargetARN": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Notificationtargetarn"
      },
      "RoleARN": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rolearn"
      }
   },
   "required": [
      "LifecycleHookName",
      "LifecycleTransition"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field DefaultResult: str | None = None

The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.

The default value is ABANDON.

field HeartbeatTimeout: int | None = None

The maximum time, in seconds, that can elapse before the lifecycle hook times out.

The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour).

field LifecycleHookName: str [Required]

The name of the lifecycle hook.

field LifecycleTransition: str [Required]

The lifecycle transition.

For Auto Scaling groups, there are two major lifecycle transitions.

field NotificationMetadata: str | None = None

Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.

field NotificationTargetARN: str | None = None

The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a wait state for the lifecycle hook.

You can specify an Amazon SNS topic or an Amazon SQS queue.

field RoleARN: str | None = None

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.

For information about creating this role, see Prepare to add a lifecycle hook to your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

field session: Any | None = None

The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use Any here because we pydantic complains vociferously if we use boto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.

classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.

!!! note

model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.

Parameters:
  • _fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self

Validate the given object with string data against the Pydantic model.

Parameters:
  • obj – The object containing string data to validate.

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

  • by_alias – Whether to use the field’s alias when validating against the provided input data.

  • by_name – Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

transform(attribute: str, transformer: str | None) Any

Transform an attribute using a regular expression into something else before it is returned.

Important

This only makes sense for attributes that are strings.

transformer is a regular expression that will be used to transform the value of the attribute.

  • If the attribute is None, it will be returned verbatim.

  • If transformer is None, the attribute will be returned verbatim.

  • If transformer has no named groups, the attribute will be replaced with the value of the first group.

  • If transformer has named groups, the attribute will be replaced with a dictionary of the named groups.

Raises:
  • ValueError – If the attribute does not exist on the model.

  • RuntimeError – If the transformer fails to match the attribute value.

Parameters:
  • attribute – The attribute to transform.

  • transformer – The regular expression to use to transform the attribute.

Returns:

The transformed attribute.