/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ /* * Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.EC2.Model { /// /// Container for the parameters to the CreateKeyPair operation. /// Creates an ED25519 or 2048-bit RSA key pair with the specified name and in the specified /// PEM or PPK format. Amazon EC2 stores the public key and displays the private key for /// you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#1 /// private key or an unencrypted PPK formatted private key for use with PuTTY. If a key /// with the specified name already exists, Amazon EC2 returns an error. /// /// /// /// The key pair returned to you is available only in the Amazon Web Services Region in /// which you create it. If you prefer, you can create your own key pair using a third-party /// tool and upload it to any Region using ImportKeyPair. /// /// /// /// You can have up to 5,000 key pairs per Amazon Web Services Region. /// /// /// /// For more information, see Amazon /// EC2 key pairs in the Amazon Elastic Compute Cloud User Guide. /// /// public partial class CreateKeyPairRequest : AmazonEC2Request { private KeyFormat _keyFormat; private string _keyName; private KeyType _keyType; private List _tagSpecifications = new List(); /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public CreateKeyPairRequest() { } /// /// Instantiates CreateKeyPairRequest with the parameterized properties /// /// A unique name for the key pair. Constraints: Up to 255 ASCII characters public CreateKeyPairRequest(string keyName) { _keyName = keyName; } /// /// Gets and sets the property KeyFormat. /// /// The format of the key pair. /// /// /// /// Default: pem /// /// public KeyFormat KeyFormat { get { return this._keyFormat; } set { this._keyFormat = value; } } // Check to see if KeyFormat property is set internal bool IsSetKeyFormat() { return this._keyFormat != null; } /// /// Gets and sets the property KeyName. /// /// A unique name for the key pair. /// /// /// /// Constraints: Up to 255 ASCII characters /// /// [AWSProperty(Required=true)] public string KeyName { get { return this._keyName; } set { this._keyName = value; } } // Check to see if KeyName property is set internal bool IsSetKeyName() { return this._keyName != null; } /// /// Gets and sets the property KeyType. /// /// The type of key pair. Note that ED25519 keys are not supported for Windows instances. /// /// /// /// Default: rsa /// /// public KeyType KeyType { get { return this._keyType; } set { this._keyType = value; } } // Check to see if KeyType property is set internal bool IsSetKeyType() { return this._keyType != null; } /// /// Gets and sets the property TagSpecifications. /// /// The tags to apply to the new key pair. /// /// public List TagSpecifications { get { return this._tagSpecifications; } set { this._tagSpecifications = value; } } // Check to see if TagSpecifications property is set internal bool IsSetTagSpecifications() { return this._tagSpecifications != null && this._tagSpecifications.Count > 0; } } }