IAM (iam)
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.iam.IAMAccessKey[source]
Bases:
PrimaryBoto3ModelContains information about an Amazon Web Services access key.
This data type is used as a response element in the CreateAccessKey and ListAccessKeys operations.
The
SecretAccessKeyvalue is returned only in response to CreateAccessKey. You can get a secret access key only when you first create an access key; you cannot recover the secret access key later. If you lose a secret access key, you must create a new access key.Show JSON schema
{ "title": "IAMAccessKey", "description": "Contains information about an Amazon Web Services access key.\n\nThis data type is used as a response element in the\n`CreateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html>`_ and\n`ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_ operations.\n\nThe ``SecretAccessKey`` value is returned only in response to\n`CreateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html>`_. You can get a secret\naccess key only when you first create an access key; you cannot recover the secret access key later. If you lose a\nsecret access key, you must create a new access key.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "AccessKeyId": { "title": "Accesskeyid", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "SecretAccessKey": { "title": "Secretaccesskey", "type": "string" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "UserName", "AccessKeyId", "Status", "SecretAccessKey" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Status: Literal['Active', 'Inactive', 'Expired'] [Required]
The status of the access key.
Activemeans that the key is valid for API calls, whileInactivemeans it is not.
- 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
IAMAccessKeyManager
- delete()
Delete the model.
- last_used() GetAccessKeyLastUsedResponse[source]
Return the
AccessKeyLastUsedobject that this access key was last used.
- 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
Get the ARN of the model instance.
- Returns:
The ARN of the model instance.
- Raises:
ValueError – If the model has no ARN identity field.
- property name: str | None
Return the name of the model. This is the value of the
AccessKeyIdattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMAccessKeyManager object>
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
AccessKeyIdattribute.- Returns:
The primary key of the model instance.
- property user: IAMUser | None
Return the
Userobject that this access key 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.
- pydantic model botocraft.services.iam.IAMGroup[source]
Bases:
PrimaryBoto3ModelContains information about an IAM group entity.
This data type is used as a response element in the following operations:
Show JSON schema
{ "title": "IAMGroup", "description": "Contains information about an IAM group entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_\n* `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\n* `ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "GroupName": { "title": "Groupname", "type": "string" }, "GroupId": { "title": "Groupid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "Path", "GroupName", "GroupId", "Arn", "CreateDate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str [Required]
The Amazon Resource Name (ARN) specifying the group.
For more information about ARNs and how to use them in policies, see IAM identifiers in the IAM User Guide.
- field CreateDate: datetime [Required]
The date and time, in ISO 8601 date-time format, when the group was created.
- field GroupId: str [Required]
The stable and unique string identifying the group.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field Path: str [Required]
The path to the group.
For more information about paths, see IAM identifiers in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
IAMGroupManager
- add_user(UserName: str) None[source]
Add a user to this group.
- Parameters:
UserName – The name of the user to add.
- attach_policy(PolicyArn: str) None[source]
Attach a policy to this group.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to attach.
- attached_policies() list[botocraft.services.iam.AttachedPolicy][source]
Return the
Policyobjects that are attached to this group.
- delete()
Delete the model.
- detach_policy(PolicyArn: str) None[source]
Detach a policy from this group.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to detach.
- inline_policies() list[str][source]
Return the
Policyobjects that are inline policies of this group.
- 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_inline_policy(PolicyName: str, PolicyDocument: str) None[source]
Put an inline policy to this group.
- Parameters:
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- remove_inline_policy(PolicyName: str) None[source]
Remove an inline policy from this group.
- Parameters:
PolicyName – The name identifying the policy document to delete.
- remove_user(UserName: str) None[source]
Remove a user from this group.
- Parameters:
UserName – The name of the user to remove.
- 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
GroupNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMGroupManager object>
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
GroupNameattribute.- Returns:
The primary key of the model instance.
- property users: list[botocraft.services.iam.IAMUser] | None
Return the
Userobjects that are members of this group.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.iam.IAMLoginProfile[source]
Bases:
PrimaryBoto3ModelContains the user name and password create date for a user.
This data type is used as a response element in the CreateLoginProfile and GetLoginProfile operations.
Show JSON schema
{ "title": "IAMLoginProfile", "description": "Contains the user name and password create date for a user.\n\nThis data type is used as a response element in the\n`CreateLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateLoginProfile.html>`_\nand\n`GetLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetLoginProfile.html>`_\noperations.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordResetRequired": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Passwordresetrequired" } }, "required": [ "UserName", "CreateDate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PasswordResetRequired: bool | None = None
Specifies whether the user is required to set a new password on next sign-in.
- field UserName: str [Required]
The name of the user, which can be used for signing in to the Amazon Web Services Management Console.
- 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
IAMLoginProfileManager
- 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
Get the ARN of the model instance.
- Returns:
The ARN of the model instance.
- Raises:
ValueError – If the model has no ARN identity field.
- property name: str | None
Return the name of the model. This is the value of the
UserNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMLoginProfileManager object>
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.iam.IAMPolicy[source]
Bases:
TagsDictMixin,IAMPolicyMixin,PrimaryBoto3ModelContains information about a managed policy.
This data type is used as a response element in the CreatePolicy, GetPolicy, and ListPolicies operations.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "IAMPolicy", "description": "Contains information about a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html>`_,\n`GetPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html>`_,\nand\n`ListPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html>`_\noperations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyId": { "default": null, "title": "Policyid", "type": "string" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Path" }, "DefaultVersionId": { "default": null, "title": "Defaultversionid", "type": "string" }, "AttachmentCount": { "default": null, "title": "Attachmentcount", "type": "integer" }, "PermissionsBoundaryUsageCount": { "default": null, "title": "Permissionsboundaryusagecount", "type": "integer" }, "IsAttachable": { "default": null, "title": "Isattachable", "type": "boolean" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" }, "UpdateDate": { "default": null, "format": "date-time", "title": "Updatedate", "type": "string" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "$defs": { "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str = None
The Amazon Resource Name (ARN).
ARNs are unique identifiers for Amazon Web Services resources.
- field AttachmentCount: int = None
The number of entities (users, groups, and roles) that the policy is attached to.
- field CreateDate: datetime = None
The date and time, in ISO 8601 date-time format, when the policy was created.
- field DefaultVersionId: str = None
The identifier for the version of the policy that is set as the default version.
- field IsAttachable: bool = None
Specifies whether the policy can be attached to an IAM user, group, or role.
- field PermissionsBoundaryUsageCount: int = None
The number of entities (users and roles) for which the policy is used to set the permissions boundary.
- field Tags: builtins.list[IAMTag] | None [Optional]
A list of tags that are attached to the instance profile.
For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- field UpdateDate: datetime = None
The date and time, in ISO 8601 date-time format, when the policy was last updated.
- 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
IAMPolicyManager
- delete()
Delete the model.
- entities() ListEntitiesForPolicyResponse[source]
Return the
Entityobjects that are entities of this policy.
- 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_default_version(VersionId: str) None[source]
Set the default version of this policy.
- Parameters:
VersionId – The version of the policy to set as the default (operative) version.
- 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.
- versions() list[botocraft.services.iam.IAMPolicyVersion][source]
Return the
PolicyVersionobjects that are versions of this policy.
- 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
PolicyNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMPolicyManager object>
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.iam.IAMPolicyVersion[source]
Bases:
PrimaryBoto3ModelContains information about a version of a managed policy.
This data type is used as a response element in the CreatePolicyVersion, GetPolicyVersion, ListPolicyVersions, and GetAccountAu thorizationDetails
operations.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "IAMPolicyVersion", "description": "Contains information about a version of a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicyVersion.html>`_,\n`GetPolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicyVersion.html>`_,\n`ListPolicyVersions <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicyVersions.html>`_,\nand\n`GetAccountAu thorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_\n operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Document": { "default": null, "title": "Document", "type": "string" }, "VersionId": { "default": null, "title": "Versionid", "type": "string" }, "IsDefaultVersion": { "default": null, "title": "Isdefaultversion", "type": "boolean" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field CreateDate: datetime = None
The date and time, in ISO 8601 date-time format, when the policy version was created.
- field IsDefaultVersion: bool = None
Specifies whether the policy version is set as the policy’s default 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
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
IAMPolicyVersionManager
- 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
Get the ARN of the model instance.
- Returns:
The ARN of the model instance.
- Raises:
ValueError – If the model has no ARN identity field.
- property name: str | None
Return the name of the model. This is the value of the
VersionIdattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMPolicyVersionManager object>
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.iam.IAMRole[source]
Bases:
TagsDictMixin,PrimaryBoto3ModelContains information about an IAM role.
This structure is returned as a response element in several API operations that interact with roles.
Show JSON schema
{ "title": "IAMRole", "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str [Required]
The Amazon Resource Name (ARN) specifying the role.
For more information about ARNs and how to use them in policies, see IAM identifiers in the IAM User Guide guide.
- field AssumeRolePolicyDocument: dict[str, Any] | None [Optional]
The policy that grants an entity permission to assume the role.
- field CreateDate: datetime [Required]
The date and time, in ISO 8601 date-time format, when the role was created.
- field MaxSessionDuration: int | None = None
The maximum session duration (in seconds) for the specified role.
Anyone who uses the CLI, or API to assume the role can specify the duration using the optional
DurationSecondsAPI parameter orduration-secondsCLI parameter.
- field Path: str [Required]
The path to the role.
For more information about paths, see IAM identifiers in the IAM User Guide.
- field PermissionsBoundary: AttachedPermissionsBoundary | None = None
The ARN of the policy used to set the permissions boundary for the role.
- field RoleId: str [Required]
The stable and unique string identifying the role.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field RoleLastUsed: IAMRoleLastUsed = None
Contains information about the last time that an IAM role was used.
This includes the date and time and the Region in which the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your Region began supporting these features within the last year. The role might have been used more than 400 days ago. For more information, see Regions where data is tracked in the IAM user Guide.
- field Tags: builtins.list[IAMTag] | None [Optional]
A list of tags that are attached to the role.
For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
IAMRoleManager
- add_policy(PolicyName: str, PolicyDocument: str) None[source]
Put an inline policy to this role.
- Parameters:
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- attach_policy(PolicyArn: str) None[source]
Attach a policy to this role.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to attach.
- attached_policies() list[botocraft.services.iam.AttachedPolicy][source]
Return the
Policyobjects that are attached to this role.
- delete()
Delete the model.
- detach_policy(PolicyArn: str) None[source]
Detach a policy from this role.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to detach.
- inline_policies() list[str][source]
Return the
Policyobjects that are inline policies of this role.
- instance_profiles() list[botocraft.services.iam.InstanceProfile][source]
Return the
InstanceProfileobjects that are instance profiles of this role.
- 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.
- remove_policy(PolicyName: str) None[source]
Remove an inline policy from this role.
- Parameters:
PolicyName – The name of the inline policy to delete from the specified IAM role.
- 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.
- update_assume_role_policy(PolicyDocument: str) None[source]
Update the assume role policy of this role.
- Parameters:
PolicyDocument – The policy that grants an entity permission to assume the role.
- 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
RoleNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMRoleManager object>
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.iam.IAMSSHPublicKey[source]
Bases:
PrimaryBoto3ModelContains information about an SSH public key.
This data type is used as a response element in the GetSSHPublicKey and UploadSSHPublicKey operations.
Show JSON schema
{ "title": "IAMSSHPublicKey", "description": "Contains information about an SSH public key.\n\nThis data type is used as a response element in the\n`GetSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetSSHPublicKey.html>`_\nand\n`UploadSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_UploadSSHPublicKey.html>`_\noperations.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "SSHPublicKeyId": { "title": "Sshpublickeyid", "type": "string" }, "Fingerprint": { "title": "Fingerprint", "type": "string" }, "SSHPublicKeyBody": { "title": "Sshpublickeybody", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "UploadDate": { "default": null, "format": "date-time", "title": "Uploaddate", "type": "string" } }, "required": [ "UserName", "SSHPublicKeyId", "Fingerprint", "SSHPublicKeyBody", "Status" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Status: Literal['Active', 'Inactive', 'Expired'] [Required]
The status of the SSH public key.
Activemeans that the key can be used for authentication with an CodeCommit repository.Inactivemeans that the key cannot be used.
- field UploadDate: datetime = None
The date and time, in ISO 8601 date-time format, when the SSH public key was uploaded.
- 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
IAMSSHPublicKeyManager
- 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
Get the ARN of the model instance.
- Returns:
The ARN of the model instance.
- Raises:
ValueError – If the model has no ARN identity field.
- property name: str | None
Return the name of the model. This is the value of the
SSHPublicKeyIdattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMSSHPublicKeyManager object>
Get the manager for this model, and set it as a class property
- property pk: OrderedDict[str, Any]
Get the primary key of the model instance.
- Returns:
The primary key of the model instance.
- pydantic model botocraft.services.iam.IAMUser[source]
Bases:
TagsDictMixin,PrimaryBoto3ModelContains information about an IAM user entity.
This data type is used as a response element in the following operations:
Show JSON schema
{ "title": "IAMUser", "description": "Contains information about an IAM user entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_\n* `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\n* `ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "UserName": { "title": "Username", "type": "string" }, "UserId": { "title": "Userid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordLastUsed": { "default": null, "format": "date-time", "title": "Passwordlastused", "type": "string" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Path", "UserName", "UserId", "Arn", "CreateDate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str [Required]
The Amazon Resource Name (ARN) that identifies the user.
For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the IAM User Guide.
- field CreateDate: datetime [Required]
The date and time, in ISO 8601 date-time format, when the user was created.
- field PasswordLastUsed: datetime = None
The date and time, in ISO 8601 date-time format, when the user’s password was last used to sign in to an Amazon Web Services website. For a list of Amazon Web Services websites that capture a user’s last sign-in time, see the Credential reports topic in the IAM User Guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. If the field is null (no value), then it indicates that they never signed in with a password. This can be because:
- field Path: str [Required]
The path to the user.
For more information about paths, see IAM identifiers in the IAM User Guide.
- field PermissionsBoundary: AttachedPermissionsBoundary | None = None
For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
- field Tags: builtins.list[IAMTag] | None [Optional]
A list of tags that are associated with the user.
For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- field UserId: str [Required]
The stable and unique string identifying the user.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
IAMUserManager
- add_policy(PolicyName: str, PolicyDocument: str) None[source]
Put an inline policy to this user.
- Parameters:
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- add_to_group(GroupName: str) None[source]
Add a user to a group.
- Parameters:
GroupName – The name of the group to update.
- attached_policies() list[botocraft.services.iam.AttachedPolicy][source]
Return the
Policyobjects that are attached to this user.
- delete()
Delete the model.
- groups() list[botocraft.services.iam.IAMGroup][source]
Return the
Groupobjects that are groups of this user.
- inline_policies() list[str][source]
Return the
Policyobjects that are inline policies of this user.
- 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.
- remove_from_group(GroupName: str) None[source]
Remove a user from a group.
- Parameters:
GroupName – The name of the group to update.
- remove_policy(PolicyName: str) None[source]
Remove an inline policy from this user.
- Parameters:
PolicyName – The name identifying the policy document to delete.
- 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
UserNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.IAMUserManager object>
Get the manager for this model, and set it as a class property
- pydantic model botocraft.services.iam.InstanceProfile[source]
Bases:
TagsDictMixin,PrimaryBoto3ModelContains information about an instance profile.
This data type is used as a response element in the following operations:
Show JSON schema
{ "title": "InstanceProfile", "description": "Contains information about an instance profile.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_\n* `GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_\n* `ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_\n*\n `ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "InstanceProfileName": { "title": "Instanceprofilename", "type": "string" }, "InstanceProfileId": { "title": "Instanceprofileid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Path", "InstanceProfileName", "InstanceProfileId", "Arn", "CreateDate", "Roles" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Arn: str [Required]
The Amazon Resource Name (ARN) specifying the instance profile.
For more information about ARNs and how to use them in policies, see IAM identifiers in the IAM User Guide.
- field InstanceProfileId: str [Required]
The stable and unique string identifying the instance profile.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field Path: str [Required]
The path to the instance profile.
For more information about paths, see IAM identifiers in the IAM User Guide.
- field Tags: builtins.list[IAMTag] | None [Optional]
A list of tags that are attached to the instance profile.
For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- manager_class
alias of
InstanceProfileManager
- 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
InstanceProfileNameattribute.- Returns:
The name of the model instance.
- objects: ClassVar[classproperty] = <botocraft.services.iam.InstanceProfileManager object>
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
InstanceProfileNameattribute.- 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.iam.IAMAccessKeyManager[source]
Bases:
Boto3ModelManager- create(model: IAMAccessKey, UserName: str | None = None) IAMAccessKey[source]
Create an AWS Access Key for a user.
- Parameters:
model – The
AccessKeyto create.- Keyword Arguments:
UserName – The name of the IAM user that the new key will belong to.
- delete(AccessKeyId: str, *, UserName: str | None = None) None[source]
Delete an AWS Access Key from a user.
- Parameters:
AccessKeyId – The access key ID for the access key ID and secret access key you want to delete.
- Keyword Arguments:
UserName – The name of the user whose access key pair you want to delete.
- last_used(AccessKeyId: str) GetAccessKeyLastUsedResponse[source]
Retrieves information about when the specified access key was last used. The information includes the date and time of last use, along with the Amazon Web Services service and Region that were specified in the last request made with that key.
- Parameters:
AccessKeyId – The identifier of an access key.
- list(*, UserName: str | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Returns information about the access key IDs associated with the specified IAM user. If there is none, the operation returns an empty list.
- Keyword Arguments:
UserName – The name of the user.
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- update(model: IAMAccessKey) None[source]
Changes the status of the specified access key from Active to Inactive, or vice versa. This operation can be used to disable a user’s key as part of a key rotation workflow.
- Parameters:
model – The
AccessKeyto update.
- class botocraft.services.iam.IAMGroupManager[source]
Bases:
Boto3ModelManager- add_user(GroupName: str, UserName: str) None[source]
Add a user to a group.
- Parameters:
GroupName – The name of the group to update.
UserName – The name of the user to add.
- attach_policy(GroupName: str, PolicyArn: str) None[source]
Attach a policy to a group.
- Parameters:
GroupName – The name (friendly name, not ARN) of the group to attach the policy to.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to attach.
- create(model: IAMGroup) IAMGroup[source]
Create an IAM group.
- Parameters:
model – The
Groupto create.
- delete(GroupName: str) None[source]
Delete an IAM group.
- Parameters:
GroupName – The name of the IAM group to delete.
- delete_policy(GroupName: str, PolicyName: str) None[source]
Delete a policy from a group.
- Parameters:
GroupName – The name (friendly name, not ARN) identifying the group that the policy is embedded in.
PolicyName – The name identifying the policy document to delete.
- detach_policy(GroupName: str, PolicyArn: str) None[source]
Detach a policy from a group.
- Parameters:
GroupName – The name (friendly name, not ARN) of the IAM group to detach the policy from.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to detach.
- get(GroupName: str, *, MaxItems: int | None = None) IAMGroup | None[source]
Get an IAM group.
- Parameters:
GroupName – The name of the group.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- get_policy(GroupName: str, PolicyName: str) GetGroupPolicyResponse[source]
Retrieves the specified inline policy document that is embedded in the specified IAM group.
- Parameters:
GroupName – The name of the group the policy is associated with.
PolicyName – The name of the policy document to get.
- list(*, PathPrefix: str | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists the IAM groups that have the specified path prefix.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. For example, the prefix
/division_abc/subdivision_xyz/gets all groups whose path starts with/division_abc/subdivision_xyz/.MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_attached_policies(GroupName: str, *, PathPrefix: str | None = None, MaxItems: int | None = None) list[botocraft.services.iam.AttachedPolicy][source]
Lists all managed policies that are attached to the specified IAM group.
- Parameters:
GroupName – The name (friendly name, not ARN) of the group to list attached policies for.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_for_user(UserName: str, *, MaxItems: int | None = None) list[botocraft.services.iam.IAMGroup][source]
Lists the IAM groups that the specified IAM user belongs to.
- Parameters:
UserName – The name of the user to list groups for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_policies(GroupName: str, *, MaxItems: int | None = None) list[str][source]
Lists the names of the inline policies that are embedded in the specified IAM group.
- Parameters:
GroupName – The name of the group to list policies for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- put_policy(GroupName: str, PolicyName: str, PolicyDocument: str) None[source]
Attach a policy to a group.
- Parameters:
GroupName – The name of the group to associate the policy with.
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- remove_user(GroupName: str, UserName: str) None[source]
Remove a user from a group.
- Parameters:
GroupName – The name of the group to update.
UserName – The name of the user to remove.
- update(model: IAMGroup, NewPath: str | None = None, NewGroupName: str | None = None) None[source]
Update an IAM group.
- Parameters:
model – The
Groupto update.- Keyword Arguments:
NewPath – New path for the IAM group. Only include this if changing the group’s path.
NewGroupName – New name for the IAM group. Only include this if changing the group’s name.
- class botocraft.services.iam.IAMLoginProfileManager[source]
Bases:
Boto3ModelManager- create(model: IAMLoginProfile) IAMLoginProfile[source]
Create a login profile for a user.
- Parameters:
model – The
LoginProfileto create.
- delete(UserName: str) None[source]
Delete a login profile for a user.
- Parameters:
UserName – The name of the user whose password you want to delete.
- get(UserName: str) IAMLoginProfile | None[source]
Retrieves the user name for the specified IAM user. A login profile is created when you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist or does not have a password, the operation returns a 404 (
NoSuchEntity) error.- Parameters:
UserName – The name of the user whose login profile you want to retrieve.
- class botocraft.services.iam.IAMPolicyManager[source]
Bases:
IAMPolicyManagerMixin,Boto3ModelManager- create(model: IAMPolicy) IAMPolicy[source]
Create a policy.
- Parameters:
model – The
Policyto create.
- delete(PolicyArn: str) None[source]
Delete a policy.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to delete.
- get(PolicyArn: str) IAMPolicy | None[source]
Retrieves information about the specified managed policy, including the policy’s default version and the total number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy. This operation returns metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use GetPolicyVersion.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the managed policy that you want information about.
- list(*, Scope: Literal['All', 'AWS', 'Local'] | None = None, OnlyAttached: bool | None = None, PathPrefix: str | None = None, PolicyUsageFilter: Literal['PermissionsPolicy', 'PermissionsBoundary'] | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists all the managed policies that are available in your Amazon Web Services account, including your own customer- defined managed policies and all Amazon Web Services managed policies.
- Keyword Arguments:
Scope – The scope to use for filtering the results.
OnlyAttached – A flag to filter the results to only the attached policies.
PathPrefix – The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies. This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (
u0021) through the DEL character (u007F), including most punctuation characters, digits, and upper and lowercased letters.PolicyUsageFilter – The policy usage method to use for filtering the results.
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_entities(PolicyArn: str, *, EntityFilter: Literal['User', 'Role', 'Group', 'LocalManagedPolicy', 'AWSManagedPolicy'] | None = None, PathPrefix: str | None = None, PolicyUsageFilter: Literal['PermissionsPolicy', 'PermissionsBoundary'] | None = None, Marker: str | None = None, MaxItems: int | None = None) ListEntitiesForPolicyResponse[source]
Lists all IAM users, groups, and roles that the specified managed policy is attached to.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.
- Keyword Arguments:
EntityFilter – The entity type to use for filtering the results.
PathPrefix – The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all entities.
PolicyUsageFilter – The policy usage method to use for filtering the results.
Marker – Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the
Markerelement in the response that you received to indicate where the next call should start.MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_versions(PolicyArn: str, *, MaxItems: int | None = None) list[botocraft.services.iam.IAMPolicyVersion][source]
Lists information about the versions of the specified managed policy, including the version that is currently set as the policy’s default version.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- set_default_version(PolicyArn: str, VersionId: str) None[source]
Sets the specified version of the specified policy as the policy’s default (operative) version.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
VersionId – The version of the policy to set as the default (operative) version.
- class botocraft.services.iam.IAMPolicyVersionManager[source]
Bases:
Boto3ModelManager- create(model: IAMPolicyVersion, SetAsDefault: bool | None = None) IAMPolicyVersion[source]
Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.
- Parameters:
model – The
PolicyVersionto create.- Keyword Arguments:
SetAsDefault – Specifies whether to set this version as the policy’s default version.
- delete(PolicyArn: str, VersionId: str) None[source]
Deletes the specified version from the specified managed policy.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version.
VersionId – The policy version to delete.
- get(PolicyArn: str, VersionId: str) IAMPolicyVersion | None[source]
Retrieves information about the specified version of the specified managed policy, including the policy document.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the managed policy that you want information about.
VersionId – Identifies the policy version to retrieve.
- list(PolicyArn: str, *, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists information about the versions of the specified managed policy, including the version that is currently set as the policy’s default version.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- set_default(PolicyArn: str, VersionId: str) None[source]
Sets the specified version of the specified policy as the policy’s default (operative) version.
- Parameters:
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.
VersionId – The version of the policy to set as the default (operative) version.
- class botocraft.services.iam.IAMRoleManager[source]
Bases:
Boto3ModelManager- add_to_instance_profile(InstanceProfileName: str, RoleName: str) None[source]
Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this quota cannot be increased. You can remove the existing role and then add a different role to an instance profile. You must then wait for the change to appear across all of Amazon Web Services because of eventual consistency. To force the change, you must disassociate the instance profile and then associate the instance profile, or you can stop your instance and then restart it.
- Parameters:
InstanceProfileName – The name of the instance profile to update.
RoleName – The name of the role to add.
- attach_policy(RoleName: str, PolicyArn: str) None[source]
Attach an IAM policy to a role.
- Parameters:
RoleName – The name (friendly name, not ARN) of the role to attach the policy to.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to attach.
- create_service_linked_role(AWSServiceName: str, *, Description: str | None = None, CustomSuffix: str | None = None) IAMRole[source]
Create a service linked role.
- Parameters:
AWSServiceName – The service principal for the Amazon Web Services service to which this role is attached. You use a string similar to a URL but without the http:// in front. For example:
elasticbeanstalk.amazonaws.com.- Keyword Arguments:
Description – The description of the role.
CustomSuffix – A string that you provide, which is combined with the service-provided prefix to form the complete role name. If you make multiple requests for the same service, then you must supply a different
CustomSuffixfor each request. Otherwise the request fails with a duplicate role name error. For example, you could add-1or-debugto the suffix.
- delete(RoleName: str) None[source]
Delete a role.
- Parameters:
RoleName – The name of the role to delete.
- delete_policy(RoleName: str, PolicyName: str) None[source]
Delete an inline policy from a role.
- Parameters:
RoleName – The name (friendly name, not ARN) identifying the role that the policy is embedded in.
PolicyName – The name of the inline policy to delete from the specified IAM role.
- delete_role_permissions_boundary(RoleName: str) None[source]
Deletes the permissions boundary for the specified IAM role.
- Parameters:
RoleName – The name (friendly name, not ARN) of the IAM role from which you want to remove the permissions boundary.
- delete_service_linked_role(RoleName: str) str[source]
Delete a service linked role.
- Parameters:
RoleName – The name of the service-linked role to be deleted.
- detach_policy(RoleName: str, PolicyArn: str) None[source]
Detach an IAM policy from a role.
- Parameters:
RoleName – The name (friendly name, not ARN) of the IAM role to detach the policy from.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to detach.
- get(RoleName: str) IAMRole | None[source]
Retrieves information about the specified role, including the role’s path, GUID, ARN, and the role’s trust policy that grants permission to assume the role. For more information about roles, see IAM roles in the IAM User Guide.
- Parameters:
RoleName – The name of the IAM role to get information about.
- get_policy(RoleName: str, PolicyName: str) GetRolePolicyResponse[source]
Get an inline policy from a role.
- Parameters:
RoleName – The name of the role associated with the policy.
PolicyName – The name of the policy document to get.
- list(*, PathPrefix: str | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about roles, see IAM roles in the IAM User Guide.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. For example, the prefix
/application_abc/component_xyz/gets all roles whose path starts with/application_abc/component_xyz/.MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_attached_policies(RoleName: str, *, PathPrefix: str | None = None, MaxItems: int | None = None) list[botocraft.services.iam.AttachedPolicy][source]
List the attached IAM policies for a role.
- Parameters:
RoleName – The name (friendly name, not ARN) of the role to list attached policies for.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_instance_profiles(RoleName: str, *, MaxItems: int | None = None) list[botocraft.services.iam.InstanceProfile][source]
Lists the instance profiles that have the specified associated IAM role. If there are none, the operation returns an empty list. For more information about instance profiles, go to Using instance profiles in the IAM User Guide.
- Parameters:
RoleName – The name of the role to list instance profiles for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_policies(RoleName: str, *, MaxItems: int | None = None) list[str][source]
List the inline policies attached to a role.
- Parameters:
RoleName – The name of the role to list policies for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- put_policy(RoleName: str, PolicyName: str, PolicyDocument: str) None[source]
Attach an inline policy to a role.
- Parameters:
RoleName – The name of the role to associate the policy with.
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- remove_from_instance_profile(InstanceProfileName: str, RoleName: str) None[source]
Removes the specified IAM role from the specified Amazon EC2 instance profile.
- Parameters:
InstanceProfileName – The name of the instance profile to update.
RoleName – The name of the role to remove.
- update_assume_role_policy(RoleName: str, PolicyDocument: str) None[source]
Updates the policy that grants an IAM entity permission to assume a role. This is typically referred to as the “role trust policy”. For more information about roles, see Using roles to delegate permissions and federate identities.
- Parameters:
RoleName – The name of the role to update with the new policy.
PolicyDocument – The policy that grants an entity permission to assume the role.
- update_description(RoleName: str, Description: str) UpdateRoleDescriptionResponse[source]
Use UpdateRole instead.
- Parameters:
RoleName – The name of the role that you want to modify.
Description – The new description that you want to apply to the specified role.
- class botocraft.services.iam.IAMSSHPublicKeyManager[source]
Bases:
Boto3ModelManager- create(model: IAMSSHPublicKey) IAMSSHPublicKey[source]
Upload an SSH public key.
- Parameters:
model – The
SSHPublicKeyto create.
- delete(UserName: str, SSHPublicKeyId: str) None[source]
Delete an SSH public key.
- Parameters:
UserName – The name of the IAM user associated with the SSH public key.
SSHPublicKeyId – The unique identifier for the SSH public key.
- get(UserName: str, SSHPublicKeyId: str, Encoding: Literal['SSH', 'PEM']) IAMSSHPublicKey | None[source]
Get an SSH public key.
- Parameters:
UserName – The name of the IAM user associated with the SSH public key.
SSHPublicKeyId – The unique identifier for the SSH public key.
Encoding – Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use
SSH. To retrieve the public key in PEM format, usePEM.
- list(UserName: str, *, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
List SSH public keys.
- Parameters:
UserName – The name of the IAM user to list SSH public keys for. If none is specified, the
UserNamefield is determined implicitly based on the Amazon Web Services access key used to sign the request.- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- update(model: IAMSSHPublicKey) None[source]
Update an SSH public key.
- Parameters:
model – The
SSHPublicKeyto update.
- class botocraft.services.iam.IAMUserManager[source]
Bases:
Boto3ModelManager- add_to_group(GroupName: str, UserName: str) None[source]
Add a user to a group.
- Parameters:
GroupName – The name of the group to update.
UserName – The name of the user to add.
- attach_policy(UserName: str, PolicyArn: str) None[source]
Attach an IAM policy to a user.
- Parameters:
UserName – The name (friendly name, not ARN) of the IAM user to attach the policy to.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to attach.
- delete(UserName: str) None[source]
Delete a user.
- Parameters:
UserName – The name of the user to delete.
- delete_permission_boundary(UserName: str) None[source]
Delete a permissions boundary from a user.
- Parameters:
UserName – The name (friendly name, not ARN) of the IAM user from which you want to remove the permissions boundary.
- delete_policy(UserName: str, PolicyName: str) None[source]
Delete an inline policy from a user.
- Parameters:
UserName – The name (friendly name, not ARN) identifying the user that the policy is embedded in.
PolicyName – The name identifying the policy document to delete.
- detach_policy(UserName: str, PolicyArn: str) None[source]
Detach an IAM policy from a user.
- Parameters:
UserName – The name (friendly name, not ARN) of the IAM user to detach the policy from.
PolicyArn – The Amazon Resource Name (ARN) of the IAM policy you want to detach.
- get(UserName: str) IAMUser | None[source]
Retrieves information about the specified IAM user, including the user’s creation date, path, unique ID, and ARN.
- Parameters:
UserName – The name of the user to get information about.
- get_policy(UserName: str, PolicyName: str) GetUserPolicyResponse[source]
Get an inline policy from a user.
- Parameters:
UserName – The name of the user who the policy is associated with.
PolicyName – The name of the policy document to get.
- list(*, PathPrefix: str | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists the IAM users that have the specified path prefix. If no path prefix is specified, the operation returns all users in the Amazon Web Services account. If there are none, the operation returns an empty list.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. For example:
/division_abc/subdivision_xyz/, which would get all user names whose path starts with/division_abc/subdivision_xyz/.MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_attached_policies(UserName: str, *, PathPrefix: str | None = None, MaxItems: int | None = None) list[botocraft.services.iam.AttachedPolicy][source]
Lists all managed policies that are attached to the specified IAM user.
- Parameters:
UserName – The name (friendly name, not ARN) of the user to list attached policies for.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_groups(UserName: str, *, MaxItems: int | None = None) list[botocraft.services.iam.IAMGroup][source]
Lists the IAM groups that the specified IAM user belongs to.
- Parameters:
UserName – The name of the user to list groups for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_policies(UserName: str, *, MaxItems: int | None = None) list[str][source]
Lists the names of the inline policies embedded in the specified IAM user.
- Parameters:
UserName – The name of the user to list policies for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- put_permission_boundary(UserName: str, PermissionsBoundary: str) None[source]
Attach a permissions boundary to a user.
- Parameters:
UserName – The name (friendly name, not ARN) of the IAM user for which you want to set the permissions boundary.
PermissionsBoundary – The ARN of the managed policy that is used to set the permissions boundary for the user.
- put_policy(UserName: str, PolicyName: str, PolicyDocument: str) None[source]
Attach an inline policy to a user.
- Parameters:
UserName – The name of the user to associate the policy with.
PolicyName – The name of the policy document.
PolicyDocument – The policy document.
- remove_from_group(GroupName: str, UserName: str) None[source]
Remove a user from a group.
- Parameters:
GroupName – The name of the group to update.
UserName – The name of the user to remove.
- update(model: IAMUser, NewPath: str | None = None, NewUserName: str | None = None) None[source]
Update a user.
- Parameters:
model – The
Userto update.- Keyword Arguments:
NewPath – New path for the IAM user. Include this parameter only if you’re changing the user’s path.
NewUserName – New name for the user. Include this parameter only if you’re changing the user’s name.
- class botocraft.services.iam.InstanceProfileManager[source]
Bases:
Boto3ModelManager- add_role(InstanceProfileName: str, RoleName: str) None[source]
Add a role to an instance profile.
- Parameters:
InstanceProfileName – The name of the instance profile to update.
RoleName – The name of the role to add.
- create(model: InstanceProfile) InstanceProfile[source]
Create an IAM instance profile.
- Parameters:
model – The
InstanceProfileto create.
- delete(InstanceProfileName: str) None[source]
Delete an IAM instance profile.
- Parameters:
InstanceProfileName – The name of the instance profile to delete.
- get(InstanceProfileName: str) InstanceProfile | None[source]
Retrieves information about the specified instance profile, including the instance profile’s path, GUID, ARN, and role. For more information about instance profiles, see Using instance profiles in the IAM User Guide.
- Parameters:
InstanceProfileName – The name of the instance profile to get information about.
- list(*, PathPrefix: str | None = None, MaxItems: int | None = None) PrimaryBoto3ModelQuerySet[source]
Lists the instance profiles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about instance profiles, see Using instance profiles in the IAM User Guide.
- Keyword Arguments:
PathPrefix – The path prefix for filtering the results. For example, the prefix
/application_abc/component_xyz/gets all instance profiles whose path starts with/application_abc/component_xyz/.MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
- list_for_role(RoleName: str, *, MaxItems: int | None = None) list[botocraft.services.iam.InstanceProfile][source]
Lists the instance profiles that have the specified associated IAM role. If there are none, the operation returns an empty list. For more information about instance profiles, go to Using instance profiles in the IAM User Guide.
- Parameters:
RoleName – The name of the role to list instance profiles for.
- Keyword Arguments:
MaxItems – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the
IsTruncatedresponse element istrue.
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.iam.AttachedPermissionsBoundary[source]
Bases:
Boto3ModelContains information about an attached permissions boundary.
An attached permissions boundary is a managed policy that has been attached to a user or role to set the permissions boundary.
For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
Show JSON schema
{ "title": "AttachedPermissionsBoundary", "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PermissionsBoundaryArn: str | None = None
The ARN of the policy used to set the permissions boundary for the user or role.
- field PermissionsBoundaryType: Literal['PermissionsBoundaryPolicy'] | None = None
The permissions boundary usage type that indicates what type of IAM resource is used as the permissions boundary for an entity.
This data type can only have a value of
Policy.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- set_session(session: Session) None
Set the boto3 session for this model.
- Parameters:
session – The boto3 session to use.
- Returns:
The model instance.
- transform(attribute: str, transformer: str | None) Any
Transform an attribute using a regular expression into something else before it is returned.
Important
This only makes sense for attributes that are strings.
transformeris a regular expression that will be used to transform the value of the attribute.If the attribute is
None, it will be returned verbatim.If
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas named groups, the attribute will be replaced with a dictionary of the named groups.
- Raises:
ValueError – If the attribute does not exist on the model.
RuntimeError – If the transformer fails to match the attribute value.
- Parameters:
attribute – The attribute to transform.
transformer – The regular expression to use to transform the attribute.
- Returns:
The transformed attribute.
- pydantic model botocraft.services.iam.IAMRoleLastUsed[source]
Bases:
Boto3ModelContains information about the last time that an IAM role was used. This includes the date and time and the Region in which the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your Region began supporting these features within the last year. The role might have been used more than 400 days ago. For more information, see Regions where data is tracked in the IAM user Guide.
This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails operations.
Show JSON schema
{ "title": "IAMRoleLastUsed", "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field LastUsedDate: datetime | None = None
The date and time, in ISO 8601 date-time format that the role was last used.
- field Region: str | None = None
The name of the Amazon Web Services Region in which the role was last 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.
- 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.iam.IAMTag[source]
Bases:
Boto3ModelA structure that represents user-provided metadata that can be associated with an IAM resource.
For more information about tagging, see Tagging IAM resources in the IAM User Guide.
Show JSON schema
{ "title": "IAMTag", "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Key: str [Required]
The key name that can be used to look up or retrieve the associated value.
For example,
DepartmentorCost Centerare common choices.
- field Value: str [Required]
The value associated with this tag.
For example, tags with a key name of
Departmentcould have values such asHuman Resources,Accounting, andSupport. Tags with a key name ofCost Centermight have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different 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
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.iam.AccessKeyMetadata[source]
Bases:
Boto3ModelContains information about an Amazon Web Services access key, without its secret key.
This data type is used as a response element in the ListAccessKeys operation.
Show JSON schema
{ "title": "AccessKeyMetadata", "description": "Contains information about an Amazon Web Services access key, without its secret\nkey.\n\nThis data type is used as a response element in the\n`ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_\noperation.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "AccessKeyId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Accesskeyid" }, "Status": { "anyOf": [ { "enum": [ "Active", "Inactive", "Expired" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Status" }, "CreateDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdate" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Status: Literal['Active', 'Inactive', 'Expired'] | None = None
The status of the access key.
Activemeans that the key is valid for API calls;Inactivemeans it is not.
- 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.iam.AttachedPolicy[source]
Bases:
Boto3ModelContains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and ` GetAccountAuthorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIR eference/API_GetAccountAuthorizationDetails.h tml>`_ operations.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "AttachedPolicy", "description": "Contains information about an attached policy.\n\nAn attached policy is a managed policy that has been attached to a user, group, or\nrole. This data type is used as a response element in the\n`ListAttachedGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedGroupPolicies.html>`_,\n`ListAttachedRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedRolePolicies.html>`_,\n`ListAttachedUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedUserPolicies.html>`_,\nand ` GetAccountAuthorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIR\neference/API_GetAccountAuthorizationDetails.h tml>`_ operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyarn" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PolicyArn: str | None = None
The Amazon Resource Name (ARN).
ARNs are unique identifiers for Amazon Web Services resources.
- 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.iam.CreateAccessKeyResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateAccessKey request.
Show JSON schema
{ "title": "CreateAccessKeyResponse", "description": "Contains the response to a successful\n`CreateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AccessKey": { "$ref": "#/$defs/IAMAccessKey" } }, "$defs": { "IAMAccessKey": { "description": "Contains information about an Amazon Web Services access key.\n\nThis data type is used as a response element in the\n`CreateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html>`_ and\n`ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_ operations.\n\nThe ``SecretAccessKey`` value is returned only in response to\n`CreateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html>`_. You can get a secret\naccess key only when you first create an access key; you cannot recover the secret access key later. If you lose a\nsecret access key, you must create a new access key.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "AccessKeyId": { "title": "Accesskeyid", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "SecretAccessKey": { "title": "Secretaccesskey", "type": "string" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "UserName", "AccessKeyId", "Status", "SecretAccessKey" ], "title": "IAMAccessKey", "type": "object" } }, "required": [ "AccessKey" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AccessKey: IAMAccessKey [Required]
A structure with details about the access key.
- 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.iam.CreateGroupResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateGroup request.
Show JSON schema
{ "title": "CreateGroupResponse", "description": "Contains the response to a successful\n`CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Group": { "$ref": "#/$defs/IAMGroup" } }, "$defs": { "IAMGroup": { "description": "Contains information about an IAM group entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_\n* `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\n* `ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "GroupName": { "title": "Groupname", "type": "string" }, "GroupId": { "title": "Groupid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "Path", "GroupName", "GroupId", "Arn", "CreateDate" ], "title": "IAMGroup", "type": "object" } }, "required": [ "Group" ] }
- 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.iam.CreateInstanceProfileResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateInstanceProfile request.
Show JSON schema
{ "title": "CreateInstanceProfileResponse", "description": "Contains the response to a successful\n`CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InstanceProfile": { "$ref": "#/$defs/InstanceProfile" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "InstanceProfile": { "description": "Contains information about an instance profile.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_\n* `GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_\n* `ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_\n*\n `ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "InstanceProfileName": { "title": "Instanceprofilename", "type": "string" }, "InstanceProfileId": { "title": "Instanceprofileid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "InstanceProfileName", "InstanceProfileId", "Arn", "CreateDate", "Roles" ], "title": "InstanceProfile", "type": "object" } }, "required": [ "InstanceProfile" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field InstanceProfile: InstanceProfile [Required]
A structure containing details about the new instance profile.
- 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.iam.CreateLoginProfileResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateLoginProfile request.
Show JSON schema
{ "title": "CreateLoginProfileResponse", "description": "Contains the response to a successful\n`CreateLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateLoginProfile.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LoginProfile": { "$ref": "#/$defs/IAMLoginProfile" } }, "$defs": { "IAMLoginProfile": { "description": "Contains the user name and password create date for a user.\n\nThis data type is used as a response element in the\n`CreateLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateLoginProfile.html>`_\nand\n`GetLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetLoginProfile.html>`_\noperations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordResetRequired": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Passwordresetrequired" } }, "required": [ "UserName", "CreateDate" ], "title": "IAMLoginProfile", "type": "object" } }, "required": [ "LoginProfile" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field LoginProfile: IAMLoginProfile [Required]
A structure containing the user name and password create date.
- 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.iam.CreatePolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful CreatePolicy request.
Show JSON schema
{ "title": "CreatePolicyResponse", "description": "Contains the response to a successful\n`CreatePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Policy": { "anyOf": [ { "$ref": "#/$defs/IAMPolicy" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMPolicy": { "description": "Contains information about a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html>`_,\n`GetPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html>`_,\nand\n`ListPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html>`_\noperations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyId": { "default": null, "title": "Policyid", "type": "string" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Path" }, "DefaultVersionId": { "default": null, "title": "Defaultversionid", "type": "string" }, "AttachmentCount": { "default": null, "title": "Attachmentcount", "type": "integer" }, "PermissionsBoundaryUsageCount": { "default": null, "title": "Permissionsboundaryusagecount", "type": "integer" }, "IsAttachable": { "default": null, "title": "Isattachable", "type": "boolean" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" }, "UpdateDate": { "default": null, "format": "date-time", "title": "Updatedate", "type": "string" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "title": "IAMPolicy", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- 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.iam.CreatePolicyVersionResponse[source]
Bases:
Boto3ModelContains the response to a successful CreatePolicyVersion request.
Show JSON schema
{ "title": "CreatePolicyVersionResponse", "description": "Contains the response to a successful\n`CreatePolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicyVersion.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyVersion": { "anyOf": [ { "$ref": "#/$defs/IAMPolicyVersion" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMPolicyVersion": { "description": "Contains information about a version of a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicyVersion.html>`_,\n`GetPolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicyVersion.html>`_,\n`ListPolicyVersions <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicyVersions.html>`_,\nand\n`GetAccountAu thorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_\n operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Document": { "default": null, "title": "Document", "type": "string" }, "VersionId": { "default": null, "title": "Versionid", "type": "string" }, "IsDefaultVersion": { "default": null, "title": "Isdefaultversion", "type": "boolean" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } }, "title": "IAMPolicyVersion", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PolicyVersion: IAMPolicyVersion | None = None
A structure containing details about the new policy 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
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.iam.CreateRoleResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateRole request.
Show JSON schema
{ "title": "CreateRoleResponse", "description": "Contains the response to a successful\n`CreateRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Role": { "$ref": "#/$defs/IAMRole" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Role" ] }
- 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.iam.CreateServiceLinkedRoleResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "CreateServiceLinkedRoleResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Role": { "anyOf": [ { "$ref": "#/$defs/IAMRole" }, { "type": "null" } ], "default": null } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Role: IAMRole | None = None
A Role object that contains details about the newly created role.
- 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.iam.CreateUserResponse[source]
Bases:
Boto3ModelContains the response to a successful CreateUser request.
Show JSON schema
{ "title": "CreateUserResponse", "description": "Contains the response to a successful\n`CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "User": { "anyOf": [ { "$ref": "#/$defs/IAMUser" }, { "type": "null" } ], "default": null } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "IAMUser": { "description": "Contains information about an IAM user entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_\n* `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\n* `ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "UserName": { "title": "Username", "type": "string" }, "UserId": { "title": "Userid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordLastUsed": { "default": null, "format": "date-time", "title": "Passwordlastused", "type": "string" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "UserName", "UserId", "Arn", "CreateDate" ], "title": "IAMUser", "type": "object" } } }
- 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.iam.DeleteServiceLinkedRoleResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "DeleteServiceLinkedRoleResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "DeletionTaskId": { "title": "Deletiontaskid", "type": "string" } }, "required": [ "DeletionTaskId" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field DeletionTaskId: str [Required]
The deletion task identifier that you can use to check the status of the deletion.
This identifier is returned in the format
task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid>.
- 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.iam.GetAccessKeyLastUsedResponse[source]
Bases:
Boto3ModelContains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action.
Show JSON schema
{ "title": "GetAccessKeyLastUsedResponse", "description": "Contains the response to a successful\n`GetAccessKeyLastUsed <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccessKeyLastUsed.html>`_ request. It is\nalso returned as a member of the\n`AccessKeyMetaData <https://docs.aws.amazon.com/IAM/latest/APIReference/API_AccessKeyMetaData.html>`_ structure returned\nby the `ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_ action.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "AccessKeyLastUsed": { "anyOf": [ { "$ref": "#/$defs/IAMAccessKeyLastUsed" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMAccessKeyLastUsed": { "description": "Contains information about the last time an Amazon Web Services access key was used\nsince IAM began tracking this information on April 22, 2015.\n\nThis data type is used as a response element in the\n`GetAccessKeyLastUsed <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccessKeyLastUsed.html>`_\noperation.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "ServiceName": { "title": "Servicename", "type": "string" }, "Region": { "title": "Region", "type": "string" } }, "required": [ "ServiceName", "Region" ], "title": "IAMAccessKeyLastUsed", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AccessKeyLastUsed: IAMAccessKeyLastUsed | None = None
Contains information about the last time the access key was 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.
- 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.iam.GetGroupPolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful GetGroupPolicy request.
Show JSON schema
{ "title": "GetGroupPolicyResponse", "description": "Contains the response to a successful\n`GetGroupPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroupPolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GroupName": { "title": "Groupname", "type": "string" }, "PolicyName": { "title": "Policyname", "type": "string" }, "PolicyDocument": { "title": "Policydocument", "type": "string" } }, "required": [ "GroupName", "PolicyName", "PolicyDocument" ] }
- 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.iam.GetGroupResponse[source]
Bases:
Boto3ModelContains the response to a successful GetGroup request.
Show JSON schema
{ "title": "GetGroupResponse", "description": "Contains the response to a successful `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Group": { "$ref": "#/$defs/IAMGroup" }, "Users": { "items": { "$ref": "#/$defs/IAMUser" }, "title": "Users", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMGroup": { "description": "Contains information about an IAM group entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_\n* `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\n* `ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "GroupName": { "title": "Groupname", "type": "string" }, "GroupId": { "title": "Groupid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "Path", "GroupName", "GroupId", "Arn", "CreateDate" ], "title": "IAMGroup", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "IAMUser": { "description": "Contains information about an IAM user entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_\n* `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\n* `ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "UserName": { "title": "Username", "type": "string" }, "UserId": { "title": "Userid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordLastUsed": { "default": null, "format": "date-time", "title": "Passwordlastused", "type": "string" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "UserName", "UserId", "Arn", "CreateDate" ], "title": "IAMUser", "type": "object" } }, "required": [ "Group", "Users" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.GetInstanceProfileResponse[source]
Bases:
Boto3ModelContains the response to a successful GetInstanceProfile request.
Show JSON schema
{ "title": "GetInstanceProfileResponse", "description": "Contains the response to a successful\n`GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InstanceProfile": { "$ref": "#/$defs/InstanceProfile" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "InstanceProfile": { "description": "Contains information about an instance profile.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_\n* `GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_\n* `ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_\n*\n `ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "InstanceProfileName": { "title": "Instanceprofilename", "type": "string" }, "InstanceProfileId": { "title": "Instanceprofileid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "InstanceProfileName", "InstanceProfileId", "Arn", "CreateDate", "Roles" ], "title": "InstanceProfile", "type": "object" } }, "required": [ "InstanceProfile" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field InstanceProfile: InstanceProfile [Required]
A structure containing details about the instance profile.
- 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.iam.GetLoginProfileResponse[source]
Bases:
Boto3ModelContains the response to a successful GetLoginProfile request.
Show JSON schema
{ "title": "GetLoginProfileResponse", "description": "Contains the response to a successful\n`GetLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetLoginProfile.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LoginProfile": { "$ref": "#/$defs/IAMLoginProfile" } }, "$defs": { "IAMLoginProfile": { "description": "Contains the user name and password create date for a user.\n\nThis data type is used as a response element in the\n`CreateLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateLoginProfile.html>`_\nand\n`GetLoginProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetLoginProfile.html>`_\noperations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordResetRequired": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Passwordresetrequired" } }, "required": [ "UserName", "CreateDate" ], "title": "IAMLoginProfile", "type": "object" } }, "required": [ "LoginProfile" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field LoginProfile: IAMLoginProfile [Required]
A structure containing the user name and the profile creation date for the user.
- 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.iam.GetPolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful GetPolicy request.
Show JSON schema
{ "title": "GetPolicyResponse", "description": "Contains the response to a successful\n`GetPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Policy": { "anyOf": [ { "$ref": "#/$defs/IAMPolicy" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMPolicy": { "description": "Contains information about a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html>`_,\n`GetPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html>`_,\nand\n`ListPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html>`_\noperations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyId": { "default": null, "title": "Policyid", "type": "string" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Path" }, "DefaultVersionId": { "default": null, "title": "Defaultversionid", "type": "string" }, "AttachmentCount": { "default": null, "title": "Attachmentcount", "type": "integer" }, "PermissionsBoundaryUsageCount": { "default": null, "title": "Permissionsboundaryusagecount", "type": "integer" }, "IsAttachable": { "default": null, "title": "Isattachable", "type": "boolean" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" }, "UpdateDate": { "default": null, "format": "date-time", "title": "Updatedate", "type": "string" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "title": "IAMPolicy", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- 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.iam.GetPolicyVersionResponse[source]
Bases:
Boto3ModelContains the response to a successful GetPolicyVersion request.
Show JSON schema
{ "title": "GetPolicyVersionResponse", "description": "Contains the response to a successful\n`GetPolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicyVersion.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyVersion": { "anyOf": [ { "$ref": "#/$defs/IAMPolicyVersion" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMPolicyVersion": { "description": "Contains information about a version of a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicyVersion.html>`_,\n`GetPolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicyVersion.html>`_,\n`ListPolicyVersions <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicyVersions.html>`_,\nand\n`GetAccountAu thorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_\n operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Document": { "default": null, "title": "Document", "type": "string" }, "VersionId": { "default": null, "title": "Versionid", "type": "string" }, "IsDefaultVersion": { "default": null, "title": "Isdefaultversion", "type": "boolean" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } }, "title": "IAMPolicyVersion", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field PolicyVersion: IAMPolicyVersion | None = None
A structure containing details about the policy 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
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.iam.GetRolePolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful GetRolePolicy request.
Show JSON schema
{ "title": "GetRolePolicyResponse", "description": "Contains the response to a successful\n`GetRolePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRolePolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RoleName": { "title": "Rolename", "type": "string" }, "PolicyName": { "title": "Policyname", "type": "string" }, "PolicyDocument": { "title": "Policydocument", "type": "string" } }, "required": [ "RoleName", "PolicyName", "PolicyDocument" ] }
- 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.iam.GetRoleResponse[source]
Bases:
Boto3ModelContains the response to a successful GetRole request.
Show JSON schema
{ "title": "GetRoleResponse", "description": "Contains the response to a successful `GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Role": { "$ref": "#/$defs/IAMRole" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Role" ] }
- 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.iam.GetSSHPublicKeyResponse[source]
Bases:
Boto3ModelContains the response to a successful GetSSHPublicKey request.
Show JSON schema
{ "title": "GetSSHPublicKeyResponse", "description": "Contains the response to a successful\n`GetSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetSSHPublicKey.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SSHPublicKey": { "anyOf": [ { "$ref": "#/$defs/IAMSSHPublicKey" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMSSHPublicKey": { "description": "Contains information about an SSH public key.\n\nThis data type is used as a response element in the\n`GetSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetSSHPublicKey.html>`_\nand\n`UploadSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_UploadSSHPublicKey.html>`_\noperations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "SSHPublicKeyId": { "title": "Sshpublickeyid", "type": "string" }, "Fingerprint": { "title": "Fingerprint", "type": "string" }, "SSHPublicKeyBody": { "title": "Sshpublickeybody", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "UploadDate": { "default": null, "format": "date-time", "title": "Uploaddate", "type": "string" } }, "required": [ "UserName", "SSHPublicKeyId", "Fingerprint", "SSHPublicKeyBody", "Status" ], "title": "IAMSSHPublicKey", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field SSHPublicKey: IAMSSHPublicKey | None = None
A structure containing details about the SSH public key.
- 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.iam.GetUserPolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful GetUserPolicy request.
Show JSON schema
{ "title": "GetUserPolicyResponse", "description": "Contains the response to a successful\n`GetUserPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUserPolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "PolicyName": { "title": "Policyname", "type": "string" }, "PolicyDocument": { "title": "Policydocument", "type": "string" } }, "required": [ "UserName", "PolicyName", "PolicyDocument" ] }
- 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.iam.GetUserResponse[source]
Bases:
Boto3ModelContains the response to a successful GetUser request.
Show JSON schema
{ "title": "GetUserResponse", "description": "Contains the response to a successful `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "User": { "$ref": "#/$defs/IAMUser" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "IAMUser": { "description": "Contains information about an IAM user entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_\n* `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\n* `ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "UserName": { "title": "Username", "type": "string" }, "UserId": { "title": "Userid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordLastUsed": { "default": null, "format": "date-time", "title": "Passwordlastused", "type": "string" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "UserName", "UserId", "Arn", "CreateDate" ], "title": "IAMUser", "type": "object" } }, "required": [ "User" ] }
- 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.iam.IAMAccessKeyLastUsed[source]
Bases:
Boto3ModelContains information about the last time an Amazon Web Services access key was used since IAM began tracking this information on April 22, 2015.
This data type is used as a response element in the GetAccessKeyLastUsed operation.
Show JSON schema
{ "title": "IAMAccessKeyLastUsed", "description": "Contains information about the last time an Amazon Web Services access key was used\nsince IAM began tracking this information on April 22, 2015.\n\nThis data type is used as a response element in the\n`GetAccessKeyLastUsed <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccessKeyLastUsed.html>`_\noperation.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "ServiceName": { "title": "Servicename", "type": "string" }, "Region": { "title": "Region", "type": "string" } }, "required": [ "ServiceName", "Region" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field LastUsedDate: datetime | None = None
The date and time, in ISO 8601 date-time format, when the access key was most recently used. This field is null in the following situations:
- field Region: str [Required]
The Amazon Web Services Region where this access key was most recently used.
The value for this field is “N/A” in the following situations:
- field ServiceName: str [Required]
The name of the Amazon Web Services service with which this access key was most recently used.
The value of this field is “N/A” in the following situations:
- 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.iam.ListAccessKeysResponse[source]
Bases:
Boto3ModelContains the response to a successful ListAccessKeys request.
Show JSON schema
{ "title": "ListAccessKeysResponse", "description": "Contains the response to a successful\n`ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AccessKeyMetadata": { "items": { "$ref": "#/$defs/AccessKeyMetadata" }, "title": "Accesskeymetadata", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AccessKeyMetadata": { "description": "Contains information about an Amazon Web Services access key, without its secret\nkey.\n\nThis data type is used as a response element in the\n`ListAccessKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html>`_\noperation.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "AccessKeyId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Accesskeyid" }, "Status": { "anyOf": [ { "enum": [ "Active", "Inactive", "Expired" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Status" }, "CreateDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Createdate" } }, "title": "AccessKeyMetadata", "type": "object" } }, "required": [ "AccessKeyMetadata" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AccessKeyMetadata: builtins.list[AccessKeyMetadata] [Required]
A list of objects containing metadata about the access keys.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListAttachedGroupPoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListAttachedGroupPolicies request.
Show JSON schema
{ "title": "ListAttachedGroupPoliciesResponse", "description": "Contains the response to a successful\n`ListAttachedGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedGroupPolicies.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AttachedPolicies": { "anyOf": [ { "items": { "$ref": "#/$defs/AttachedPolicy" }, "type": "array" }, { "type": "null" } ], "title": "Attachedpolicies" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPolicy": { "description": "Contains information about an attached policy.\n\nAn attached policy is a managed policy that has been attached to a user, group, or\nrole. This data type is used as a response element in the\n`ListAttachedGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedGroupPolicies.html>`_,\n`ListAttachedRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedRolePolicies.html>`_,\n`ListAttachedUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedUserPolicies.html>`_,\nand ` GetAccountAuthorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIR\neference/API_GetAccountAuthorizationDetails.h tml>`_ operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyarn" } }, "title": "AttachedPolicy", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AttachedPolicies: builtins.list[AttachedPolicy] | None [Optional]
A list of the attached policies.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListAttachedRolePoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListAttachedRolePolicies request.
Show JSON schema
{ "title": "ListAttachedRolePoliciesResponse", "description": "Contains the response to a successful\n`ListAttachedRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedRolePolicies.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AttachedPolicies": { "anyOf": [ { "items": { "$ref": "#/$defs/AttachedPolicy" }, "type": "array" }, { "type": "null" } ], "title": "Attachedpolicies" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPolicy": { "description": "Contains information about an attached policy.\n\nAn attached policy is a managed policy that has been attached to a user, group, or\nrole. This data type is used as a response element in the\n`ListAttachedGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedGroupPolicies.html>`_,\n`ListAttachedRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedRolePolicies.html>`_,\n`ListAttachedUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedUserPolicies.html>`_,\nand ` GetAccountAuthorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIR\neference/API_GetAccountAuthorizationDetails.h tml>`_ operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyarn" } }, "title": "AttachedPolicy", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AttachedPolicies: builtins.list[AttachedPolicy] | None [Optional]
A list of the attached policies.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListAttachedUserPoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListAttachedUserPolicies request.
Show JSON schema
{ "title": "ListAttachedUserPoliciesResponse", "description": "Contains the response to a successful\n`ListAttachedUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedUserPolicies.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AttachedPolicies": { "anyOf": [ { "items": { "$ref": "#/$defs/AttachedPolicy" }, "type": "array" }, { "type": "null" } ], "title": "Attachedpolicies" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPolicy": { "description": "Contains information about an attached policy.\n\nAn attached policy is a managed policy that has been attached to a user, group, or\nrole. This data type is used as a response element in the\n`ListAttachedGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedGroupPolicies.html>`_,\n`ListAttachedRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedRolePolicies.html>`_,\n`ListAttachedUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAttachedUserPolicies.html>`_,\nand ` GetAccountAuthorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIR\neference/API_GetAccountAuthorizationDetails.h tml>`_ operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyarn" } }, "title": "AttachedPolicy", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field AttachedPolicies: builtins.list[AttachedPolicy] | None [Optional]
A list of the attached policies.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListEntitiesForPolicyResponse[source]
Bases:
Boto3ModelContains the response to a successful ListEntitiesForPolicy request.
Show JSON schema
{ "title": "ListEntitiesForPolicyResponse", "description": "Contains the response to a successful\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyGroups": { "anyOf": [ { "items": { "$ref": "#/$defs/PolicyGroup" }, "type": "array" }, { "type": "null" } ], "title": "Policygroups" }, "PolicyUsers": { "anyOf": [ { "items": { "$ref": "#/$defs/PolicyUser" }, "type": "array" }, { "type": "null" } ], "title": "Policyusers" }, "PolicyRoles": { "anyOf": [ { "items": { "$ref": "#/$defs/PolicyRole" }, "type": "array" }, { "type": "null" } ], "title": "Policyroles" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "PolicyGroup": { "description": "Contains information about a group that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GroupName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groupname" }, "GroupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groupid" } }, "title": "PolicyGroup", "type": "object" }, "PolicyRole": { "description": "Contains information about a role that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RoleName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rolename" }, "RoleId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Roleid" } }, "title": "PolicyRole", "type": "object" }, "PolicyUser": { "description": "Contains information about a user that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "UserId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Userid" } }, "title": "PolicyUser", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination request.
- field PolicyGroups: builtins.list[PolicyGroup] | None [Optional]
A list of IAM groups that the policy is attached to.
- field PolicyRoles: builtins.list[PolicyRole] | None [Optional]
A list of IAM roles that the policy is attached to.
- field PolicyUsers: builtins.list[PolicyUser] | None [Optional]
A list of IAM users that the policy is attached to.
- 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.iam.ListGroupPoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListGroupPolicies request.
Show JSON schema
{ "title": "ListGroupPoliciesResponse", "description": "Contains the response to a successful\n`ListGroupPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroupPolicies.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyNames": { "items": { "type": "string" }, "title": "Policynames", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "required": [ "PolicyNames" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListGroupsForUserResponse[source]
Bases:
Boto3ModelContains the response to a successful ListGroupsForUser request.
Show JSON schema
{ "title": "ListGroupsForUserResponse", "description": "Contains the response to a successful\n`ListGroupsForUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroupsForUser.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Groups": { "items": { "$ref": "#/$defs/IAMGroup" }, "title": "Groups", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "IAMGroup": { "description": "Contains information about an IAM group entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_\n* `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\n* `ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "GroupName": { "title": "Groupname", "type": "string" }, "GroupId": { "title": "Groupid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "Path", "GroupName", "GroupId", "Arn", "CreateDate" ], "title": "IAMGroup", "type": "object" } }, "required": [ "Groups" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListGroupsResponse[source]
Bases:
Boto3ModelContains the response to a successful ListGroups request.
Show JSON schema
{ "title": "ListGroupsResponse", "description": "Contains the response to a successful\n`ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Groups": { "items": { "$ref": "#/$defs/IAMGroup" }, "title": "Groups", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "IAMGroup": { "description": "Contains information about an IAM group entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html>`_\n* `GetGroup <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroup.html>`_\n* `ListGroups <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListGroups.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "GroupName": { "title": "Groupname", "type": "string" }, "GroupId": { "title": "Groupid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" } }, "required": [ "Path", "GroupName", "GroupId", "Arn", "CreateDate" ], "title": "IAMGroup", "type": "object" } }, "required": [ "Groups" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListInstanceProfilesForRoleResponse[source]
Bases:
Boto3ModelContains the response to a successful ListInstanceProfilesForRole request.
Show JSON schema
{ "title": "ListInstanceProfilesForRoleResponse", "description": "Contains the response to a successful\n`ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_\nrequest.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InstanceProfiles": { "items": { "$ref": "#/$defs/InstanceProfile" }, "title": "Instanceprofiles", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "InstanceProfile": { "description": "Contains information about an instance profile.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_\n* `GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_\n* `ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_\n*\n `ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "InstanceProfileName": { "title": "Instanceprofilename", "type": "string" }, "InstanceProfileId": { "title": "Instanceprofileid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "InstanceProfileName", "InstanceProfileId", "Arn", "CreateDate", "Roles" ], "title": "InstanceProfile", "type": "object" } }, "required": [ "InstanceProfiles" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field InstanceProfiles: builtins.list[InstanceProfile] [Required]
A list of instance profiles.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListInstanceProfilesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListInstanceProfiles request.
Show JSON schema
{ "title": "ListInstanceProfilesResponse", "description": "Contains the response to a successful\n`ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "InstanceProfiles": { "items": { "$ref": "#/$defs/InstanceProfile" }, "title": "Instanceprofiles", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "InstanceProfile": { "description": "Contains information about an instance profile.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateInstanceProfile.html>`_\n* `GetInstanceProfile <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetInstanceProfile.html>`_\n* `ListInstanceProfiles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html>`_\n*\n `ListInstanceProfilesForRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfilesForRole.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "InstanceProfileName": { "title": "Instanceprofilename", "type": "string" }, "InstanceProfileId": { "title": "Instanceprofileid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "InstanceProfileName", "InstanceProfileId", "Arn", "CreateDate", "Roles" ], "title": "InstanceProfile", "type": "object" } }, "required": [ "InstanceProfiles" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field InstanceProfiles: builtins.list[InstanceProfile] [Required]
A list of instance profiles.
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListPoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListPolicies request.
Show JSON schema
{ "title": "ListPoliciesResponse", "description": "Contains the response to a successful\n`ListPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Policies": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMPolicy" }, "type": "array" }, { "type": "null" } ], "title": "Policies" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "IAMPolicy": { "description": "Contains information about a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html>`_,\n`GetPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html>`_,\nand\n`ListPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicies.html>`_\noperations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Policyname" }, "PolicyId": { "default": null, "title": "Policyid", "type": "string" }, "Arn": { "default": null, "title": "Arn", "type": "string" }, "Path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Path" }, "DefaultVersionId": { "default": null, "title": "Defaultversionid", "type": "string" }, "AttachmentCount": { "default": null, "title": "Attachmentcount", "type": "integer" }, "PermissionsBoundaryUsageCount": { "default": null, "title": "Permissionsboundaryusagecount", "type": "integer" }, "IsAttachable": { "default": null, "title": "Isattachable", "type": "boolean" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" }, "UpdateDate": { "default": null, "format": "date-time", "title": "Updatedate", "type": "string" }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "title": "IAMPolicy", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListPolicyVersionsResponse[source]
Bases:
Boto3ModelContains the response to a successful ListPolicyVersions request.
Show JSON schema
{ "title": "ListPolicyVersionsResponse", "description": "Contains the response to a successful\n`ListPolicyVersions <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicyVersions.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Versions": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMPolicyVersion" }, "type": "array" }, { "type": "null" } ], "title": "Versions" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "IAMPolicyVersion": { "description": "Contains information about a version of a managed policy.\n\nThis data type is used as a response element in the\n`CreatePolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicyVersion.html>`_,\n`GetPolicyVersion <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicyVersion.html>`_,\n`ListPolicyVersions <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListPolicyVersions.html>`_,\nand\n`GetAccountAu thorizationDetails <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_\n operations.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Document": { "default": null, "title": "Document", "type": "string" }, "VersionId": { "default": null, "title": "Versionid", "type": "string" }, "IsDefaultVersion": { "default": null, "title": "Isdefaultversion", "type": "boolean" }, "CreateDate": { "default": null, "format": "date-time", "title": "Createdate", "type": "string" } }, "title": "IAMPolicyVersion", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination request.
- field Versions: builtins.list[IAMPolicyVersion] | None [Optional]
A list of policy versions.
- 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.iam.ListRolePoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListRolePolicies request.
Show JSON schema
{ "title": "ListRolePoliciesResponse", "description": "Contains the response to a successful\n`ListRolePolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListRolePolicies.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyNames": { "items": { "type": "string" }, "title": "Policynames", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "required": [ "PolicyNames" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListRolesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListRoles request.
Show JSON schema
{ "title": "ListRolesResponse", "description": "Contains the response to a successful\n`ListRoles <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListRoles.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Roles": { "items": { "$ref": "#/$defs/IAMRole" }, "title": "Roles", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } }, "required": [ "Roles" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListSSHPublicKeysResponse[source]
Bases:
Boto3ModelContains the response to a successful ListSSHPublicKeys request.
Show JSON schema
{ "title": "ListSSHPublicKeysResponse", "description": "Contains the response to a successful\n`ListSSHPublicKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListSSHPublicKeys.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SSHPublicKeys": { "anyOf": [ { "items": { "$ref": "#/$defs/SSHPublicKeyMetadata" }, "type": "array" }, { "type": "null" } ], "title": "Sshpublickeys" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "SSHPublicKeyMetadata": { "description": "Contains information about an SSH public key, without the key's body or fingerprint.\n\nThis data type is used as a response element in the\n`ListSSHPublicKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListSSHPublicKeys.html>`_\noperation.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "SSHPublicKeyId": { "title": "Sshpublickeyid", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "UploadDate": { "format": "date-time", "title": "Uploaddate", "type": "string" } }, "required": [ "UserName", "SSHPublicKeyId", "Status", "UploadDate" ], "title": "SSHPublicKeyMetadata", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination request.
- field SSHPublicKeys: builtins.list[SSHPublicKeyMetadata] | None [Optional]
A list of the SSH public keys assigned to IAM user.
- 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.iam.ListUserPoliciesResponse[source]
Bases:
Boto3ModelContains the response to a successful ListUserPolicies request.
Show JSON schema
{ "title": "ListUserPoliciesResponse", "description": "Contains the response to a successful\n`ListUserPolicies <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUserPolicies.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PolicyNames": { "items": { "type": "string" }, "title": "Policynames", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "required": [ "PolicyNames" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.ListUsersResponse[source]
Bases:
Boto3ModelContains the response to a successful ListUsers request.
Show JSON schema
{ "title": "ListUsersResponse", "description": "Contains the response to a successful\n`ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Users": { "items": { "$ref": "#/$defs/IAMUser" }, "title": "Users", "type": "array" }, "IsTruncated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Istruncated" }, "Marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Marker" } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" }, "IAMUser": { "description": "Contains information about an IAM user entity.\n\nThis data type is used as a response element in the following operations:\n\n* `CreateUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html>`_\n* `GetUser <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html>`_\n* `ListUsers <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html>`_", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Path": { "title": "Path", "type": "string" }, "UserName": { "title": "Username", "type": "string" }, "UserId": { "title": "Userid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "PasswordLastUsed": { "default": null, "format": "date-time", "title": "Passwordlastused", "type": "string" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "required": [ "Path", "UserName", "UserId", "Arn", "CreateDate" ], "title": "IAMUser", "type": "object" } }, "required": [ "Users" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field IsTruncated: bool | None = None
A flag that indicates whether there are more items to return.
If your results were truncated, you can make a subsequent pagination request using the
Markerrequest parameter to retrieve more items. Note that IAM might return fewer than theMaxItemsnumber of results even when there are more results available. We recommend that you checkIsTruncatedafter every call to ensure that you receive all your results.
- field Marker: str | None = None
When
IsTruncatedistrue, this element is present and contains the value to use for theMarkerparameter in a subsequent pagination 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
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.iam.PolicyGroup[source]
Bases:
Boto3ModelContains information about a group that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy operation.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "PolicyGroup", "description": "Contains information about a group that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "GroupName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groupname" }, "GroupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groupid" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field GroupId: str | None = None
The stable and unique string identifying the group.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- set_session(session: Session) None
Set the boto3 session for this model.
- Parameters:
session – The boto3 session to use.
- Returns:
The model instance.
- transform(attribute: str, transformer: str | None) Any
Transform an attribute using a regular expression into something else before it is returned.
Important
This only makes sense for attributes that are strings.
transformeris a regular expression that will be used to transform the value of the attribute.If the attribute is
None, it will be returned verbatim.If
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas named groups, the attribute will be replaced with a dictionary of the named groups.
- Raises:
ValueError – If the attribute does not exist on the model.
RuntimeError – If the transformer fails to match the attribute value.
- Parameters:
attribute – The attribute to transform.
transformer – The regular expression to use to transform the attribute.
- Returns:
The transformed attribute.
- pydantic model botocraft.services.iam.PolicyRole[source]
Bases:
Boto3ModelContains information about a role that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy operation.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "PolicyRole", "description": "Contains information about a role that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "RoleName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Rolename" }, "RoleId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Roleid" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field RoleId: str | None = None
The stable and unique string identifying the role.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- set_session(session: Session) None
Set the boto3 session for this model.
- Parameters:
session – The boto3 session to use.
- Returns:
The model instance.
- transform(attribute: str, transformer: str | None) Any
Transform an attribute using a regular expression into something else before it is returned.
Important
This only makes sense for attributes that are strings.
transformeris a regular expression that will be used to transform the value of the attribute.If the attribute is
None, it will be returned verbatim.If
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas named groups, the attribute will be replaced with a dictionary of the named groups.
- Raises:
ValueError – If the attribute does not exist on the model.
RuntimeError – If the transformer fails to match the attribute value.
- Parameters:
attribute – The attribute to transform.
transformer – The regular expression to use to transform the attribute.
- Returns:
The transformed attribute.
- pydantic model botocraft.services.iam.PolicyUser[source]
Bases:
Boto3ModelContains information about a user that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy operation.
For more information about managed policies, refer to Managed policies and inline policies in the IAM User Guide.
Show JSON schema
{ "title": "PolicyUser", "description": "Contains information about a user that a managed policy is attached to.\n\nThis data type is used as a response element in the\n`ListEntitiesForPolicy <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListEntitiesForPolicy.html>`_\noperation.\n\nFor more information about managed policies, refer to\n`Managed policies and inline policies <https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html>`_\nin the *IAM User Guide*.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "UserId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Userid" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field UserId: str | None = None
The stable and unique string identifying the user.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- field session: Any | None = None
The boto3 session to use for this model. This is set by the manager, and is used in relationships. We have to use
Anyhere because we pydantic complains vociferously if we useboto3.session.Session. We exclude it from the model dump because it’s not something that should be serialized.
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) Self
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) Self
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- set_session(session: Session) None
Set the boto3 session for this model.
- Parameters:
session – The boto3 session to use.
- Returns:
The model instance.
- transform(attribute: str, transformer: str | None) Any
Transform an attribute using a regular expression into something else before it is returned.
Important
This only makes sense for attributes that are strings.
transformeris a regular expression that will be used to transform the value of the attribute.If the attribute is
None, it will be returned verbatim.If
transformerisNone, the attribute will be returned verbatim.If
transformerhas no named groups, the attribute will be replaced with the value of the first group.If
transformerhas named groups, the attribute will be replaced with a dictionary of the named groups.
- Raises:
ValueError – If the attribute does not exist on the model.
RuntimeError – If the transformer fails to match the attribute value.
- Parameters:
attribute – The attribute to transform.
transformer – The regular expression to use to transform the attribute.
- Returns:
The transformed attribute.
- pydantic model botocraft.services.iam.SSHPublicKeyMetadata[source]
Bases:
Boto3ModelContains information about an SSH public key, without the key’s body or fingerprint.
This data type is used as a response element in the ListSSHPublicKeys operation.
Show JSON schema
{ "title": "SSHPublicKeyMetadata", "description": "Contains information about an SSH public key, without the key's body or fingerprint.\n\nThis data type is used as a response element in the\n`ListSSHPublicKeys <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListSSHPublicKeys.html>`_\noperation.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "SSHPublicKeyId": { "title": "Sshpublickeyid", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "UploadDate": { "format": "date-time", "title": "Uploaddate", "type": "string" } }, "required": [ "UserName", "SSHPublicKeyId", "Status", "UploadDate" ] }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field Status: Literal['Active', 'Inactive', 'Expired'] [Required]
The status of the SSH public key.
Activemeans that the key can be used for authentication with an CodeCommit repository.Inactivemeans that the key cannot be used.
- field UploadDate: datetime [Required]
The date and time, in ISO 8601 date-time format, when the SSH public key was uploaded.
- 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.iam.UpdateRoleDescriptionResponse[source]
Bases:
Boto3ModelShow JSON schema
{ "title": "UpdateRoleDescriptionResponse", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Role": { "anyOf": [ { "$ref": "#/$defs/IAMRole" }, { "type": "null" } ], "default": null } }, "$defs": { "AttachedPermissionsBoundary": { "description": "Contains information about an attached permissions boundary.\n\nAn attached permissions boundary is a managed policy that has been attached to a\nuser or role to set the permissions boundary.\n\nFor more information about permissions boundaries, see\n`Permissions boundaries for IAM identities <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html>`_\nin the *IAM User Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "PermissionsBoundaryType": { "anyOf": [ { "const": "PermissionsBoundaryPolicy", "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundarytype" }, "PermissionsBoundaryArn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Permissionsboundaryarn" } }, "title": "AttachedPermissionsBoundary", "type": "object" }, "IAMRole": { "description": "Contains information about an IAM role.\n\nThis structure is returned as a response element in several API operations that\ninteract with roles.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "AssumeRolePolicyDocument": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Assumerolepolicydocument" }, "Path": { "title": "Path", "type": "string" }, "RoleName": { "title": "Rolename", "type": "string" }, "RoleId": { "title": "Roleid", "type": "string" }, "Arn": { "title": "Arn", "type": "string" }, "CreateDate": { "format": "date-time", "title": "Createdate", "type": "string" }, "Description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "MaxSessionDuration": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Maxsessionduration" }, "PermissionsBoundary": { "anyOf": [ { "$ref": "#/$defs/AttachedPermissionsBoundary" }, { "type": "null" } ], "default": null }, "Tags": { "anyOf": [ { "items": { "$ref": "#/$defs/IAMTag" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "RoleLastUsed": { "$ref": "#/$defs/IAMRoleLastUsed", "default": null } }, "required": [ "Path", "RoleName", "RoleId", "Arn", "CreateDate" ], "title": "IAMRole", "type": "object" }, "IAMRoleLastUsed": { "description": "Contains information about the last time that an IAM role was used. This includes the date and time and the Region in\nwhich the role was last used. Activity is only reported for the trailing 400 days. This period can be shorter if your\nRegion began supporting these features within the last year. The role might have been used more than 400 days ago. For\nmore information, see `Regions where data is\ntracked <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-\nperiod>`_ in the *IAM user Guide*.\n\nThis data type is returned as a response element in the\n`GetRole <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetRole.html>`_ and `GetAccountAuthorizationDetails <htt\nps://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountAuthorizationDetails.html>`_ operations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "LastUsedDate": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Lastuseddate" }, "Region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Region" } }, "title": "IAMRoleLastUsed", "type": "object" }, "IAMTag": { "description": "A structure that represents user-provided metadata that can be associated with an\nIAM resource.\n\nFor more information about tagging, see\n`Tagging IAM resources <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html>`_\nin the *IAM\nUser Guide*.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "Key": { "title": "Key", "type": "string" }, "Value": { "title": "Value", "type": "string" } }, "required": [ "Key", "Value" ], "title": "IAMTag", "type": "object" } } }
- 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.iam.UploadSSHPublicKeyResponse[source]
Bases:
Boto3ModelContains the response to a successful UploadSSHPublicKey request.
Show JSON schema
{ "title": "UploadSSHPublicKeyResponse", "description": "Contains the response to a successful\n`UploadSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_UploadSSHPublicKey.html>`_ request.", "type": "object", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "SSHPublicKey": { "anyOf": [ { "$ref": "#/$defs/IAMSSHPublicKey" }, { "type": "null" } ], "default": null } }, "$defs": { "IAMSSHPublicKey": { "description": "Contains information about an SSH public key.\n\nThis data type is used as a response element in the\n`GetSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetSSHPublicKey.html>`_\nand\n`UploadSSHPublicKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_UploadSSHPublicKey.html>`_\noperations.", "properties": { "session": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Session" }, "UserName": { "title": "Username", "type": "string" }, "SSHPublicKeyId": { "title": "Sshpublickeyid", "type": "string" }, "Fingerprint": { "title": "Fingerprint", "type": "string" }, "SSHPublicKeyBody": { "title": "Sshpublickeybody", "type": "string" }, "Status": { "enum": [ "Active", "Inactive", "Expired" ], "title": "Status", "type": "string" }, "UploadDate": { "default": null, "format": "date-time", "title": "Uploaddate", "type": "string" } }, "required": [ "UserName", "SSHPublicKeyId", "Fingerprint", "SSHPublicKeyBody", "Status" ], "title": "IAMSSHPublicKey", "type": "object" } } }
- Config:
validate_assignment: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- field SSHPublicKey: IAMSSHPublicKey | None = None
Contains information about the SSH public key.
- 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.