Returns a list of user groups.
Parameters:
-
user_group_id
(Optional[String], default:
None
)
–
The ID of the user group.
-
max_records
(Optional[IntegerOptional], default:
None
)
–
The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.
-
marker
(Optional[String], default:
None
)
–
An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. >
Raises:
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
| def describe_user_groups(
self,
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
user_group_id: Optional["capo_elasticache.types.string.String"] = None,
max_records: Optional[
"capo_elasticache.types.integer_optional.IntegerOptional"
] = None,
marker: Optional["capo_elasticache.types.string.String"] = None,
) -> "capo_elasticache.types.describe_user_groups_result.DescribeUserGroupsResult":
"""<p>Returns a list of user groups.</p>
Args:
user_group_id: <p>The ID of the user group.</p>
max_records: <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved. </p>
marker: <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. ></p>
Raises:
capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
capo_elasticache.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
capo_elasticache.errors.user_group_not_found_fault.UserGroupNotFoundFault: <p>The user group was not found or does not exist</p>
capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elasticache.types.describe_user_groups_message.DescribeUserGroupsMessage]",
) -> OperationResponse[
"capo_elasticache.types.describe_user_groups_result.DescribeUserGroupsResult"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.describe_user_groups
output, http_response = (
capo_elasticache._operations.amazon_elasti_cache_v9.describe_user_groups.describe_user_groups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeUserGroups")
)
input_: capo_elasticache.types.describe_user_groups_message.DescribeUserGroupsMessage = {}
if user_group_id is not None:
input_["user_group_id"] = user_group_id
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|