class AWS::IAM::ServerCertificateCollection

string will be returned.
prefix, only the certificates whose paths start with the given
option to any of the enumerator methods. When you pass a
You can limit the certificates returned by passing a :prefix
end
puts cert.name
certificates.each do |cert|
certificates:
Server certificate collections can also be used to enumerate
== Enumerating Server Certificates
certificate = certificates[‘MyCert’]

You can get a reference to a server certificate using array notation:
== Getting a Server Certificate by Name
Identity and Access Management</i>.
Creating and Uploading Server Certificates} in <i>Using AWS
{docs.amazonwebservices.com/IAM/latest/UserGuide/InstallCert.html<br>with IAM, see
For information about generating a server certificate for use
:private_key => my_private_key)
:certificate_body => my_certificate_body,
certificates.upload(:name => “MyCert”,
You can upload any valid, signed certificate using {#upload}.
== Uploading A Server Certificate
certificates = iam.server_certificates
iam = AWS::IAM.new
belonging to this account.
A collection that provides access to IAM server certificates

def [] name

Returns:
  • (ServerCertificate) - Returns a reference to the named

Parameters:
  • name (String) -- Name of the server certificate.
def [] name
  ServerCertificate.new(name, :config => config)
end

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

def each_item response, &block

def each_item response, &block
  response.server_certificate_metadata_list.each do |sc|
    certificate = ServerCertificate.new_from(:list_server_certificates,
                                             sc,
                                             sc.server_certificate_name,
                                             :config => config)
    yield(certificate)
  end
end