All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jclouds.elb.features.PolicyAsyncApi Maven / Gradle / Ivy

/**
 * Licensed to jclouds, Inc. (jclouds) under one or more
 * contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  jclouds licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.jclouds.elb.features;

import java.util.Set;

import javax.inject.Named;
import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;

import org.jclouds.aws.filters.FormSigner;
import org.jclouds.elb.binders.BindPolicyTypeNamesToIndexedFormParams;
import org.jclouds.elb.domain.Policy;
import org.jclouds.elb.domain.PolicyType;
import org.jclouds.elb.options.ListPoliciesOptions;
import org.jclouds.elb.xml.DescribeLoadBalancerPoliciesResultHandler;
import org.jclouds.elb.xml.DescribeLoadBalancerPolicyTypesResultHandler;
import org.jclouds.elb.xml.PolicyHandler;
import org.jclouds.elb.xml.PolicyTypeHandler;
import org.jclouds.rest.annotations.BinderParam;
import org.jclouds.rest.annotations.ExceptionParser;
import org.jclouds.rest.annotations.FormParams;
import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.VirtualHost;
import org.jclouds.rest.annotations.XMLResponseParser;
import org.jclouds.rest.functions.ReturnEmptySetOnNotFoundOr404;
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;

import com.google.common.util.concurrent.ListenableFuture;

/**
 * Provides access to Amazon ELB via the Query API
 * 

* * @see doc * @see PolicyApi * @author Adrian Cole */ @RequestFilters(FormSigner.class) @VirtualHost public interface PolicyAsyncApi { /** * @see PolicyApi#get() */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicies") @POST @Path("/") @XMLResponseParser(PolicyHandler.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicies") @ExceptionParser(ReturnNullOnNotFoundOr404.class) ListenableFuture get(@FormParam("PolicyNames.member.1") String name); /** * @see PolicyApi#list() */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicies") @POST @Path("/") @XMLResponseParser(DescribeLoadBalancerPoliciesResultHandler.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicies") ListenableFuture> list(); /** * @see PolicyApi#list(ListPoliciesOptions) */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicies") @POST @Path("/") @XMLResponseParser(DescribeLoadBalancerPoliciesResultHandler.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicies") ListenableFuture> list(ListPoliciesOptions options); /** * @see PolicyApi#getType() */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicyTypes") @POST @Path("/") @XMLResponseParser(PolicyTypeHandler.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicyTypes") @ExceptionParser(ReturnNullOnNotFoundOr404.class) ListenableFuture getType(@FormParam("PolicyTypeNames.member.1") String name); /** * @see PolicyApi#listTypes() */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicyTypes") @POST @Path("/") @XMLResponseParser(DescribeLoadBalancerPolicyTypesResultHandler.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicyTypes") ListenableFuture> listTypes(); /** * @see PolicyApi#listTypes(Iterable) */ @Named("elasticloadbalancing:DescribeLoadBalancerPolicyTypes") @POST @Path("/") @XMLResponseParser(DescribeLoadBalancerPolicyTypesResultHandler.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @FormParams(keys = "Action", values = "DescribeLoadBalancerPolicyTypes") ListenableFuture> listTypes(@BinderParam(BindPolicyTypeNamesToIndexedFormParams.class) Iterable names); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy