SSM (ssm)

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.ssm.Parameter[source]

Bases: PrimaryBoto3Model

An Amazon Web Services Systems Manager parameter in Parameter Store.

Show JSON schema
{
   "title": "Parameter",
   "description": "An Amazon Web Services Systems Manager parameter in Parameter Store.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Name": {
         "title": "Name",
         "type": "string"
      },
      "Value": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Value"
      },
      "Type": {
         "enum": [
            "String",
            "StringList",
            "SecureString"
         ],
         "title": "Type",
         "type": "string"
      },
      "DataType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "text",
         "title": "Datatype"
      },
      "Version": {
         "default": null,
         "title": "Version",
         "type": "integer"
      },
      "Selector": {
         "default": null,
         "title": "Selector",
         "type": "string"
      },
      "SourceResult": {
         "default": null,
         "title": "Sourceresult",
         "type": "string"
      },
      "LastModifiedDate": {
         "default": null,
         "format": "date-time",
         "title": "Lastmodifieddate",
         "type": "string"
      },
      "ARN": {
         "default": null,
         "title": "Arn",
         "type": "string"
      }
   },
   "required": [
      "Name",
      "Type"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ARN: str = None

The Amazon Resource Name (ARN) of the parameter.

field DataType: str | None = 'text'

The data type of the parameter, such as text or aws:ec2:image.

The default is text.

field LastModifiedDate: datetime = None

Date the parameter was last changed or updated and the parameter version was created.

field Name: str [Required]

The name of the parameter.

field Selector: str = None

Either the version number or the label used to retrieve the parameter value.

Specify selectors by using one of the following formats:

field SourceResult: str = None

Applies to parameters that reference information in other Amazon Web Services services.

SourceResult is the raw result or response from the source.

field Type: Literal['String', 'StringList', 'SecureString'] [Required]

The type of parameter.

Valid values include the following: String, StringList, and SecureString.

field Value: str | None = None

The parameter value.

field Version: int = None

The parameter version.

field session: Any | None = None

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

manager_class

alias of ParameterManager

delete()

Delete the model.

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

save(**kwargs)

Save the model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

property arn: str | None

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

Returns:

The ARN of the model instance.

property name: str | None

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

Returns:

The name of the model instance.

objects: ClassVar[classproperty]

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

property pk: str | None

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

Returns:

The primary key of the model instance.

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.ssm.ParameterManager[source]

Bases: Boto3ModelManager

create(model: Parameter, Description: str | None = None, KeyId: str | None = None, AllowedPattern: str | None = None, Tags: list[botocraft.services.common.Tag] | None = None, Tier: Literal['Standard', 'Advanced', 'Intelligent-Tiering'] | None = None, Policies: str | None = None) int[source]

Create or update a parameter in Parameter Store.

Parameters:

model – The Parameter to create.

Keyword Arguments:
  • Description – Information about the parameter that you want to add to the system. Optional but recommended.

  • KeyId – The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the SecureString data type.

  • AllowedPattern – A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^d+$

  • Tags – Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:

  • Tier – The parameter tier to assign to a parameter.

  • Policies – One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a tool in Amazon Web Services Systems Manager supports the following policy types:

delete(Name: str) None[source]

Delete a parameter from the system. After deleting a parameter, wait for at least 30 seconds to create a parameter with the same name.

Parameters:

Name – The name of the parameter to delete.

get(Name: str, *, WithDecryption: bool = True) Parameter | None[source]

Get information about one or more parameters by specifying multiple parameter names.

Parameters:

Name – The name of the parameter you want to query.

Keyword Arguments:

WithDecryption – Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

get_many(Names: list[str], *, WithDecryption: bool = True) PrimaryBoto3ModelQuerySet | GetParametersResult | None[source]

Get information about one or more parameters by specifying multiple parameter names.

Parameters:

Names – The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs.

Keyword Arguments:

WithDecryption – Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types.

list(*, Filters: list[botocraft.services.ssm.ParametersFilter] | None = None, ParameterFilters: list[botocraft.services.ssm.ParameterStringFilter] | None = None, Shared: bool | None = None) list[botocraft.services.ssm.ParameterMetadata][source]

Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the Shared option.

Keyword Arguments:
  • Filters – This data type is deprecated. Instead, use ParameterFilters.

  • ParameterFilters – Filters to limit the request results.

  • Shared – Lists parameters that are shared with you.

update(model: Parameter, Description: str | None = None, KeyId: str | None = None, Overwrite: bool | None = None, AllowedPattern: str | None = None, Tags: list[botocraft.services.common.Tag] | None = None, Tier: Literal['Standard', 'Advanced', 'Intelligent-Tiering'] | None = None, Policies: str | None = None) int[source]

Create or update a parameter in Parameter Store.

Parameters:

model – The Parameter to update.

Keyword Arguments:
  • Description – Information about the parameter that you want to add to the system. Optional but recommended.

  • KeyId – The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the SecureString data type.

  • Overwrite – Overwrite an existing parameter. The default value is false.

  • AllowedPattern – A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^d+$

  • Tags – Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:

  • Tier – The parameter tier to assign to a parameter.

  • Policies – One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a tool in Amazon Web Services Systems Manager supports the following policy types:

service_name: str = 'ssm'

ec2, s3, etc.

Type:

The name of the boto3 service. Example

Secondary Models

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

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.ssm.DeleteParameterResult[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "DeleteParameterResult",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.DescribeParametersResult[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "DescribeParametersResult",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Parameters": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ParameterMetadata"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Parameters"
      },
      "NextToken": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Nexttoken"
      }
   },
   "$defs": {
      "ParameterInlinePolicy": {
         "description": "One or more policies assigned to a parameter.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "PolicyText": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policytext"
            },
            "PolicyType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policytype"
            },
            "PolicyStatus": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policystatus"
            }
         },
         "title": "ParameterInlinePolicy",
         "type": "object"
      },
      "ParameterMetadata": {
         "description": "Metadata includes information like the Amazon Resource Name (ARN) of the last user\nto update the parameter and the date and time the parameter was last used.",
         "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"
            },
            "Type": {
               "anyOf": [
                  {
                     "enum": [
                        "String",
                        "StringList",
                        "SecureString"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Type"
            },
            "KeyId": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Keyid"
            },
            "LastModifiedDate": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Lastmodifieddate"
            },
            "LastModifiedUser": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Lastmodifieduser"
            },
            "Description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "AllowedPattern": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Allowedpattern"
            },
            "Version": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            },
            "Tier": {
               "anyOf": [
                  {
                     "enum": [
                        "Standard",
                        "Advanced",
                        "Intelligent-Tiering"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Tier"
            },
            "Policies": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/ParameterInlinePolicy"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Policies"
            },
            "DataType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Datatype"
            }
         },
         "title": "ParameterMetadata",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field NextToken: str | None = None

The token to use when requesting the next set of items.

field Parameters: builtins.list[ParameterMetadata] | None [Optional]

Parameters returned by the request.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.GetParametersResult[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "GetParametersResult",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Parameters": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/Parameter"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Parameters"
      },
      "InvalidParameters": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Invalidparameters"
      }
   },
   "$defs": {
      "Parameter": {
         "description": "An Amazon Web Services Systems Manager parameter in Parameter Store.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "Name": {
               "title": "Name",
               "type": "string"
            },
            "Value": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Value"
            },
            "Type": {
               "enum": [
                  "String",
                  "StringList",
                  "SecureString"
               ],
               "title": "Type",
               "type": "string"
            },
            "DataType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "text",
               "title": "Datatype"
            },
            "Version": {
               "default": null,
               "title": "Version",
               "type": "integer"
            },
            "Selector": {
               "default": null,
               "title": "Selector",
               "type": "string"
            },
            "SourceResult": {
               "default": null,
               "title": "Sourceresult",
               "type": "string"
            },
            "LastModifiedDate": {
               "default": null,
               "format": "date-time",
               "title": "Lastmodifieddate",
               "type": "string"
            },
            "ARN": {
               "default": null,
               "title": "Arn",
               "type": "string"
            }
         },
         "required": [
            "Name",
            "Type"
         ],
         "title": "Parameter",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

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

A list of parameters that aren’t formatted correctly or don’t run during an execution.

field Parameters: builtins.list[Parameter] | None [Optional]

A list of details for a parameter.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.ParameterInlinePolicy[source]

Bases: Boto3Model

One or more policies assigned to a parameter.

Show JSON schema
{
   "title": "ParameterInlinePolicy",
   "description": "One or more policies assigned to a parameter.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "PolicyText": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Policytext"
      },
      "PolicyType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Policytype"
      },
      "PolicyStatus": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Policystatus"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field PolicyStatus: str | None = None

The status of the policy.

Policies report the following statuses: Pending (the policy hasn’t been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn’t applied), or InProgress (the policy is being applied now).

field PolicyText: str | None = None

The JSON text of the policy.

field PolicyType: str | None = None

The type of policy.

Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.ParameterMetadata[source]

Bases: Boto3Model

Metadata includes information like the Amazon Resource Name (ARN) of the last user to update the parameter and the date and time the parameter was last used.

