Sha256: 6cfe9fbddef936d4105314d0a04200307ae468abae6c956248bb4e1d0b6417e3

Contents?: true

Size: 1.41 KB

Versions: 98

Compression:

Stored size: 1.41 KB

Contents

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

        # Deletes the specified server certificate.
        #
        # ==== Parameters
        # * server_certificate_name<~String>: The name of the server certificate you want to delete.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'RequestId'<~String> - Id of the request
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/IAM/latest/APIReference/API_DeleteServerCertificate.html
        #
        def delete_server_certificate(server_certificate_name)
          request({
            'Action'                => 'DeleteServerCertificate',
            'ServerCertificateName' => server_certificate_name,
            :parser                 => Fog::Parsers::AWS::IAM::Basic.new
          })
        end
      end

      class Mock
        def delete_server_certificate(server_certificate_name)
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'RequestId' => Fog::AWS::Mock.request_id
          }

          unless self.data[:server_certificates].delete(server_certificate_name)
            raise Fog::AWS::IAM::NotFound.new("The Server Certificate with name #{server_certificate_name} cannot be found.")
          end

          response
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.29.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.28.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.27.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.26.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.25.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.24.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.23.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.22.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.21.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.21.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.20.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.19.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.18.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.17.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.16.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.15.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.14.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.13.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.12.0 lib/fog/aws/requests/iam/delete_server_certificate.rb