Interface WebhookApi
-
- All Superinterfaces:
AutoCloseable
,Closeable
@Consumes("application/json") @Path("/webhooks") public interface WebhookApi extends Closeable
The API for controlling Auto Scale Webhooks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.common.collect.FluentIterable<Webhook>
create(String name, Map<String,Object> metadata)
Create a webhook.com.google.common.collect.FluentIterable<Webhook>
create(List<CreateWebhook> webhooks)
Create webhooks.boolean
delete(String id)
Delete a webhook.Webhook
get(String id)
Get a webhook.com.google.common.collect.FluentIterable<Webhook>
list()
List webhooks.boolean
update(String id, String name, Map<String,Object> metadata)
Update a webhook.
-
-
-
Method Detail
-
create
@Named("Webhook:create") @POST com.google.common.collect.FluentIterable<Webhook> create(String name, Map<String,Object> metadata)
Create a webhook.- Parameters:
name
- The webhook name. Required.metadata
- A map of associated metadata. Use String keys. Required.- Returns:
- WebhookResponse The webhook created by this call.
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
create
@Named("webhook:create") @POST com.google.common.collect.FluentIterable<Webhook> create(List<CreateWebhook> webhooks)
Create webhooks.- Parameters:
webhooks
- A list of webhooks.- Returns:
- WebhookResponse The webhook created by this call.
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
list
@Named("Webhook:list") @GET com.google.common.collect.FluentIterable<Webhook> list()
List webhooks.- Returns:
- A list of webhooks
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
get
@Named("webhook:get") @GET @Path("/{webhookId}") @Nullable Webhook get(@PathParam("webhookId") String id)
Get a webhook.- Parameters:
String
- id The id of the webhook.- Returns:
- The webhook
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
update
@Named("webhook:update") @PUT @Path("/{webhookId}") boolean update(@PathParam("webhookId") String id, String name, Map<String,Object> metadata)
Update a webhook.- Parameters:
id
- The webhook idname
- The webhook namemetadata
- A map of associated metadata. Use String keys.- Returns:
- true when successful.
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
delete
@Named("webhook:delete") @DELETE @Path("/{webhookId}") boolean delete(@PathParam("webhookId") String id)
Delete a webhook.- Parameters:
String
- id The id of the webhook.- Returns:
- true if successful.
- See Also:
CreateWebhook
,Webhook
,Group
,CreateScalingPolicy
-
-