aws-sdk-ec2 1.308.0 → 1.309.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0568d5a04675582bfbbc673aa2486b74a35511bbbc570e3d9adf0e9b4ac0d947'
4
- data.tar.gz: 5a00be4c1ed6484e1b4fabf8cd87b1e850109e7d0809810fff56095fe8d46853
3
+ metadata.gz: 2e285a4ec10318bc908bea452a07179d6083076c04c1e9f98ccc560bceb99889
4
+ data.tar.gz: 5b4b2f2a824da32e96c119e1e8e8b9d9a82aed3003f35e8cb309813e17cea6b2
5
5
  SHA512:
6
- metadata.gz: 86eff3497fa4cbaece9126dc68a45d2d7bf7a2d2b6216299275283f6ad87989ac64c8ed3f28408093b1430c2dc343ad13844892081b803d1aa9c50bfd225d2f5
7
- data.tar.gz: f00262ce6dd5a2bc7929be3ce7328161fc5eed9cf3cfb5b8b46d955f68ded016b7918fe8a78059c792a789a258881b1c1d13136022953d3b7e4140b0be06459c
6
+ metadata.gz: c99bb361a69770847fda20d0f8dfd8be23887472077901ad63e4ef4952a0e1f6a72ad487cc81b82f2f1400ecc026a46d197f62d51433090beb7c560a83a3fce5
7
+ data.tar.gz: ea4719f3d4e8a0343b54aed166361d3015e9cfb1a3602300e4cf3d3794593a01c4b519be4b4f535304c1de3e82d82d080c2243f8f201f0729efea90894fb1c9f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.309.0 (2022-04-28)
5
+ ------------------
6
+
7
+ * Feature - This release adds support to query the public key and creation date of EC2 Key Pairs. Additionally, the format (pem or ppk) of a key pair can be specified when creating a new key pair.
8
+
4
9
  1.308.0 (2022-04-22)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.308.0
1
+ 1.309.0
@@ -6959,11 +6959,13 @@ module Aws::EC2
6959
6959
  req.send_request(options)
6960
6960
  end
6961
6961
 
6962
- # Creates an ED25519 or 2048-bit RSA key pair with the specified name.
6963
- # Amazon EC2 stores the public key and displays the private key for you
6964
- # to save to a file. The private key is returned as an unencrypted PEM
6965
- # encoded PKCS#1 private key. If a key with the specified name already
6966
- # exists, Amazon EC2 returns an error.
6962
+ # Creates an ED25519 or 2048-bit RSA key pair with the specified name
6963
+ # and in the specified PEM or PPK format. Amazon EC2 stores the public
6964
+ # key and displays the private key for you to save to a file. The
6965
+ # private key is returned as an unencrypted PEM encoded PKCS#1 private
6966
+ # key or an unencrypted PPK formatted private key for use with PuTTY. If
6967
+ # a key with the specified name already exists, Amazon EC2 returns an
6968
+ # error.
6967
6969
  #
6968
6970
  # The key pair returned to you is available only in the Amazon Web
6969
6971
  # Services Region in which you create it. If you prefer, you can create
@@ -6999,6 +7001,11 @@ module Aws::EC2
6999
7001
  # @option params [Array<Types::TagSpecification>] :tag_specifications
7000
7002
  # The tags to apply to the new key pair.
7001
7003
  #
7004
+ # @option params [String] :key_format
7005
+ # The format of the key pair.
7006
+ #
7007
+ # Default: `pem`
7008
+ #
7002
7009
  # @return [Types::KeyPair] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7003
7010
  #
7004
7011
  # * {Types::KeyPair#key_fingerprint #key_fingerprint} => String
@@ -7033,6 +7040,7 @@ module Aws::EC2
7033
7040
  # ],
7034
7041
  # },
7035
7042
  # ],
7043
+ # key_format: "pem", # accepts pem, ppk
7036
7044
  # })
7037
7045
  #
7038
7046
  # @example Response structure
@@ -22679,6 +22687,11 @@ module Aws::EC2
22679
22687
  # If you have the required permissions, the error response is
22680
22688
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
22681
22689
  #
22690
+ # @option params [Boolean] :include_public_key
22691
+ # If `true`, the public key material is included in the response.
22692
+ #
22693
+ # Default: `false`
22694
+ #
22682
22695
  # @return [Types::DescribeKeyPairsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
22683
22696
  #
22684
22697
  # * {Types::DescribeKeyPairsResult#key_pairs #key_pairs} => Array&lt;Types::KeyPairInfo&gt;
@@ -22716,6 +22729,7 @@ module Aws::EC2
22716
22729
  # key_names: ["KeyPairName"],
22717
22730
  # key_pair_ids: ["KeyPairId"],
22718
22731
  # dry_run: false,
22732
+ # include_public_key: false,
22719
22733
  # })
22720
22734
  #
22721
22735
  # @example Response structure
@@ -22728,6 +22742,8 @@ module Aws::EC2
22728
22742
  # resp.key_pairs[0].tags #=> Array
22729
22743
  # resp.key_pairs[0].tags[0].key #=> String
22730
22744
  # resp.key_pairs[0].tags[0].value #=> String
22745
+ # resp.key_pairs[0].public_key #=> String
22746
+ # resp.key_pairs[0].create_time #=> Time
22731
22747
  #
22732
22748
  #
22733
22749
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -49490,7 +49506,7 @@ module Aws::EC2
49490
49506
  params: params,
49491
49507
  config: config)
49492
49508
  context[:gem_name] = 'aws-sdk-ec2'
49493
- context[:gem_version] = '1.308.0'
49509
+ context[:gem_version] = '1.309.0'
49494
49510
  Seahorse::Client::Request.new(handlers, context)
49495
49511
  end
49496
49512
 
@@ -1581,6 +1581,7 @@ module Aws::EC2
1581
1581
  Ipv6RangeList = Shapes::ListShape.new(name: 'Ipv6RangeList')
1582
1582
  Ipv6SupportValue = Shapes::StringShape.new(name: 'Ipv6SupportValue')
1583
1583
  KernelId = Shapes::StringShape.new(name: 'KernelId')
1584
+ KeyFormat = Shapes::StringShape.new(name: 'KeyFormat')
1584
1585
  KeyNameStringList = Shapes::ListShape.new(name: 'KeyNameStringList')
1585
1586
  KeyPair = Shapes::StructureShape.new(name: 'KeyPair')
1586
1587
  KeyPairId = Shapes::StringShape.new(name: 'KeyPairId')
@@ -4075,6 +4076,7 @@ module Aws::EC2
4075
4076
  CreateKeyPairRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: Boolean, location_name: "dryRun"))
4076
4077
  CreateKeyPairRequest.add_member(:key_type, Shapes::ShapeRef.new(shape: KeyType, location_name: "KeyType"))
4077
4078
  CreateKeyPairRequest.add_member(:tag_specifications, Shapes::ShapeRef.new(shape: TagSpecificationList, location_name: "TagSpecification"))
4079
+ CreateKeyPairRequest.add_member(:key_format, Shapes::ShapeRef.new(shape: KeyFormat, location_name: "KeyFormat"))
4078
4080
  CreateKeyPairRequest.struct_class = Types::CreateKeyPairRequest
4079
4081
 
4080
4082
  CreateLaunchTemplateRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: Boolean, location_name: "DryRun"))
@@ -5772,6 +5774,7 @@ module Aws::EC2
5772
5774
  DescribeKeyPairsRequest.add_member(:key_names, Shapes::ShapeRef.new(shape: KeyNameStringList, location_name: "KeyName"))
5773
5775
  DescribeKeyPairsRequest.add_member(:key_pair_ids, Shapes::ShapeRef.new(shape: KeyPairIdStringList, location_name: "KeyPairId"))
5774
5776
  DescribeKeyPairsRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: Boolean, location_name: "dryRun"))
5777
+ DescribeKeyPairsRequest.add_member(:include_public_key, Shapes::ShapeRef.new(shape: Boolean, location_name: "IncludePublicKey"))
5775
5778
  DescribeKeyPairsRequest.struct_class = Types::DescribeKeyPairsRequest
5776
5779
 
5777
5780
  DescribeKeyPairsResult.add_member(:key_pairs, Shapes::ShapeRef.new(shape: KeyPairList, location_name: "keySet"))
@@ -8971,6 +8974,8 @@ module Aws::EC2
8971
8974
  KeyPairInfo.add_member(:key_name, Shapes::ShapeRef.new(shape: String, location_name: "keyName"))
8972
8975
  KeyPairInfo.add_member(:key_type, Shapes::ShapeRef.new(shape: KeyType, location_name: "keyType"))
8973
8976
  KeyPairInfo.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "tagSet"))
8977
+ KeyPairInfo.add_member(:public_key, Shapes::ShapeRef.new(shape: String, location_name: "publicKey"))
8978
+ KeyPairInfo.add_member(:create_time, Shapes::ShapeRef.new(shape: MillisecondDateTime, location_name: "createTime"))
8974
8979
  KeyPairInfo.struct_class = Types::KeyPairInfo
8975
8980
 
8976
8981
  KeyPairList.member = Shapes::ShapeRef.new(shape: KeyPairInfo, location_name: "item")
@@ -80,6 +80,28 @@ module Aws::EC2
80
80
  data[:tags]
81
81
  end
82
82
 
83
+ # The public key material.
84
+ # @return [String]
85
+ def public_key
86
+ data[:public_key]
87
+ end
88
+
89
+ # If you used Amazon EC2 to create the key pair, this is the date and
90
+ # time when the key was created, in [ISO 8601 date-time format][1], in
91
+ # the UTC time zone.
92
+ #
93
+ # If you imported an existing key pair to Amazon EC2, this is the date
94
+ # and time the key was imported, in [ISO 8601 date-time format][1], in
95
+ # the UTC time zone.
96
+ #
97
+ #
98
+ #
99
+ # [1]: https://www.iso.org/iso-8601-date-and-time-format.html
100
+ # @return [Time]
101
+ def create_time
102
+ data[:create_time]
103
+ end
104
+
83
105
  # @!endgroup
84
106
 
85
107
  # @return [Client]
@@ -631,6 +631,7 @@ module Aws::EC2
631
631
  # ],
632
632
  # },
633
633
  # ],
634
+ # key_format: "pem", # accepts pem, ppk
634
635
  # })
635
636
  # @param [Hash] options ({})
636
637
  # @option options [required, String] :key_name
@@ -649,6 +650,10 @@ module Aws::EC2
649
650
  # Default: `rsa`
650
651
  # @option options [Array<Types::TagSpecification>] :tag_specifications
651
652
  # The tags to apply to the new key pair.
653
+ # @option options [String] :key_format
654
+ # The format of the key pair.
655
+ #
656
+ # Default: `pem`
652
657
  # @return [KeyPair]
653
658
  def create_key_pair(options = {})
654
659
  resp = @client.create_key_pair(options)
@@ -2528,6 +2533,7 @@ module Aws::EC2
2528
2533
  # key_names: ["KeyPairName"],
2529
2534
  # key_pair_ids: ["KeyPairId"],
2530
2535
  # dry_run: false,
2536
+ # include_public_key: false,
2531
2537
  # })
2532
2538
  # @param [Hash] options ({})
2533
2539
  # @option options [Array<Types::Filter>] :filters
@@ -2559,6 +2565,10 @@ module Aws::EC2
2559
2565
  # without actually making the request, and provides an error response.
2560
2566
  # If you have the required permissions, the error response is
2561
2567
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
2568
+ # @option options [Boolean] :include_public_key
2569
+ # If `true`, the public key material is included in the response.
2570
+ #
2571
+ # Default: `false`
2562
2572
  # @return [KeyPairInfo::Collection]
2563
2573
  def key_pairs(options = {})
2564
2574
  batches = Enumerator.new do |y|
@@ -8997,6 +8997,7 @@ module Aws::EC2
8997
8997
  # ],
8998
8998
  # },
8999
8999
  # ],
9000
+ # key_format: "pem", # accepts pem, ppk
9000
9001
  # }
9001
9002
  #
