Interface BucketsApi


@ThreadSafe public interface BucketsApi
The client of the InfluxDB 2.x that implement Bucket HTTP API endpoint.
Author:
Jakub Bednar (bednar@github) (13/09/2018 10:31)
  • Method Details

    • createBucket

      @Nonnull Bucket createBucket(@Nonnull Bucket bucket)
      Creates a new bucket and sets Bucket.getId() with the new identifier.
      Parameters:
      bucket - bucket to create
      Returns:
      Bucket created
    • createBucket

      @Nonnull Bucket createBucket(@Nonnull String name, @Nonnull Organization organization)
      Creates a new bucket and sets Bucket.getId() with the new identifier.
      Parameters:
      name - name of the bucket
      organization - owner of bucket
      Returns:
      Bucket created
    • createBucket

      @Nonnull Bucket createBucket(@Nonnull String name, @Nullable BucketRetentionRules bucketRetentionRules, @Nonnull Organization organization)
      Creates a new bucket and sets Bucket.getId() with the new identifier.
      Parameters:
      name - name of the bucket
      bucketRetentionRules - bucket retention period
      organization - owner of bucket
      Returns:
      Bucket created
    • createBucket

      @Nonnull Bucket createBucket(@Nonnull String name, @Nonnull String orgID)
      Creates a new bucket and sets Bucket.getId() with the new identifier.
      Parameters:
      name - name of the bucket
      orgID - owner of bucket
      Returns:
      Bucket created
    • createBucket

      @Nonnull Bucket createBucket(@Nonnull String name, @Nullable BucketRetentionRules bucketRetentionRules, @Nonnull String orgID)
      Creates a new bucket and sets Bucket.getId() with the new identifier.
      Parameters:
      name - name of the bucket
      bucketRetentionRules - bucket retention period
      orgID - owner of bucket
      Returns:
      Bucket created
    • createBucket

      @Nonnull Bucket createBucket(@Nonnull PostBucketRequest bucket)
      Create a bucket.
      Parameters:
      bucket - Bucket to create
      Returns:
      Bucket created
    • updateBucket

      @Nonnull Bucket updateBucket(@Nonnull Bucket bucket)
      Update a bucket name and retention.
      Parameters:
      bucket - bucket update to apply
      Returns:
      bucket updated
    • deleteBucket

      void deleteBucket(@Nonnull Bucket bucket)
      Delete a bucket.
      Parameters:
      bucket - bucket to delete
    • deleteBucket

      void deleteBucket(@Nonnull String bucketID)
      Delete a bucket.
      Parameters:
      bucketID - ID of bucket to delete
    • cloneBucket

      @Nonnull Bucket cloneBucket(@Nonnull String clonedName, @Nonnull String bucketID)
      Clone a bucket.
      Parameters:
      clonedName - name of cloned bucket
      bucketID - ID of bucket to clone
      Returns:
      cloned bucket
    • cloneBucket

      @Nonnull Bucket cloneBucket(@Nonnull String clonedName, @Nonnull Bucket bucket)
      Clone a bucket.
      Parameters:
      clonedName - name of cloned bucket
      bucket - bucket to clone
      Returns:
      cloned bucket
    • findBucketByID

      @Nonnull Bucket findBucketByID(@Nonnull String bucketID)
      Retrieve a bucket.
      Parameters:
      bucketID - ID of bucket to get
      Returns:
      bucket details
    • findBucketByName

      @Nullable Bucket findBucketByName(@Nonnull String bucketName)
      Retrieve a bucket.
      Parameters:
      bucketName - Name of bucket to get
      Returns:
      bucket details
    • findBuckets

      @Nonnull List<Bucket> findBuckets()
      List all buckets.
      Returns:
      List all buckets
    • findBuckets

      @Nonnull Buckets findBuckets(@Nonnull FindOptions findOptions)
      List all buckets filtered by findOptions.
      Parameters:
      findOptions - the find options
      Returns:
      List all buckets
    • findBucketsByOrg

      @Nonnull List<Bucket> findBucketsByOrg(@Nonnull Organization organization)
      List all buckets for specified organization.
      Parameters:
      organization - filter buckets to a specific organization
      Returns:
      A list of buckets
    • findBucketsByOrgName

      @Nonnull List<Bucket> findBucketsByOrgName(@Nullable String orgName)
      List all buckets for specified orgName.
      Parameters:
      orgName - filter buckets to a specific organization name
      Returns:
      A list of buckets
    • findBuckets

      @Nonnull List<Bucket> findBuckets(@Nonnull BucketsQuery query)
      List all buckets.
      Returns:
      List all buckets
    • getMembers

      @Nonnull List<ResourceMember> getMembers(@Nonnull Bucket bucket)
      List all users with member privileges for a bucket.
      Parameters:
      bucket - the bucket with members
      Returns:
      return the list all users with member privileges for a bucket
    • getMembers

      @Nonnull List<ResourceMember> getMembers(@Nonnull String bucketID)
      List all users with member privileges for a bucket.
      Parameters:
      bucketID - ID of bucket to get members
      Returns:
      return the list all users with member privileges for a bucket
    • addMember

      @Nonnull ResourceMember addMember(@Nonnull User member, @Nonnull Bucket bucket)
      Add the bucket member.
      Parameters:
      member - the member of an bucket
      bucket - the bucket for the member
      Returns:
      created mapping
    • addMember

      @Nonnull ResourceMember addMember(@Nonnull String memberID, @Nonnull String bucketID)
      Add the bucket member.
      Parameters:
      memberID - the ID of a member
      bucketID - the ID of a bucket
      Returns:
      created mapping
    • deleteMember

      void deleteMember(@Nonnull User member, @Nonnull Bucket bucket)
      Removes a member from a bucket.
      Parameters:
      member - the member of a bucket
      bucket - the bucket
    • deleteMember

      void deleteMember(@Nonnull String memberID, @Nonnull String bucketID)
      Removes a member from a bucket.
      Parameters:
      memberID - the ID of a member
      bucketID - the ID of a bucket
    • getOwners

      @Nonnull List<ResourceOwner> getOwners(@Nonnull Bucket bucket)
      List all owners of a bucket.
      Parameters:
      bucket - the bucket with owners
      Returns:
      return List all owners of a bucket.
    • getOwners

      @Nonnull List<ResourceOwner> getOwners(@Nonnull String bucketID)
      List all owners of a bucket.
      Parameters:
      bucketID - ID of bucket to get owners
      Returns:
      return List all owners of a bucket
    • addOwner

      @Nonnull ResourceOwner addOwner(@Nonnull User owner, @Nonnull Bucket bucket)
      Add the bucket owner.
      Parameters:
      owner - the owner of a bucket
      bucket - the bucket
      Returns:
      created mapping
    • addOwner

      @Nonnull ResourceOwner addOwner(@Nonnull String ownerID, @Nonnull String bucketID)
      Add the bucket owner.
      Parameters:
      ownerID - the ID of a owner
      bucketID - the ID of a bucket
      Returns:
      created mapping
    • deleteOwner

      void deleteOwner(@Nonnull User owner, @Nonnull Bucket bucket)
      Removes a owner from a bucket.
      Parameters:
      owner - the owner of a bucket
      bucket - the bucket
    • deleteOwner

      void deleteOwner(@Nonnull String ownerID, @Nonnull String bucketID)
      Removes a owner from a bucket.
      Parameters:
      ownerID - the ID of a owner
      bucketID - the ID of a bucket
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull Bucket bucket)
      List all labels of a bucket.
      Parameters:
      bucket - the bucket with labels
      Returns:
      return List all labels of a bucket.
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull String bucketID)
      List all labels of a bucket.
      Parameters:
      bucketID - ID of bucket to get labels
      Returns:
      return List all labels of a bucket
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull Label label, @Nonnull Bucket bucket)
      Add the bucket label.
      Parameters:
      label - the label of a bucket
      bucket - the bucket
      Returns:
      added label
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull String labelID, @Nonnull String bucketID)
      Add the bucket label.
      Parameters:
      labelID - the ID of a label
      bucketID - the ID of a bucket
      Returns:
      added label
    • deleteLabel

      void deleteLabel(@Nonnull Label label, @Nonnull Bucket bucket)
      Removes a label from a bucket.
      Parameters:
      label - the label of a bucket
      bucket - the bucket
    • deleteLabel

      void deleteLabel(@Nonnull String labelID, @Nonnull String bucketID)
      Removes a label from a bucket.
      Parameters:
      labelID - the ID of a label
      bucketID - the ID of a bucket