EventBridge (events)
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.events.EventBus[source]
Bases:
PrimaryBoto3ModelAn event bus receives events from a source, uses rules to evaluate them, applies any configured input transformation, and routes them to the appropriate target(s).
Your account’s default event bus receives events from Amazon Web Services services. A custom event bus can receive events from your custom applications and services. A partner event bus receives events from an event source created by an SaaS partner. These events come from the partners services or applications.
Show JSON schema
{ "title": "EventBus", "description": "An event bus receives events from a source, uses rules to evaluate them, applies any\nconfigured input transformation, and routes them to the appropriate target(s).\n\nYour account's default event bus receives events from Amazon Web Services services.\nA custom event bus can receive events from your custom applications and services. A\npartner event bus receives events from an event source created by an SaaS partner.\nThese events come from the partners services or applications.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "Policy": { "default": null, "title": "Policy", "type": "string" }, "CreationTime": { "default": null, "format": "date-time", "title": "Creationtime", "type": "string" }, "LastModifiedTime": { "default": null, "format": "date-time", "title": "Lastmodifiedtime", "type": "string" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Policy: str = None
The permissions policy of the event bus, describing which other Amazon Web Services accounts can write events to this event bus.
- 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
EventBusManager
- 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.
- put_events(Entries: list[botocraft.services.events.PutEventsRequestEntry], EndpointId: str | None = None) PutEventsResponse[source]
Put events to this event bus.
- Parameters:
Entries – The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.
- Keyword Arguments:
EndpointId – The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is
abcde.veo.
- rules() list[botocraft.services.events.EventRule][source]
Return the rules that are associated with this event bus.
- 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
Arnattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
Nameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty]
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.events.EventRule[source]
Bases:
PrimaryBoto3ModelContains information about a rule in Amazon EventBridge.
Show JSON schema
{ "title": "EventRule", "description": "Contains information about a rule in Amazon EventBridge.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "EventPattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventpattern" }, "State": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED", "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "State" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "ScheduleExpression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Scheduleexpression" }, "RoleArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rolearn" }, "ManagedBy": { "default": null, "title": "Managedby", "type": "string" }, "EventBusName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventbusname" }, "CreatedBy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdby" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field EventBusName: str | None = None
The name or ARN of the event bus associated with the rule.
If you omit this, the default event bus is used.
- field EventPattern: str | None = None
The event pattern of the rule.
For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .
- field ManagedBy: str = None
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.
- field RoleArn: str | None = None
The Amazon Resource Name (ARN) of the role that is used for target invocation.
- field ScheduleExpression: str | None = None
The scheduling expression.
For example, “cron(0 20 * * ? *)”, “rate(5 minutes)”. For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
- field State: Literal['ENABLED', 'DISABLED', 'ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS'] | None = None
The state of the rule.
- 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
EventRuleManager
- 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
Arnattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
Nameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty]
Get the manager for this model, and set it as a class property
- property pk: str | None
Return the primary key of the model. This is the value of the
Nameattribute.- Returns:
The primary key of the model instance.
- property targets: list[botocraft.services.events.EventTarget] | None
Return the targets that are associated with this rule, if any.
Note
The output of this property is cached on the model instance, so calling this multiple times will not result in multiple calls to the AWS API. If you need a fresh copy of the data, you can re-get the model instance from the manager.
- pydantic model botocraft.services.events.EventTarget[source]
Bases:
PrimaryBoto3ModelTargets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see PutTargets.
If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a
RoleArnwith proper permissions in theTargetstructure. For more information, see Sending and Receiving Events Between Amazon Web Services Accounts in the Amazon EventBridge User Guide.Show JSON schema
{ "title": "EventTarget", "description": "Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can\nbe set as a target, see `PutTargets <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html>`_.\n\nIf you are setting the event bus of another account as the target, and that account granted permission to your account\nthrough an organization instead of directly by the account ID, then you must specify a ``RoleArn`` with proper\npermissions in the ``Target`` structure. For more information, see `Sending and Receiving Events Between Amazon Web\nServices Accounts <https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-\ndelivery.html>`_ in the *Amazon EventBridge User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "RoleArn": { "default": null, "title": "Rolearn", "type": "string" }, "Input": { "default": null, "title": "Input", "type": "string" }, "InputPath": { "default": null, "title": "Inputpath", "type": "string" }, "InputTransformer": { "$ref": "#/$defs/EventsInputTransformer", "default": null }, "KinesisParameters": { "$ref": "#/$defs/EventsKinesisParameters", "default": null }, "RunCommandParameters": { "$ref": "#/$defs/EventsRunCommandParameters", "default": null }, "EcsParameters": { "$ref": "#/$defs/EventsEcsParameters", "default": null }, "BatchParameters": { "$ref": "#/$defs/EventsBatchParameters", "default": null }, "SqsParameters": { "$ref": "#/$defs/EventsSqsParameters", "default": null }, "HttpParameters": { "$ref": "#/$defs/EventsHttpParameters", "default": null }, "RedshiftDataParameters": { "$ref": "#/$defs/EventsRedshiftDataParameters", "default": null }, "SageMakerPipelineParameters": { "$ref": "#/$defs/EventsSageMakerPipelineParameters", "default": null }, "DeadLetterConfig": { "$ref": "#/$defs/EventsDeadLetterConfig", "default": null }, "RetryPolicy": { "$ref": "#/$defs/EventsRetryPolicy", "default": null }, "AppSyncParameters": { "$ref": "#/$defs/EventsAppSyncParameters", "default": null } }, "$defs": { "BatchArrayProperties": { "description": "The array properties for the submitted job, such as the size of the array.\n\nThe array size can be between 2 and 10,000. If you specify array properties for a\njob, it becomes an array job. This parameter is used only if the target is an Batch\njob.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" } }, "title": "BatchArrayProperties", "type": "object" }, "BatchRetryStrategy": { "description": "The retry strategy to use for failed jobs, if the target is an Batch job.\n\nIf you specify a retry strategy here, it overrides the retry strategy defined in the\njob definition.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Attempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Attempts" } }, "title": "BatchRetryStrategy", "type": "object" }, "EventsAppSyncParameters": { "description": "Contains the GraphQL operation to be parsed and executed, if the event target is an\nAppSync API.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GraphQLOperation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Graphqloperation" } }, "title": "EventsAppSyncParameters", "type": "object" }, "EventsAwsVpcConfiguration": { "description": "This structure specifies the VPC subnets and security groups for the task, and\nwhether a public IP address is to be used.\n\nThis structure is relevant only for ECS tasks that use the ``awsvpc`` network mode.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Subnets": { "items": { "type": "string" }, "title": "Subnets", "type": "array" }, "SecurityGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Securitygroups" }, "AssignPublicIp": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Assignpublicip" } }, "required": [ "Subnets" ], "title": "EventsAwsVpcConfiguration", "type": "object" }, "EventsBatchParameters": { "description": "The custom parameters to be used when the target is an Batch job.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "JobDefinition": { "title": "Jobdefinition", "type": "string" }, "JobName": { "title": "Jobname", "type": "string" }, "ArrayProperties": { "anyOf": [ { "$ref": "#/$defs/BatchArrayProperties" }, { "type": "null" } ], "default": null }, "RetryStrategy": { "anyOf": [ { "$ref": "#/$defs/BatchRetryStrategy" }, { "type": "null" } ], "default": null } }, "required": [ "JobDefinition", "JobName" ], "title": "EventsBatchParameters", "type": "object" }, "EventsCapacityProviderStrategyItem": { "description": "The details of a capacity provider strategy.\n\nTo learn more, see `CapacityProviderStrategyItem <https://docs.aws.amazon.c\nom/AmazonECS/latest/APIReference/API_CapacityProviderStrategyItem.html>`_ in the Amazon ECS API Reference.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "capacityProvider": { "title": "Capacityprovider", "type": "string" }, "weight": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Weight" }, "base": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Base" } }, "required": [ "capacityProvider" ], "title": "EventsCapacityProviderStrategyItem", "type": "object" }, "EventsDeadLetterConfig": { "description": "Configuration details of the Amazon SQS queue for EventBridge to use as a dead-\nletter queue (DLQ).\n\nFor more information, see `Using dead-letter queues to process undelivered\nevents <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq>`_ in the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" } }, "title": "EventsDeadLetterConfig", "type": "object" }, "EventsEcsParameters": { "description": "The custom parameters to be used when the target is an Amazon ECS task.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TaskDefinitionArn": { "title": "Taskdefinitionarn", "type": "string" }, "TaskCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Taskcount" }, "LaunchType": { "anyOf": [ { "enum": [ "EC2", "FARGATE", "EXTERNAL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Launchtype" }, "NetworkConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsNetworkConfiguration" }, { "type": "null" } ], "default": null }, "PlatformVersion": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Platformversion" }, "Group": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Group" }, "CapacityProviderStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsCapacityProviderStrategyItem" }, "type": "array" }, { "type": "null" } ], "title": "Capacityproviderstrategy" }, "EnableECSManagedTags": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableecsmanagedtags" }, "EnableExecuteCommand": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableexecutecommand" }, "PlacementConstraints": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementConstraint" }, "type": "array" }, { "type": "null" } ], "title": "Placementconstraints" }, "PlacementStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementStrategy" }, "type": "array" }, { "type": "null" } ], "title": "Placementstrategy" }, "PropagateTags": { "anyOf": [ { "const": "TASK_DEFINITION", "type": "string" }, { "type": "null" } ], "default": null, "title": "Propagatetags" }, "ReferenceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Referenceid" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "TaskDefinitionArn" ], "title": "EventsEcsParameters", "type": "object" }, "EventsHttpParameters": { "description": "These are custom parameter to be used when the target is an API Gateway APIs or\nEventBridge ApiDestinations.\n\nIn the latter case, these are merged with any InvocationParameters specified on the\nConnection, with any values from the Connection taking precedence.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PathParameterValues": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pathparametervalues" }, "HeaderParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headerparameters" }, "QueryStringParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Querystringparameters" } }, "title": "EventsHttpParameters", "type": "object" }, "EventsInputTransformer": { "description": "Contains the parameters needed for you to provide custom input to a target based on\none or more pieces of data extracted from the event.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InputPathsMap": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Inputpathsmap" }, "InputTemplate": { "title": "Inputtemplate", "type": "string" } }, "required": [ "InputTemplate" ], "title": "EventsInputTransformer", "type": "object" }, "EventsKinesisParameters": { "description": "This object enables you to specify a JSON path to extract from the event and use as\nthe partition key for the Amazon Kinesis data stream, so that you can control the\nshard to which the event goes.\n\nIf you do not include this parameter,\nthe default is to use the ``eventId`` as the partition key.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PartitionKeyPath": { "title": "Partitionkeypath", "type": "string" } }, "required": [ "PartitionKeyPath" ], "title": "EventsKinesisParameters", "type": "object" }, "EventsNetworkConfiguration": { "description": "This structure specifies the network configuration for an ECS task.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "awsvpcConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsAwsVpcConfiguration" }, { "type": "null" } ], "default": null } }, "title": "EventsNetworkConfiguration", "type": "object" }, "EventsPlacementConstraint": { "description": "An object representing a constraint on task placement.\n\nTo learn more, see\n`Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_\nin the Amazon\nElastic Container Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "distinctInstance", "memberOf" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" } }, "title": "EventsPlacementConstraint", "type": "object" }, "EventsPlacementStrategy": { "description": "The task placement strategy for a task or service.\n\nTo learn more, see\n`Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_\nin the Amazon\nElastic Container Service Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "random", "spread", "binpack" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Field" } }, "title": "EventsPlacementStrategy", "type": "object" }, "EventsRedshiftDataParameters": { "description": "These are custom parameters to be used when the target is a Amazon Redshift cluster\nto invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SecretManagerArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Secretmanagerarn" }, "Database": { "title": "Database", "type": "string" }, "DbUser": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dbuser" }, "Sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Sql" }, "StatementName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Statementname" }, "WithEvent": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Withevent" }, "Sqls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sqls" } }, "required": [ "Database" ], "title": "EventsRedshiftDataParameters", "type": "object" }, "EventsRetryPolicy": { "description": "A ``RetryPolicy`` object that includes information about the retry policy settings.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MaximumRetryAttempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumretryattempts" }, "MaximumEventAgeInSeconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumeventageinseconds" } }, "title": "EventsRetryPolicy", "type": "object" }, "EventsRunCommandParameters": { "description": "This parameter contains the criteria (either InstanceIds or a tag) used to specify\nwhich EC2 instances are to be sent the command.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RunCommandTargets": { "items": { "$ref": "#/$defs/RunCommandTarget" }, "title": "Runcommandtargets", "type": "array" } }, "required": [ "RunCommandTargets" ], "title": "EventsRunCommandParameters", "type": "object" }, "EventsSageMakerPipelineParameters": { "description": "These are custom parameters to use when the target is a SageMaker AI Model Building\nPipeline that starts based on EventBridge events.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PipelineParameterList": { "anyOf": [ { "items": { "$ref": "#/$defs/SageMakerPipelineParameter" }, "type": "array" }, { "type": "null" } ], "title": "Pipelineparameterlist" } }, "title": "EventsSageMakerPipelineParameters", "type": "object" }, "EventsSqsParameters": { "description": "This structure includes the custom parameter to be used when the target is an SQS\nFIFO queue.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MessageGroupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Messagegroupid" } }, "title": "EventsSqsParameters", "type": "object" }, "RunCommandTarget": { "description": "Information about the EC2 instances that are to be sent the command, specified as\nkey-value pairs.\n\nEach\n``RunCommandTarget`` block can include only one key, but this key may specify multiple values.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Values": { "items": { "type": "string" }, "title": "Values", "type": "array" } }, "required": [ "Key", "Values" ], "title": "RunCommandTarget", "type": "object" }, "SageMakerPipelineParameter": { "description": "Name/Value pair of a parameter to start execution of a SageMaker AI Model Building\nPipeline.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "SageMakerPipelineParameter", "type": "object" }, "Tag": { "description": "The metadata that you apply to a resource to help you categorize and\norganize them. Each tag consists of a key and an optional value. You define\nthem.\n\nThe following basic restrictions apply to tags:\n\n* Maximum number of tags per resource - 50\n* For each resource, each tag key must be unique, and each tag key can have\n only one value.\n* Maximum key length - 128 Unicode characters in UTF-8\n* Maximum value length - 256 Unicode characters in UTF-8\n* If your tagging schema is used across multiple services and resources,\n remember that other services may have restrictions on allowed characters.\n Generally allowed characters are: letters, numbers, and spaces representable in\n UTF-8, and the following characters: + - = . _ : / @.\n* Tag keys and values are case-sensitive.\n* Do not use ``aws:``, ``AWS:``, or any upper or lowercase combination of such\n as a prefix for either keys or values as it is reserved for Amazon Web Services\n use. You cannot edit or delete tag keys or values with this prefix. Tags with\n this prefix do not count against your tags per resource limit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Key" }, "Value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "title": "Tag", "type": "object" } }, "required": [ "Id", "Arn" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
AppSyncParameters (botocraft.services.events.EventsAppSyncParameters)BatchParameters (botocraft.services.events.EventsBatchParameters)DeadLetterConfig (botocraft.services.events.EventsDeadLetterConfig)EcsParameters (botocraft.services.events.EventsEcsParameters)HttpParameters (botocraft.services.events.EventsHttpParameters)InputTransformer (botocraft.services.events.EventsInputTransformer)KinesisParameters (botocraft.services.events.EventsKinesisParameters)RedshiftDataParameters (botocraft.services.events.EventsRedshiftDataParameters)RunCommandParameters (botocraft.services.events.EventsRunCommandParameters)SageMakerPipelineParameters (botocraft.services.events.EventsSageMakerPipelineParameters)SqsParameters (botocraft.services.events.EventsSqsParameters)
- field AppSyncParameters: EventsAppSyncParameters = None
Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
- field BatchParameters: EventsBatchParameters = None
If the event target is an Batch job, this contains the job definition, job name, and other parameters.
For more information, see Jobs in the Batch User Guide.
- field DeadLetterConfig: EventsDeadLetterConfig = None
The
DeadLetterConfigthat defines the target queue to send dead-letter queue events to.
- field EcsParameters: EventsEcsParameters = None
Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task.
For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.
- field HttpParameters: EventsHttpParameters = None
Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.
- field Id: str [Required]
The ID of the target within the specified rule.
Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string.
- field Input: str = None
Valid JSON text passed to the target.
In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.
- field InputPath: str = None
The value of the JSONPath that is used for extracting part of the matched event when passing it to the target.
You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.
- field InputTransformer: EventsInputTransformer = None
Settings to enable you to provide custom input to a target based on certain event data.
You can extract one or more key- value pairs from the event and then use that data to send customized input to the target.
- field KinesisParameters: EventsKinesisParameters = None
The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream.
If you do not include this parameter, the default is to use the
eventIdas the partition key.
- field RedshiftDataParameters: EventsRedshiftDataParameters = None
Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.
- field RetryPolicy: EventsRetryPolicy = None
The retry policy configuration to use for the dead-letter queue.
- field RoleArn: str = None
The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered.
If one rule triggers multiple targets, you can use a different IAM role for each target.
- field RunCommandParameters: EventsRunCommandParameters = None
Parameters used when you are using the rule to invoke Amazon EC2 Run Command.
- field SageMakerPipelineParameters: EventsSageMakerPipelineParameters = None
Contains the SageMaker AI Model Building Pipeline parameters to start execution of a SageMaker AI Model Building Pipeline.
- field SqsParameters: EventsSqsParameters = None
Contains the message group ID to use when the target is a FIFO queue.
- 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
EventTargetManager
- 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
Arnattribute.- Returns:
The ARN of the model instance.
- property name: str | None
Return the name of the model. This is the value of the
Idattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty]
Get the manager for this model, and set it as a class property
- property pk: str | None
Return the primary key of the model. This is the value of the
Idattribute.- Returns:
The primary key of the model instance.
- property rules: EventRule | None
Return the
Ruleobject that this target belongs 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.events.EventBusManager[source]
Bases:
Boto3ModelManager- create(model: EventBus, EventSourceName: str | None = None, KmsKeyIdentifier: str | None = None, DeadLetterConfig: EventsDeadLetterConfig | None = None, LogConfig: EventsLogConfig | None = None, Tags: list[botocraft.services.common.Tag] | None = None) CreateEventBusResponse[source]
Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.
- Parameters:
model – The
EventBusto create.- Keyword Arguments:
EventSourceName – If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
KmsKeyIdentifier – The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
DeadLetterConfig – Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
LogConfig – The logging configuration settings for the event bus.
Tags – Tags to associate with the event bus.
- delete(Name: str) None[source]
Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can’t delete your account’s default event bus.
- Parameters:
Name – The name of the event bus to delete.
- get(*, Name: str | None = None) EventBus | None[source]
Displays details about an event bus in your account. This can include the external Amazon Web Services accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time.
- Keyword Arguments:
Name – The name or ARN of the event bus to show details for. If you omit this, the default event bus is displayed.
- list(*, NamePrefix: str | None = None, NextToken: str | None = None, Limit: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.
- Keyword Arguments:
NamePrefix – Specifying this limits the results to only those event buses with names that start with the specified prefix.
NextToken – The token returned by a previous call, which you can use to retrieve the next set of results.
Limit – Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
- list_rules(*, NamePrefix: str | None = None, EventBusName: str | None = None, Limit: int | None = None) list[botocraft.services.events.EventRule][source]
Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to the rule names.
- Keyword Arguments:
NamePrefix – The prefix matching the rule name.
EventBusName – The name or ARN of the event bus to list the rules for. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- put_events(Entries: list[botocraft.services.events.PutEventsRequestEntry], *, EndpointId: str | None = None) PutEventsResponse[source]
Sends custom events to Amazon EventBridge so that they can be matched to rules.
- Parameters:
Entries – The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.
- Keyword Arguments:
EndpointId – The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is
abcde.veo.
- update(model: EventBus, KmsKeyIdentifier: str | None = None, DeadLetterConfig: EventsDeadLetterConfig | None = None, LogConfig: EventsLogConfig | None = None) UpdateEventBusResponse[source]
Updates the specified event bus.
- Parameters:
model – The
EventBusto update.- Keyword Arguments:
KmsKeyIdentifier – The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
DeadLetterConfig – Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
LogConfig – The logging configuration settings for the event bus.
- class botocraft.services.events.EventRuleManager[source]
Bases:
Boto3ModelManager- create(model: EventRule, Tags: list[botocraft.services.common.Tag] | None = None) str[source]
Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using DisableRule.
- Parameters:
model – The
Ruleto create.- Keyword Arguments:
Tags – The list of key-value pairs to associate with the rule.
- delete(Name: str, *, EventBusName: str | None = None, Force: bool = True) None[source]
Deletes the specified rule.
- Parameters:
Name – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
Force – If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify
ForceasTrueto delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by usingDescribeRuleorListRulesand checking theManagedByfield of the response.
- disable(Name: str, *, EventBusName: str | None = None) None[source]
Disables the specified rule. A disabled rule won’t match any events, and won’t self-trigger if it has a schedule expression.
- Parameters:
Name – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
- enable(Name: str, *, EventBusName: str | None = None) None[source]
Enables the specified rule. If the rule does not exist, the operation fails.
- Parameters:
Name – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
- get(Name: str, *, EventBusName: str | None = None) DescribeRuleResponse | None[source]
Describes the specified rule.
- Parameters:
Name – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
- list(*, NamePrefix: str | None = None, EventBusName: str | None = None, Limit: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to the rule names.
- Keyword Arguments:
NamePrefix – The prefix matching the rule name.
EventBusName – The name or ARN of the event bus to list the rules for. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- list_by_target(TargetArn: str, *, EventBusName: str | None = None, Limit: int | None = None) list[str][source]
Lists the rules for the specified target. You can see which of the rules in Amazon EventBridge can invoke a specific target in your account.
- Parameters:
TargetArn – The Amazon Resource Name (ARN) of the target resource.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus to list rules for. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- list_targets(Rule: str, *, EventBusName: str | None = None, Limit: int | None = None) list[botocraft.services.events.EventTarget][source]
Lists the targets assigned to the specified rule.
- Parameters:
Rule – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- update(model: EventRule, Tags: list[botocraft.services.common.Tag] | None = None) str[source]
Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using DisableRule.
- Parameters:
model – The
Ruleto update.- Keyword Arguments:
Tags – The list of key-value pairs to associate with the rule.
- class botocraft.services.events.EventTargetManager[source]
Bases:
Boto3ModelManager- create(model: EventTarget, EventBusName: str | None = None) PutTargetsResponse[source]
Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
- Parameters:
model – The
Targetto create.- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
- delete(Rule: str, Ids: list[str], *, EventBusName: str | None = None, Force: bool | None = None) EventTarget[source]
Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.
- Parameters:
Rule – The name of the rule.
Ids – The IDs of the targets to remove from the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
Force – If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify
ForceasTrueto remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by usingDescribeRuleorListRulesand checking theManagedByfield of the response.
- list(Rule: str, *, EventBusName: str | None = None, Limit: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists the targets assigned to the specified rule.
- Parameters:
Rule – The name of the rule.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- list_rules(TargetArn: str, *, EventBusName: str | None = None, Limit: int | None = None) list[str][source]
Lists the rules for the specified target. You can see which of the rules in Amazon EventBridge can invoke a specific target in your account.
- Parameters:
TargetArn – The Amazon Resource Name (ARN) of the target resource.
- Keyword Arguments:
EventBusName – The name or ARN of the event bus to list rules for. If you omit this, the default event bus is used.
Limit – The maximum number of results to return.
- update(model: EventTarget, EventBusName: str | None = None) PutTargetsResponse[source]
Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
- Parameters:
model – The
Targetto update.- Keyword Arguments:
EventBusName – The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
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.events.BatchArrayProperties[source]
Bases:
Boto3ModelThe array properties for the submitted job, such as the size of the array.
The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.
Show JSON schema
{ "title": "BatchArrayProperties", "description": "The array properties for the submitted job, such as the size of the array.\n\nThe array size can be between 2 and 10,000. If you specify array properties for a\njob, it becomes an array job. This parameter is used only if the target is an Batch\njob.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Size: int | None = None
The size of the array, if this is an array batch job.
Valid values are integers between 2 and 10,000.
- 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.events.BatchRetryStrategy[source]
Bases:
Boto3ModelThe retry strategy to use for failed jobs, if the target is an Batch job.
If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.
Show JSON schema
{ "title": "BatchRetryStrategy", "description": "The retry strategy to use for failed jobs, if the target is an Batch job.\n\nIf you specify a retry strategy here, it overrides the retry strategy defined in the\njob definition.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Attempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Attempts" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Attempts: int | None = None
The number of times to attempt to retry, if the job fails.
Valid values are 1-10.
- 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.events.EventsAppSyncParameters[source]
Bases:
Boto3ModelContains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.
Show JSON schema
{ "title": "EventsAppSyncParameters", "description": "Contains the GraphQL operation to be parsed and executed, if the event target is an\nAppSync API.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GraphQLOperation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Graphqloperation" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field GraphQLOperation: str | None = None
The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL 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.events.EventsAwsVpcConfiguration[source]
Bases:
Boto3ModelThis structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used.
This structure is relevant only for ECS tasks that use the
awsvpcnetwork mode.Show JSON schema
{ "title": "EventsAwsVpcConfiguration", "description": "This structure specifies the VPC subnets and security groups for the task, and\nwhether a public IP address is to be used.\n\nThis structure is relevant only for ECS tasks that use the ``awsvpc`` network mode.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Subnets": { "items": { "type": "string" }, "title": "Subnets", "type": "array" }, "SecurityGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Securitygroups" }, "AssignPublicIp": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Assignpublicip" } }, "required": [ "Subnets" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AssignPublicIp: Literal['ENABLED', 'DISABLED'] | None = None
Specifies whether the task’s elastic network interface receives a public IP address.
You can specify
ENABLEDonly whenLaunchTypeinEcsParametersis set toFARGATE.
- field SecurityGroups: builtins.list[str] | None [Optional]
Specifies the security groups associated with the task.
These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
- field Subnets: builtins.list[str] [Required]
Specifies the subnets associated with the task.
These subnets must all be in the same VPC. You can specify as many as 16 subnets.
- 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.events.EventsBatchParameters[source]
Bases:
Boto3ModelThe custom parameters to be used when the target is an Batch job.
Show JSON schema
{ "title": "EventsBatchParameters", "description": "The custom parameters to be used when the target is an Batch job.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "JobDefinition": { "title": "Jobdefinition", "type": "string" }, "JobName": { "title": "Jobname", "type": "string" }, "ArrayProperties": { "anyOf": [ { "$ref": "#/$defs/BatchArrayProperties" }, { "type": "null" } ], "default": null }, "RetryStrategy": { "anyOf": [ { "$ref": "#/$defs/BatchRetryStrategy" }, { "type": "null" } ], "default": null } }, "$defs": { "BatchArrayProperties": { "description": "The array properties for the submitted job, such as the size of the array.\n\nThe array size can be between 2 and 10,000. If you specify array properties for a\njob, it becomes an array job. This parameter is used only if the target is an Batch\njob.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" } }, "title": "BatchArrayProperties", "type": "object" }, "BatchRetryStrategy": { "description": "The retry strategy to use for failed jobs, if the target is an Batch job.\n\nIf you specify a retry strategy here, it overrides the retry strategy defined in the\njob definition.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Attempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Attempts" } }, "title": "BatchRetryStrategy", "type": "object" } }, "required": [ "JobDefinition", "JobName" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field ArrayProperties: BatchArrayProperties | None = None
The array properties for the submitted job, such as the size of the array.
The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.
- field JobDefinition: str [Required]
The ARN or name of the job definition to use if the event target is an Batch job.
This job definition must already exist.
- field JobName: str [Required]
The name to use for this execution of the job, if the target is an Batch job.
- field RetryStrategy: BatchRetryStrategy | None = None
The retry strategy to use for failed jobs, if the target is an Batch job.
The retry strategy is the number of times to retry the failed job execution. Valid values are 1-10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.
- 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.events.EventsCapacityProviderStrategyItem[source]
Bases:
Boto3ModelThe details of a capacity provider strategy.
To learn more, see CapacityProviderStrategyItem in the Amazon ECS API Reference.
Show JSON schema
{ "title": "EventsCapacityProviderStrategyItem", "description": "The details of a capacity provider strategy.\n\nTo learn more, see `CapacityProviderStrategyItem <https://docs.aws.amazon.c\nom/AmazonECS/latest/APIReference/API_CapacityProviderStrategyItem.html>`_ in the Amazon ECS API Reference.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "capacityProvider": { "title": "Capacityprovider", "type": "string" }, "weight": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Weight" }, "base": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Base" } }, "required": [ "capacityProvider" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field base: int | None = None
The base value designates how many tasks, at a minimum, to run on the specified capacity provider.
Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.
- 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.
- field weight: int | None = None
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
The weight value is taken into consideration after the base value, if defined, is satisfied.
- 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.events.EventsDeadLetterConfig[source]
Bases:
Boto3ModelConfiguration details of the Amazon SQS queue for EventBridge to use as a dead- letter queue (DLQ).
For more information, see Using dead-letter queues to process undelivered events in the EventBridge User Guide.
Show JSON schema
{ "title": "EventsDeadLetterConfig", "description": "Configuration details of the Amazon SQS queue for EventBridge to use as a dead-\nletter queue (DLQ).\n\nFor more information, see `Using dead-letter queues to process undelivered\nevents <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq>`_ in the\n*EventBridge User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str | None = None
The ARN of the SQS queue specified as the target for the dead-letter queue.
- 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.events.EventsEcsParameters[source]
Bases:
TagsDictMixin,Boto3ModelThe custom parameters to be used when the target is an Amazon ECS task.
Show JSON schema
{ "title": "EventsEcsParameters", "description": "The custom parameters to be used when the target is an Amazon ECS task.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TaskDefinitionArn": { "title": "Taskdefinitionarn", "type": "string" }, "TaskCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Taskcount" }, "LaunchType": { "anyOf": [ { "enum": [ "EC2", "FARGATE", "EXTERNAL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Launchtype" }, "NetworkConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsNetworkConfiguration" }, { "type": "null" } ], "default": null }, "PlatformVersion": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Platformversion" }, "Group": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Group" }, "CapacityProviderStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsCapacityProviderStrategyItem" }, "type": "array" }, { "type": "null" } ], "title": "Capacityproviderstrategy" }, "EnableECSManagedTags": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableecsmanagedtags" }, "EnableExecuteCommand": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableexecutecommand" }, "PlacementConstraints": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementConstraint" }, "type": "array" }, { "type": "null" } ], "title": "Placementconstraints" }, "PlacementStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementStrategy" }, "type": "array" }, { "type": "null" } ], "title": "Placementstrategy" }, "PropagateTags": { "anyOf": [ { "const": "TASK_DEFINITION", "type": "string" }, { "type": "null" } ], "default": null, "title": "Propagatetags" }, "ReferenceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Referenceid" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "$defs": { "EventsAwsVpcConfiguration": { "description": "This structure specifies the VPC subnets and security groups for the task, and\nwhether a public IP address is to be used.\n\nThis structure is relevant only for ECS tasks that use the ``awsvpc`` network mode.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Subnets": { "items": { "type": "string" }, "title": "Subnets", "type": "array" }, "SecurityGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Securitygroups" }, "AssignPublicIp": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Assignpublicip" } }, "required": [ "Subnets" ], "title": "EventsAwsVpcConfiguration", "type": "object" }, "EventsCapacityProviderStrategyItem": { "description": "The details of a capacity provider strategy.\n\nTo learn more, see `CapacityProviderStrategyItem <https://docs.aws.amazon.c\nom/AmazonECS/latest/APIReference/API_CapacityProviderStrategyItem.html>`_ in the Amazon ECS API Reference.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "capacityProvider": { "title": "Capacityprovider", "type": "string" }, "weight": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Weight" }, "base": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Base" } }, "required": [ "capacityProvider" ], "title": "EventsCapacityProviderStrategyItem", "type": "object" }, "EventsNetworkConfiguration": { "description": "This structure specifies the network configuration for an ECS task.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "awsvpcConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsAwsVpcConfiguration" }, { "type": "null" } ], "default": null } }, "title": "EventsNetworkConfiguration", "type": "object" }, "EventsPlacementConstraint": { "description": "An object representing a constraint on task placement.\n\nTo learn more, see\n`Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_\nin the Amazon\nElastic Container Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "distinctInstance", "memberOf" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" } }, "title": "EventsPlacementConstraint", "type": "object" }, "EventsPlacementStrategy": { "description": "The task placement strategy for a task or service.\n\nTo learn more, see\n`Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_\nin the Amazon\nElastic Container Service Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "random", "spread", "binpack" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Field" } }, "title": "EventsPlacementStrategy", "type": "object" }, "Tag": { "description": "The metadata that you apply to a resource to help you categorize and\norganize them. Each tag consists of a key and an optional value. You define\nthem.\n\nThe following basic restrictions apply to tags:\n\n* Maximum number of tags per resource - 50\n* For each resource, each tag key must be unique, and each tag key can have\n only one value.\n* Maximum key length - 128 Unicode characters in UTF-8\n* Maximum value length - 256 Unicode characters in UTF-8\n* If your tagging schema is used across multiple services and resources,\n remember that other services may have restrictions on allowed characters.\n Generally allowed characters are: letters, numbers, and spaces representable in\n UTF-8, and the following characters: + - = . _ : / @.\n* Tag keys and values are case-sensitive.\n* Do not use ``aws:``, ``AWS:``, or any upper or lowercase combination of such\n as a prefix for either keys or values as it is reserved for Amazon Web Services\n use. You cannot edit or delete tag keys or values with this prefix. Tags with\n this prefix do not count against your tags per resource limit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Key" }, "Value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "title": "Tag", "type": "object" } }, "required": [ "TaskDefinitionArn" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
CapacityProviderStrategy (list[botocraft.services.events.EventsCapacityProviderStrategyItem] | None)NetworkConfiguration (botocraft.services.events.EventsNetworkConfiguration | None)PlacementConstraints (list[botocraft.services.events.EventsPlacementConstraint] | None)PlacementStrategy (list[botocraft.services.events.EventsPlacementStrategy] | None)
- field CapacityProviderStrategy: builtins.list[EventsCapacityProviderStrategyItem] | None [Optional]
The capacity provider strategy to use for the task.
- field EnableECSManagedTags: bool | None = None
Specifies whether to enable Amazon ECS managed tags for the task.
For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
- field EnableExecuteCommand: bool | None = None
Whether or not to enable the execute command functionality for the containers in this task.
If true, this enables execute command functionality on all containers in the task.
- field Group: str | None = None
Specifies an ECS task group for the task.
The maximum length is 255 characters.
- field LaunchType: Literal['EC2', 'FARGATE', 'EXTERNAL'] | None = None
Specifies the launch type on which your task is running.
The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The
FARGATEvalue is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.
- field NetworkConfiguration: EventsNetworkConfiguration | None = None
Use this structure if the Amazon ECS task uses the
awsvpcnetwork mode.This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if
LaunchTypeisFARGATEbecause theawsvpcmode is required for Fargate tasks.
- field PlacementConstraints: builtins.list[EventsPlacementConstraint] | None [Optional]
An array of placement constraint objects to use for the task.
You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
- field PlacementStrategy: builtins.list[EventsPlacementStrategy] | None [Optional]
The placement strategy objects to use for the task.
You can specify a maximum of five strategy rules per task.
- field PlatformVersion: str | None = None
Specifies the platform version for the task.
Specify only the numeric portion of the platform version, such as
1.1.0.
- field PropagateTags: Literal['TASK_DEFINITION'] | None = None
Specifies whether to propagate the tags from the task definition to the task.
If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
- field Tags: builtins.list[Tag] | None [Optional]
The metadata that you apply to the task to help you categorize and organize them.
Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
- field TaskCount: int | None = None
The number of tasks to create based on
TaskDefinition.The default is 1.
- field TaskDefinitionArn: str [Required]
The ARN of the task definition to use if the event target is an Amazon ECS task.
- 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.
- tag_class
alias of
Tag
- 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.events.EventsHttpParameters[source]
Bases:
Boto3ModelThese are custom parameter to be used when the target is an API Gateway APIs or EventBridge ApiDestinations.
In the latter case, these are merged with any InvocationParameters specified on the Connection, with any values from the Connection taking precedence.
Show JSON schema
{ "title": "EventsHttpParameters", "description": "These are custom parameter to be used when the target is an API Gateway APIs or\nEventBridge ApiDestinations.\n\nIn the latter case, these are merged with any InvocationParameters specified on the\nConnection, with any values from the Connection taking precedence.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PathParameterValues": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pathparametervalues" }, "HeaderParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headerparameters" }, "QueryStringParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Querystringparameters" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field HeaderParameters: dict[str, str] | None [Optional]
The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.
- field PathParameterValues: builtins.list[str] | None [Optional]
The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path wildcards (“*”).
- field QueryStringParameters: dict[str, str] | None [Optional]
The query string keys/values that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.
- 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.events.EventsInputTransformer[source]
Bases:
Boto3ModelContains the parameters needed for you to provide custom input to a target based on one or more pieces of data extracted from the event.
Show JSON schema
{ "title": "EventsInputTransformer", "description": "Contains the parameters needed for you to provide custom input to a target based on\none or more pieces of data extracted from the event.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InputPathsMap": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Inputpathsmap" }, "InputTemplate": { "title": "Inputtemplate", "type": "string" } }, "required": [ "InputTemplate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field InputPathsMap: dict[str, str] | None [Optional]
Map of JSON paths to be extracted from the event.
You can then insert these in the template in
InputTemplateto produce the output you want to be sent to the target.
- field InputTemplate: str [Required]
Input template where you specify placeholders that will be filled with the values of the keys from
InputPathsMapto customize the data sent to the target.Enclose each
InputPathsMapsvalue in brackets: <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.events.EventsKinesisParameters[source]
Bases:
Boto3ModelThis object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream, so that you can control the shard to which the event goes.
If you do not include this parameter, the default is to use the
eventIdas the partition key.Show JSON schema
{ "title": "EventsKinesisParameters", "description": "This object enables you to specify a JSON path to extract from the event and use as\nthe partition key for the Amazon Kinesis data stream, so that you can control the\nshard to which the event goes.\n\nIf you do not include this parameter,\nthe default is to use the ``eventId`` as the partition key.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PartitionKeyPath": { "title": "Partitionkeypath", "type": "string" } }, "required": [ "PartitionKeyPath" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PartitionKeyPath: str [Required]
The JSON path to be extracted from the event and used as the partition key.
For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer 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.events.EventsNetworkConfiguration[source]
Bases:
Boto3ModelThis structure specifies the network configuration for an ECS task.
Show JSON schema
{ "title": "EventsNetworkConfiguration", "description": "This structure specifies the network configuration for an ECS task.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "awsvpcConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsAwsVpcConfiguration" }, { "type": "null" } ], "default": null } }, "$defs": { "EventsAwsVpcConfiguration": { "description": "This structure specifies the VPC subnets and security groups for the task, and\nwhether a public IP address is to be used.\n\nThis structure is relevant only for ECS tasks that use the ``awsvpc`` network mode.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Subnets": { "items": { "type": "string" }, "title": "Subnets", "type": "array" }, "SecurityGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Securitygroups" }, "AssignPublicIp": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Assignpublicip" } }, "required": [ "Subnets" ], "title": "EventsAwsVpcConfiguration", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field awsvpcConfiguration: EventsAwsVpcConfiguration | None = None
Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used.
This structure is relevant only for ECS tasks that use the
awsvpcnetwork mode.
- 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.events.EventsPlacementConstraint[source]
Bases:
Boto3ModelAn object representing a constraint on task placement.
To learn more, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.
Show JSON schema
{ "title": "EventsPlacementConstraint", "description": "An object representing a constraint on task placement.\n\nTo learn more, see\n`Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_\nin the Amazon\nElastic Container Service Developer Guide.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "distinctInstance", "memberOf" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field expression: str | None = None
A cluster query language expression to apply to the constraint.
You cannot specify an expression if the constraint type is
distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer 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.
- field type: Literal['distinctInstance', 'memberOf'] | None = None
The type of constraint.
Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.
- 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.events.EventsPlacementStrategy[source]
Bases:
Boto3ModelThe task placement strategy for a task or service.
To learn more, see Task Placement Strategies in the Amazon Elastic Container Service Service Developer Guide.
Show JSON schema
{ "title": "EventsPlacementStrategy", "description": "The task placement strategy for a task or service.\n\nTo learn more, see\n`Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_\nin the Amazon\nElastic Container Service Service Developer Guide.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "random", "spread", "binpack" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Field" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field field: str | None = None
The field to apply the placement strategy against.
For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used.
- 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.
- field type: Literal['random', 'spread', 'binpack'] | None = None
The type of placement strategy.
The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).
- 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.events.EventsRedshiftDataParameters[source]
Bases:
Boto3ModelThese are custom parameters to be used when the target is a Amazon Redshift cluster to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.
Show JSON schema
{ "title": "EventsRedshiftDataParameters", "description": "These are custom parameters to be used when the target is a Amazon Redshift cluster\nto invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SecretManagerArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Secretmanagerarn" }, "Database": { "title": "Database", "type": "string" }, "DbUser": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dbuser" }, "Sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Sql" }, "StatementName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Statementname" }, "WithEvent": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Withevent" }, "Sqls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sqls" } }, "required": [ "Database" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Database: str [Required]
The name of the database.
Required when authenticating using temporary credentials.
- field DbUser: str | None = None
The database user name.
Required when authenticating using temporary credentials.
- field SecretManagerArn: str | None = None
The name or ARN of the secret that enables access to the database.
Required when authenticating using Amazon Web Services Secrets Manager.
- field Sqls: builtins.list[str] | None [Optional]
One or more SQL statements to run.
The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don’t start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.
- field StatementName: str | None = None
The name of the SQL statement.
You can name the SQL statement when you create it to identify the query.
- field WithEvent: bool | None = None
Indicates whether to send an event back to EventBridge after the SQL statement runs.
- 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.events.EventsRetryPolicy[source]
Bases:
Boto3ModelA
RetryPolicyobject that includes information about the retry policy settings.Show JSON schema
{ "title": "EventsRetryPolicy", "description": "A ``RetryPolicy`` object that includes information about the retry policy settings.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MaximumRetryAttempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumretryattempts" }, "MaximumEventAgeInSeconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumeventageinseconds" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field MaximumEventAgeInSeconds: int | None = None
The maximum amount of time, in seconds, to continue to make retry attempts.
- field MaximumRetryAttempts: int | None = None
The maximum number of retry attempts to make before the request fails.
Retry attempts continue until either the maximum number of attempts is made or until the duration of the
MaximumEventAgeInSecondsis met.
- 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.events.EventsRunCommandParameters[source]
Bases:
Boto3ModelThis parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.
Show JSON schema
{ "title": "EventsRunCommandParameters", "description": "This parameter contains the criteria (either InstanceIds or a tag) used to specify\nwhich EC2 instances are to be sent the command.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RunCommandTargets": { "items": { "$ref": "#/$defs/RunCommandTarget" }, "title": "Runcommandtargets", "type": "array" } }, "$defs": { "RunCommandTarget": { "description": "Information about the EC2 instances that are to be sent the command, specified as\nkey-value pairs.\n\nEach\n``RunCommandTarget`` block can include only one key, but this key may specify multiple values.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Values": { "items": { "type": "string" }, "title": "Values", "type": "array" } }, "required": [ "Key", "Values" ], "title": "RunCommandTarget", "type": "object" } }, "required": [ "RunCommandTargets" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field RunCommandTargets: builtins.list[RunCommandTarget] [Required]
Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
- 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.events.EventsSageMakerPipelineParameters[source]
Bases:
Boto3ModelThese are custom parameters to use when the target is a SageMaker AI Model Building Pipeline that starts based on EventBridge events.
Show JSON schema
{ "title": "EventsSageMakerPipelineParameters", "description": "These are custom parameters to use when the target is a SageMaker AI Model Building\nPipeline that starts based on EventBridge events.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PipelineParameterList": { "anyOf": [ { "items": { "$ref": "#/$defs/SageMakerPipelineParameter" }, "type": "array" }, { "type": "null" } ], "title": "Pipelineparameterlist" } }, "$defs": { "SageMakerPipelineParameter": { "description": "Name/Value pair of a parameter to start execution of a SageMaker AI Model Building\nPipeline.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "SageMakerPipelineParameter", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PipelineParameterList: builtins.list[SageMakerPipelineParameter] | None [Optional]
List of Parameter names and values for SageMaker AI Model Building Pipeline execution.
- 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.events.EventsSqsParameters[source]
Bases:
Boto3ModelThis structure includes the custom parameter to be used when the target is an SQS FIFO queue.
Show JSON schema
{ "title": "EventsSqsParameters", "description": "This structure includes the custom parameter to be used when the target is an SQS\nFIFO queue.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MessageGroupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Messagegroupid" } } }
- 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.events.PutEventsRequestEntry[source]
Bases:
Boto3ModelRepresents an event to be submitted.
Show JSON schema
{ "title": "PutEventsRequestEntry", "description": "Represents an event to be submitted.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Time" }, "Source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source" }, "Resources": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Resources" }, "DetailType": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Detailtype" }, "Detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Detail" }, "EventBusName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventbusname" }, "TraceHeader": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Traceheader" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Detail: str | None = None
A valid JSON object.
There is no other schema imposed. The JSON object may contain fields and nested sub- objects.
- field DetailType: str | None = None
Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.
- field EventBusName: str | None = None
The name or ARN of the event bus to receive the event.
Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.
- field Resources: builtins.list[str] | None [Optional]
Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns.
Any number, including zero, may be present.
- field Time: datetime | None = None
The time stamp of the event, per RFC3339. If no time stamp is provided, the time stamp of the PutEvents call is used.
- field TraceHeader: str | None = None
An X-Ray trace header, which is an http header (X-Amzn-Trace-Id) that contains the trace-id associated with the event.
- 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.events.RunCommandTarget[source]
Bases:
Boto3ModelInformation about the EC2 instances that are to be sent the command, specified as key-value pairs.
Each
RunCommandTargetblock can include only one key, but this key may specify multiple values.Show JSON schema
{ "title": "RunCommandTarget", "description": "Information about the EC2 instances that are to be sent the command, specified as\nkey-value pairs.\n\nEach\n``RunCommandTarget`` block can include only one key, but this key may specify multiple values.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Values": { "items": { "type": "string" }, "title": "Values", "type": "array" } }, "required": [ "Key", "Values" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Values: builtins.list[str] [Required]
If
Keyistag:tag-key,Valuesis a list of tag values.If
KeyisInstanceIds,Valuesis a list of Amazon EC2 instance IDs.
- 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.events.SageMakerPipelineParameter[source]
Bases:
Boto3ModelName/Value pair of a parameter to start execution of a SageMaker AI Model Building Pipeline.
Show JSON schema
{ "title": "SageMakerPipelineParameter", "description": "Name/Value pair of a parameter to start execution of a SageMaker AI Model Building\nPipeline.", "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 Name: str [Required]
Name of parameter to start execution of a SageMaker AI Model Building Pipeline.
- field Value: str [Required]
Value of parameter to start execution of a SageMaker AI Model Building Pipeline.
- 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.events.CreateEventBusResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "CreateEventBusResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "EventBusArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventbusarn" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "KmsKeyIdentifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Kmskeyidentifier" }, "DeadLetterConfig": { "anyOf": [ { "$ref": "#/$defs/EventsDeadLetterConfig" }, { "type": "null" } ], "default": null }, "LogConfig": { "anyOf": [ { "$ref": "#/$defs/EventsLogConfig" }, { "type": "null" } ], "default": null } }, "$defs": { "EventsDeadLetterConfig": { "description": "Configuration details of the Amazon SQS queue for EventBridge to use as a dead-\nletter queue (DLQ).\n\nFor more information, see `Using dead-letter queues to process undelivered\nevents <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq>`_ in the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" } }, "title": "EventsDeadLetterConfig", "type": "object" }, "EventsLogConfig": { "description": "The logging configuration settings for the event bus.\n\nFor more information, see\n`Configuring logs for event buses <https://docs.aws.amazon.com/eb-event-bus-logs.html>`_\nin the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "IncludeDetail": { "anyOf": [ { "enum": [ "NONE", "FULL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Includedetail" }, "Level": { "anyOf": [ { "enum": [ "OFF", "ERROR", "INFO", "TRACE" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Level" } }, "title": "EventsLogConfig", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field DeadLetterConfig: EventsDeadLetterConfig | None = None
Configuration details of the Amazon SQS queue for EventBridge to use as a dead- letter queue (DLQ).
- field KmsKeyIdentifier: str | None = None
The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
- field LogConfig: EventsLogConfig | None = None
The logging configuration settings for the event bus.
- 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.events.DescribeRuleResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DescribeRuleResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" }, "EventPattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventpattern" }, "ScheduleExpression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Scheduleexpression" }, "State": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED", "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "State" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "RoleArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rolearn" }, "ManagedBy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Managedby" }, "EventBusName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventbusname" }, "CreatedBy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdby" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field CreatedBy: str | None = None
The account ID of the user that created the rule.
If you use
PutRuleto put a rule on an event bus in another account, the other account is the owner of the rule, and the rule ARN includes the account ID for that account. However, the value forCreatedByis the account ID as the account that created the rule in the other account.
- field EventPattern: str | None = None
The event pattern.
For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .
- field ManagedBy: str | None = None
If this is a managed rule, created by an Amazon Web Services service on your behalf, this field displays the principal name of the Amazon Web Services service that created the rule.
- field RoleArn: str | None = None
The Amazon Resource Name (ARN) of the IAM role associated with the rule.
- field ScheduleExpression: str | None = None
The scheduling expression.
For example, “cron(0 20 * * ? *)”, “rate(5 minutes)”.
- field State: Literal['ENABLED', 'DISABLED', 'ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS'] | None = None
Specifies whether the rule is enabled or disabled.
- 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.events.EventsLogConfig[source]
Bases:
Boto3ModelThe logging configuration settings for the event bus.
For more information, see Configuring logs for event buses in the EventBridge User Guide.
Show JSON schema
{ "title": "EventsLogConfig", "description": "The logging configuration settings for the event bus.\n\nFor more information, see\n`Configuring logs for event buses <https://docs.aws.amazon.com/eb-event-bus-logs.html>`_\nin the\n*EventBridge User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "IncludeDetail": { "anyOf": [ { "enum": [ "NONE", "FULL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Includedetail" }, "Level": { "anyOf": [ { "enum": [ "OFF", "ERROR", "INFO", "TRACE" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Level" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IncludeDetail: Literal['NONE', 'FULL'] | None = None
Whether EventBridge include detailed event information in the records it generates.
Detailed data can be useful for troubleshooting and debugging. This information includes details of the event itself, as well as target details.
- field Level: Literal['OFF', 'ERROR', 'INFO', 'TRACE'] | None = None
The level of logging detail to include.
This applies to all log destinations for the event bus.
- 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.events.ListEventBusesResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "ListEventBusesResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "EventBuses": { "anyOf": [ { "items": { "$ref": "#/$defs/EventBus" }, "type": "array" }, { "type": "null" } ], "title": "Eventbuses" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "EventBus": { "description": "An event bus receives events from a source, uses rules to evaluate them, applies any\nconfigured input transformation, and routes them to the appropriate target(s).\n\nYour account's default event bus receives events from Amazon Web Services services.\nA custom event bus can receive events from your custom applications and services. A\npartner event bus receives events from an event source created by an SaaS partner.\nThese events come from the partners services or applications.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "Policy": { "default": null, "title": "Policy", "type": "string" }, "CreationTime": { "default": null, "format": "date-time", "title": "Creationtime", "type": "string" }, "LastModifiedTime": { "default": null, "format": "date-time", "title": "Lastmodifiedtime", "type": "string" } }, "title": "EventBus", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
A token indicating there are more results available.
If there are no more results, no token is included in the response.
- 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.events.ListRuleNamesByTargetResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "ListRuleNamesByTargetResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RuleNames": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Rulenames" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
A token indicating there are more results available.
If there are no more results, no token is included in the response.
- field RuleNames: builtins.list[str] | None [Optional]
The names of the rules that can invoke the given target.
- 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.events.ListRulesResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "ListRulesResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Rules": { "anyOf": [ { "items": { "$ref": "#/$defs/EventRule" }, "type": "array" }, { "type": "null" } ], "title": "Rules" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "EventRule": { "description": "Contains information about a rule in Amazon EventBridge.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "EventPattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventpattern" }, "State": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED", "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "State" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "ScheduleExpression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Scheduleexpression" }, "RoleArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rolearn" }, "ManagedBy": { "default": null, "title": "Managedby", "type": "string" }, "EventBusName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventbusname" }, "CreatedBy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdby" } }, "title": "EventRule", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
A token indicating there are more results available.
If there are no more results, no token is included in the response.
- field Rules: builtins.list[EventRule] | None [Optional]
The rules that match the specified criteria.
- 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.events.ListTargetsByRuleResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "ListTargetsByRuleResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Targets": { "anyOf": [ { "items": { "$ref": "#/$defs/EventTarget" }, "type": "array" }, { "type": "null" } ], "title": "Targets" }, "NextToken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Nexttoken" } }, "$defs": { "BatchArrayProperties": { "description": "The array properties for the submitted job, such as the size of the array.\n\nThe array size can be between 2 and 10,000. If you specify array properties for a\njob, it becomes an array job. This parameter is used only if the target is an Batch\njob.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" } }, "title": "BatchArrayProperties", "type": "object" }, "BatchRetryStrategy": { "description": "The retry strategy to use for failed jobs, if the target is an Batch job.\n\nIf you specify a retry strategy here, it overrides the retry strategy defined in the\njob definition.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Attempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Attempts" } }, "title": "BatchRetryStrategy", "type": "object" }, "EventTarget": { "description": "Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can\nbe set as a target, see `PutTargets <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html>`_.\n\nIf you are setting the event bus of another account as the target, and that account granted permission to your account\nthrough an organization instead of directly by the account ID, then you must specify a ``RoleArn`` with proper\npermissions in the ``Target`` structure. For more information, see `Sending and Receiving Events Between Amazon Web\nServices Accounts <https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-\ndelivery.html>`_ in the *Amazon EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Id": { "title": "Id", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "RoleArn": { "default": null, "title": "Rolearn", "type": "string" }, "Input": { "default": null, "title": "Input", "type": "string" }, "InputPath": { "default": null, "title": "Inputpath", "type": "string" }, "InputTransformer": { "$ref": "#/$defs/EventsInputTransformer", "default": null }, "KinesisParameters": { "$ref": "#/$defs/EventsKinesisParameters", "default": null }, "RunCommandParameters": { "$ref": "#/$defs/EventsRunCommandParameters", "default": null }, "EcsParameters": { "$ref": "#/$defs/EventsEcsParameters", "default": null }, "BatchParameters": { "$ref": "#/$defs/EventsBatchParameters", "default": null }, "SqsParameters": { "$ref": "#/$defs/EventsSqsParameters", "default": null }, "HttpParameters": { "$ref": "#/$defs/EventsHttpParameters", "default": null }, "RedshiftDataParameters": { "$ref": "#/$defs/EventsRedshiftDataParameters", "default": null }, "SageMakerPipelineParameters": { "$ref": "#/$defs/EventsSageMakerPipelineParameters", "default": null }, "DeadLetterConfig": { "$ref": "#/$defs/EventsDeadLetterConfig", "default": null }, "RetryPolicy": { "$ref": "#/$defs/EventsRetryPolicy", "default": null }, "AppSyncParameters": { "$ref": "#/$defs/EventsAppSyncParameters", "default": null } }, "required": [ "Id", "Arn" ], "title": "EventTarget", "type": "object" }, "EventsAppSyncParameters": { "description": "Contains the GraphQL operation to be parsed and executed, if the event target is an\nAppSync API.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GraphQLOperation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Graphqloperation" } }, "title": "EventsAppSyncParameters", "type": "object" }, "EventsAwsVpcConfiguration": { "description": "This structure specifies the VPC subnets and security groups for the task, and\nwhether a public IP address is to be used.\n\nThis structure is relevant only for ECS tasks that use the ``awsvpc`` network mode.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Subnets": { "items": { "type": "string" }, "title": "Subnets", "type": "array" }, "SecurityGroups": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Securitygroups" }, "AssignPublicIp": { "anyOf": [ { "enum": [ "ENABLED", "DISABLED" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Assignpublicip" } }, "required": [ "Subnets" ], "title": "EventsAwsVpcConfiguration", "type": "object" }, "EventsBatchParameters": { "description": "The custom parameters to be used when the target is an Batch job.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "JobDefinition": { "title": "Jobdefinition", "type": "string" }, "JobName": { "title": "Jobname", "type": "string" }, "ArrayProperties": { "anyOf": [ { "$ref": "#/$defs/BatchArrayProperties" }, { "type": "null" } ], "default": null }, "RetryStrategy": { "anyOf": [ { "$ref": "#/$defs/BatchRetryStrategy" }, { "type": "null" } ], "default": null } }, "required": [ "JobDefinition", "JobName" ], "title": "EventsBatchParameters", "type": "object" }, "EventsCapacityProviderStrategyItem": { "description": "The details of a capacity provider strategy.\n\nTo learn more, see `CapacityProviderStrategyItem <https://docs.aws.amazon.c\nom/AmazonECS/latest/APIReference/API_CapacityProviderStrategyItem.html>`_ in the Amazon ECS API Reference.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "capacityProvider": { "title": "Capacityprovider", "type": "string" }, "weight": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Weight" }, "base": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Base" } }, "required": [ "capacityProvider" ], "title": "EventsCapacityProviderStrategyItem", "type": "object" }, "EventsDeadLetterConfig": { "description": "Configuration details of the Amazon SQS queue for EventBridge to use as a dead-\nletter queue (DLQ).\n\nFor more information, see `Using dead-letter queues to process undelivered\nevents <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq>`_ in the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" } }, "title": "EventsDeadLetterConfig", "type": "object" }, "EventsEcsParameters": { "description": "The custom parameters to be used when the target is an Amazon ECS task.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TaskDefinitionArn": { "title": "Taskdefinitionarn", "type": "string" }, "TaskCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Taskcount" }, "LaunchType": { "anyOf": [ { "enum": [ "EC2", "FARGATE", "EXTERNAL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Launchtype" }, "NetworkConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsNetworkConfiguration" }, { "type": "null" } ], "default": null }, "PlatformVersion": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Platformversion" }, "Group": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Group" }, "CapacityProviderStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsCapacityProviderStrategyItem" }, "type": "array" }, { "type": "null" } ], "title": "Capacityproviderstrategy" }, "EnableECSManagedTags": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableecsmanagedtags" }, "EnableExecuteCommand": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enableexecutecommand" }, "PlacementConstraints": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementConstraint" }, "type": "array" }, { "type": "null" } ], "title": "Placementconstraints" }, "PlacementStrategy": { "anyOf": [ { "items": { "$ref": "#/$defs/EventsPlacementStrategy" }, "type": "array" }, { "type": "null" } ], "title": "Placementstrategy" }, "PropagateTags": { "anyOf": [ { "const": "TASK_DEFINITION", "type": "string" }, { "type": "null" } ], "default": null, "title": "Propagatetags" }, "ReferenceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Referenceid" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "TaskDefinitionArn" ], "title": "EventsEcsParameters", "type": "object" }, "EventsHttpParameters": { "description": "These are custom parameter to be used when the target is an API Gateway APIs or\nEventBridge ApiDestinations.\n\nIn the latter case, these are merged with any InvocationParameters specified on the\nConnection, with any values from the Connection taking precedence.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PathParameterValues": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pathparametervalues" }, "HeaderParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Headerparameters" }, "QueryStringParameters": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Querystringparameters" } }, "title": "EventsHttpParameters", "type": "object" }, "EventsInputTransformer": { "description": "Contains the parameters needed for you to provide custom input to a target based on\none or more pieces of data extracted from the event.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InputPathsMap": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Inputpathsmap" }, "InputTemplate": { "title": "Inputtemplate", "type": "string" } }, "required": [ "InputTemplate" ], "title": "EventsInputTransformer", "type": "object" }, "EventsKinesisParameters": { "description": "This object enables you to specify a JSON path to extract from the event and use as\nthe partition key for the Amazon Kinesis data stream, so that you can control the\nshard to which the event goes.\n\nIf you do not include this parameter,\nthe default is to use the ``eventId`` as the partition key.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PartitionKeyPath": { "title": "Partitionkeypath", "type": "string" } }, "required": [ "PartitionKeyPath" ], "title": "EventsKinesisParameters", "type": "object" }, "EventsNetworkConfiguration": { "description": "This structure specifies the network configuration for an ECS task.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "awsvpcConfiguration": { "anyOf": [ { "$ref": "#/$defs/EventsAwsVpcConfiguration" }, { "type": "null" } ], "default": null } }, "title": "EventsNetworkConfiguration", "type": "object" }, "EventsPlacementConstraint": { "description": "An object representing a constraint on task placement.\n\nTo learn more, see\n`Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_\nin the Amazon\nElastic Container Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "distinctInstance", "memberOf" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "expression": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expression" } }, "title": "EventsPlacementConstraint", "type": "object" }, "EventsPlacementStrategy": { "description": "The task placement strategy for a task or service.\n\nTo learn more, see\n`Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_\nin the Amazon\nElastic Container Service Service Developer Guide.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "type": { "anyOf": [ { "enum": [ "random", "spread", "binpack" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Field" } }, "title": "EventsPlacementStrategy", "type": "object" }, "EventsRedshiftDataParameters": { "description": "These are custom parameters to be used when the target is a Amazon Redshift cluster\nto invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SecretManagerArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Secretmanagerarn" }, "Database": { "title": "Database", "type": "string" }, "DbUser": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dbuser" }, "Sql": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Sql" }, "StatementName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Statementname" }, "WithEvent": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Withevent" }, "Sqls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Sqls" } }, "required": [ "Database" ], "title": "EventsRedshiftDataParameters", "type": "object" }, "EventsRetryPolicy": { "description": "A ``RetryPolicy`` object that includes information about the retry policy settings.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MaximumRetryAttempts": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumretryattempts" }, "MaximumEventAgeInSeconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maximumeventageinseconds" } }, "title": "EventsRetryPolicy", "type": "object" }, "EventsRunCommandParameters": { "description": "This parameter contains the criteria (either InstanceIds or a tag) used to specify\nwhich EC2 instances are to be sent the command.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RunCommandTargets": { "items": { "$ref": "#/$defs/RunCommandTarget" }, "title": "Runcommandtargets", "type": "array" } }, "required": [ "RunCommandTargets" ], "title": "EventsRunCommandParameters", "type": "object" }, "EventsSageMakerPipelineParameters": { "description": "These are custom parameters to use when the target is a SageMaker AI Model Building\nPipeline that starts based on EventBridge events.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PipelineParameterList": { "anyOf": [ { "items": { "$ref": "#/$defs/SageMakerPipelineParameter" }, "type": "array" }, { "type": "null" } ], "title": "Pipelineparameterlist" } }, "title": "EventsSageMakerPipelineParameters", "type": "object" }, "EventsSqsParameters": { "description": "This structure includes the custom parameter to be used when the target is an SQS\nFIFO queue.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "MessageGroupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Messagegroupid" } }, "title": "EventsSqsParameters", "type": "object" }, "RunCommandTarget": { "description": "Information about the EC2 instances that are to be sent the command, specified as\nkey-value pairs.\n\nEach\n``RunCommandTarget`` block can include only one key, but this key may specify multiple values.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Values": { "items": { "type": "string" }, "title": "Values", "type": "array" } }, "required": [ "Key", "Values" ], "title": "RunCommandTarget", "type": "object" }, "SageMakerPipelineParameter": { "description": "Name/Value pair of a parameter to start execution of a SageMaker AI Model Building\nPipeline.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Name": { "title": "Name", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Name", "Value" ], "title": "SageMakerPipelineParameter", "type": "object" }, "Tag": { "description": "The metadata that you apply to a resource to help you categorize and\norganize them. Each tag consists of a key and an optional value. You define\nthem.\n\nThe following basic restrictions apply to tags:\n\n* Maximum number of tags per resource - 50\n* For each resource, each tag key must be unique, and each tag key can have\n only one value.\n* Maximum key length - 128 Unicode characters in UTF-8\n* Maximum value length - 256 Unicode characters in UTF-8\n* If your tagging schema is used across multiple services and resources,\n remember that other services may have restrictions on allowed characters.\n Generally allowed characters are: letters, numbers, and spaces representable in\n UTF-8, and the following characters: + - = . _ : / @.\n* Tag keys and values are case-sensitive.\n* Do not use ``aws:``, ``AWS:``, or any upper or lowercase combination of such\n as a prefix for either keys or values as it is reserved for Amazon Web Services\n use. You cannot edit or delete tag keys or values with this prefix. Tags with\n this prefix do not count against your tags per resource limit.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Key" }, "Value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "title": "Tag", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field NextToken: str | None = None
A token indicating there are more results available.
If there are no more results, no token is included in the response.
- field Targets: builtins.list[EventTarget] | None [Optional]
The targets assigned to the rule.
- 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.events.PutEventsResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "PutEventsResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "FailedEntryCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Failedentrycount" }, "Entries": { "anyOf": [ { "items": { "$ref": "#/$defs/PutEventsResultEntry" }, "type": "array" }, { "type": "null" } ], "title": "Entries" } }, "$defs": { "PutEventsResultEntry": { "description": "Represents the results of an event submitted to an event bus.\n\nIf the submission was successful, the entry has the event ID in it. Otherwise, you\ncan use the error code and error message to identify the problem with the entry.\n\nFor information about the errors that are common to all actions, see\n`Common Errors <https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html>`_.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "EventId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } }, "title": "PutEventsResultEntry", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Entries: builtins.list[PutEventsResultEntry] | None [Optional]
The successfully and unsuccessfully ingested events results.
If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.
- 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.events.PutEventsResultEntry[source]
Bases:
Boto3ModelRepresents the results of an event submitted to an event bus.
If the submission was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.
For information about the errors that are common to all actions, see Common Errors.
Show JSON schema
{ "title": "PutEventsResultEntry", "description": "Represents the results of an event submitted to an event bus.\n\nIf the submission was successful, the entry has the event ID in it. Otherwise, you\ncan use the error code and error message to identify the problem with the entry.\n\nFor information about the errors that are common to all actions, see\n`Common Errors <https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html>`_.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "EventId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Eventid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field ErrorMessage: str | None = None
The error message that explains why the event submission failed.
- 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.events.PutRuleResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "PutRuleResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RuleArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rulearn" } } }
- 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.events.PutTargetsResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "PutTargetsResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "FailedEntryCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Failedentrycount" }, "FailedEntries": { "anyOf": [ { "items": { "$ref": "#/$defs/PutTargetsResultEntry" }, "type": "array" }, { "type": "null" } ], "title": "Failedentries" } }, "$defs": { "PutTargetsResultEntry": { "description": "Represents a target that failed to be added to a rule.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Targetid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } }, "title": "PutTargetsResultEntry", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field FailedEntries: builtins.list[PutTargetsResultEntry] | None [Optional]
The failed target entries.
- 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.events.PutTargetsResultEntry[source]
Bases:
Boto3ModelRepresents a target that failed to be added to a rule.
Show JSON schema
{ "title": "PutTargetsResultEntry", "description": "Represents a target that failed to be added to a rule.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Targetid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field ErrorCode: str | None = None
The error code that indicates why the target addition failed.
If the value is
ConcurrentModificationException, too many requests were made at the same time.
- field ErrorMessage: str | None = None
The error message that explains why the target addition failed.
- 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.events.RemoveTargetsResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "RemoveTargetsResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "FailedEntryCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Failedentrycount" }, "FailedEntries": { "anyOf": [ { "items": { "$ref": "#/$defs/RemoveTargetsResultEntry" }, "type": "array" }, { "type": "null" } ], "title": "Failedentries" } }, "$defs": { "RemoveTargetsResultEntry": { "description": "Represents a target that failed to be removed from a rule.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Targetid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } }, "title": "RemoveTargetsResultEntry", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field FailedEntries: builtins.list[RemoveTargetsResultEntry] | None [Optional]
The failed target entries.
- 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.events.RemoveTargetsResultEntry[source]
Bases:
Boto3ModelRepresents a target that failed to be removed from a rule.
Show JSON schema
{ "title": "RemoveTargetsResultEntry", "description": "Represents a target that failed to be removed from a rule.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "TargetId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Targetid" }, "ErrorCode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errorcode" }, "ErrorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Errormessage" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field ErrorCode: str | None = None
The error code that indicates why the target removal failed.
If the value is
ConcurrentModificationException, too many requests were made at the same time.
- field ErrorMessage: str | None = None
The error message that explains why the target removal failed.
- 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.events.UpdateEventBusResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "UpdateEventBusResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" }, "Name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "KmsKeyIdentifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Kmskeyidentifier" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "DeadLetterConfig": { "anyOf": [ { "$ref": "#/$defs/EventsDeadLetterConfig" }, { "type": "null" } ], "default": null }, "LogConfig": { "anyOf": [ { "$ref": "#/$defs/EventsLogConfig" }, { "type": "null" } ], "default": null } }, "$defs": { "EventsDeadLetterConfig": { "description": "Configuration details of the Amazon SQS queue for EventBridge to use as a dead-\nletter queue (DLQ).\n\nFor more information, see `Using dead-letter queues to process undelivered\nevents <https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-event-delivery.html#eb-rule-dlq>`_ in the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Arn" } }, "title": "EventsDeadLetterConfig", "type": "object" }, "EventsLogConfig": { "description": "The logging configuration settings for the event bus.\n\nFor more information, see\n`Configuring logs for event buses <https://docs.aws.amazon.com/eb-event-bus-logs.html>`_\nin the\n*EventBridge User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "IncludeDetail": { "anyOf": [ { "enum": [ "NONE", "FULL" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Includedetail" }, "Level": { "anyOf": [ { "enum": [ "OFF", "ERROR", "INFO", "TRACE" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Level" } }, "title": "EventsLogConfig", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field DeadLetterConfig: EventsDeadLetterConfig | None = None
Configuration details of the Amazon SQS queue for EventBridge to use as a dead- letter queue (DLQ).
- field KmsKeyIdentifier: str | None = None
The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.
- field LogConfig: EventsLogConfig | None = None
The logging configuration settings for the event bus.
- 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.