
org.jclouds.aws.ec2.services.KeyPairClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jclouds-aws Show documentation
Show all versions of jclouds-aws Show documentation
jclouds Core components to access Amazon AWS
The newest version!
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC.
*
* ====================================================================
* Licensed 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.aws.ec2.services;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import org.jclouds.aws.ec2.domain.KeyPair;
import org.jclouds.concurrent.Timeout;
/**
* Provides access to EC2 via their REST API.
*
*
* @author Adrian Cole
*/
@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS)
public interface KeyPairClient {
/**
* Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by
* Amazon EC2 and the private key is displayed on the console. The private key is returned as an
* unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists,
* Amazon EC2 returns an error.
*
* @param region
* Key pairs (to connect to instances) are Region-specific.
* @param keyName
* A unique name for the key pair.
*
* @see #runInstances
* @see #describeKeyPairs
* @see #deleteKeyPair
*
* @see
*/
KeyPair createKeyPairInRegion(@Nullable String region, String keyName);
/**
* Returns information about key pairs available to you. If you specify key pairs, information
* about those key pairs is returned. Otherwise, information for all registered key pairs is
* returned.
*
* @param region
* Key pairs (to connect to instances) are Region-specific.
* @param keyPairNames
* Key pairs to describe.
*
* @see #runInstances
* @see #describeAvailabilityZones
* @see
*/
Set describeKeyPairsInRegion(@Nullable String region, String... keyPairNames);
/**
* Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the
* key pair
*
* @param region
* Key pairs (to connect to instances) are Region-specific.
* @param keyName
* Name of the key pair to delete
*
* @see #describeKeyPairs
* @see #createKeyPair
*
* @see
*/
void deleteKeyPairInRegion(@Nullable String region, String keyName);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy