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

    Interface ReplicasRequestBuilder

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

    interface ReplicasRequestBuilder {
        byReplica_name(replica_name: string): WithReplica_nameItemRequestBuilder;
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ReplicasGetResponse>;
        post(
            body: Database_replica,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ReplicasPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPostRequestInformation(
            body: Database_replica,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): ReplicasRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To list all of the read-only replicas associated with a database cluster, send a GET request to /v2/databases/$DATABASE_ID/replicas.Note: Read-only replicas are not supported for Caching or Valkey clusters.The result will be a JSON object with a replicas key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | ReplicasGetResponse>

      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: Database_replica,
          requestConfiguration?: RequestConfiguration<object>,
      ): Promise<undefined | ReplicasPostResponse>

      To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/replicas specifying the name it should be given, the size of the node to be used, and the region where it will be located.Note: Read-only replicas are not supported for Caching or Valkey clusters.The response will be a JSON object with a key called replica. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's status attribute will be forking. When the replica is ready to receive traffic, this will transition to active.

      Parameters

      • body: Database_replica

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | ReplicasPostResponse>

      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 read-only replicas associated with a database cluster, send a GET request to /v2/databases/$DATABASE_ID/replicas.Note: Read-only replicas are not supported for Caching or Valkey clusters.The result will be a JSON object with a replicas key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/replicas specifying the name it should be given, the size of the node to be used, and the region where it will be located.Note: Read-only replicas are not supported for Caching or Valkey clusters.The response will be a JSON object with a key called replica. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's status attribute will be forking. When the replica is ready to receive traffic, this will transition to active.

      Parameters

      • body: Database_replica

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns ReplicasRequestBuilder