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

    Interface WithUsernameItemRequestBuilder

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

    interface WithUsernameItemRequestBuilder {
        get reset_auth(): Reset_authRequestBuilder;
        delete(requestConfiguration?: RequestConfiguration<object>): Promise<void>;
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | WithUsernameGetResponse>;
        put(
            body: WithUsernamePutRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | WithUsernamePutResponse>;
        toDeleteRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPutRequestInformation(
            body: WithUsernamePutRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): WithUsernameItemRequestBuilder;
    }

    Hierarchy

    Index

    Accessors

    Methods

    • To remove a specific database user, send a DELETE request to/v2/databases/$DATABASE_ID/users/$USERNAME.A status of 204 will be given. This indicates that the request was processedsuccessfully, but that no response body is needed.Note: User management is not supported for Caching or Valkey clusters.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<void>

      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 show information about an existing database user, send a GET request to/v2/databases/$DATABASE_ID/users/$USERNAME.Note: User management is not supported for Caching or Valkey clusters.The response will be a JSON object with a user key. This will be set to an objectcontaining the standard database user attributes. The user's password will not showup unless the database:view_credentials scope is present.For MySQL clusters, additional options will be contained in the mysql_settingsobject.For Kafka clusters, additional options will be contained in the 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 | WithUsernameGetResponse>

      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 update an existing database user, send a PUT request to /v2/databases/$DATABASE_ID/users/$USERNAMEwith the desired settings.Note: only settings can be updated via this type of request. If you wish to change the name of a user,you must recreate a new user.The response will be a JSON object with a key called user. The value of this will be anobject that contains the name of the update database user, along with the settings object thathas been updated.

      Parameters

      • body: WithUsernamePutRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | WithUsernamePutResponse>

      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 remove a specific database user, send a DELETE request to/v2/databases/$DATABASE_ID/users/$USERNAME.A status of 204 will be given. This indicates that the request was processedsuccessfully, but that no response body is needed.Note: User management is not supported for Caching or Valkey clusters.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To show information about an existing database user, send a GET request to/v2/databases/$DATABASE_ID/users/$USERNAME.Note: User management is not supported for Caching or Valkey clusters.The response will be a JSON object with a user key. This will be set to an objectcontaining the standard database user attributes. The user's password will not showup unless the database:view_credentials scope is present.For MySQL clusters, additional options will be contained in the mysql_settingsobject.For Kafka clusters, additional options will be contained in the 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 update an existing database user, send a PUT request to /v2/databases/$DATABASE_ID/users/$USERNAMEwith the desired settings.Note: only settings can be updated via this type of request. If you wish to change the name of a user,you must recreate a new user.The response will be a JSON object with a key called user. The value of this will be anobject that contains the name of the update database user, along with the settings object thathas been updated.

      Parameters

      • body: WithUsernamePutRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation