Module Smaws_Client_IAM.AttachUserPolicy

Attaches the specified managed policy to the specified user.

You use this operation to attach a managed policy to a user. To embed an inline policy in a user, use PutUserPolicy.

As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide.

For more information about policies, see Managed policies and inline policies in the IAM User Guide.

val error_to_string : [ Smaws_Lib.Protocols.AwsQuery.error | `InvalidInputException of Types.invalid_input_exception | `LimitExceededException of Types.limit_exceeded_exception | `NoSuchEntityException of Types.no_such_entity_exception | `PolicyNotAttachableException of Types.policy_not_attachable_exception | `ServiceFailureException of Types.service_failure_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.attach_user_policy_request -> (Smaws_Lib.Smithy_api.Types.unit_, [> Smaws_Lib.Protocols.AwsQuery.error | `InvalidInputException of Types.invalid_input_exception | `LimitExceededException of Types.limit_exceeded_exception | `NoSuchEntityException of Types.no_such_entity_exception | `PolicyNotAttachableException of Types.policy_not_attachable_exception | `ServiceFailureException of Types.service_failure_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.attach_user_policy_request -> (Smaws_Lib.Smithy_api.Types.unit_ Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsQuery.error | `InvalidInputException of Types.invalid_input_exception | `LimitExceededException of Types.limit_exceeded_exception | `NoSuchEntityException of Types.no_such_entity_exception | `PolicyNotAttachableException of Types.policy_not_attachable_exception | `ServiceFailureException of Types.service_failure_exception ] * Smaws_Lib.Response.metadata) Stdlib.result