@digitalocean/dots - v1.0.1
    Preparing search index...

    Interface UsersRequestBuilder

    Builds and executes requests for operations under /v2/databases/{database_cluster_uuid}/users

    interface UsersRequestBuilder {
        byUsername(username: string): WithUsernameItemRequestBuilder;
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | UsersGetResponse>;
        post(
            body: UsersPostRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | UsersPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPostRequestInformation(
            body: UsersPostRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): UsersRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To list all of the users for your database cluster, send a GET request to/v2/databases/$DATABASE_ID/users.Note: User management is not supported for Caching or Valkey clusters.The result will be a JSON object with a users key. This will be set to an arrayof database user objects, each of which will contain the standard database user attributes.User passwords will not show without the database:view_credentials scope.For MySQL clusters, additional options will be contained in the mysql_settings object.For MongoDB clusters, additional information will be contained in the mongo_user_settings object

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns Promise<undefined | UsersGetResponse>

      error when the service returns a 401 status code

      error when the service returns a 404 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    post

    • post(
          body: UsersPostRequestBody,
          requestConfiguration?: RequestConfiguration<object>,
      ): Promise<undefined | UsersPostResponse>

      To add a new database user, send a POST request to /v2/databases/$DATABASE_ID/userswith the desired username.Note: User management is not supported for Caching or Valkey clusters.When adding a user to a MySQL cluster, additional options can be configured in themysql_settings object.When adding a user to a Kafka cluster, additional options can be configured inthe settings object. When adding a user to a MongoDB cluster, additional options can be configured inthe settings.mongo_user_settings object.The response will be a JSON object with a key called user. The value of this will be anobject that contains the standard attributes associated with a database user includingits randomly generated password.

      Parameters

      • body: UsersPostRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns Promise<undefined | UsersPostResponse>

      error when the service returns a 401 status code

      error when the service returns a 404 status code

      error when the service returns a 429 status code

      error when the service returns a 500 status code

      error when the service returns a 4XX or 5XX status code

    • To list all of the users for your database cluster, send a GET request to/v2/databases/$DATABASE_ID/users.Note: User management is not supported for Caching or Valkey clusters.The result will be a JSON object with a users key. This will be set to an arrayof database user objects, each of which will contain the standard database user attributes.User passwords will not show without the database:view_credentials scope.For MySQL clusters, additional options will be contained in the mysql_settings object.For MongoDB clusters, additional information will be contained in the mongo_user_settings object

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns RequestInformation

    • To add a new database user, send a POST request to /v2/databases/$DATABASE_ID/userswith the desired username.Note: User management is not supported for Caching or Valkey clusters.When adding a user to a MySQL cluster, additional options can be configured in themysql_settings object.When adding a user to a Kafka cluster, additional options can be configured inthe settings object. When adding a user to a MongoDB cluster, additional options can be configured inthe settings.mongo_user_settings object.The response will be a JSON object with a key called user. The value of this will be anobject that contains the standard attributes associated with a database user includingits randomly generated password.

      Parameters

      • body: UsersPostRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

        Configuration for the request such as headers, query parameters, and middleware options.

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns UsersRequestBuilder