def secret_id(role_name, secret_id)
      opts = { secret_id: secret_id }
      json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/lookup", JSON.fast_generate(opts), {})
      return nil unless json
      return Secret.decode(json)
    rescue HTTPError => e
      if e.code == 404 || e.code == 405
        begin
          json = client.get("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/#{encode_path(secret_id)}")
          return Secret.decode(json)
        rescue HTTPError => e
          return nil if e.code == 404
          raise e
        end
      end

      raise
    end
def secret_id(role_name, secret_id)
      opts = { secret_id: secret_id }
      json = client.post("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/lookup", JSON.fast_generate(opts), {})
      return nil unless json
      return Secret.decode(json)
    rescue HTTPError => e
      if e.code == 404 || e.code == 405
        begin
          json = client.get("/v1/auth/approle/role/#{encode_path(role_name)}/secret-id/#{encode_path(secret_id)}")
          return Secret.decode(json)
        rescue HTTPError => e
          return nil if e.code == 404
          raise e
        end
      end

      raise
    end
Reads out the properties of a SecretID assigned to an AppRole.
 If the specified SecretID don't exist, +nil+ is returned.

 @example
   Vault.approle.role("testrole", "841771dc-11c9-...") #=> #<Vault::Secret lease_id="...">

 @param [String] role_name
   The name of the AppRole
 @param [String] secret_id
   SecretID belonging to AppRole

 @return [Secret, nil]