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.11.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.10.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.9.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.8.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.7.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.7 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.6 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.5 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.4 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.3 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.6.2 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.5.2 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.5.1 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.5.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.4.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.3.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.2.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
fog-aws-3.1.0 lib/fog/aws/requests/iam/delete_server_certificate.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/iam/delete_server_certificate.rb
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