create_user
¶
create_user(
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
user_id: Optional[UserId] = None,
user_name: Optional[UserName] = None,
engine: Optional[EngineType] = None,
passwords: Optional[PasswordListInput] = None,
access_string: Optional[AccessString] = None,
no_password_required: Optional[BooleanOptional] = None,
tags: Optional[TagList] = None,
authentication_mode: Optional[AuthenticationMode] = None,
) -> User
For Valkey engine version 7.2 onwards and Redis OSS 6.0 to 7.1: Creates a user. For more information, see Using Role Based Access Control (RBAC).
Parameters:
-
user_id(Optional[UserId], default:None) –The ID of the user. This value is stored as a lowercase string.
-
user_name(Optional[UserName], default:None) –The username of the user.
-
engine(Optional[EngineType], default:None) –The options are valkey or redis.
-
passwords(Optional[PasswordListInput], default:None) –Passwords used for this user. You can create up to two passwords for each user.
-
access_string(Optional[AccessString], default:None) –Access permissions string used for this user.
-
no_password_required(Optional[BooleanOptional], default:None) –Indicates a password is not required for this user.
-
tags(Optional[TagList], default:None) –A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
-
authentication_mode(Optional[AuthenticationMode], default:None) –Specifies how to authenticate the user.
Raises:
-
DuplicateUserNameFault–A user with this username already exists.
-
InvalidParameterCombinationException–Two or more incompatible parameters were specified.
-
InvalidParameterValueException–The value for a parameter is invalid.
-
ServiceLinkedRoleNotFoundFault–The specified service linked role (SLR) was not found.
-
TagQuotaPerResourceExceeded–The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.
-
UserAlreadyExistsFault–A user with this ID already exists.
-
UserQuotaExceededFault–The quota of users has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 | |