Package com.influxdb.client
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 Summary
Modifier and TypeMethodDescriptionAdd the bucket label.Add the bucket label.Add the bucket member.Add the bucket member.Add the bucket owner.Add the bucket owner.cloneBucket(String clonedName, Bucket bucket) Clone a bucket.cloneBucket(String clonedName, String bucketID) Clone a bucket.createBucket(Bucket bucket) Creates a new bucket and setsBucket.getId()with the new identifier.createBucket(PostBucketRequest bucket) Create a bucket.createBucket(String name, BucketRetentionRules bucketRetentionRules, Organization organization) Creates a new bucket and setsBucket.getId()with the new identifier.createBucket(String name, BucketRetentionRules bucketRetentionRules, String orgID) Creates a new bucket and setsBucket.getId()with the new identifier.createBucket(String name, Organization organization) Creates a new bucket and setsBucket.getId()with the new identifier.createBucket(String name, String orgID) Creates a new bucket and setsBucket.getId()with the new identifier.voiddeleteBucket(Bucket bucket) Delete a bucket.voiddeleteBucket(String bucketID) Delete a bucket.voiddeleteLabel(Label label, Bucket bucket) Removes a label from a bucket.voiddeleteLabel(String labelID, String bucketID) Removes a label from a bucket.voiddeleteMember(User member, Bucket bucket) Removes a member from a bucket.voiddeleteMember(String memberID, String bucketID) Removes a member from a bucket.voiddeleteOwner(User owner, Bucket bucket) Removes a owner from a bucket.voiddeleteOwner(String ownerID, String bucketID) Removes a owner from a bucket.findBucketByID(String bucketID) Retrieve a bucket.findBucketByName(String bucketName) Retrieve a bucket.List all buckets.findBuckets(BucketsQuery query) List all buckets.findBuckets(FindOptions findOptions) List all buckets filtered byfindOptions.findBucketsByOrg(Organization organization) List all buckets for specifiedorganization.findBucketsByOrgName(String orgName) List all buckets for specifiedorgName.List all labels of a bucket.List all labels of a bucket.getMembers(Bucket bucket) List all users with member privileges for a bucket.getMembers(String bucketID) List all users with member privileges for a bucket.List all owners of a bucket.List all owners of a bucket.updateBucket(Bucket bucket) Update a bucket name and retention.
-
Method Details
-
createBucket
Creates a new bucket and setsBucket.getId()with the new identifier.- Parameters:
bucket- bucket to create- Returns:
- Bucket created
-
createBucket
Creates a new bucket and setsBucket.getId()with the new identifier.- Parameters:
name- name of the bucketorganization- owner of bucket- Returns:
- Bucket created
-
createBucket
@Nonnull Bucket createBucket(@Nonnull String name, @Nullable BucketRetentionRules bucketRetentionRules, @Nonnull Organization organization) Creates a new bucket and setsBucket.getId()with the new identifier.- Parameters:
name- name of the bucketbucketRetentionRules- bucket retention periodorganization- owner of bucket- Returns:
- Bucket created
-
createBucket
Creates a new bucket and setsBucket.getId()with the new identifier.- Parameters:
name- name of the bucketorgID- owner of bucket- Returns:
- Bucket created
-
createBucket
@Nonnull Bucket createBucket(@Nonnull String name, @Nullable BucketRetentionRules bucketRetentionRules, @Nonnull String orgID) Creates a new bucket and setsBucket.getId()with the new identifier.- Parameters:
name- name of the bucketbucketRetentionRules- bucket retention periodorgID- owner of bucket- Returns:
- Bucket created
-
createBucket
Create a bucket.- Parameters:
bucket- Bucket to create- Returns:
- Bucket created
-
updateBucket
Update a bucket name and retention.- Parameters:
bucket- bucket update to apply- Returns:
- bucket updated
-
deleteBucket
Delete a bucket.- Parameters:
bucket- bucket to delete
-
deleteBucket
Delete a bucket.- Parameters:
bucketID- ID of bucket to delete
-
cloneBucket
Clone a bucket.- Parameters:
clonedName- name of cloned bucketbucketID- ID of bucket to clone- Returns:
- cloned bucket
-
cloneBucket
Clone a bucket.- Parameters:
clonedName- name of cloned bucketbucket- bucket to clone- Returns:
- cloned bucket
-
findBucketByID
Retrieve a bucket.- Parameters:
bucketID- ID of bucket to get- Returns:
- bucket details
-
findBucketByName
Retrieve a bucket.- Parameters:
bucketName- Name of bucket to get- Returns:
- bucket details
-
findBuckets
List all buckets.- Returns:
- List all buckets
-
findBuckets
List all buckets filtered byfindOptions.- Parameters:
findOptions- the find options- Returns:
- List all buckets
-
findBucketsByOrg
List all buckets for specifiedorganization.- Parameters:
organization- filter buckets to a specific organization- Returns:
- A list of buckets
-
findBucketsByOrgName
List all buckets for specifiedorgName.- Parameters:
orgName- filter buckets to a specific organization name- Returns:
- A list of buckets
-
findBuckets
List all buckets.- Returns:
- List all buckets
-
getMembers
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
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
Add the bucket member.- Parameters:
member- the member of an bucketbucket- the bucket for the member- Returns:
- created mapping
-
addMember
Add the bucket member.- Parameters:
memberID- the ID of a memberbucketID- the ID of a bucket- Returns:
- created mapping
-
deleteMember
Removes a member from a bucket.- Parameters:
member- the member of a bucketbucket- the bucket
-
deleteMember
Removes a member from a bucket.- Parameters:
memberID- the ID of a memberbucketID- the ID of a bucket
-
getOwners
List all owners of a bucket.- Parameters:
bucket- the bucket with owners- Returns:
- return List all owners of a bucket.
-
getOwners
List all owners of a bucket.- Parameters:
bucketID- ID of bucket to get owners- Returns:
- return List all owners of a bucket
-
addOwner
Add the bucket owner.- Parameters:
owner- the owner of a bucketbucket- the bucket- Returns:
- created mapping
-
addOwner
Add the bucket owner.- Parameters:
ownerID- the ID of a ownerbucketID- the ID of a bucket- Returns:
- created mapping
-
deleteOwner
Removes a owner from a bucket.- Parameters:
owner- the owner of a bucketbucket- the bucket
-
deleteOwner
Removes a owner from a bucket.- Parameters:
ownerID- the ID of a ownerbucketID- the ID of a bucket
-
getLabels
List all labels of a bucket.- Parameters:
bucket- the bucket with labels- Returns:
- return List all labels of a bucket.
-
getLabels
List all labels of a bucket.- Parameters:
bucketID- ID of bucket to get labels- Returns:
- return List all labels of a bucket
-
addLabel
Add the bucket label.- Parameters:
label- the label of a bucketbucket- the bucket- Returns:
- added label
-
addLabel
Add the bucket label.- Parameters:
labelID- the ID of a labelbucketID- the ID of a bucket- Returns:
- added label
-
deleteLabel
Removes a label from a bucket.- Parameters:
label- the label of a bucketbucket- the bucket
-
deleteLabel
Removes a label from a bucket.- Parameters:
labelID- the ID of a labelbucketID- the ID of a bucket
-