Skip to content

list_types

list_types(
    keyspace_name: KeyspaceName,
    *,
    config_overrides: Optional[KeyspacesClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListTypesResponse

The ListTypes operation returns a list of types for a specified keyspace.

To read keyspace metadata using ListTypes, the IAM principal needs Select action permissions for the system keyspace. To configure the required permissions, see Permissions to view a UDT in the Amazon Keyspaces Developer Guide.

Parameters:

  • next_token (Optional[NextToken], default: None ) –

    The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

  • max_results (Optional[MaxResults], default: None ) –

    The total number of types to return in the output. If the total number of types available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

  • keyspace_name (KeyspaceName) –

    The name of the keyspace that contains the listed types.

Raises:

  • AccessDeniedException –

    You don't have sufficient access permissions to perform this action.

  • InternalServerException –

    Amazon Keyspaces was unable to fully process this request because of an internal server error.

  • ResourceNotFoundException –

    The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ServiceQuotaExceededException –

    The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide.

  • ValidationException –

    The operation failed due to an invalid or malformed request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_keyspaces/_services/keyspaces.py
def list_types(
    self,
    keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
    *,
    config_overrides: Optional[KeyspacesClientConfig] = None,
    next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
    max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
) -> "capo_keyspaces.types.list_types_response.ListTypesResponse":
    """<p> The <code>ListTypes</code> operation returns a list of types for a specified keyspace. </p> <p>To read keyspace metadata using <code>ListTypes</code>, the IAM principal needs <code>Select</code> action permissions for the system keyspace. To configure the required permissions, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/configure-udt-permissions.html#udt-permissions-view">Permissions to view a UDT</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>

    Args:
        next_token: <p> The pagination token. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation. </p>
        max_results: <p> The total number of types to return in the output. If the total number of types available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation. </p>
        keyspace_name: <p> The name of the keyspace that contains the listed types. </p>

    Raises:
        capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
        capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
        capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
        capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
        capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
        capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_keyspaces.types.list_types_request.ListTypesRequest]",
    ) -> OperationResponse[
        "capo_keyspaces.types.list_types_response.ListTypesResponse"
    ]:
        import capo_keyspaces._operations.keyspaces_service.list_types

        output, http_response = (
            capo_keyspaces._operations.keyspaces_service.list_types.list_types(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTypes")
    )
    input_: capo_keyspaces.types.list_types_request.ListTypesRequest = {
        "keyspace_name": keyspace_name
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output