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

    Builds and executes requests for operations under /v2/projects/default/resources

    interface ResourcesRequestBuilder {
        get(
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ResourcesGetResponse>;
        post(
            body: Project_assignment,
            requestConfiguration?: RequestConfiguration<object>,
        ): Promise<undefined | ResourcesPostResponse>;
        toGetRequestInformation(
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        toPostRequestInformation(
            body: Project_assignment,
            requestConfiguration?: RequestConfiguration<object>,
        ): RequestInformation;
        withUrl(rawUrl: string): ResourcesRequestBuilder;
    }

    Hierarchy

    Index

    Methods

    • To list all your resources in your default project, send a GET request to /v2/projects/default/resources.Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read scope.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | ResourcesGetResponse>

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

      To assign resources to your default project, send a POST request to /v2/projects/default/resources.You must have both project:update and :read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update and droplet:read scopes.

      Parameters

      • body: Project_assignment

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns Promise<undefined | ResourcesPostResponse>

      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 your resources in your default project, send a GET request to /v2/projects/default/resources.Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read scope.

      Parameters

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • To assign resources to your default project, send a POST request to /v2/projects/default/resources.You must have both project:update and :read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update and droplet:read scopes.

      Parameters

      • body: Project_assignment

        The request body

      • OptionalrequestConfiguration: RequestConfiguration<object>

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

      Returns RequestInformation

    • Parameters

      • rawUrl: string

      Returns ResourcesRequestBuilder