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

    Interface FirewallRequestBuilder

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

    interface FirewallRequestBuilder {
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | FirewallGetResponse>;
        put(
            body: FirewallPutRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<void>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPutRequestInformation(
            body: FirewallPutRequestBody,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): FirewallRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to /v2/databases/$DATABASE_ID/firewall.The result will be a JSON object with a rules key.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | FirewallGetResponse>

      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 a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to /v2/databases/$DATABASE_ID/firewall specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend placing your databases into a VPC network to limit access to them instead of using a firewall.A successful

      Parameters

      • body: FirewallPutRequestBody

        The request body

      • 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 list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to /v2/databases/$DATABASE_ID/firewall.The result will be a JSON object with a rules key.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To update a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to /v2/databases/$DATABASE_ID/firewall specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend placing your databases into a VPC network to limit access to them instead of using a firewall.A successful

      Parameters

      • body: FirewallPutRequestBody

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns FirewallRequestBuilder