Sha256: a5574d837e8a3d9aac3f38dea322d3b91cc8fae7b8a7ff36d3a8e7be7cb9fd37

Contents?: true

Size: 1.96 KB

Versions: 97

Compression:

Stored size: 1.96 KB

Contents

module Fog
  module AWS
    class IAM
      class Real
        require 'fog/aws/parsers/iam/list_server_certificates'

        # List server certificates
        #
        # ==== Parameters
        # * options<~Hash>:
        #   * 'Marker'<~String> - The marker from the previous result (for pagination)
        #   * 'MaxItems'<~String> - The maximum number of server certificates you want in the response
        #   * 'PathPrefix'<~String> - The path prefix for filtering the results
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'Certificates'<~Array> - Matching server certificates
        #       * server_certificate<~Hash>:
        #         * Arn<~String> -
        #         * Path<~String> -
        #         * ServerCertificateId<~String> -
        #         * ServerCertificateName<~String> -
        #         * UploadDate<~Time> -
        #       * 'IsTruncated'<~Boolean> - Whether or not the results were truncated
        #       * 'Marker'<~String> - appears when IsTruncated is true as the next marker to use
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_ListServerCertificates.html
        #
        def list_server_certificates(options = {})
          request({
            'Action'  => 'ListServerCertificates',
            :parser   => Fog::Parsers::AWS::IAM::ListServerCertificates.new
          }.merge!(options))
        end
      end

      class Mock
        def list_server_certificates(options = {})
          certificates = self.data[:server_certificates].values
          certificates = certificates.select { |certificate| certificate['Path'] =~ Regexp.new("^#{options['PathPrefix']}") } if options['PathPrefix']
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'Certificates' => certificates
          }

          response
        end
      end
    end
  end
end

Version data entries

97 entries across 95 versions & 6 rubygems

Version Path
fog-aws-3.10.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.9.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.8.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.7.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.7 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.6 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.5 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.4 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.3 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.6.2 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.5.2 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.5.1 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.5.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.4.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.3.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.2.0 lib/fog/aws/requests/iam/list_server_certificates.rb
fog-aws-3.1.0 lib/fog/aws/requests/iam/list_server_certificates.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/iam/list_server_certificates.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/iam/list_server_certificates.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/iam/list_server_certificates.rb