9002
9003
  # @!attribute [rw] key_name
@@ -9023,13 +9024,20 @@ module Aws::EC2
9023
9024
  # The tags to apply to the new key pair.
9024
9025
  # @return [Array<Types::TagSpecification>]
9025
9026
  #
9027
+ # @!attribute [rw] key_format
9028
+ # The format of the key pair.
9029
+ #
9030
+ # Default: `pem`
9031
+ # @return [String]
9032
+ #
9026
9033
  # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPairRequest AWS API Documentation
9027
9034
  #
9028
9035
  class CreateKeyPairRequest < Struct.new(
9029
9036
  :key_name,
9030
9037
  :dry_run,
9031
9038
  :key_type,
9032
- :tag_specifications)
9039
+ :tag_specifications,
9040
+ :key_format)
9033
9041
  SENSITIVE = []
9034
9042
  include Aws::Structure
9035
9043
  end
@@ -22135,6 +22143,7 @@ module Aws::EC2
22135
22143
  # key_names: ["KeyPairName"],
22136
22144
  # key_pair_ids: ["KeyPairId"],
22137
22145
  # dry_run: false,
22146
+ # include_public_key: false,
22138
22147
  # }
22139
22148
  #
22140
22149
  # @!attribute [rw] filters
@@ -22174,13 +22183,20 @@ module Aws::EC2
22174
22183
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
22175
22184
  # @return [Boolean]
22176
22185
  #
22186
+ # @!attribute [rw] include_public_key
22187
+ # If `true`, the public key material is included in the response.
22188
+ #
22189
+ # Default: `false`
22190
+ # @return [Boolean]
22191
+ #
22177
22192
  # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairsRequest AWS API Documentation
22178
22193
  #
22179
22194
  class DescribeKeyPairsRequest < Struct.new(
22180
22195
  :filters,
22181
22196
  :key_names,
22182
22197
  :key_pair_ids,
22183
- :dry_run)
22198
+ :dry_run,
22199
+ :include_public_key)
22184
22200
  SENSITIVE = []
22185
22201
  include Aws::Structure
22186
22202
  end
@@ -43431,6 +43447,24 @@ module Aws::EC2
43431
43447
  # Any tags applied to the key pair.
43432
43448
  # @return [Array<Types::Tag>]
43433
43449
  #
43450
+ # @!attribute [rw] public_key
43451
+ # The public key material.
43452
+ # @return [String]
43453
+ #
43454
+ # @!attribute [rw] create_time
43455
+ # If you used Amazon EC2 to create the key pair, this is the date and
43456
+ # time when the key was created, in [ISO 8601 date-time format][1], in
43457
+ # the UTC time zone.
43458
+ #
43459
+ # If you imported an existing key pair to Amazon EC2, this is the date
43460
+ # and time the key was imported, in [ISO 8601 date-time format][1], in
43461
+ # the UTC time zone.
43462
+ #
43463
+ #
43464
+ #
43465
+ # [1]: https://www.iso.org/iso-8601-date-and-time-format.html
43466
+ # @return [Time]
43467
+ #
43434
43468
  # @see http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/KeyPairInfo AWS API Documentation
43435
43469
  #
43436
43470
  class KeyPairInfo < Struct.new(
@@ -43438,7 +43472,9 @@ module Aws::EC2
43438
43472
  :key_fingerprint,
43439
43473
  :key_name,
43440
43474
  :key_type,
43441
- :tags)
43475
+ :tags,
43476
+ :public_key,
43477
+ :create_time)
43442
43478
  SENSITIVE = []
43443
43479
  include Aws::Structure
43444
43480
  end
data/lib/aws-sdk-ec2.rb CHANGED
@@ -72,6 +72,6 @@ require_relative 'aws-sdk-ec2/customizations'
72
72
  # @!group service
73
73
  module Aws::EC2
74
74
 
75
- GEM_VERSION = '1.308.0'
75
+ GEM_VERSION = '1.309.0'
76
76
 
77
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.308.0
4
+ version: 1.309.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-22 00:00:00.000000000 Z
11
+ date: 2022-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sigv4