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
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.0.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-2.0.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-2.0.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.4.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.4.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.3.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.2.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.2.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.1.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-1.0.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.13.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.12.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.11.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.10.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.9.4 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.9.3 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.9.2 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.9.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-0.9.0 lib/fog/aws/requests/iam/delete_server_certificate.rb