class AWS::IAM::ServerCertificateCollection

def create options = {}

Returns:
  • (ServerCertificate) - The newly created server

Options Hash: (**options)
  • :certificate_chain (String) -- The contents of
  • :private_key (String) -- The contents of the
  • :path (String) -- The path for the server
  • :name (String) -- The name for the server
  • :certificate_body (String) -- The contents of the

Parameters:
  • options (Hash) -- Options for uploading the certificate.
def create options = {}
  client_opts = options.dup
  client_opts[:server_certificate_name] = client_opts.delete(:name)
  if path = client_opts[:path]
    client_opts[:path] = "/#{path}/".
      sub(%r{^//}, "/").
      sub(%r{//$}, "/")
  end
  resp = client.upload_server_certificate(client_opts)
  ServerCertificate.new(
    resp[:server_certificate_metadata][:server_certificate_name], 
    :config => config)
end