BucketsAPI
public class BucketsAPI
-
Declaration
Swift
public init(influxDB2API: InfluxDB2API)
-
Delete a bucket
Declaration
Swift
public func deleteBucketsID(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The ID of the bucket to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteBucketsID(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
bucketID
(path) The ID of the bucket to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a label from a bucket
Declaration
Swift
public func deleteBucketsIDLabelsID(bucketID: String, labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
labelID
(path) The ID of the label to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a label from a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteBucketsIDLabelsID(bucketID: String, labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
bucketID
(path) The bucket ID.
labelID
(path) The ID of the label to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Remove a member from a bucket
Declaration
Swift
public func deleteBucketsIDMembersID(userID: String, bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
userID
(path) The ID of the member to remove.
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Remove a member from a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteBucketsIDMembersID(userID: String, bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
userID
(path) The ID of the member to remove.
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Remove an owner from a bucket
Declaration
Swift
public func deleteBucketsIDOwnersID(userID: String, bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
userID
(path) The ID of the owner to remove.
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Remove an owner from a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteBucketsIDOwnersID(userID: String, bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
userID
(path) The ID of the owner to remove.
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all buckets
Declaration
Swift
public func getBuckets(zapTraceSpan: String? = nil, offset: Int? = nil, limit: Int? = nil, after: String? = nil, org: String? = nil, orgID: String? = nil, name: String? = nil, id: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Buckets?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
offset
(query) (optional)
limit
(query) (optional, default to 20)
after
(query) Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
org
(query) The name of the organization. (optional)
orgID
(query) The organization ID. (optional)
name
(query) Only returns buckets with a specific name. (optional)
id
(query) Only returns buckets with a specific ID. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all buckets
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getBuckets(zapTraceSpan: String? = nil, offset: Int? = nil, limit: Int? = nil, after: String? = nil, org: String? = nil, orgID: String? = nil, name: String? = nil, id: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Buckets?
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
offset
(query) (optional)
limit
(query) (optional, default to 20)
after
(query) Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
org
(query) The name of the organization. (optional)
orgID
(query) The organization ID. (optional)
name
(query) Only returns buckets with a specific name. (optional)
id
(query) Only returns buckets with a specific ID. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Retrieve a bucket
Declaration
Swift
public func getBucketsID(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Bucket?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Retrieve a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getBucketsID(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Bucket?
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all labels for a bucket
Declaration
Swift
public func getBucketsIDLabels(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelsResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all labels for a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getBucketsIDLabels(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelsResponse?
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all users with member privileges for a bucket
Declaration
Swift
public func getBucketsIDMembers(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: ResourceMembers?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all users with member privileges for a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getBucketsIDMembers(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> ResourceMembers?
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all owners of a bucket
Declaration
Swift
public func getBucketsIDOwners(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: ResourceOwners?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all owners of a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getBucketsIDOwners(bucketID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> ResourceOwners?
Parameters
bucketID
(path) The bucket ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Get buckets in a source
Declaration
Swift
public func getSourcesIDBuckets(sourceID: String, zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Buckets?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
sourceID
(path) The source ID.
zapTraceSpan
(header) OpenTracing span context (optional)
org
(query) The name of the organization. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Get buckets in a source
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getSourcesIDBuckets(sourceID: String, zapTraceSpan: String? = nil, org: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Buckets?
Parameters
sourceID
(path) The source ID.
zapTraceSpan
(header) OpenTracing span context (optional)
org
(query) The name of the organization. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Update a bucket
Declaration
Swift
public func patchBucketsID(bucketID: String, patchBucketRequest: PatchBucketRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Bucket?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
patchBucketRequest
(body) Bucket update to apply
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Update a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func patchBucketsID(bucketID: String, patchBucketRequest: PatchBucketRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Bucket?
Parameters
bucketID
(path) The bucket ID.
patchBucketRequest
(body) Bucket update to apply
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Create a bucket
Declaration
Swift
public func postBuckets(postBucketRequest: PostBucketRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Bucket?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
postBucketRequest
(body) Bucket to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Create a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postBuckets(postBucketRequest: PostBucketRequest, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Bucket?
Parameters
postBucketRequest
(body) Bucket to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Add a label to a bucket
Declaration
Swift
public func postBucketsIDLabels(bucketID: String, labelMapping: LabelMapping, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
labelMapping
(body) Label to add
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Add a label to a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postBucketsIDLabels(bucketID: String, labelMapping: LabelMapping, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelResponse?
Parameters
bucketID
(path) The bucket ID.
labelMapping
(body) Label to add
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
postBucketsIDMembers(bucketID:
addResourceMemberRequestBody: zapTraceSpan: apiResponseQueue: completion: ) Add a member to a bucket
Declaration
Swift
public func postBucketsIDMembers(bucketID: String, addResourceMemberRequestBody: AddResourceMemberRequestBody, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: ResourceMember?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
addResourceMemberRequestBody
(body) User to add as member
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
postBucketsIDMembers(bucketID:
AsynchronousaddResourceMemberRequestBody: zapTraceSpan: apiResponseQueue: ) Add a member to a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postBucketsIDMembers(bucketID: String, addResourceMemberRequestBody: AddResourceMemberRequestBody, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> ResourceMember?
Parameters
bucketID
(path) The bucket ID.
addResourceMemberRequestBody
(body) User to add as member
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
postBucketsIDOwners(bucketID:
addResourceMemberRequestBody: zapTraceSpan: apiResponseQueue: completion: ) Add an owner to a bucket
Declaration
Swift
public func postBucketsIDOwners(bucketID: String, addResourceMemberRequestBody: AddResourceMemberRequestBody, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: ResourceOwner?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
bucketID
(path) The bucket ID.
addResourceMemberRequestBody
(body) User to add as owner
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
postBucketsIDOwners(bucketID:
AsynchronousaddResourceMemberRequestBody: zapTraceSpan: apiResponseQueue: ) Add an owner to a bucket
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postBucketsIDOwners(bucketID: String, addResourceMemberRequestBody: AddResourceMemberRequestBody, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> ResourceOwner?
Parameters
bucketID
(path) The bucket ID.
addResourceMemberRequestBody
(body) User to add as owner
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects