Application Auto Scaling (application-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.application_autoscaling.ScalableTarget[source]
Bases:
ScalableTargetModelMixin,PrimaryBoto3ModelRepresents a scalable target.
Show JSON schema
{ "title": "ScalableTarget", "description": "Represents a scalable target.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "title": "Scalabledimension", "type": "string" }, "MinCapacity": { "title": "Mincapacity", "type": "integer" }, "MaxCapacity": { "title": "Maxcapacity", "type": "integer" }, "PredictedCapacity": { "default": null, "title": "Predictedcapacity", "type": "integer" }, "RoleARN": { "title": "Rolearn", "type": "string" }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" }, "SuspendedState": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingSuspendedState" }, { "type": "null" } ], "default": null }, "ScalableTargetARN": { "default": null, "title": "Scalabletargetarn", "type": "string" } }, "$defs": { "ApplicationAutoscalingSuspendedState": { "description": "Specifies whether the scaling activities for a scalable target are in a suspended\nstate.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "DynamicScalingInSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalinginsuspended" }, "DynamicScalingOutSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalingoutsuspended" }, "ScheduledScalingSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Scheduledscalingsuspended" } }, "title": "ApplicationAutoscalingSuspendedState", "type": "object" } }, "required": [ "ServiceNamespace", "ResourceId", "ScalableDimension", "MinCapacity", "MaxCapacity", "RoleARN", "CreationTime" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field CreationTime: datetime [Required]
The Unix timestamp for when the scalable target was created.
- field MaxCapacity: int [Required]
The maximum value to scale to in response to a scale-out activity.
- field MinCapacity: int [Required]
The minimum value to scale to in response to a scale-in activity.
- field ResourceId: str [Required]
The identifier of the resource associated with the scalable target.
This string consists of the resource type and unique identifier.
- field RoleARN: str [Required]
The ARN of an IAM role that allows Application Auto Scaling to modify the scalable target on your behalf.
- field ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] [Required]
The scalable dimension associated with the scalable target.
This string consists of the service namespace, resource type, and scaling property.
- field ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'] [Required]
The namespace of the Amazon Web Services service that provides the resource, or a
custom-resource.
- field SuspendedState: ApplicationAutoscalingSuspendedState | None = None
Specifies whether the scaling activities for a scalable target are in a suspended state.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
ScalableTargetManager
- 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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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 arn: str | None
Return the ARN of the model. This is the value of the
ScalableTargetARNattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
ResourceIdattribute.- 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: OrderedDict[str, Any]
The primary key of the scalable target.
This can be used do
botocraft.services.application_autoscaling.ScalableTargetManager.delete.
- property resource: Service
Return the resource object for this scalable target.
Currently only the
ecsservice namespace is supported, which returns anServiceobject.
- property scaling_policies: list[botocraft.services.application_autoscaling.ScalingPolicy] | None
Return the
ScalingPolicyobjects that this scalable target has.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 scheduled_action: ScheduledAction | None
Return the
ScheduledActionobjects that this scalable target has.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.
- pydantic model botocraft.services.application_autoscaling.ScalingPolicy[source]
Bases:
PrimaryBoto3ModelRepresents a scaling policy to use with Application Auto Scaling.
For more information about configuring scaling policies for a specific service, see Amazon Web Services services that you can use with Application Auto Scaling in the Application Auto Scaling User Guide.
Show JSON schema
{ "title": "ScalingPolicy", "description": "Represents a scaling policy to use with Application Auto Scaling.\n\nFor more information about configuring scaling policies for a specific service, see\n`Amazon Web Services services that you can use with Application Auto Scaling <https://docs.aws.amazon.com/autoscaling/application/userguide/integrated-\nservices-list.html>`_ in the *Application Auto Scaling User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyARN": { "title": "Policyarn", "type": "string" }, "PolicyName": { "title": "Policyname", "type": "string" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "title": "Scalabledimension", "type": "string" }, "PolicyType": { "enum": [ "StepScaling", "TargetTrackingScaling", "PredictiveScaling" ], "title": "Policytype", "type": "string" }, "StepScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingStepScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "TargetTrackingScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "PredictiveScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingPredictiveScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "Alarms": { "anyOf": [ { "items": { "$ref": "#/$defs/Alarm" }, "type": "array" }, { "type": "null" } ], "title": "Alarms" }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" } }, "$defs": { "Alarm": { "description": "Represents a CloudWatch alarm associated with a scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AlarmName": { "title": "Alarmname", "type": "string" }, "AlarmARN": { "title": "Alarmarn", "type": "string" } }, "required": [ "AlarmName", "AlarmARN" ], "title": "Alarm", "type": "object" }, "ApplicationAutoscalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy\nto use with Application Auto Scaling.\n\nFor information about the available metrics for a service, see `Amazon Web Services services that publish CloudWatch\nmetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html>`_ in the\n*Amazon CloudWatch User Guide*.\n\nTo create your customized metric specification:\n\n* Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you\n create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see `Publish\n custom metrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html>`_ in the *Amazon\n CloudWatch User Guide*.\n* Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in\n inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity\n increases, and increase when capacity decreases.\n\nFor more information about the CloudWatch terminology below, see `Amazon CloudWatch\nconcepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_ in the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/MetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "Statistic": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum", "SampleCount", "Sum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Statistic" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "Metrics": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDataQuery" }, "type": "array" }, { "type": "null" } ], "title": "Metrics" } }, "title": "ApplicationAutoscalingCustomizedMetricSpecification", "type": "object" }, "ApplicationAutoscalingPredefinedMetricSpecification": { "description": "Represents a predefined metric for a target tracking scaling policy to use with\nApplication Auto Scaling.\n\nFor more information,\n`Predefined metrics for target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html#predefined-metrics>`_\nin the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "enum": [ "DynamoDBReadCapacityUtilization", "DynamoDBWriteCapacityUtilization", "ALBRequestCountPerTarget", "RDSReaderAverageCPUUtilization", "RDSReaderAverageDatabaseConnections", "EC2SpotFleetRequestAverageCPUUtilization", "EC2SpotFleetRequestAverageNetworkIn", "EC2SpotFleetRequestAverageNetworkOut", "SageMakerVariantInvocationsPerInstance", "ECSServiceAverageCPUUtilization", "ECSServiceAverageMemoryUtilization", "AppStreamAverageCapacityUtilization", "ComprehendInferenceUtilization", "LambdaProvisionedConcurrencyUtilization", "CassandraReadCapacityUtilization", "CassandraWriteCapacityUtilization", "KafkaBrokerStorageUtilization", "ElastiCacheEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsagePercentage", "ElastiCachePrimaryEngineCPUUtilization", "ElastiCacheReplicaEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage", "NeptuneReaderAverageCPUUtilization", "SageMakerVariantProvisionedConcurrencyUtilization", "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage", "SageMakerInferenceComponentInvocationsPerCopy", "WorkSpacesAverageUserSessionsCapacityUtilization", "SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution", "SageMakerVariantConcurrentRequestsPerModelHighResolution" ], "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "ApplicationAutoscalingPredefinedMetricSpecification", "type": "object" }, "ApplicationAutoscalingPredictiveScalingPolicyConfiguration": { "description": "Represents a predictive scaling policy configuration.\n\nPredictive scaling is supported on Amazon ECS services.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricSpecifications": { "items": { "$ref": "#/$defs/PredictiveScalingMetricSpecification" }, "title": "Metricspecifications", "type": "array" }, "Mode": { "anyOf": [ { "enum": [ "ForecastOnly", "ForecastAndScale" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Mode" }, "SchedulingBufferTime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Schedulingbuffertime" }, "MaxCapacityBreachBehavior": { "anyOf": [ { "enum": [ "HonorMaxCapacity", "IncreaseMaxCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybreachbehavior" }, "MaxCapacityBuffer": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybuffer" } }, "required": [ "MetricSpecifications" ], "title": "ApplicationAutoscalingPredictiveScalingPolicyConfiguration", "type": "object" }, "ApplicationAutoscalingStepScalingPolicyConfiguration": { "description": "Represents a step scaling policy configuration to use with Application Auto Scaling.\n\nFor more information, see\n`Step scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-\npolicies.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AdjustmentType": { "anyOf": [ { "enum": [ "ChangeInCapacity", "PercentChangeInCapacity", "ExactCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Adjustmenttype" }, "StepAdjustments": { "anyOf": [ { "items": { "$ref": "#/$defs/StepAdjustment" }, "type": "array" }, { "type": "null" } ], "title": "Stepadjustments" }, "MinAdjustmentMagnitude": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Minadjustmentmagnitude" }, "Cooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Cooldown" }, "MetricAggregationType": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricaggregationtype" } }, "title": "ApplicationAutoscalingStepScalingPolicyConfiguration", "type": "object" }, "ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration": { "description": "Represents a target tracking scaling policy configuration to use with Application\nAuto Scaling.\n\nFor more information, see\n`Target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html>`_\nin the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingPredefinedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "ScaleOutCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleoutcooldown" }, "ScaleInCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleincooldown" }, "DisableScaleIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Disablescalein" } }, "required": [ "TargetValue" ], "title": "ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration", "type": "object" }, "MetricDimension": { "description": "Describes the dimension names and values associated with a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "MetricDimension", "type": "object" }, "PredictiveScalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a predictive scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricDataQueries": { "items": { "$ref": "#/$defs/PredictiveScalingMetricDataQuery" }, "title": "Metricdataqueries", "type": "array" } }, "required": [ "MetricDataQueries" ], "title": "PredictiveScalingCustomizedMetricSpecification", "type": "object" }, "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDataQuery": { "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "PredictiveScalingMetricDataQuery", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricSpecification": { "description": "This structure specifies the metrics and target utilization settings for a\npredictive scaling policy.\n\nYou must specify either a metric pair, or a load metric and a scaling metric\nindividually. Specifying a metric pair instead of individual metrics provides a\nsimpler way to configure metrics for a scaling policy. You choose the metric pair,\nand the policy automatically knows the correct sum and average statistics to use for\nthe load metric and the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricPairSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedMetricPairSpecification" }, { "type": "null" } ], "default": null }, "PredefinedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedScalingMetricSpecification" }, { "type": "null" } ], "default": null }, "PredefinedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedLoadMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedCapacityMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null } }, "required": [ "TargetValue" ], "title": "PredictiveScalingMetricSpecification", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" }, "PredictiveScalingPredefinedLoadMetricSpecification": { "description": "Describes a load metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedLoadMetricSpecification", "type": "object" }, "PredictiveScalingPredefinedMetricPairSpecification": { "description": "Represents a metric pair for a predictive scaling policy.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedMetricPairSpecification", "type": "object" }, "PredictiveScalingPredefinedScalingMetricSpecification": { "description": "Describes a scaling metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedScalingMetricSpecification", "type": "object" }, "StepAdjustment": { "description": "Represents a step adjustment for a `StepScalingPolicyConfiguration <https://docs.aws.amazon.com/autoscaling/application/\nAPIReference/API_StepScalingPolicyConfiguration.html>`_. Describes an adjustment based on the difference between the value\nof the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.\n\nFor the following examples, suppose that you have an alarm with a breach threshold of 50:\n\n* To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of\n ``0`` and an upper bound of ``10``.\n* To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of\n ``-10`` and an upper bound of ``0``.\n\nThere are a few rules for the step adjustments for your step policy:\n\n* The ranges of your step adjustments can't overlap or have a gap.\n* At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there\n must be a step adjustment with a null lower bound.\n* At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there\n must be a step adjustment with a null upper bound.\n* The upper and lower bound can't be null in the same step adjustment.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricIntervalLowerBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervallowerbound" }, "MetricIntervalUpperBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervalupperbound" }, "ScalingAdjustment": { "title": "Scalingadjustment", "type": "integer" } }, "required": [ "ScalingAdjustment" ], "title": "StepAdjustment", "type": "object" }, "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDataQuery": { "description": "The metric data to return. Also defines whether this call is returning data for one\nmetric only, or whether it is performing a math expression on the values of returned\nmetric statistics to create a new time series. A time series is a series of data\npoints, each of which is associated with a timestamp.\n\nFor more information and examples, see\n`Create a target tracking scaling policy for Application Auto Scaling using metric math <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-\nmetric-math.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "Id": { "title": "Id", "type": "string" }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/TargetTrackingMetricStat" }, { "type": "null" } ], "default": null }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "TargetTrackingMetricDataQuery", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" }, "TargetTrackingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "TargetTrackingMetricStat", "type": "object" } }, "required": [ "PolicyARN", "PolicyName", "ServiceNamespace", "ResourceId", "ScalableDimension", "PolicyType", "CreationTime" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Alarms: builtins.list[Alarm] | None [Optional]
The CloudWatch alarms associated with the scaling policy.
- field CreationTime: datetime [Required]
The Unix timestamp for when the scaling policy was created.
- field PolicyType: Literal['StepScaling', 'TargetTrackingScaling', 'PredictiveScaling'] [Required]
The scaling policy type.
- field PredictiveScalingPolicyConfiguration: ApplicationAutoscalingPredictiveScalingPolicyConfiguration | None = None
The predictive scaling policy configuration.
- field ResourceId: str [Required]
The identifier of the resource associated with the scaling policy.
This string consists of the resource type and unique identifier.
- field ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] [Required]
The scalable dimension.
This string consists of the service namespace, resource type, and scaling property.
- field ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'] [Required]
The namespace of the Amazon Web Services service that provides the resource, or a
custom-resource.
- field StepScalingPolicyConfiguration: ApplicationAutoscalingStepScalingPolicyConfiguration | None = None
A step scaling policy.
- field TargetTrackingScalingPolicyConfiguration: ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration | None = None
A target tracking scaling policy.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
ScalingPolicyManager
- 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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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 arn: str | None
Return the ARN of the model. This is the value of the
PolicyARNattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
PolicyNameattribute.- 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: OrderedDict[str, Any]
The primary key of the scaling policy.
This can be used to get the scaling policy with the
botocraft.services.application_autoscaling.ScalingPolicyManager.getmethod, or to dobotocraft.services.application_autoscaling.ScalingPolicyManager.delete.
- property scalable_target: ScalableTarget | None
Return the
ScalableTargetobject that this scaling policy applies to.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.
- pydantic model botocraft.services.application_autoscaling.ScheduledAction[source]
Bases:
PrimaryBoto3ModelRepresents a scheduled action.
Show JSON schema
{ "title": "ScheduledAction", "description": "Represents a scheduled action.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScheduledActionName": { "title": "Scheduledactionname", "type": "string" }, "ScheduledActionARN": { "title": "Scheduledactionarn", "type": "string" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "Schedule": { "title": "Schedule", "type": "string" }, "Timezone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Timezone" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "anyOf": [ { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Scalabledimension" }, "StartTime": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Starttime" }, "EndTime": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Endtime" }, "ScalableTargetAction": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingScalableTargetAction" }, { "type": "null" } ], "default": null }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" } }, "$defs": { "ApplicationAutoscalingScalableTargetAction": { "description": "Represents the minimum and maximum capacity for a scheduled action.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MinCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Mincapacity" }, "MaxCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacity" } }, "title": "ApplicationAutoscalingScalableTargetAction", "type": "object" } }, "required": [ "ScheduledActionName", "ScheduledActionARN", "ServiceNamespace", "Schedule", "ResourceId", "CreationTime" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field EndTime: datetime | None = None
The date and time that the action is scheduled to end, in UTC.
- field ResourceId: str [Required]
The identifier of the resource associated with the scaling policy.
This string consists of the resource type and unique identifier.
- field ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None
The scalable dimension.
This string consists of the service namespace, resource type, and scaling property.
- field ScalableTargetAction: ApplicationAutoscalingScalableTargetAction | None = None
The new minimum and maximum capacity.
You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
- field ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'] [Required]
The namespace of the Amazon Web Services service that provides the resource, or a
custom-resource.
- field StartTime: datetime | None = None
The date and time that the action is scheduled to begin, in UTC.
- field Timezone: str | None = None
The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
ScheduledActionManager
- 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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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 arn: str | None
Return the ARN of the model. This is the value of the
ScheduledActionARNattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
ScheduledActionNameattribute.- 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: OrderedDict[str, Any]
The primary key of the scheduled action.
This can be used to get the scheduled action with the
botocraft.services.application_autoscaling.ScheduledActionManager.getmethod, or to dobotocraft.services.application_autoscaling.ScheduledActionManager.delete.
- property scalable_target: ScalableTarget | None
Return the
ScalableTargetobject that this scheduled action applies to.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.application_autoscaling.ScalableTargetManager[source]
Bases:
Boto3ModelManager- create(model: ScalableTarget, Tags: dict[str, str] | None = None) RegisterScalableTargetResponse[source]
Registers or updates a scalable target, which is the resource that you want to scale.
- Parameters:
model – The
ScalableTargetto create.- Keyword Arguments:
Tags – Assigns one or more tags to the scalable target. Use this parameter to tag the scalable target when it is created. To tag an existing scalable target, use the TagResource operation.
- delete(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], ResourceId: str, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions']) None[source]
Deregisters an Application Auto Scaling scalable target when you have finished using it. To see which resources have been registered, use DescribeScalableTargets.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.ResourceId – The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property.
- get(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, ResourceIds: list[str] | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) ScalableTarget | None[source]
Gets information about the scalable targets in the specified namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
ResourceIds – The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- list(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, ResourceIds: list[str] | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) PrimaryBoto3ModelQuerySet[source]
Gets information about the scalable targets in the specified namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
ResourceIds – The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- class botocraft.services.application_autoscaling.ScalingPolicyManager[source]
Bases:
Boto3ModelManager- create(model: ScalingPolicy) PutScalingPolicyResponse[source]
Creates or updates a scaling policy for an Application Auto Scaling scalable target.
- Parameters:
model – The
ScalingPolicyto create.
- delete(PolicyName: str, ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], ResourceId: str, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions']) None[source]
Deletes the specified scaling policy for an Application Auto Scaling scalable target.
- Parameters:
PolicyName – The name of the scaling policy.
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.ResourceId – The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
- get(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, PolicyNames: list[str] | None = None, ResourceId: str | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) ScalingPolicy | None[source]
Describes the Application Auto Scaling scaling policies for the specified service namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
PolicyNames – The names of the scaling policies to describe.
ResourceId – The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- list(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, PolicyNames: list[str] | None = None, ResourceId: str | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) PrimaryBoto3ModelQuerySet[source]
Describes the Application Auto Scaling scaling policies for the specified service namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
PolicyNames – The names of the scaling policies to describe.
ResourceId – The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- update(model: ScalingPolicy) PutScalingPolicyResponse[source]
Creates or updates a scaling policy for an Application Auto Scaling scalable target.
- Parameters:
model – The
ScalingPolicyto update.
- class botocraft.services.application_autoscaling.ScheduledActionManager[source]
Bases:
Boto3ModelManager- create(model: ScheduledAction) None[source]
Creates or updates a scheduled action for an Application Auto Scaling scalable target.
- Parameters:
model – The
ScheduledActionto create.
- delete(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], ScheduledActionName: str, ResourceId: str, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions']) None[source]
Deletes the specified scheduled action for an Application Auto Scaling scalable target.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.ScheduledActionName – The name of the scheduled action.
ResourceId – The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
- get(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, ScheduledActionNames: list[str] | None = None, ResourceId: str | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) ScheduledAction | None[source]
Describes the Application Auto Scaling scheduled actions for the specified service namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
ScheduledActionNames – The names of the scheduled actions to describe.
ResourceId – The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- list(ServiceNamespace: Literal['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb', 'rds', 'sagemaker', 'custom-resource', 'comprehend', 'lambda', 'cassandra', 'kafka', 'elasticache', 'neptune', 'workspaces'], *, ScheduledActionNames: list[str] | None = None, ResourceId: str | None = None, ScalableDimension: Literal['ecs:service:DesiredCount', 'ec2:spot-fleet-request:TargetCapacity', 'elasticmapreduce:instancegroup:InstanceCount', 'appstream:fleet:DesiredCapacity', 'dynamodb:table:ReadCapacityUnits', 'dynamodb:table:WriteCapacityUnits', 'dynamodb:index:ReadCapacityUnits', 'dynamodb:index:WriteCapacityUnits', 'rds:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredInstanceCount', 'custom-resource:ResourceType:Property', 'comprehend:document-classifier-endpoint:DesiredInferenceUnits', 'comprehend:entity-recognizer-endpoint:DesiredInferenceUnits', 'lambda:function:ProvisionedConcurrency', 'cassandra:table:ReadCapacityUnits', 'cassandra:table:WriteCapacityUnits', 'kafka:broker-storage:VolumeSize', 'elasticache:cache-cluster:Nodes', 'elasticache:replication-group:NodeGroups', 'elasticache:replication-group:Replicas', 'neptune:cluster:ReadReplicaCount', 'sagemaker:variant:DesiredProvisionedConcurrency', 'sagemaker:inference-component:DesiredCopyCount', 'workspaces:workspacespool:DesiredUserSessions'] | None = None) PrimaryBoto3ModelQuerySet[source]
Describes the Application Auto Scaling scheduled actions for the specified service namespace.
- Parameters:
ServiceNamespace – The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use
custom-resourceinstead.- Keyword Arguments:
ScheduledActionNames – The names of the scheduled actions to describe.
ResourceId – The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.
ScalableDimension – The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
- update(model: ScheduledAction) None[source]
Creates or updates a scheduled action for an Application Auto Scaling scalable target.
- Parameters:
model – The
ScheduledActionto update.
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.application_autoscaling.Alarm[source]
Bases:
Boto3ModelRepresents a CloudWatch alarm associated with a scaling policy.
Show JSON schema
{ "title": "Alarm", "description": "Represents a CloudWatch alarm associated with a scaling policy.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AlarmName": { "title": "Alarmname", "type": "string" }, "AlarmARN": { "title": "Alarmarn", "type": "string" } }, "required": [ "AlarmName", "AlarmARN" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingCustomizedMetricSpecification[source]
Bases:
Boto3ModelRepresents a CloudWatch metric of your choosing for a target tracking scaling policy to use with Application Auto Scaling.
For information about the available metrics for a service, see Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
To create your customized metric specification:
Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see Publish custom metrics in the Amazon CloudWatch User Guide.
Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity increases, and increase when capacity decreases.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide.
Show JSON schema
{ "title": "ApplicationAutoscalingCustomizedMetricSpecification", "description": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy\nto use with Application Auto Scaling.\n\nFor information about the available metrics for a service, see `Amazon Web Services services that publish CloudWatch\nmetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html>`_ in the\n*Amazon CloudWatch User Guide*.\n\nTo create your customized metric specification:\n\n* Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you\n create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see `Publish\n custom metrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html>`_ in the *Amazon\n CloudWatch User Guide*.\n* Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in\n inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity\n increases, and increase when capacity decreases.\n\nFor more information about the CloudWatch terminology below, see `Amazon CloudWatch\nconcepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_ in the *Amazon\nCloudWatch User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/MetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "Statistic": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum", "SampleCount", "Sum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Statistic" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "Metrics": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDataQuery" }, "type": "array" }, { "type": "null" } ], "title": "Metrics" } }, "$defs": { "MetricDimension": { "description": "Describes the dimension names and values associated with a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "MetricDimension", "type": "object" }, "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDataQuery": { "description": "The metric data to return. Also defines whether this call is returning data for one\nmetric only, or whether it is performing a math expression on the values of returned\nmetric statistics to create a new time series. A time series is a series of data\npoints, each of which is associated with a timestamp.\n\nFor more information and examples, see\n`Create a target tracking scaling policy for Application Auto Scaling using metric math <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-\nmetric-math.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "Id": { "title": "Id", "type": "string" }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/TargetTrackingMetricStat" }, { "type": "null" } ], "default": null }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "TargetTrackingMetricDataQuery", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" }, "TargetTrackingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "TargetTrackingMetricStat", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Dimensions: builtins.list[MetricDimension] | None [Optional]
The dimensions of the metric.
- field MetricName: str | None = None
The name of the metric.
To get the exact metric name, namespace, and dimensions, inspect the Metric object that’s returned by a call to ListMetrics.
- field Metrics: builtins.list[TargetTrackingMetricDataQuery] | None [Optional]
The metrics to include in the target tracking scaling policy, as a metric data query.
This can include both raw metric and metric math expressions.
- field Statistic: Literal['Average', 'Minimum', 'Maximum', 'SampleCount', 'Sum'] | None = None
The statistic of the metric.
- field Unit: str | None = None
The unit of the metric.
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingPredefinedMetricSpecification[source]
Bases:
Boto3ModelRepresents a predefined metric for a target tracking scaling policy to use with Application Auto Scaling.
For more information, Predefined metrics for target tracking scaling policies in the Application Auto Scaling User Guide.
Show JSON schema
{ "title": "ApplicationAutoscalingPredefinedMetricSpecification", "description": "Represents a predefined metric for a target tracking scaling policy to use with\nApplication Auto Scaling.\n\nFor more information,\n`Predefined metrics for target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html#predefined-metrics>`_\nin the *Application Auto Scaling User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "enum": [ "DynamoDBReadCapacityUtilization", "DynamoDBWriteCapacityUtilization", "ALBRequestCountPerTarget", "RDSReaderAverageCPUUtilization", "RDSReaderAverageDatabaseConnections", "EC2SpotFleetRequestAverageCPUUtilization", "EC2SpotFleetRequestAverageNetworkIn", "EC2SpotFleetRequestAverageNetworkOut", "SageMakerVariantInvocationsPerInstance", "ECSServiceAverageCPUUtilization", "ECSServiceAverageMemoryUtilization", "AppStreamAverageCapacityUtilization", "ComprehendInferenceUtilization", "LambdaProvisionedConcurrencyUtilization", "CassandraReadCapacityUtilization", "CassandraWriteCapacityUtilization", "KafkaBrokerStorageUtilization", "ElastiCacheEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsagePercentage", "ElastiCachePrimaryEngineCPUUtilization", "ElastiCacheReplicaEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage", "NeptuneReaderAverageCPUUtilization", "SageMakerVariantProvisionedConcurrencyUtilization", "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage", "SageMakerInferenceComponentInvocationsPerCopy", "WorkSpacesAverageUserSessionsCapacityUtilization", "SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution", "SageMakerVariantConcurrentRequestsPerModelHighResolution" ], "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PredefinedMetricType: Literal['DynamoDBReadCapacityUtilization', 'DynamoDBWriteCapacityUtilization', 'ALBRequestCountPerTarget', 'RDSReaderAverageCPUUtilization', 'RDSReaderAverageDatabaseConnections', 'EC2SpotFleetRequestAverageCPUUtilization', 'EC2SpotFleetRequestAverageNetworkIn', 'EC2SpotFleetRequestAverageNetworkOut', 'SageMakerVariantInvocationsPerInstance', 'ECSServiceAverageCPUUtilization', 'ECSServiceAverageMemoryUtilization', 'AppStreamAverageCapacityUtilization', 'ComprehendInferenceUtilization', 'LambdaProvisionedConcurrencyUtilization', 'CassandraReadCapacityUtilization', 'CassandraWriteCapacityUtilization', 'KafkaBrokerStorageUtilization', 'ElastiCacheEngineCPUUtilization', 'ElastiCacheDatabaseMemoryUsagePercentage', 'ElastiCachePrimaryEngineCPUUtilization', 'ElastiCacheReplicaEngineCPUUtilization', 'ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage', 'NeptuneReaderAverageCPUUtilization', 'SageMakerVariantProvisionedConcurrencyUtilization', 'ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage', 'SageMakerInferenceComponentInvocationsPerCopy', 'WorkSpacesAverageUserSessionsCapacityUtilization', 'SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution', 'SageMakerVariantConcurrentRequestsPerModelHighResolution'] [Required]
The metric type.
The
ALBRequestCountPerTargetmetric type applies only to Spot Fleets and ECS services.
- field ResourceLabel: str | None = None
Identifies the resource associated with the metric type.
You can’t specify a resource label unless the metric type is
ALBRequestCountPerTargetand there is a target group attached to the Spot Fleet or ECS service.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingPredictiveScalingPolicyConfiguration[source]
Bases:
Boto3ModelRepresents a predictive scaling policy configuration.
Predictive scaling is supported on Amazon ECS services.
Show JSON schema
{ "title": "ApplicationAutoscalingPredictiveScalingPolicyConfiguration", "description": "Represents a predictive scaling policy configuration.\n\nPredictive scaling is supported on Amazon ECS services.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricSpecifications": { "items": { "$ref": "#/$defs/PredictiveScalingMetricSpecification" }, "title": "Metricspecifications", "type": "array" }, "Mode": { "anyOf": [ { "enum": [ "ForecastOnly", "ForecastAndScale" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Mode" }, "SchedulingBufferTime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Schedulingbuffertime" }, "MaxCapacityBreachBehavior": { "anyOf": [ { "enum": [ "HonorMaxCapacity", "IncreaseMaxCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybreachbehavior" }, "MaxCapacityBuffer": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybuffer" } }, "$defs": { "PredictiveScalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a predictive scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricDataQueries": { "items": { "$ref": "#/$defs/PredictiveScalingMetricDataQuery" }, "title": "Metricdataqueries", "type": "array" } }, "required": [ "MetricDataQueries" ], "title": "PredictiveScalingCustomizedMetricSpecification", "type": "object" }, "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDataQuery": { "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "PredictiveScalingMetricDataQuery", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricSpecification": { "description": "This structure specifies the metrics and target utilization settings for a\npredictive scaling policy.\n\nYou must specify either a metric pair, or a load metric and a scaling metric\nindividually. Specifying a metric pair instead of individual metrics provides a\nsimpler way to configure metrics for a scaling policy. You choose the metric pair,\nand the policy automatically knows the correct sum and average statistics to use for\nthe load metric and the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricPairSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedMetricPairSpecification" }, { "type": "null" } ], "default": null }, "PredefinedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedScalingMetricSpecification" }, { "type": "null" } ], "default": null }, "PredefinedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedLoadMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedCapacityMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null } }, "required": [ "TargetValue" ], "title": "PredictiveScalingMetricSpecification", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" }, "PredictiveScalingPredefinedLoadMetricSpecification": { "description": "Describes a load metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedLoadMetricSpecification", "type": "object" }, "PredictiveScalingPredefinedMetricPairSpecification": { "description": "Represents a metric pair for a predictive scaling policy.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedMetricPairSpecification", "type": "object" }, "PredictiveScalingPredefinedScalingMetricSpecification": { "description": "Describes a scaling metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedScalingMetricSpecification", "type": "object" } }, "required": [ "MetricSpecifications" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field MaxCapacityBreachBehavior: Literal['HonorMaxCapacity', 'IncreaseMaxCapacity'] | None = None
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity.
Defaults to
HonorMaxCapacityif not specified.
- field MaxCapacityBuffer: int | None = None
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity.
The value is specified as a percentage relative to the forecast capacity. For example, if the buffer is 10, this means a 10 percent buffer, such that if the forecast capacity is 50, and the maximum capacity is 40, then the effective maximum capacity is 55.
- field MetricSpecifications: builtins.list[PredictiveScalingMetricSpecification] [Required]
This structure includes the metrics and target utilization to use for predictive scaling.
- field Mode: Literal['ForecastOnly', 'ForecastAndScale'] | None = None
The predictive scaling mode.
Defaults to
ForecastOnlyif not specified.
- field SchedulingBufferTime: int | None = None
The amount of time, in seconds, that the start time can be advanced.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingScalableTargetAction[source]
Bases:
Boto3ModelRepresents the minimum and maximum capacity for a scheduled action.
Show JSON schema
{ "title": "ApplicationAutoscalingScalableTargetAction", "description": "Represents the minimum and maximum capacity for a scheduled action.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MinCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Mincapacity" }, "MaxCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacity" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingStepScalingPolicyConfiguration[source]
Bases:
Boto3ModelRepresents a step scaling policy configuration to use with Application Auto Scaling.
For more information, see Step scaling policies in the Application Auto Scaling User Guide.
Show JSON schema
{ "title": "ApplicationAutoscalingStepScalingPolicyConfiguration", "description": "Represents a step scaling policy configuration to use with Application Auto Scaling.\n\nFor more information, see\n`Step scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-\npolicies.html>`_ in the *Application Auto Scaling User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AdjustmentType": { "anyOf": [ { "enum": [ "ChangeInCapacity", "PercentChangeInCapacity", "ExactCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Adjustmenttype" }, "StepAdjustments": { "anyOf": [ { "items": { "$ref": "#/$defs/StepAdjustment" }, "type": "array" }, { "type": "null" } ], "title": "Stepadjustments" }, "MinAdjustmentMagnitude": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Minadjustmentmagnitude" }, "Cooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Cooldown" }, "MetricAggregationType": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricaggregationtype" } }, "$defs": { "StepAdjustment": { "description": "Represents a step adjustment for a `StepScalingPolicyConfiguration <https://docs.aws.amazon.com/autoscaling/application/\nAPIReference/API_StepScalingPolicyConfiguration.html>`_. Describes an adjustment based on the difference between the value\nof the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.\n\nFor the following examples, suppose that you have an alarm with a breach threshold of 50:\n\n* To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of\n ``0`` and an upper bound of ``10``.\n* To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of\n ``-10`` and an upper bound of ``0``.\n\nThere are a few rules for the step adjustments for your step policy:\n\n* The ranges of your step adjustments can't overlap or have a gap.\n* At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there\n must be a step adjustment with a null lower bound.\n* At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there\n must be a step adjustment with a null upper bound.\n* The upper and lower bound can't be null in the same step adjustment.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricIntervalLowerBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervallowerbound" }, "MetricIntervalUpperBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervalupperbound" }, "ScalingAdjustment": { "title": "Scalingadjustment", "type": "integer" } }, "required": [ "ScalingAdjustment" ], "title": "StepAdjustment", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AdjustmentType: Literal['ChangeInCapacity', 'PercentChangeInCapacity', 'ExactCapacity'] | None = None
Specifies how the
ScalingAdjustmentvalue in a StepAdjustment is interpreted (for example, an absolute number or a percentage). The valid values areChangeInCapacity,ExactCapacity, andPercentChangeInCapacity.
- field Cooldown: int | None = None
The amount of time, in seconds, to wait for a previous scaling activity to take effect.
If not specified, the default value is 300. For more information, see Cooldown period in the Application Auto Scaling User Guide.
- field MetricAggregationType: Literal['Average', 'Minimum', 'Maximum'] | None = None
The aggregation type for the CloudWatch metrics.
Valid values are
Minimum,Maximum, andAverage. If the aggregation type is null, the value is treated asAverage.
- field MinAdjustmentMagnitude: int | None = None
The minimum value to scale by when the adjustment type is
PercentChangeInCapacity.For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify a
MinAdjustmentMagnitudeof 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified aMinAdjustmentMagnitudeof 2, Application Auto Scaling scales out the service by 2 tasks.
- field StepAdjustments: builtins.list[StepAdjustment] | None [Optional]
A set of adjustments that enable you to scale based on the size of the alarm breach.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingSuspendedState[source]
Bases:
Boto3ModelSpecifies whether the scaling activities for a scalable target are in a suspended state.
Show JSON schema
{ "title": "ApplicationAutoscalingSuspendedState", "description": "Specifies whether the scaling activities for a scalable target are in a suspended\nstate.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "DynamicScalingInSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalinginsuspended" }, "DynamicScalingOutSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalingoutsuspended" }, "ScheduledScalingSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Scheduledscalingsuspended" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field DynamicScalingInSuspended: bool | None = None
Whether scale in by a target tracking scaling policy or a step scaling policy is suspended.
Set the value to
trueif you don’t want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default isfalse.
- field DynamicScalingOutSuspended: bool | None = None
Whether scale out by a target tracking scaling policy or a step scaling policy is suspended.
Set the value to
trueif you don’t want Application Auto Scaling to add capacity when a scaling policy is triggered. The default isfalse.
- field ScheduledScalingSuspended: bool | None = None
Whether scheduled scaling is suspended.
Set the value to
trueif you don’t want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default isfalse.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration[source]
Bases:
Boto3ModelRepresents a target tracking scaling policy configuration to use with Application Auto Scaling.
For more information, see Target tracking scaling policies in the Application Auto Scaling User Guide.
Show JSON schema
{ "title": "ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration", "description": "Represents a target tracking scaling policy configuration to use with Application\nAuto Scaling.\n\nFor more information, see\n`Target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html>`_\nin the *Application Auto Scaling User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingPredefinedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "ScaleOutCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleoutcooldown" }, "ScaleInCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleincooldown" }, "DisableScaleIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Disablescalein" } }, "$defs": { "ApplicationAutoscalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy\nto use with Application Auto Scaling.\n\nFor information about the available metrics for a service, see `Amazon Web Services services that publish CloudWatch\nmetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html>`_ in the\n*Amazon CloudWatch User Guide*.\n\nTo create your customized metric specification:\n\n* Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you\n create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see `Publish\n custom metrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html>`_ in the *Amazon\n CloudWatch User Guide*.\n* Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in\n inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity\n increases, and increase when capacity decreases.\n\nFor more information about the CloudWatch terminology below, see `Amazon CloudWatch\nconcepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_ in the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/MetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "Statistic": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum", "SampleCount", "Sum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Statistic" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "Metrics": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDataQuery" }, "type": "array" }, { "type": "null" } ], "title": "Metrics" } }, "title": "ApplicationAutoscalingCustomizedMetricSpecification", "type": "object" }, "ApplicationAutoscalingPredefinedMetricSpecification": { "description": "Represents a predefined metric for a target tracking scaling policy to use with\nApplication Auto Scaling.\n\nFor more information,\n`Predefined metrics for target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html#predefined-metrics>`_\nin the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "enum": [ "DynamoDBReadCapacityUtilization", "DynamoDBWriteCapacityUtilization", "ALBRequestCountPerTarget", "RDSReaderAverageCPUUtilization", "RDSReaderAverageDatabaseConnections", "EC2SpotFleetRequestAverageCPUUtilization", "EC2SpotFleetRequestAverageNetworkIn", "EC2SpotFleetRequestAverageNetworkOut", "SageMakerVariantInvocationsPerInstance", "ECSServiceAverageCPUUtilization", "ECSServiceAverageMemoryUtilization", "AppStreamAverageCapacityUtilization", "ComprehendInferenceUtilization", "LambdaProvisionedConcurrencyUtilization", "CassandraReadCapacityUtilization", "CassandraWriteCapacityUtilization", "KafkaBrokerStorageUtilization", "ElastiCacheEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsagePercentage", "ElastiCachePrimaryEngineCPUUtilization", "ElastiCacheReplicaEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage", "NeptuneReaderAverageCPUUtilization", "SageMakerVariantProvisionedConcurrencyUtilization", "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage", "SageMakerInferenceComponentInvocationsPerCopy", "WorkSpacesAverageUserSessionsCapacityUtilization", "SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution", "SageMakerVariantConcurrentRequestsPerModelHighResolution" ], "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "ApplicationAutoscalingPredefinedMetricSpecification", "type": "object" }, "MetricDimension": { "description": "Describes the dimension names and values associated with a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "MetricDimension", "type": "object" }, "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDataQuery": { "description": "The metric data to return. Also defines whether this call is returning data for one\nmetric only, or whether it is performing a math expression on the values of returned\nmetric statistics to create a new time series. A time series is a series of data\npoints, each of which is associated with a timestamp.\n\nFor more information and examples, see\n`Create a target tracking scaling policy for Application Auto Scaling using metric math <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-\nmetric-math.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "Id": { "title": "Id", "type": "string" }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/TargetTrackingMetricStat" }, { "type": "null" } ], "default": null }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "TargetTrackingMetricDataQuery", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" }, "TargetTrackingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "TargetTrackingMetricStat", "type": "object" } }, "required": [ "TargetValue" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field CustomizedMetricSpecification: ApplicationAutoscalingCustomizedMetricSpecification | None = None
A customized metric.
You can specify either a predefined metric or a customized metric.
- field DisableScaleIn: bool | None = None
Indicates whether scale in by the target tracking scaling policy is disabled.
If the value is
true, scale in is disabled and the target tracking scaling policy won’t remove capacity from the scalable target. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable target. The default value isfalse.
- field PredefinedMetricSpecification: ApplicationAutoscalingPredefinedMetricSpecification | None = None
A predefined metric.
You can specify either a predefined metric or a customized metric.
- field ScaleInCooldown: int | None = None
The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide.
- field ScaleOutCooldown: int | None = None
The amount of time, in seconds, to wait for a previous scale-out activity to take effect.
For more information and for default values, see Define cooldown periods in the Application Auto Scaling User Guide.
- field TargetValue: float [Required]
The target value for the metric.
Although this property accepts numbers of type Double, it won’t accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.MetricDimension[source]
Bases:
Boto3ModelDescribes the dimension names and values associated with a metric.
Show JSON schema
{ "title": "MetricDimension", "description": "Describes the dimension names and values associated with a metric.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingCustomizedMetricSpecification[source]
Bases:
Boto3ModelRepresents a CloudWatch metric of your choosing for a predictive scaling policy.
Show JSON schema
{ "title": "PredictiveScalingCustomizedMetricSpecification", "description": "Represents a CloudWatch metric of your choosing for a predictive scaling policy.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricDataQueries": { "items": { "$ref": "#/$defs/PredictiveScalingMetricDataQuery" }, "title": "Metricdataqueries", "type": "array" } }, "$defs": { "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDataQuery": { "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "PredictiveScalingMetricDataQuery", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" } }, "required": [ "MetricDataQueries" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field MetricDataQueries: builtins.list[PredictiveScalingMetricDataQuery] [Required]
One or more metric data queries to provide data points for a metric specification.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingMetric[source]
Bases:
Boto3ModelDescribes the scaling metric.
Show JSON schema
{ "title": "PredictiveScalingMetric", "description": "Describes the scaling metric.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "$defs": { "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Dimensions: builtins.list[PredictiveScalingMetricDimension] | None [Optional]
Describes the dimensions of the metric.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingMetricDataQuery[source]
Bases:
Boto3ModelThe metric data to return.
Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
Show JSON schema
{ "title": "PredictiveScalingMetricDataQuery", "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "$defs": { "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" } }, "required": [ "Id" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Expression: str | None = None
The math expression to perform on the returned data, if this object is performing a math expression.
This expression can use the
Idof the other metrics to refer to those metrics, and can also use theIdof other expressions to use the result of those expressions.
- field Id: str [Required]
A short name that identifies the object’s results in the response.
This name must be unique among all
MetricDataQueryobjects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
- field Label: str | None = None
A human-readable label for this metric or expression.
This is especially useful if this is a math expression, so that you know what the value represents.
- field MetricStat: PredictiveScalingMetricStat | None = None
Information about the metric data to return.
- field ReturnData: bool | None = None
Indicates whether to return the timestamps and raw data values of this metric.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingMetricDimension[source]
Bases:
Boto3ModelDescribes the dimension of a metric.
Show JSON schema
{ "title": "PredictiveScalingMetricDimension", "description": "Describes the dimension of a metric.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingMetricSpecification[source]
Bases:
Boto3ModelThis structure specifies the metrics and target utilization settings for a predictive scaling policy.
You must specify either a metric pair, or a load metric and a scaling metric individually. Specifying a metric pair instead of individual metrics provides a simpler way to configure metrics for a scaling policy. You choose the metric pair, and the policy automatically knows the correct sum and average statistics to use for the load metric and the scaling metric.
Show JSON schema
{ "title": "PredictiveScalingMetricSpecification", "description": "This structure specifies the metrics and target utilization settings for a\npredictive scaling policy.\n\nYou must specify either a metric pair, or a load metric and a scaling metric\nindividually. Specifying a metric pair instead of individual metrics provides a\nsimpler way to configure metrics for a scaling policy. You choose the metric pair,\nand the policy automatically knows the correct sum and average statistics to use for\nthe load metric and the scaling metric.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricPairSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedMetricPairSpecification" }, { "type": "null" } ], "default": null }, "PredefinedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedScalingMetricSpecification" }, { "type": "null" } ], "default": null }, "PredefinedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedLoadMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedCapacityMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null } }, "$defs": { "PredictiveScalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a predictive scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricDataQueries": { "items": { "$ref": "#/$defs/PredictiveScalingMetricDataQuery" }, "title": "Metricdataqueries", "type": "array" } }, "required": [ "MetricDataQueries" ], "title": "PredictiveScalingCustomizedMetricSpecification", "type": "object" }, "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDataQuery": { "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "PredictiveScalingMetricDataQuery", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" }, "PredictiveScalingPredefinedLoadMetricSpecification": { "description": "Describes a load metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedLoadMetricSpecification", "type": "object" }, "PredictiveScalingPredefinedMetricPairSpecification": { "description": "Represents a metric pair for a predictive scaling policy.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedMetricPairSpecification", "type": "object" }, "PredictiveScalingPredefinedScalingMetricSpecification": { "description": "Describes a scaling metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedScalingMetricSpecification", "type": "object" } }, "required": [ "TargetValue" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field CustomizedCapacityMetricSpecification: PredictiveScalingCustomizedMetricSpecification | None = None
The customized capacity metric specification.
- field CustomizedLoadMetricSpecification: PredictiveScalingCustomizedMetricSpecification | None = None
The customized load metric specification.
- field CustomizedScalingMetricSpecification: PredictiveScalingCustomizedMetricSpecification | None = None
The customized scaling metric specification.
- field PredefinedLoadMetricSpecification: PredictiveScalingPredefinedLoadMetricSpecification | None = None
The predefined load metric specification.
- field PredefinedMetricPairSpecification: PredictiveScalingPredefinedMetricPairSpecification | None = None
The predefined metric pair specification that determines the appropriate scaling metric and load metric to use.
- field PredefinedScalingMetricSpecification: PredictiveScalingPredefinedScalingMetricSpecification | None = None
The predefined scaling metric specification.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingMetricStat[source]
Bases:
Boto3ModelThis structure defines the CloudWatch metric to return, along with the statistic and unit.
Show JSON schema
{ "title": "PredictiveScalingMetricStat", "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "$defs": { "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" } }, "required": [ "Metric", "Stat" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Metric: PredictiveScalingMetric [Required]
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
- field Stat: str [Required]
The statistic to return.
It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
- field Unit: str | None = None
The unit to use for the returned data points.
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingPredefinedLoadMetricSpecification[source]
Bases:
Boto3ModelDescribes a load metric for a predictive scaling policy.
When returned in the output of
DescribePolicies, it indicates that a predictive scaling policy uses individually specified load and scaling metrics instead of a metric pair.The following predefined metrics are available for predictive scaling:
ECSServiceAverageCPUUtilizationECSServiceAverageMemoryUtilizationECSServiceCPUUtilizationECSServiceMemoryUtilizationECSServiceTotalCPUUtilizationECSServiceTotalMemoryUtilizationALBRequestCountALBRequestCountPerTargetTotalALBRequestCount
Show JSON schema
{ "title": "PredictiveScalingPredefinedLoadMetricSpecification", "description": "Describes a load metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingPredefinedMetricPairSpecification[source]
Bases:
Boto3ModelRepresents a metric pair for a predictive scaling policy.
The following predefined metrics are available for predictive scaling:
ECSServiceAverageCPUUtilizationECSServiceAverageMemoryUtilizationECSServiceCPUUtilizationECSServiceMemoryUtilizationECSServiceTotalCPUUtilizationECSServiceTotalMemoryUtilizationALBRequestCountALBRequestCountPerTargetTotalALBRequestCount
Show JSON schema
{ "title": "PredictiveScalingPredefinedMetricPairSpecification", "description": "Represents a metric pair for a predictive scaling policy.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PredefinedMetricType: str [Required]
Indicates which metrics to use.
There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.
- field ResourceLabel: str | None = None
A label that uniquely identifies a specific target group from which to determine the total and average request count.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PredictiveScalingPredefinedScalingMetricSpecification[source]
Bases:
Boto3ModelDescribes a scaling metric for a predictive scaling policy.
When returned in the output of
DescribePolicies, it indicates that a predictive scaling policy uses individually specified load and scaling metrics instead of a metric pair.The following predefined metrics are available for predictive scaling:
ECSServiceAverageCPUUtilizationECSServiceAverageMemoryUtilizationECSServiceCPUUtilizationECSServiceMemoryUtilizationECSServiceTotalCPUUtilizationECSServiceTotalMemoryUtilizationALBRequestCountALBRequestCountPerTargetTotalALBRequestCount
Show JSON schema
{ "title": "PredictiveScalingPredefinedScalingMetricSpecification", "description": "Describes a scaling metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field ResourceLabel: str | None = None
A label that uniquely identifies a specific target group from which to determine the average request count.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.StepAdjustment[source]
Bases:
Boto3ModelRepresents a step adjustment for a StepScalingPolicyConfiguration. Describes an adjustment based on the difference between the value of the aggregated CloudWatch metric and the breach threshold that you’ve defined for the alarm.
For the following examples, suppose that you have an alarm with a breach threshold of 50:
To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of
0and an upper bound of10.To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of
-10and an upper bound of0.
There are a few rules for the step adjustments for your step policy:
The ranges of your step adjustments can’t overlap or have a gap.
At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there must be a step adjustment with a null lower bound.
At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there must be a step adjustment with a null upper bound.
The upper and lower bound can’t be null in the same step adjustment.
Show JSON schema
{ "title": "StepAdjustment", "description": "Represents a step adjustment for a `StepScalingPolicyConfiguration <https://docs.aws.amazon.com/autoscaling/application/\nAPIReference/API_StepScalingPolicyConfiguration.html>`_. Describes an adjustment based on the difference between the value\nof the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.\n\nFor the following examples, suppose that you have an alarm with a breach threshold of 50:\n\n* To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of\n ``0`` and an upper bound of ``10``.\n* To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of\n ``-10`` and an upper bound of ``0``.\n\nThere are a few rules for the step adjustments for your step policy:\n\n* The ranges of your step adjustments can't overlap or have a gap.\n* At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there\n must be a step adjustment with a null lower bound.\n* At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there\n must be a step adjustment with a null upper bound.\n* The upper and lower bound can't be null in the same step adjustment.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricIntervalLowerBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervallowerbound" }, "MetricIntervalUpperBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervalupperbound" }, "ScalingAdjustment": { "title": "Scalingadjustment", "type": "integer" } }, "required": [ "ScalingAdjustment" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field MetricIntervalLowerBound: float | None = None
The lower bound for the difference between the alarm threshold and the CloudWatch metric.
If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it’s exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
- field MetricIntervalUpperBound: float | None = None
The upper bound for the difference between the alarm threshold and the CloudWatch metric.
If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it’s inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.
- field ScalingAdjustment: int [Required]
The amount by which to scale, based on the specified adjustment type.
A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.TargetTrackingMetric[source]
Bases:
Boto3ModelRepresents a specific metric.
Metric is a property of the TargetTrackingMetricStat object.
Show JSON schema
{ "title": "TargetTrackingMetric", "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "$defs": { "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Dimensions: builtins.list[TargetTrackingMetricDimension] | None [Optional]
The dimensions for the metric.
For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
- field Namespace: str | None = None
The namespace of the metric.
For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.TargetTrackingMetricDataQuery[source]
Bases:
Boto3ModelThe metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
For more information and examples, see Create a target tracking scaling policy for Application Auto Scaling using metric math in the Application Auto Scaling User Guide.
Show JSON schema
{ "title": "TargetTrackingMetricDataQuery", "description": "The metric data to return. Also defines whether this call is returning data for one\nmetric only, or whether it is performing a math expression on the values of returned\nmetric statistics to create a new time series. A time series is a series of data\npoints, each of which is associated with a timestamp.\n\nFor more information and examples, see\n`Create a target tracking scaling policy for Application Auto Scaling using metric math <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-\nmetric-math.html>`_ in the *Application Auto Scaling User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "Id": { "title": "Id", "type": "string" }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/TargetTrackingMetricStat" }, { "type": "null" } ], "default": null }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "$defs": { "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" }, "TargetTrackingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "TargetTrackingMetricStat", "type": "object" } }, "required": [ "Id" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Expression: str | None = None
The math expression to perform on the returned data, if this object is performing a math expression.
This expression can use the
Idof the other metrics to refer to those metrics, and can also use theIdof other expressions to use the result of those expressions.
- field Id: str [Required]
A short name that identifies the object’s results in the response.
This name must be unique among all
MetricDataQueryobjects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
- field Label: str | None = None
A human-readable label for this metric or expression.
This is especially useful if this is a math expression, so that you know what the value represents.
- field MetricStat: TargetTrackingMetricStat | None = None
Information about the metric data to return.
- field ReturnData: bool | None = None
Indicates whether to return the timestamps and raw data values of this metric.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.TargetTrackingMetricDimension[source]
Bases:
Boto3ModelDescribes the dimension of a metric.
Show JSON schema
{ "title": "TargetTrackingMetricDimension", "description": "Describes the dimension of a metric.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.TargetTrackingMetricStat[source]
Bases:
Boto3ModelThis structure defines the CloudWatch metric to return, along with the statistic and unit.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide.
Show JSON schema
{ "title": "TargetTrackingMetricStat", "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "$defs": { "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" } }, "required": [ "Metric", "Stat" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Metric: TargetTrackingMetric [Required]
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
- field Stat: str [Required]
The statistic to return.
It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
- field Unit: str | None = None
The unit to use for the returned data points.
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DeleteScalingPolicyResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DeleteScalingPolicyResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DeleteScheduledActionResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DeleteScheduledActionResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DeregisterScalableTargetResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DeregisterScalableTargetResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DescribeScalableTargetsResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DescribeScalableTargetsResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScalableTargets": { "anyOf": [ { "items": { "$ref": "#/$defs/ScalableTarget" }, "type": "array" }, { "type": "null" } ], "title": "Scalabletargets" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "ApplicationAutoscalingSuspendedState": { "description": "Specifies whether the scaling activities for a scalable target are in a suspended\nstate.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "DynamicScalingInSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalinginsuspended" }, "DynamicScalingOutSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Dynamicscalingoutsuspended" }, "ScheduledScalingSuspended": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Scheduledscalingsuspended" } }, "title": "ApplicationAutoscalingSuspendedState", "type": "object" }, "ScalableTarget": { "description": "Represents a scalable target.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "title": "Scalabledimension", "type": "string" }, "MinCapacity": { "title": "Mincapacity", "type": "integer" }, "MaxCapacity": { "title": "Maxcapacity", "type": "integer" }, "PredictedCapacity": { "default": null, "title": "Predictedcapacity", "type": "integer" }, "RoleARN": { "title": "Rolearn", "type": "string" }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" }, "SuspendedState": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingSuspendedState" }, { "type": "null" } ], "default": null }, "ScalableTargetARN": { "default": null, "title": "Scalabletargetarn", "type": "string" } }, "required": [ "ServiceNamespace", "ResourceId", "ScalableDimension", "MinCapacity", "MaxCapacity", "RoleARN", "CreationTime" ], "title": "ScalableTarget", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
The token required to get the next set of results.
This value is
nullif there are no more results to return.
- field ScalableTargets: builtins.list[ScalableTarget] | None [Optional]
The scalable targets that match the request parameters.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DescribeScalingPoliciesResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DescribeScalingPoliciesResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScalingPolicies": { "anyOf": [ { "items": { "$ref": "#/$defs/ScalingPolicy" }, "type": "array" }, { "type": "null" } ], "title": "Scalingpolicies" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "Alarm": { "description": "Represents a CloudWatch alarm associated with a scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AlarmName": { "title": "Alarmname", "type": "string" }, "AlarmARN": { "title": "Alarmarn", "type": "string" } }, "required": [ "AlarmName", "AlarmARN" ], "title": "Alarm", "type": "object" }, "ApplicationAutoscalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy\nto use with Application Auto Scaling.\n\nFor information about the available metrics for a service, see `Amazon Web Services services that publish CloudWatch\nmetrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html>`_ in the\n*Amazon CloudWatch User Guide*.\n\nTo create your customized metric specification:\n\n* Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you\n create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see `Publish\n custom metrics <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html>`_ in the *Amazon\n CloudWatch User Guide*.\n* Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in\n inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity\n increases, and increase when capacity decreases.\n\nFor more information about the CloudWatch terminology below, see `Amazon CloudWatch\nconcepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_ in the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/MetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "Statistic": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum", "SampleCount", "Sum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Statistic" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "Metrics": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDataQuery" }, "type": "array" }, { "type": "null" } ], "title": "Metrics" } }, "title": "ApplicationAutoscalingCustomizedMetricSpecification", "type": "object" }, "ApplicationAutoscalingPredefinedMetricSpecification": { "description": "Represents a predefined metric for a target tracking scaling policy to use with\nApplication Auto Scaling.\n\nFor more information,\n`Predefined metrics for target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html#predefined-metrics>`_\nin the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "enum": [ "DynamoDBReadCapacityUtilization", "DynamoDBWriteCapacityUtilization", "ALBRequestCountPerTarget", "RDSReaderAverageCPUUtilization", "RDSReaderAverageDatabaseConnections", "EC2SpotFleetRequestAverageCPUUtilization", "EC2SpotFleetRequestAverageNetworkIn", "EC2SpotFleetRequestAverageNetworkOut", "SageMakerVariantInvocationsPerInstance", "ECSServiceAverageCPUUtilization", "ECSServiceAverageMemoryUtilization", "AppStreamAverageCapacityUtilization", "ComprehendInferenceUtilization", "LambdaProvisionedConcurrencyUtilization", "CassandraReadCapacityUtilization", "CassandraWriteCapacityUtilization", "KafkaBrokerStorageUtilization", "ElastiCacheEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsagePercentage", "ElastiCachePrimaryEngineCPUUtilization", "ElastiCacheReplicaEngineCPUUtilization", "ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage", "NeptuneReaderAverageCPUUtilization", "SageMakerVariantProvisionedConcurrencyUtilization", "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage", "SageMakerInferenceComponentInvocationsPerCopy", "WorkSpacesAverageUserSessionsCapacityUtilization", "SageMakerInferenceComponentConcurrentRequestsPerCopyHighResolution", "SageMakerVariantConcurrentRequestsPerModelHighResolution" ], "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "ApplicationAutoscalingPredefinedMetricSpecification", "type": "object" }, "ApplicationAutoscalingPredictiveScalingPolicyConfiguration": { "description": "Represents a predictive scaling policy configuration.\n\nPredictive scaling is supported on Amazon ECS services.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricSpecifications": { "items": { "$ref": "#/$defs/PredictiveScalingMetricSpecification" }, "title": "Metricspecifications", "type": "array" }, "Mode": { "anyOf": [ { "enum": [ "ForecastOnly", "ForecastAndScale" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Mode" }, "SchedulingBufferTime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Schedulingbuffertime" }, "MaxCapacityBreachBehavior": { "anyOf": [ { "enum": [ "HonorMaxCapacity", "IncreaseMaxCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybreachbehavior" }, "MaxCapacityBuffer": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacitybuffer" } }, "required": [ "MetricSpecifications" ], "title": "ApplicationAutoscalingPredictiveScalingPolicyConfiguration", "type": "object" }, "ApplicationAutoscalingStepScalingPolicyConfiguration": { "description": "Represents a step scaling policy configuration to use with Application Auto Scaling.\n\nFor more information, see\n`Step scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-\npolicies.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AdjustmentType": { "anyOf": [ { "enum": [ "ChangeInCapacity", "PercentChangeInCapacity", "ExactCapacity" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Adjustmenttype" }, "StepAdjustments": { "anyOf": [ { "items": { "$ref": "#/$defs/StepAdjustment" }, "type": "array" }, { "type": "null" } ], "title": "Stepadjustments" }, "MinAdjustmentMagnitude": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Minadjustmentmagnitude" }, "Cooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Cooldown" }, "MetricAggregationType": { "anyOf": [ { "enum": [ "Average", "Minimum", "Maximum" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricaggregationtype" } }, "title": "ApplicationAutoscalingStepScalingPolicyConfiguration", "type": "object" }, "ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration": { "description": "Represents a target tracking scaling policy configuration to use with Application\nAuto Scaling.\n\nFor more information, see\n`Target tracking scaling policies <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html>`_\nin the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingPredefinedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "ScaleOutCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleoutcooldown" }, "ScaleInCooldown": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Scaleincooldown" }, "DisableScaleIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Disablescalein" } }, "required": [ "TargetValue" ], "title": "ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration", "type": "object" }, "MetricDimension": { "description": "Describes the dimension names and values associated with a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "MetricDimension", "type": "object" }, "PredictiveScalingCustomizedMetricSpecification": { "description": "Represents a CloudWatch metric of your choosing for a predictive scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricDataQueries": { "items": { "$ref": "#/$defs/PredictiveScalingMetricDataQuery" }, "title": "Metricdataqueries", "type": "array" } }, "required": [ "MetricDataQueries" ], "title": "PredictiveScalingCustomizedMetricSpecification", "type": "object" }, "PredictiveScalingMetric": { "description": "Describes the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/PredictiveScalingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "PredictiveScalingMetric", "type": "object" }, "PredictiveScalingMetricDataQuery": { "description": "The metric data to return.\n\nAlso defines whether this call is returning data for one metric only, or whether it\nis performing a math expression on the values of returned metric statistics to\ncreate a new time series. A time series is a series of data points, each of which is\nassociated with a timestamp.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingMetricStat" }, { "type": "null" } ], "default": null }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "PredictiveScalingMetricDataQuery", "type": "object" }, "PredictiveScalingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "PredictiveScalingMetricDimension", "type": "object" }, "PredictiveScalingMetricSpecification": { "description": "This structure specifies the metrics and target utilization settings for a\npredictive scaling policy.\n\nYou must specify either a metric pair, or a load metric and a scaling metric\nindividually. Specifying a metric pair instead of individual metrics provides a\nsimpler way to configure metrics for a scaling policy. You choose the metric pair,\nand the policy automatically knows the correct sum and average statistics to use for\nthe load metric and the scaling metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetValue": { "title": "Targetvalue", "type": "number" }, "PredefinedMetricPairSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedMetricPairSpecification" }, { "type": "null" } ], "default": null }, "PredefinedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedScalingMetricSpecification" }, { "type": "null" } ], "default": null }, "PredefinedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingPredefinedLoadMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedScalingMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedLoadMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null }, "CustomizedCapacityMetricSpecification": { "anyOf": [ { "$ref": "#/$defs/PredictiveScalingCustomizedMetricSpecification" }, { "type": "null" } ], "default": null } }, "required": [ "TargetValue" ], "title": "PredictiveScalingMetricSpecification", "type": "object" }, "PredictiveScalingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/PredictiveScalingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "PredictiveScalingMetricStat", "type": "object" }, "PredictiveScalingPredefinedLoadMetricSpecification": { "description": "Describes a load metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedLoadMetricSpecification", "type": "object" }, "PredictiveScalingPredefinedMetricPairSpecification": { "description": "Represents a metric pair for a predictive scaling policy.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedMetricPairSpecification", "type": "object" }, "PredictiveScalingPredefinedScalingMetricSpecification": { "description": "Describes a scaling metric for a predictive scaling policy.\n\nWhen returned in the output of ``DescribePolicies``, it indicates that a predictive scaling policy uses individually\nspecified load and scaling metrics instead of a metric pair.\n\nThe following predefined metrics are available for predictive scaling:\n\n* ``ECSServiceAverageCPUUtilization``\n* ``ECSServiceAverageMemoryUtilization``\n* ``ECSServiceCPUUtilization``\n* ``ECSServiceMemoryUtilization``\n* ``ECSServiceTotalCPUUtilization``\n* ``ECSServiceTotalMemoryUtilization``\n* ``ALBRequestCount``\n* ``ALBRequestCountPerTarget``\n* ``TotalALBRequestCount``", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PredefinedMetricType": { "title": "Predefinedmetrictype", "type": "string" }, "ResourceLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resourcelabel" } }, "required": [ "PredefinedMetricType" ], "title": "PredictiveScalingPredefinedScalingMetricSpecification", "type": "object" }, "ScalingPolicy": { "description": "Represents a scaling policy to use with Application Auto Scaling.\n\nFor more information about configuring scaling policies for a specific service, see\n`Amazon Web Services services that you can use with Application Auto Scaling <https://docs.aws.amazon.com/autoscaling/application/userguide/integrated-\nservices-list.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyARN": { "title": "Policyarn", "type": "string" }, "PolicyName": { "title": "Policyname", "type": "string" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "title": "Scalabledimension", "type": "string" }, "PolicyType": { "enum": [ "StepScaling", "TargetTrackingScaling", "PredictiveScaling" ], "title": "Policytype", "type": "string" }, "StepScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingStepScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "TargetTrackingScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingTargetTrackingScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "PredictiveScalingPolicyConfiguration": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingPredictiveScalingPolicyConfiguration" }, { "type": "null" } ], "default": null }, "Alarms": { "anyOf": [ { "items": { "$ref": "#/$defs/Alarm" }, "type": "array" }, { "type": "null" } ], "title": "Alarms" }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" } }, "required": [ "PolicyARN", "PolicyName", "ServiceNamespace", "ResourceId", "ScalableDimension", "PolicyType", "CreationTime" ], "title": "ScalingPolicy", "type": "object" }, "StepAdjustment": { "description": "Represents a step adjustment for a `StepScalingPolicyConfiguration <https://docs.aws.amazon.com/autoscaling/application/\nAPIReference/API_StepScalingPolicyConfiguration.html>`_. Describes an adjustment based on the difference between the value\nof the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.\n\nFor the following examples, suppose that you have an alarm with a breach threshold of 50:\n\n* To initiate the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of\n ``0`` and an upper bound of ``10``.\n* To initiate the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of\n ``-10`` and an upper bound of ``0``.\n\nThere are a few rules for the step adjustments for your step policy:\n\n* The ranges of your step adjustments can't overlap or have a gap.\n* At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there\n must be a step adjustment with a null lower bound.\n* At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there\n must be a step adjustment with a null upper bound.\n* The upper and lower bound can't be null in the same step adjustment.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MetricIntervalLowerBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervallowerbound" }, "MetricIntervalUpperBound": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Metricintervalupperbound" }, "ScalingAdjustment": { "title": "Scalingadjustment", "type": "integer" } }, "required": [ "ScalingAdjustment" ], "title": "StepAdjustment", "type": "object" }, "TargetTrackingMetric": { "description": "Represents a specific metric.\n\nMetric is a property of the TargetTrackingMetricStat object.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Dimensions": { "anyOf": [ { "items": { "$ref": "#/$defs/TargetTrackingMetricDimension" }, "type": "array" }, { "type": "null" } ], "title": "Dimensions" }, "MetricName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Metricname" }, "Namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Namespace" } }, "title": "TargetTrackingMetric", "type": "object" }, "TargetTrackingMetricDataQuery": { "description": "The metric data to return. Also defines whether this call is returning data for one\nmetric only, or whether it is performing a math expression on the values of returned\nmetric statistics to create a new time series. A time series is a series of data\npoints, each of which is associated with a timestamp.\n\nFor more information and examples, see\n`Create a target tracking scaling policy for Application Auto Scaling using metric math <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-\nmetric-math.html>`_ in the *Application Auto Scaling User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" }, "Id": { "title": "Id", "type": "string" }, "Label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "MetricStat": { "anyOf": [ { "$ref": "#/$defs/TargetTrackingMetricStat" }, { "type": "null" } ], "default": null }, "ReturnData": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Returndata" } }, "required": [ "Id" ], "title": "TargetTrackingMetricDataQuery", "type": "object" }, "TargetTrackingMetricDimension": { "description": "Describes the dimension of a metric.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "TargetTrackingMetricDimension", "type": "object" }, "TargetTrackingMetricStat": { "description": "This structure defines the CloudWatch metric to return, along with the statistic and\nunit.\n\nFor more information about the CloudWatch terminology below, see\n`Amazon CloudWatch concepts <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html>`_\nin the *Amazon\nCloudWatch User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Metric": { "$ref": "#/$defs/TargetTrackingMetric" }, "Stat": { "title": "Stat", "type": "string" }, "Unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" } }, "required": [ "Metric", "Stat" ], "title": "TargetTrackingMetricStat", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
The token required to get the next set of results.
This value is
nullif there are no more results to return.
- field ScalingPolicies: builtins.list[ScalingPolicy] | None [Optional]
Information about the scaling policies.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.DescribeScheduledActionsResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DescribeScheduledActionsResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScheduledActions": { "anyOf": [ { "items": { "$ref": "#/$defs/ScheduledAction" }, "type": "array" }, { "type": "null" } ], "title": "Scheduledactions" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "ApplicationAutoscalingScalableTargetAction": { "description": "Represents the minimum and maximum capacity for a scheduled action.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MinCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Mincapacity" }, "MaxCapacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxcapacity" } }, "title": "ApplicationAutoscalingScalableTargetAction", "type": "object" }, "ScheduledAction": { "description": "Represents a scheduled action.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScheduledActionName": { "title": "Scheduledactionname", "type": "string" }, "ScheduledActionARN": { "title": "Scheduledactionarn", "type": "string" }, "ServiceNamespace": { "enum": [ "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka", "elasticache", "neptune", "workspaces" ], "title": "Servicenamespace", "type": "string" }, "Schedule": { "title": "Schedule", "type": "string" }, "Timezone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Timezone" }, "ResourceId": { "title": "Resourceid", "type": "string" }, "ScalableDimension": { "anyOf": [ { "enum": [ "ecs:service:DesiredCount", "ec2:spot-fleet-request:TargetCapacity", "elasticmapreduce:instancegroup:InstanceCount", "appstream:fleet:DesiredCapacity", "dynamodb:table:ReadCapacityUnits", "dynamodb:table:WriteCapacityUnits", "dynamodb:index:ReadCapacityUnits", "dynamodb:index:WriteCapacityUnits", "rds:cluster:ReadReplicaCount", "sagemaker:variant:DesiredInstanceCount", "custom-resource:ResourceType:Property", "comprehend:document-classifier-endpoint:DesiredInferenceUnits", "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits", "lambda:function:ProvisionedConcurrency", "cassandra:table:ReadCapacityUnits", "cassandra:table:WriteCapacityUnits", "kafka:broker-storage:VolumeSize", "elasticache:cache-cluster:Nodes", "elasticache:replication-group:NodeGroups", "elasticache:replication-group:Replicas", "neptune:cluster:ReadReplicaCount", "sagemaker:variant:DesiredProvisionedConcurrency", "sagemaker:inference-component:DesiredCopyCount", "workspaces:workspacespool:DesiredUserSessions" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Scalabledimension" }, "StartTime": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Starttime" }, "EndTime": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Endtime" }, "ScalableTargetAction": { "anyOf": [ { "$ref": "#/$defs/ApplicationAutoscalingScalableTargetAction" }, { "type": "null" } ], "default": null }, "CreationTime": { "format": "date-time", "title": "Creationtime", "type": "string" } }, "required": [ "ScheduledActionName", "ScheduledActionARN", "ServiceNamespace", "Schedule", "ResourceId", "CreationTime" ], "title": "ScheduledAction", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
The token required to get the next set of results.
This value is
nullif there are no more results to return.
- field ScheduledActions: builtins.list[ScheduledAction] | None [Optional]
Information about the scheduled actions.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.PutScalingPolicyResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "PutScalingPolicyResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyARN": { "title": "Policyarn", "type": "string" }, "Alarms": { "anyOf": [ { "items": { "$ref": "#/$defs/Alarm" }, "type": "array" }, { "type": "null" } ], "title": "Alarms" } }, "$defs": { "Alarm": { "description": "Represents a CloudWatch alarm associated with a scaling policy.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AlarmName": { "title": "Alarmname", "type": "string" }, "AlarmARN": { "title": "Alarmarn", "type": "string" } }, "required": [ "AlarmName", "AlarmARN" ], "title": "Alarm", "type": "object" } }, "required": [ "PolicyARN" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Alarms: builtins.list[Alarm] | None [Optional]
The CloudWatch alarms created for the target tracking scaling policy.
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.application_autoscaling.RegisterScalableTargetResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "RegisterScalableTargetResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "ScalableTargetARN": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Scalabletargetarn" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- 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
Anyhere because we pydantic complains vociferously if we useboto3.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.
transformeris 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
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas 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.