Package com.influxdb.client
Interface ScraperTargetsApi
@ThreadSafe
public interface ScraperTargetsApi
Represents an HTTP API handler for scraper targets.
- Author:
- Jakub Bednar (bednar@github) (22/01/2019 08:08)
-
Method Summary
Modifier and TypeMethodDescriptionaddLabel
(Label label, ScraperTargetResponse scraperTargetResponse) Add the ScraperTarget label.Add the ScraperTarget label.addMember
(User member, ScraperTargetResponse scraperTargetResponse) Add the scraperTarget member.Add the ScraperTarget member.addOwner
(User owner, ScraperTargetResponse scraperTargetResponse) Add the ScraperTarget owner.Add the ScraperTarget owner.cloneScraperTarget
(String clonedName, ScraperTargetResponse scraperTargetResponse) Clone a ScraperTarget.cloneScraperTarget
(String clonedName, String scraperTargetID) Clone a ScraperTarget.createScraperTarget
(ScraperTargetRequest scraperTargetRequest) Creates a new ScraperTarget and setsScraperTargetResponse.getId()
with the new identifier.createScraperTarget
(String name, String url, String bucketID, String orgID) Create new ScraperTarget withScraperTargetRequest.getType()
set toScraperTargetRequest.TypeEnum.PROMETHEUS
.void
deleteLabel
(Label label, ScraperTargetResponse scraperTargetResponse) Removes a label from a ScraperTarget.void
deleteLabel
(String labelID, String scraperTargetID) Removes a label from a ScraperTarget.void
deleteMember
(User member, ScraperTargetResponse scraperTargetResponse) Removes a member from a ScraperTarget.void
deleteMember
(String memberID, String scraperTargetID) Removes a member from a ScraperTarget.void
deleteOwner
(User owner, ScraperTargetResponse scraperTargetResponse) Removes a owner from a ScraperTarget.void
deleteOwner
(String ownerID, String scraperTargetID) Removes a owner from a ScraperTarget.void
deleteScraperTarget
(ScraperTargetResponse scraperTargetResponse) Delete a ScraperTarget.void
deleteScraperTarget
(String scraperTargetID) Delete a ScraperTarget.findScraperTargetByID
(String scraperTargetID) Retrieve a ScraperTarget.Get all scraper targets.findScraperTargetsByOrg
(Organization organization) Get all scraper targets.findScraperTargetsByOrgId
(String orgID) Get all scraper targets.getLabels
(ScraperTargetResponse scraperTargetResponse) List all labels of a ScraperTarget.List all labels of a ScraperTarget.getMembers
(ScraperTargetResponse scraperTargetResponse) List all users with member privileges for a ScraperTarget.getMembers
(String scraperTargetID) List all users with member privileges for a ScraperTarget.getOwners
(ScraperTargetResponse scraperTargetResponse) List all owners of a ScraperTarget.List all owners of a ScraperTarget.updateScraperTarget
(ScraperTargetResponse scraperTargetResponse) Update a ScraperTarget.updateScraperTarget
(String scraperTargetID, ScraperTargetRequest scraperTargetRequest) Update a ScraperTarget.
-
Method Details
-
createScraperTarget
@Nonnull ScraperTargetResponse createScraperTarget(@Nonnull ScraperTargetRequest scraperTargetRequest) Creates a new ScraperTarget and setsScraperTargetResponse.getId()
with the new identifier.- Parameters:
scraperTargetRequest
- the scraper to create- Returns:
- ScraperTarget created
-
createScraperTarget
@Nonnull ScraperTargetResponse createScraperTarget(@Nonnull String name, @Nonnull String url, @Nonnull String bucketID, @Nonnull String orgID) Create new ScraperTarget withScraperTargetRequest.getType()
set toScraperTargetRequest.TypeEnum.PROMETHEUS
.- Parameters:
name
- the name of the new ScraperTargeturl
- the url of the new ScraperTargetbucketID
- the id of the scraperTarget that its use to writesorgID
- the id of the organization that owns new ScraperTarget- Returns:
- ScraperTarget created
-
updateScraperTarget
@Nonnull ScraperTargetResponse updateScraperTarget(@Nonnull ScraperTargetResponse scraperTargetResponse) Update a ScraperTarget.- Parameters:
scraperTargetResponse
- ScraperTarget update to apply- Returns:
- ScraperTarget updated
-
updateScraperTarget
@Nonnull ScraperTargetResponse updateScraperTarget(@Nonnull String scraperTargetID, @Nonnull ScraperTargetRequest scraperTargetRequest) Update a ScraperTarget.- Parameters:
scraperTargetID
- id of the scraper target (required)scraperTargetRequest
- ScraperTarget update to apply- Returns:
- ScraperTarget updated
-
deleteScraperTarget
Delete a ScraperTarget.- Parameters:
scraperTargetResponse
- ScraperTarget to delete
-
deleteScraperTarget
Delete a ScraperTarget.- Parameters:
scraperTargetID
- ID of ScraperTarget to delete
-
cloneScraperTarget
@Nonnull ScraperTargetResponse cloneScraperTarget(@Nonnull String clonedName, @Nonnull String scraperTargetID) Clone a ScraperTarget.- Parameters:
clonedName
- name of cloned ScraperTargetscraperTargetID
- ID of ScraperTarget to clone- Returns:
- cloned ScraperTarget
-
cloneScraperTarget
@Nonnull ScraperTargetResponse cloneScraperTarget(@Nonnull String clonedName, @Nonnull ScraperTargetResponse scraperTargetResponse) Clone a ScraperTarget.- Parameters:
clonedName
- name of cloned ScraperTargetscraperTargetResponse
- ScraperTarget to clone- Returns:
- cloned ScraperTarget
-
findScraperTargetByID
Retrieve a ScraperTarget.- Parameters:
scraperTargetID
- ID of ScraperTarget to get- Returns:
- ScraperTarget details
-
findScraperTargets
Get all scraper targets.- Returns:
- List all ScraperTargets
-
findScraperTargetsByOrg
Get all scraper targets.- Parameters:
organization
- specifies the organization of the resource- Returns:
- all scraper targets
-
findScraperTargetsByOrgId
Get all scraper targets.- Parameters:
orgID
- specifies the organization ID of the resource- Returns:
- all scraper targets
-
getMembers
List all users with member privileges for a ScraperTarget.- Parameters:
scraperTargetResponse
- the ScraperTarget with members- Returns:
- return the list all users with member privileges for a ScraperTarget
-
getMembers
List all users with member privileges for a ScraperTarget.- Parameters:
scraperTargetID
- ID of ScraperTarget to get members- Returns:
- return the list all users with member privileges for a ScraperTarget
-
addMember
@Nonnull ResourceMember addMember(@Nonnull User member, @Nonnull ScraperTargetResponse scraperTargetResponse) Add the scraperTarget member.- Parameters:
member
- the member of an ScraperTargetscraperTargetResponse
- the ScraperTarget for the member- Returns:
- created mapping
-
addMember
Add the ScraperTarget member.- Parameters:
memberID
- the ID of a memberscraperTargetID
- the ID of a ScraperTarget- Returns:
- created mapping
-
deleteMember
Removes a member from a ScraperTarget.- Parameters:
member
- the member of a ScraperTargetscraperTargetResponse
- the scraperTarget
-
deleteMember
Removes a member from a ScraperTarget.- Parameters:
memberID
- the ID of a memberscraperTargetID
- the ID of a ScraperTarget
-
getOwners
List all owners of a ScraperTarget.- Parameters:
scraperTargetResponse
- the ScraperTarget with owners- Returns:
- return List all owners of a ScraperTarget.
-
getOwners
List all owners of a ScraperTarget.- Parameters:
scraperTargetID
- ID of ScraperTarget to get owners- Returns:
- return List all owners of a ScraperTarget
-
addOwner
@Nonnull ResourceOwner addOwner(@Nonnull User owner, @Nonnull ScraperTargetResponse scraperTargetResponse) Add the ScraperTarget owner.- Parameters:
owner
- the owner of a ScraperTargetscraperTargetResponse
- the ScraperTarget- Returns:
- created mapping
-
addOwner
Add the ScraperTarget owner.- Parameters:
ownerID
- the ID of a ownerscraperTargetID
- the ID of a ScraperTarget- Returns:
- created mapping
-
deleteOwner
Removes a owner from a ScraperTarget.- Parameters:
owner
- the owner of a ScraperTargetscraperTargetResponse
- the scraperTarget
-
deleteOwner
Removes a owner from a ScraperTarget.- Parameters:
ownerID
- the ID of a ownerscraperTargetID
- the ID of a ScraperTarget
-
getLabels
List all labels of a ScraperTarget.- Parameters:
scraperTargetResponse
- the ScraperTarget with labels- Returns:
- return List all labels of a ScraperTarget.
-
getLabels
List all labels of a ScraperTarget.- Parameters:
scraperTargetID
- ID of ScraperTarget to get labels- Returns:
- return List all labels of a ScraperTarget
-
addLabel
@Nonnull LabelResponse addLabel(@Nonnull Label label, @Nonnull ScraperTargetResponse scraperTargetResponse) Add the ScraperTarget label.- Parameters:
label
- the label of a ScraperTargetscraperTargetResponse
- the ScraperTarget- Returns:
- added label
-
addLabel
Add the ScraperTarget label.- Parameters:
labelID
- the ID of a labelscraperTargetID
- the ID of a ScraperTarget- Returns:
- added label
-
deleteLabel
Removes a label from a ScraperTarget.- Parameters:
label
- the label of a ScraperTargetscraperTargetResponse
- the ScraperTarget
-
deleteLabel
Removes a label from a ScraperTarget.- Parameters:
labelID
- the ID of a LabelscraperTargetID
- the ID of a ScraperTarget
-