Show JSON schema
{
   "title": "ParameterMetadata",
   "description": "Metadata includes information like the Amazon Resource Name (ARN) of the last user\nto update the parameter and the date and time the parameter was last used.",
   "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"
      },
      "Type": {
         "anyOf": [
            {
               "enum": [
                  "String",
                  "StringList",
                  "SecureString"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Type"
      },
      "KeyId": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Keyid"
      },
      "LastModifiedDate": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Lastmodifieddate"
      },
      "LastModifiedUser": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Lastmodifieduser"
      },
      "Description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Description"
      },
      "AllowedPattern": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Allowedpattern"
      },
      "Version": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Version"
      },
      "Tier": {
         "anyOf": [
            {
               "enum": [
                  "Standard",
                  "Advanced",
                  "Intelligent-Tiering"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tier"
      },
      "Policies": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ParameterInlinePolicy"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Policies"
      },
      "DataType": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Datatype"
      }
   },
   "$defs": {
      "ParameterInlinePolicy": {
         "description": "One or more policies assigned to a parameter.",
         "properties": {
            "session": {
               "anyOf": [
                  {},
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Session"
            },
            "PolicyText": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policytext"
            },
            "PolicyType": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policytype"
            },
            "PolicyStatus": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Policystatus"
            }
         },
         "title": "ParameterInlinePolicy",
         "type": "object"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field ARN: str | None = None

The Amazon Resource Name (ARN) of the parameter.

field AllowedPattern: str | None = None

A parameter name can include only the following letters and symbols.

field DataType: str | None = None

The data type of the parameter, such as text or aws:ec2:image.

The default is text.

field Description: str | None = None

Description of the parameter actions.

field KeyId: str | None = None

The alias of the Key Management Service (KMS) key used to encrypt the parameter.

Applies to SecureString parameters only.

field LastModifiedDate: datetime | None = None

Date the parameter was last changed or updated.

field LastModifiedUser: str | None = None

Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.

field Name: str | None = None

The parameter name.

field Policies: builtins.list[ParameterInlinePolicy] | None [Optional]

A list of policies associated with a parameter.

field Tier: Literal['Standard', 'Advanced', 'Intelligent-Tiering'] | None = None

The parameter tier.

field Type: Literal['String', 'StringList', 'SecureString'] | None = None

The type of parameter.

Valid parameter types include the following: String, StringList, and SecureString.

field Version: int | None = None

The parameter version.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.ParameterStringFilter[source]

Bases: Boto3Model

One or more filters.

Use a filter to return a more specific list of results.

Show JSON schema
{
   "title": "ParameterStringFilter",
   "description": "One or more filters.\n\nUse a filter to return a more specific list of results.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Key": {
         "title": "Key",
         "type": "string"
      },
      "Option": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Option"
      },
      "Values": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "title": "Values"
      }
   },
   "required": [
      "Key"
   ]
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Key: str [Required]

The name of the filter.

field Option: str | None = None

For all filters used with DescribeParameters, valid options include Equals and BeginsWith.

The Name filter additionally supports the Contains option. (Exception: For filters using the key Path, valid options include Recursive and OneLevel.)

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

The value you want to search for.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.ParametersFilter[source]

Bases: Boto3Model

This data type is deprecated.

Instead, use ParameterStringFilter.

Show JSON schema
{
   "title": "ParametersFilter",
   "description": "This data type is deprecated.\n\nInstead, use ParameterStringFilter.",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Key": {
         "enum": [
            "Name",
            "Type",
            "KeyId"
         ],
         "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 Key: Literal['Name', 'Type', 'KeyId'] [Required]

The name of the filter.

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

The filter values.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.

pydantic model botocraft.services.ssm.PutParameterResult[source]

Bases: Boto3Model

Show JSON schema
{
   "title": "PutParameterResult",
   "type": "object",
   "properties": {
      "session": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Session"
      },
      "Version": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Version"
      },
      "Tier": {
         "anyOf": [
            {
               "enum": [
                  "Standard",
                  "Advanced",
                  "Intelligent-Tiering"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tier"
      }
   }
}

Config:
  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
field Tier: Literal['Standard', 'Advanced', 'Intelligent-Tiering'] | None = None

The tier assigned to the parameter.

field Version: int | None = None

The new version number of a parameter.

If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don’t specify a specific version, the system returns the latest parameter value when a parameter is called.

field session: Any | None = None

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

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

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

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

!!! note

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

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

  • values – Trusted or pre-validated data dictionary.

Returns:

A new instance of the Model class with validated data.

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

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

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

  • strict – Whether to enforce types strictly.

  • context – Extra variables to pass to the validator.

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

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

Returns:

The validated Pydantic model.

set_session(session: Session) None

Set the boto3 session for this model.

Parameters:

session – The boto3 session to use.

Returns:

The model instance.

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

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

Important

This only makes sense for attributes that are strings.

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

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

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

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

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

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

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

Parameters:
  • attribute – The attribute to transform.

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

Returns:

The transformed attribute.